Results 1 to 4 of 4

Thread: need some help

  1. #1
    Join Date
    Nov 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default need some help

    ok so i wrote this script cause i want to learn scripting.
    Its been made in SCAR 1.13 and i want to keep it like that! because its for runescape classic
    i dont care about includes and other then basic codes just yet.

    ok so
    when you start the script while logged out, it logs in flawlessly, closes the black box and attacks chickens with right click ( bitmap ) now the thing is when u get logged out, the script doesnt log back in. Another problem is that after a while it creates lag and the game crashes.

    pls help me out here thnx





    var
    i, x, y, AttackChicken: integer;
    f: integer;

    username, password: string;

    procedure BitmapLoad;
    begin
    AttackChicken := BitmapFromString(51, 5,
    '000000FFFFFFFFFFFF000000000000FFFFFFFFFFFFFFFFFF0 00000' +
    'FFFFFFFFFFFFFFFFFF000000000000FFFFFFFFFFFFFFFFFFF FFFFF' +
    '000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF0000000 00000' +
    'FFFFFFFFFFFF000000000000FFFFFFFFFFFF0000000000000 00000' +
    '000000FFFF00FFFF000000000000000000000000000000000 00000' +
    'FFFF00FFFF00000000FFFF00FFFF00000000000000FFFFFFF FFFFF' +
    '000000000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF0 00000' +
    '000000FFFFFF000000000000000000FFFFFFFFFFFF000000F FFFFF' +
    'FFFFFF000000000000FFFFFFFFFFFF000000FFFFFFFFFFFF0 00000' +
    'FFFFFFFFFFFF000000000000000000000000000000FFFF00F FFF00' +
    '000000000000000000000000000000000000FFFF00FFFF00F FFF00' +
    '000000FFFF00FFFF00000000FFFFFFFFFFFF000000000000F FFFFF' +
    'FFFFFF000000000000FFFFFFFFFFFF0000000000000000000 00000' +
    'FFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFF0000000 00000' +
    '000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF0000000 00000' +
    '000000000000000000000000FFFF00FFFF000000000000000 00000' +
    '000000000000000000FFFF00FFFF00000000000000FFFF00F FFF00' +
    '000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF0000000 00000' +
    'FFFFFFFFFFFF000000000000000000FFFFFFFFFFFF000000F FFFFF' +
    'FFFFFF000000FFFFFFFFFFFF0000000000000000000000000 00000' +
    'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000 00000' +
    '000000FFFF00FFFF000000000000000000000000000000000 00000' +
    'FFFF00FFFF00000000000000FFFF00FFFF00FFFFFFFFFFFFF FFFFF' +
    'FFFFFF000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF0 00000' +
    '000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF000000F FFFFF' +
    'FFFFFF000000000000000000000000000000FFFFFFFFFFFF0 00000' +
    'FFFFFFFFFFFF000000000000000000000000000000FFFF00F FFF00' +
    '000000000000000000000000000000000000FFFF00FFFF000 00000' +
    '000000FFFF00FFFF00');

    end;

    begin
    username:= readln('username for ReLogin:');
    password:= readln('password for Relogin:');
    while (True) do
    begin
    if(GetColor(503,146)=3472636)and
    (GetColor(761,52)=15525068) then
    begin
    Writeln('Clearing Username and Password');
    ClickMouse(659,288,True);
    Wait(200 + random(50));
    Writeln('Selecting Existing User');
    ClickMouse(255 + random(5),287 + random(5),True);
    Wait(200 + random(50));
    Writeln('Attempting login #');
    ClickMouse(166 + random(5),263 + random(5),True);
    Wait(500 + random(50));
    SendKeysSilent(username);
    Wait(500 + random(50));
    ClickMouse(602,307,True);
    Wait(500 + random(50));
    SendKeysSilent(password);
    Wait(500 + random(50));
    ClickMouse(811,247,True);
    Wait(3000);
    ClickMouse(662,249,True);
    end;

    begin
    BitmapLoad;

    repeat
    i:= 0;
    if (FindColorSpiral (x, y, 41957, 418, 10, 927, 333)) or
    (FindColorSpiral (x, y, 234, 418, 10, 927, 333)) or
    (FindColorSpiral (x, y, 16185078, 1, 10, 375, 200)) then
    begin
    wait(500);
    ClickMouse (x, y, False);
    wait(1000);
    if (FindBitmap (AttackChicken, x, y)) then
    begin
    ClickMouse (x+2, y+2, True);
    repeat
    repeat
    f:= GetFightMode;
    if (f > 0) then
    begin
    i:= 9;
    f:= GetFightMode;
    end;
    until (f = 0);
    i:= i + 1;
    wait (100);
    until (i = 10);

    end;
    end;
    until (False);
    end;
    end;
    end.

  2. #2
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    You need to free your Bitmap. FreeBitmap(AttackChicken); That will help with the lag. I don't know anything about RSC so I can't help you with the login/out problem.

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  3. #3
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It would be extremely helpful if you put your code in scar tags.

    [scar.][/scar.] - Without out the period (.)

    And you have a pretty big bitmap which will cause a lot of lag. Get another bitmap, make sure it's smaller and the code is not more then about 3-5 lines.

    And it is best if you download the new includes and the new SCAR. There is already a log in procedure made for RSC that makes it easier. Instead of using ClickMouse you should use Mouse. You have two repeats right next to each-other. Also, your attack procedure is in your main loop.

    I'd definitely suggest you read a few more tutorials and how to get SCAR. You can either click the link in my signature for a tutorial on how to install the new SCAR or you can go here. I also have a beginner tutorial in the link with a few others. After you have your new SCAR, go here too.

  4. #4
    Join Date
    Nov 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    this topic can be closed.

    I fixed the script, working flawlessly now

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •