Need help with first script

Discussion in 'Scar/Simba Help' started by thomis, Jul 5, 2007.

Need help with first script
  1. Unread #1 - Jul 5, 2007 at 9:54 AM
  2. thomis
    Joined:
    Jun 12, 2007
    Posts:
    8
    Referrals:
    0
    Sythe Gold:
    0

    thomis Newcomer

    Need help with first script

    I need some help with my feather buyer (it's my first script).

    It doesn't switch to the Internet window and right-clicks in the scar program.
    If someone would help me, that would be really nice.


    Code:
    program MyFeatherBuyer;
    {.include SRL\SRL.scar}
    
    var
       bought, iter : integer;
    
    
    Procedure DoBuy; //One click of buy
    begin
         Mouse(370,73,20,20,false);
         begin
              ClickOption('Buy 10',1);
              bought := bought + 10;
         end;
    end;
    
    Procedure MyReport; //Randoms and purchases report
    begin
         SRLRandomsReport;
         Writeln('');
         Writeln('We have bought ' + IntToStr(bought) + ' feathers.');
         Writeln('');
    end;
    
    begin
     SetupSRL;
         bought := 0;
         iter := 0;;
     repeat
       DoBuy;
       iter := iter + 1;
       Wait(5000 + random(2000));
       FindNormalRandoms;
     until (iter = 1799);
     MyReport;
    end.
     
  3. Unread #2 - Jul 5, 2007 at 10:07 AM
  4. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    Need help with first script

    Put ActivateClient; after SetupSRL.
     
  5. Unread #3 - Jul 5, 2007 at 10:19 AM
  6. thomis
    Joined:
    Jun 12, 2007
    Posts:
    8
    Referrals:
    0
    Sythe Gold:
    0

    thomis Newcomer

    Need help with first script

    thanks, you really helped me out
     
< Help! | Im Typing In Capital Letters Because I Want You To Read This >

Users viewing this thread
1 guest


 
 
Adblock breaks this site