Naum
02-29-2008, 06:52 PM
I was playing around with walking function when i came up with an idea.
As we know more than 60% of runescape are full of trees and there is still no function that walks to the trees
Problem solved :)
I proudly present...
TreeWalk!!
{************************************************* *******************************
Function TreeWalk(WhatTree: String; x1, y1, x2, y2: Integer) : Boolean;
By: NaumanAkhlaQ
Description: Walks to a tree in a specified area, for use in the MiniMap
Direction: In the string 'WhatTree' the valid arguments are 'RareTree' and 'Tree'
************************************************** ******************************}
Function TreeWalk(WhatTree: String; x1, y1, x2, y2: Integer) : Boolean;
Var
Tree : array [0..2] of Integer;
i : Integer;
// x,y : Integer;
begin
Tree[0] := 2250789;
Tree[1] := 2315315;
Tree[2] := 2442328;
Begin
Case WhatTree of
'Tree': Begin
For i:= 0 to 2 do
If FindColorSpiralTolerance(x,y,Tree[i],x1,y1,x2,y2,48) then
Begin
Writeln('Tree Found!')
Result:= True;
Exit;
end else
Writeln('Tree Not Found, Exiting');
Exit;
end;
'RareTree' : Begin
If FindSymbolIn(x,y,'Tree',x1,y1,x2,y2) then
Begin
Writeln('Tree Found!')
Result:= True
Exit;
end else
Writeln('Tree Not Found, Exiting');
Exit;
end;
end;
end;
end;
Usage:
If TreeWalk('Tree',603, 38,609, 44) then
or
If TreeWalk('RareTree',605, 31,659, 4) then
A Quick example:
If TreeWalk('Tree',603, 38,609, 44) then
Begin
Location := Yews;
Mouse(x,y,1,1,true)
end;
Please post comments and suggestions.
Thanks
NaumanAkhlaQ!!!
As we know more than 60% of runescape are full of trees and there is still no function that walks to the trees
Problem solved :)
I proudly present...
TreeWalk!!
{************************************************* *******************************
Function TreeWalk(WhatTree: String; x1, y1, x2, y2: Integer) : Boolean;
By: NaumanAkhlaQ
Description: Walks to a tree in a specified area, for use in the MiniMap
Direction: In the string 'WhatTree' the valid arguments are 'RareTree' and 'Tree'
************************************************** ******************************}
Function TreeWalk(WhatTree: String; x1, y1, x2, y2: Integer) : Boolean;
Var
Tree : array [0..2] of Integer;
i : Integer;
// x,y : Integer;
begin
Tree[0] := 2250789;
Tree[1] := 2315315;
Tree[2] := 2442328;
Begin
Case WhatTree of
'Tree': Begin
For i:= 0 to 2 do
If FindColorSpiralTolerance(x,y,Tree[i],x1,y1,x2,y2,48) then
Begin
Writeln('Tree Found!')
Result:= True;
Exit;
end else
Writeln('Tree Not Found, Exiting');
Exit;
end;
'RareTree' : Begin
If FindSymbolIn(x,y,'Tree',x1,y1,x2,y2) then
Begin
Writeln('Tree Found!')
Result:= True
Exit;
end else
Writeln('Tree Not Found, Exiting');
Exit;
end;
end;
end;
end;
Usage:
If TreeWalk('Tree',603, 38,609, 44) then
or
If TreeWalk('RareTree',605, 31,659, 4) then
A Quick example:
If TreeWalk('Tree',603, 38,609, 44) then
Begin
Location := Yews;
Mouse(x,y,1,1,true)
end;
Please post comments and suggestions.
Thanks
NaumanAkhlaQ!!!