Infantry001
2006-07-02 14:41:05
heres my script. when i run it, its looks for a tree, finds it, and clicks it, and then scar freezes up, and im left with a moving mous that wont stop movin in hte same position over and over agan. i cant stop the script cuz scar is frozen. any ideas?
program WillowCutter;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\woodcutting.scar}
var willow: integer;
const
Nick = 'Write 3-4 letters of your username here';
TreeColor1=2914408; //Set three tree colors here
TreeColor2=2127968;
TreeColor3=4358256;
CutTime=15; //Set time in seconds to wait before cutting down another tree
Procedure welcome;
begin
ClearDebug
writeln('////////////////////\\\\\\\\\\\\\\\\\\\\')
writeln('/ Welcome to Infantry001''s \')
writeln('/ WillowCutter! \')
writeln('/ \')
writeln('/ Hope you enjoy it! \')
writeln('////////////////////\\\\\\\\\\\\\\\\\\\\')
wait(2000);
readln('Welcome to my Willow-cutter. Enjoy, and remember, keep on auto-ing!')
end;
Procedure setup;
begin
FixChat
SetupDemon
FindAxeHeadColor
end;
Procedure loadbitmaps;
begin
willow := BitmapFromString(13, 14, 'z78DA333018C1C0D9D5D9D5' +
'104A52A20659A5B1ABA18BABA185A19381194E35C4BB6DA898861' +
'94A949B862932D44D8300B05E2889641A8A08A9C008AC17833434' +
'07B91042926A24B25EFCE60000859CDB64');
end;
Procedure randoms;
begin
FindHead;
FindEnt(TreeColor1);
end;
Procedure CutLogs;
var x,y: integer;
var x1,y1: integer;
begin
repeat
if(FindColorTolerance(x,y,treecolor1, 4,1,515,337,5))or(FindColorTolerance(x,y,treecolor2, 5,4,515,337,5))or(FindColorTolerance(x,y,treecolor3, 5,4,515,337,5))then
MMouse(x,y,3,3)
wait(500+random(50));
if(FindBitmapToleranceIn(willow,x1,y1,80,5,100,20,2))then;
CMouse(x,y,3,3,true)
wait(CutTime * 1000+random(500));
until(InvFull);
end;
begin
welcome;
SetupSRL;
ActivateClient;
setup;
NickNameBMP := CreateBitmapMaskFromText(Nick, UpChars);
loadbitmaps;
wait(500);
repeat
Antiban;
FindNormalRandoms;
randoms;
CutLogs;
DropAllLogs;
wait(500);
until(false);
end.