Gu3st...
2008-08-15 20:41:12
function WalkToPoint(TileX, TileY, Rx, Ry, Tryes: Integer): Boolean;
var
Tw, MyPosPoint: TPoint;
I : Integer;
begin
Tw := TiletoMM(Point(Tilex, Tiley));
if(not InCircle(Tw.x, Tw.y, MMCX, MMCY, 74))then
begin
Writeln('Tile off minimap!');
while I > Tryes do
begin
MyPosPoint := GetMyPos;
if TileX >= MyPosPoint.X and TileY >= MyPosPoint.Y then
begin
end else
if TileX <= MyPosPoint.X and TileY >= MyPosPoint.Y then
begin
end else
if TileX <= MyPosPoint.X and TileY <= MyPosPoint.Y then
begin
end else
if TileX >= MyPosPoint.X and TileY <= MyPosPoint.Y then
begin
end;
Inc(I);
end;
Result:= False;
Exit;
end;
Mouse(Tw.x, Tw.y, Rx, Rx, True);
Result:= True;
end;This script (if you insert code for walking in the diferent directions) would try to walk to a point for as many times as you input in 'Tryes', I have'nt tested it, and i just made a fast scetch so that you guys can get the idea.for example:
You start in Warrock and want to walk to barbarian willage
then you do:
WalkToPoint(BarbarianWillageTile[10].x, BarbarianWillageTile[10].y, 10, 10, 20);
Then the script will walk west 20 times, or until it hits the tile.
Remember, the script i posted is not a working script, its just a scetch.
Do you think it will work?