Learning how to script yet my script wont chop the tree.
Hey I am following a video tutorial on scripting down my first tree and I am having a problem. Im trying to make a PowerChopper. However The mouse constantly is searching for the trees and its just moving the cursor without clicking on it. Maybe you could inform me to why its not clicking the tree?
Code:
Function ChopDownTree: Boolean;
Var
X, Y: Integer;
begin
If FindObjCustom(x, y, ['chop', 'down', 'p d'], [3957891 ,4353678 ], 20) Then
WriteLn('We found a tree');
GetMousePos(X, Y);
Case Random(2) of
0: mouse(X, Y, 5, 5, True);
1: Begin
Mouse(X, Y, 5, 5, False);
WaitOption('Chop', 100);
End;
end;
end;