SRL Archive - Help and Support

help


canofpeople

2006-04-14 16:29:48

problem is it works but keeps clicking the tree fast any help would be great its not done yet i still have to add antirandoms and drop logs proc

program Woodcutter;
{.include SRL\SRL.scar}

const treecolor1=5281928;
const treecolor2=3237976;
const treecolor3=6594712;

function Chopping:Boolean;
begin
Result:=False
If(Getcolor(189,407)=0) or (getcolor(40,409)=0) or (Getcolor(134,409)=0) then
begin
Result:=True
end;
end;

function FindTree:Boolean;
begin
Result:=False
SleepAndMoveMouse (1000+Random(4000))
x:=251
y:=166
If(FindColorSpiralTolerance(x,y,treecolor1,5,5,515,337,5))or
(FindColorSpiralTolerance(x,y,treecolor2,5,5,515,337,5))or
(FindColorSpiralTolerance(x,y,treecolor3,5,5,515,337,5))Then
begin
MMouse (x,y,0,0)
If(Option2('Chop down'))Then
begin
Result:=True
end;
end;
end;

procedure ChopTree;
begin
MMouse(x, y, 0, 0)
if(Option2('Chop down'))then
begin
Mouse(x, y, 0, 0, true)
if(Chopping)then
begin
choptree;
repeat
until(Getcolor(105,426)=0)
end;
end;
end;


procedure Setup;
begin
SetupSRL;
ActivateClient;
end;

{==========================Main Loop==================================}

begin
Setup;
repeat;
if(findtree)then
begin
ChopTree
end;
until(false)
end.

--------------------------------------------------------------------------------

WhiteShadow

2006-04-15 00:58:29

begin
Setup;
repeat;
if(findtree)then
begin
ChopTree
end;
until(false)
end.

It's fast because k, watch. I'll explain what your doing. As soon as it finds a tree it does ChopTree. Choptree clicks the tree. Then it repeats so it clicks the tree over and over again.
I'm not very good at tree scripts. I suggest you do some sort of procedure that waits while until not find treecol in front of you, a regular wait or the ischatmessage thing.