Amsterdamn
10-22-2012, 11:44 PM
Hi. I've made countless scripts using simba for a private server. However I'm having trouble with my woodcutting + firemaking one. I can't figure out how to make it detect if you have a full inventory of logs, so i can stop chopping and just start burning them. Any ideas on how?
Here is the script...
program Chopperd;
{$i SRL/SRL.simba}
const
Tree = 4287091;
var
x, y:Integer;
Procedure Choppyss;
begin
if (FindColorSpiralTolerance (x, y, Tree, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Mouse (x, y, 5, 5, true);
wait (20000);
end;
begin
if (FindColorSpiralTolerance (x, y, Tree, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Mouse (x, y, 5, 5, true);
wait (20000);
end;
begin
if (FindColorSpiralTolerance (x, y, Tree, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Mouse (x, y, 5, 5, true);
wait (20000);
end;
begin
if (FindColorSpiralTolerance (x, y, Tree, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Mouse (x, y, 5, 5, true);
wait (20000);
end;
begin
if (FindColorSpiralTolerance (x, y, Tree, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Mouse (x, y, 5, 5, true);
wait (20000);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
end;
end;
end;
end;
end;
Procedure main;
begin
repeat
Choppyss;
until(IsKeyDown (114)); //Press f3 to stop
end;
begin
ClearDebug;
SetUpSrl;
SRL_EnableNavBar; // Added for offset for new navbar at the top, otherwise it will get the wrong coordinates
ActivateClient;
main;
end.
Here is the script...
program Chopperd;
{$i SRL/SRL.simba}
const
Tree = 4287091;
var
x, y:Integer;
Procedure Choppyss;
begin
if (FindColorSpiralTolerance (x, y, Tree, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Mouse (x, y, 5, 5, true);
wait (20000);
end;
begin
if (FindColorSpiralTolerance (x, y, Tree, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Mouse (x, y, 5, 5, true);
wait (20000);
end;
begin
if (FindColorSpiralTolerance (x, y, Tree, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Mouse (x, y, 5, 5, true);
wait (20000);
end;
begin
if (FindColorSpiralTolerance (x, y, Tree, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Mouse (x, y, 5, 5, true);
wait (20000);
end;
begin
if (FindColorSpiralTolerance (x, y, Tree, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Mouse (x, y, 5, 5, true);
wait (20000);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
begin
Mouse (724, 443, 0, 0, true);
wait (100);
Mouse (684, 442, 0, 0, true);
wait (100);
end;
end;
end;
end;
end;
end;
Procedure main;
begin
repeat
Choppyss;
until(IsKeyDown (114)); //Press f3 to stop
end;
begin
ClearDebug;
SetUpSrl;
SRL_EnableNavBar; // Added for offset for new navbar at the top, otherwise it will get the wrong coordinates
ActivateClient;
main;
end.