Help me with getting this to repeate?

Discussion in 'Scar/Simba Help' started by JasonManson, Nov 10, 2007.

Help me with getting this to repeate?
  1. Unread #1 - Nov 10, 2007 at 11:50 PM
  2. JasonManson
    Joined:
    Apr 22, 2007
    Posts:
    71
    Referrals:
    0
    Sythe Gold:
    0

    JasonManson Member

    Help me with getting this to repeate?

    All im having toruble with now is makingmy script repeat. I have the sleep, and the autofighting.. but for some reason i cant get it to say, kill 100 things and then sleep, then kill 100 things and sleep.. ect... heres what i have, any help would be great!

    It is a script for RSC by the way if that helps.

    program AutoFighter;

    const
    MonColor1= 8752875;
    MonColor2= 10924523; //monster colors go here
    MonColor3= 9673963;

    var
    SleepBag: Integer;
    Att: Integer;
    x,y: Integer;
    i: Integer;

    procedure LoadBmps;
    begin
    SleepBag := BitmapFromString(57, 34, 'beNrtmCFuw0AQRY0Kc4ge' +
    'oDAsLCWFVaSigFygJNC0KqpZQUlgUFHOEJ7cI1J5YCba6Gs6s 7vey' +
    'N71AK9GlmU78dP33z9eV9U4yo/N+6xePL0+X2s6ebAPKcogZwiV5L' +
    'UDzFE18Gq5wj4/OyCnpiXIpmk+P97cQX6NkH0QVMD8fO2oBGSItgC' +
    'wl5PKcXpPRWizusKL+r1+Of7W59P2XlQ3AfMB000JmBdBghMH 04XN' +
    'lxjA+If6d8BBbNNpaT664oLw6iIsLzx9ofZ+/hii5cwOknIDp0LVB' +
    'RX/7DVAxAZAdeFGU9KlcYrbOwpLBuAeaKUVEdeaHv22EqCmO6GV09 ' +
    'vB+wqHEG0IlXxOFf9VpijWtBqAR5w2eRlOr43F3bHlqLiAuol 4Crm' +
    '7W3yCcFXBhp1ikmpgRJOgdY1DEAJbhGGZ10ivPrd8U41DG4A7 ocyr' +
    'o761jmKucC+tqsehu0Yk3wZf+wgDhwxgZKWG6WNZ0njj4Alga sGOl' +
    'NDvYNa+gegQtvkNJMRsUNJxjKPruACr07rt');

    Att := BitmapFromString(40, 14, 'beNrtU0kSABAM8/9P14lBI13MO' +
    'Bg5VUPTTSkflyENixPaoZhR3fHoiZDQ7Re01ujXlM5zly3Mge hC2/' +
    'kQsmldWB0ph3Q7quusSGZwNtpzU9dkc7P2zJdMyvw+u30mS37 +Ex9' +
    'BBSEb0jw=');
    end;

    procedure Sleep;
    begin // Begins Procedure
    Wait(1000+random(20));
    MoveMouseSmooth(497,42); //Opens Inventory
    Wait(1000+random(20));
    if (FindBitmap(SleepBag,x,y)) then //Finds Sleeping Bag
    begin //Begins IF
    Wait(1000);
    MoveMouseSmooth(x+20,y+15);; //moves mouse to sleeping bag
    Wait(1000+random(20))
    ClickMouse(x+20,y+15,True); //Clicks on Sleeping bag
    Wait(2000+random(20));
    end; //Ends IF
    end; //Ends Procedure

    procedure Fight; //Fights
    begin
    if(FindColor(x,y,MonColor1,0,0,600,600)) or
    (FindColor(x,y,MonColor2,0,0,600,600)) or //finds monster
    (FindColor(x,y,MonColor3,0,0,600,600)) then
    MoveMouse(x,y+random(2));
    Wait(500+random(90))
    ClickMouse(x,y,False)
    Wait(1000+random(90));
    if(FindBitmap(Att,x,y)) then //attacks and such
    Wait(1000+random(90));
    MoveMouse(x+20,y+8);
    Wait(1000+random(90));
    ClickMouse(x+20,y+8,True);
    Wait(15000+random(90)); //gives 15 secconds to kill it
    end;

    Procedure Action; //this brings it all together and makes it repeate
    begin
    repeat
    i:= i + 1;
    Fight;
    until (i>=100);
    Sleep;
    Action;
    end;

    begin
    LoadBmps;
    Action;
    end.
     
  3. Unread #2 - Nov 11, 2007 at 9:44 AM
  4. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    Help me with getting this to repeate?

    Use if (Boolean) then begin "etc" end;
     
< Total noob question but.... | i might be stupid but... >

Users viewing this thread
1 guest


 
 
Adblock breaks this site