timmyboy
2006-05-02 09:43:13
Same thing as the new MineDone, except this one if for tree's.
{*******************************************************************************
function ChopDone(Mtime: Integer): Boolean;
By: Timmyboy
Description: Returns true if you cut a tree, false if not.
Remember to set time-out(Mtime). Must be the max time you think it will take for your
character to cut the tree.
*******************************************************************************}
function ChopDone: Boolean;
var
Wmark: Integer;
begin
MarkTime(Wmark);
if(FindChatText('swing your axe'))then
begin
repeat
wait(500+random(400));
until(FindChatText('get some')) or (TimeFromMark(Wmark)>Mtime);
if(FindChatText('get some'))then
begin
Result:=true;
end else
if (TimeFromMark(Wmark)>Mtime)then
begin
Result:=false;
end;
end;
end;