Results 1 to 5 of 5

Thread: need some help ;)

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

    Default need some help ;)

    this script i made is for RSC. The script works flawless!
    its been made in scar 113 and i want to keep it like that.

    now where you can help me with the script is as you can see i have autologin at the begin and at the end because it would log me in when im logged out but when i get logged out, it wouldnt relog me. So thats why the relogin part is 2 times in there. I want this removed somehow, just cannot figure out how.
    now another thing is, whilst im running the script, it attacks a chicken but when it attacks the same chicken again im already fighting, then the cient crashes.

    thx

    Script
    ~~~~~~~~~~~~~~

    var
    x, y, Attack, takefe: integer;


    username, password: string;

    procedure BitmapLoad;
    begin
    Attack := BitmapFromString(11, 13,
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '000000000000000000000000000000000000000000FFFFFFF FFFFF' +
    'FFFFFF000000000000000000000000FFFFFF0000000000000 00000' +
    'FFFFFFFFFFFFFFFFFF000000000000000000FFFFFFFFFFFF0 00000' +
    '000000FFFFFFFFFFFF000000FFFFFFFFFFFF000000000000F FFFFF' +
    'FFFFFFFFFFFF000000FFFFFFFFFFFF000000FFFFFFFFFFFF0 00000' +
    '000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF000000F FFFFF' +
    'FFFFFF000000000000FFFFFFFFFFFF000000000000FFFFFFF FFFFF' +
    '000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF0000000 00000' +
    'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFF FFFFF' +
    '000000000000FFFFFF000000000000000000FFFFFFFFFFFF0 00000' +
    'FFFFFFFFFFFF000000000000FFFFFF000000000000000000F FFFFF' +
    'FFFFFF000000000000FFFFFFFFFFFF0000000000000000000 00000' +
    '000000000000000000000000000000000000000000000000' );
    takefe := BitmapFromString(19, 14,
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '000000000000000000000000FF9040FF9040FF9040FF9040F F9040' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '000000000000000000000000000000FF9040FF90400000000 00000' +
    '000000000000000000000000000000000000FFFFFFFFFFFFF FFFFF' +
    'FFFFFF000000000000000000000000000000FF9040FF90400 00000' +
    '000000000000000000000000FF9040000000FFFFFFFFFFFF0 00000' +
    '000000FFFFFFFFFFFF000000000000000000000000FF9040F F9040' +
    '000000000000000000000000FF9040FF9040000000FFFFFFF FFFFF' +
    '000000000000FFFFFFFFFFFF000000000000000000000000F F9040' +
    'FF9040FF9040FF9040FF9040000000FF9040FF9040000000F FFFFF' +
    'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000 00000' +
    'FF9040FF9040000000000000000000000000FF9040FF90400 00000' +
    'FFFFFFFFFFFF0000000000000000000000000000000000000 00000' +
    '000000FF9040FF9040000000000000000000000000FF9040F F9040' +
    '000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF0000000 00000' +
    '000000000000FF9040FF9040000000000000000000000000F F9040' +
    'FF9040000000000000FFFFFFFFFFFFFFFFFFFFFFFF0000000 00000' +
    '000000000000000000FF9040FF90400000000000000000000 00000' +
    '000000FF90400000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '0000000000000000000000000000000000000000000000000 00000' +
    '000000000000000000000000000000');

    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;


    if (FindColorSpiral (x, y, 234, 418, 10, 927, 333)) or
    (FindColorSpiral (x, y, 16185078, 418, 10, 927, 333)) or
    (FindColorSpiral (x, y, 41957, 1, 10, 375, 200)) or
    (FindColorSpiral (x, y,12105912, 418, 10, 927, 333))then
    begin
    Wait(500);
    ClickMouse (x, y, False);
    wait(500);
    if (FindBitmap (Attack, x, y)) or
    (FindBitmap (takefe, x, y)) then
    begin
    ClickMouse (x+2, y+2, True);
    end;

    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;
    end;
    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

    Didn't you make a thread about this already? Try something like
    SCAR Code:
    if(FindBitmap(Attack, x, y))then
    begin
      ClickMouse(x, y, True);
      repeat
        Wait(1000);
      until(not(FindBitmap(Attack, x, y)));
    end;

    Also, please put your code into [.scar][./scar] (with no periods) tags.

    ~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
    Nov 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nope that didnt fix it.

    i think i have to work with procedures because my whole script is 1 big loop.
    but i dont know how to do seperate the procedures.

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

    Default

    SCAR Code:
    procedure ProcedureName;
    begin
    end;

    begin
      ProcedureName;
    end.

    ~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.


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

    Default

    i know how a procedure is build but the when i do
    procedure login (it wont ask me user and psw)
    so i left that procedure out ok it works like it was so i made a procedure of the attack monster
    then scar forces me to use a (end.) after te login. but then ofcourse the only thing it does is log me in. Guess im pretty much stuck

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
  •