SRL Archive - OSR Help

Learning how to script yet my script wont chop the tree.


tigerkungfu

2013-03-25 01:58:45

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?

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;

Brid Mayhem

2013-03-25 02:22:03

From: tigerkungfu
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?

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;


Use things like 'hop down' 'own' ect, try not putting the first letter