SRL Archive - OSR Help

Anti-leach help. cant figure it out.


Jekora

2013-03-13 10:01:41

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.

litoris

2013-03-13 10:48:18

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:
 repeat
Learn;
wait(RandomRange(200, 500));
until(start)

Jekora

2013-03-13 10:56:09

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.

litoris

2013-03-13 11:15:23

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)

Jekora

2013-03-13 11:22:56

FIXED IT

Thanks alot! <3