Results 1 to 5 of 5

Thread: Anti-leach help. cant figure it out.

  1. #1
    Join Date
    Mar 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Anti-leach help. cant figure it out.

    hello, im very new to all this scripting stuff, and i need help fixing this one.

    program Buyer;
    {$I SRL\SRL.Simba}
    {$I P07Include.Simba}
    var n, x, y, amount: integer;
    var start: boolean;
    procedure Learn;
    begin
    if (IsMouseButtonDown(1) = true) then
    begin
    GetMousePos(x,y);
    start := true
    end;
    end;
    procedure Buy;
    begin
    MMouse(x, y, 5, 5);
    wait(RandomRange(20,70))
    ClickMouse2(mouse_right);
    P07_ChooseOptionMulti(['10']);
    end;
    begin
    SetupSRL;
    SetupP07Include;
    P07_MakeCameraAngleHigh;
    P07_MakeCompassNorth;
    IsMouseButtonDown(1); //the command is flawed and it needs to update using this)
    amount := 110; // this must be a multiple of ten
    WriteLn('Double click the item you wish the buy/sell ' + IntToStr(amount) + ' of.')
    n :=0
    repeat
    Learn;
    wait(RandomRange(200, 500));
    until(start)
    repeat
    n := (1+n)
    Buy;
    writeln('Bought or Sold: ' + IntToStr(n*10),
    wait(RandomRange(500, 1000)),
    until((10*n)=amount)
    end.

  2. #2
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    It seems like you need to click and hold your first mouse button until the script starts doing stuff.
    You can just remove this part to get it to run:
    Simba Code:
    repeat
     Learn;
     wait(RandomRange(200, 500));
     until(start)
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

  3. #3
    Join Date
    Mar 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Now im getting: [Error] C:\Users\Jekora\Downloads\ShopBuyer1.0.simba(36:1) : Syntax error at line 35
    Compiling failed.



    EDIT:
    Now getting: C:\Simba\Scripts\ShopBuyer1.0 (1).simba(36:23): Identifier expected at line 35
    Compiling failed.



    program Buyer;
    {$I SRL\SRL.Simba}
    {$I P07Include.Simba}
    var n, x, y, amount: integer;
    var start: boolean;
    procedure Learn;
    begin
    if (IsMouseButtonDown(1) = true) then
    begin
    GetMousePos(x,y);
    start := true
    end;
    end;
    procedure Buy;
    begin
    MMouse(x, y, 5, 5);
    wait(RandomRange(20,70))
    ClickMouse2(mouse_right);
    P07_ChooseOptionMulti(['10']);
    end;
    begin
    SetupSRL;
    SetupP07Include;
    P07_MakeCameraAngleHigh;
    P07_MakeCompassNorth;
    IsMouseButtonDown(1); //the command is flawed and it needs to update using this)
    amount := 110; // this must be a multiple of ten
    WriteLn('Double click the item you wish the buy/sell ' + IntToStr(amount) + ' of.')
    n :=0
    repeat
    n := 1+n
    Buy;
    writeln('Bought or Sold: ' + IntToStr(n*10))
    wait(RandomRange(500,1000))
    until((10*n) = amount))
    end.
    Last edited by Jekora; 03-13-2013 at 03:00 PM.

  4. #4
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    There is also supposed to be a semi colon at the end of every line... many lines are missing it in what you posted.
    example:
    start := true;
    end;
    n:= 0;
    begin (no semicolon)
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

  5. #5
    Join Date
    Mar 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    FIXED IT

    Thanks alot! <3
    Last edited by Jekora; 03-13-2013 at 03:25 PM.

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
  •