kozak94
2014-12-11 21:26:39
Hey guys, I put together a very rough script to get some smithing levels up. I would like to add anti-ban and add more control in terms of choosing the Iron i/ii/iii ingot bars. Any tips, or references to guides available? I keep getting an error that I did not receive before and I was wondering what has changed. Thank you for your help =)
Error: print('TRSProductionScreen.getType(): result = ' + toStr(result), TDebug.SUB);
Error: Unknown declaration "TRSInterface" at line 31
Compiling failed.
Error: Operator expected at line 340
Compiling failed.
Error: Operator expected at line 340
Compiling failed.
Error: Operator expected at line 340
Compiling failed.
program ArtisanSmelter;
{$DEFINE SMART}
{$I SRL-6/SRL.Simba}
procedure withDraw();
var
draw: TBox; //declare TBox variable
begin
draw := intToBox(273, 149, 303, 170); //top left, bottom right points
mouseBox(draw, MOUSE_LEFT); //left click
wait(randomRange(3500, 4441));
end;
procedure waiiit();
begin wait(randomRange(3500, 4441));
end;
procedure acceptButton();
var
x, y: integer;
begin
wait(randomRange(1113,2546));
while not productionScreen.isOpen() do wait(1);
KeyDown(VK_SPACE);
wait(randomRange(123,936));
KeyUp(VK_SPACE);
sleepAndMoveMouse(1000 + random(2000));
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(168325, 198512));
end;
procedure anvil();
var
settingsButton: TBox; //declare TBox variable
begin
settingsButton := intToBox(455, 193, 463, 210); //top left, bottom right points
mouseBox(settingsButton, MOUSE_LEFT); //left click
wait(randomRange(3500, 4441));
end;
procedure waitSmith();
begin
wait(randomRange(126000, 130000));
end;
procedure waitSmithtwo();
begin
wait(randomRange(136000, 140000));
end;
procedure deposit();
var
settingsButton: TBox; //declare TBox variable
begin
settingsButton := intToBox(248, 149, 268, 168); //top left, bottom right points
mouseBox(settingsButton, MOUSE_LEFT); //left click
wait(randomRange(3500, 4441));
end;
procedure walk();
var
settingsButton: TBox; //declare TBox variable
begin
settingsButton := intToBox(163, 183, 177, 197); //top left, bottom right points
mouseBox(settingsButton, MOUSE_LEFT); //left click
wait(randomRange(3500, 4441));
end;
procedure antiban;
var
i: integer;
begin
i := random(2000);
case i of
1..3: randomRClickItem();
4..5: sleepAndMoveMouse(randomrange(1000, 1500));
6..7: wait(randomrange(8000, 12000));
8..10: randomCameraAngle(MS_ANGLE_HIGH);
11..15: smallRandomMouse();
16..18: mouseOffClient(OFF_CLIENT_TOP);
19..21: mouseOffClient(OFF_CLIENT_RANDOM);
end;
end;
begin
clearDebug();
setupSRL();
repeat // these 3 procedures will repeat forever
withDraw();
acceptButton();
anvil();
waiiit();
acceptButton();
waitSmith();
antiban();
waitSmithtwo();
deposit();
walk();
Withdraw();
until false;
end
Error: print('TRSProductionScreen.getType(): result = ' + toStr(result), TDebug.SUB);
Error: Unknown declaration "TRSInterface" at line 31
Compiling failed.
Error: Operator expected at line 340
Compiling failed.
Error: Operator expected at line 340
Compiling failed.
Error: Operator expected at line 340
Compiling failed.
program ArtisanSmelter;
{$DEFINE SMART}
{$I SRL-6/SRL.Simba}
procedure withDraw();
var
draw: TBox; //declare TBox variable
begin
draw := intToBox(273, 149, 303, 170); //top left, bottom right points
mouseBox(draw, MOUSE_LEFT); //left click
wait(randomRange(3500, 4441));
end;
procedure waiiit();
begin wait(randomRange(3500, 4441));
end;
procedure acceptButton();
var
x, y: integer;
begin
wait(randomRange(1113,2546));
while not productionScreen.isOpen() do wait(1);
KeyDown(VK_SPACE);
wait(randomRange(123,936));
KeyUp(VK_SPACE);
sleepAndMoveMouse(1000 + random(2000));
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(168325, 198512));
end;
procedure anvil();
var
settingsButton: TBox; //declare TBox variable
begin
settingsButton := intToBox(455, 193, 463, 210); //top left, bottom right points
mouseBox(settingsButton, MOUSE_LEFT); //left click
wait(randomRange(3500, 4441));
end;
procedure waitSmith();
begin
wait(randomRange(126000, 130000));
end;
procedure waitSmithtwo();
begin
wait(randomRange(136000, 140000));
end;
procedure deposit();
var
settingsButton: TBox; //declare TBox variable
begin
settingsButton := intToBox(248, 149, 268, 168); //top left, bottom right points
mouseBox(settingsButton, MOUSE_LEFT); //left click
wait(randomRange(3500, 4441));
end;
procedure walk();
var
settingsButton: TBox; //declare TBox variable
begin
settingsButton := intToBox(163, 183, 177, 197); //top left, bottom right points
mouseBox(settingsButton, MOUSE_LEFT); //left click
wait(randomRange(3500, 4441));
end;
procedure antiban;
var
i: integer;
begin
i := random(2000);
case i of
1..3: randomRClickItem();
4..5: sleepAndMoveMouse(randomrange(1000, 1500));
6..7: wait(randomrange(8000, 12000));
8..10: randomCameraAngle(MS_ANGLE_HIGH);
11..15: smallRandomMouse();
16..18: mouseOffClient(OFF_CLIENT_TOP);
19..21: mouseOffClient(OFF_CLIENT_RANDOM);
end;
end;
begin
clearDebug();
setupSRL();
repeat // these 3 procedures will repeat forever
withDraw();
acceptButton();
anvil();
waiiit();
acceptButton();
waitSmith();
antiban();
waitSmithtwo();
deposit();
walk();
Withdraw();
until false;
end