Robot91292
2013-03-01 03:44:24
So I'm trying to write a simple script to steal from the nature rune chest. I know its a very nooby script but its meant to be baby sat mostly. Just want it to make it so you don't have to focus so much.
I need help with finding a way know when the chest is open, right now I'm using the gold lock when its there its closed when its gone its open. This seems to only work half the time and is not stable.
Here is what I have so far. Any help is very much appreciated!
I need help with finding a way know when the chest is open, right now I'm using the gold lock when its there its closed when its gone its open. This seems to only work half the time and is not stable.
Here is what I have so far. Any help is very much appreciated!
program ChestThief;
{.include srl/srl.simba}
Procedure ChestClosed;
Var
x,y:integer;
Begin
SetupSRL;
Repeat wait(100) Until
FindColorTolerance(x,y,6908273,195,146,279,179,3)//Finds trim color of chest to right click
If FindColorTolerance(x,y,6908273,195,146,279,179,3) Then
begin;
SetupSRL;
Repeat
Wait(RandomRange(100, 1200));
Mouse(x,y,2,2,False); //right clicks to bring up disarm option
Wait(200)
Mouse(x-10,y+43,2,2,True); //clicks disarm option
Until
not FindColorTolerance(x,y,1083273,195,146,279,179,55) //repeats clicking disarm option until chest opens
end;
end;
Procedure IsChestOpen;
Var
x,y:integer;
Begin
SetupSRL;
Repeat wait(100) Until
not FindColorTolerance(x,y,1083273,195,146,279,179,55) //finds color of lock on chest
If not FindColorTolerance(x,y,1083273,195,146,279,179,55) Then //when lock is not found it knows its open
SetupSRL;
WriteLn('Chest is open')
wait(RandomRange(12000, 14000)); //random time before spam clicking disarm
end;
Begin
IsChestOpen;
ChestClosed;
End.