Page 1 of 1

putting the pathfinding/follow

Posted: 2008-01-07 13:44:41
by iRuLez
if possibile to create script with putting the "pathfinding" or "follow" on LastTarget?

Posted: 2008-01-07 14:02:02
by iRuLez
I need a script that recognizes the coordinates where the enemy is and makes a double-click-right on those coordinates

Posted: 2008-01-07 15:16:30
by Grin
You can get screen coordinates from uo world coordinates. X and Y axis rotated by 45 deg and so on. One tile 44px height and wight.

Or

You can use EasyUO for pathfind.

Or

Perl script module for injection (too hard for understanding)

Good luck!

Posted: 2008-01-07 15:37:45
by iRuLez

Code: Select all

sub test()
   var x,y
   
   x = uo.getx("laststatus")
   y = uo.gety("laststatus")
   uo.print(str(x))
   uo.rdblclick(x,y)
end sub



maybe i dont undestand ... :roll:

Posted: 2008-01-07 16:07:27
by Grin

Code: Select all

sub GetStatus(serial)
   var dx = uo.GetX(serial)-uo.GetX()
   var dy = uo.GetY(serial)-uo.GetY()
   var dz = uo.GetZ(serial)-uo.GetZ()
   var x = 400+22*(dx-dy)
   var y = 300+22*(dx+dy)-dz*4-20
   UO.Drag(x, y, x+44, y)
end sub
sub Pathfind(x, y)
   var dx = x-uo.GetX()
   var dy = y-uo.GetY()

   UO.RDblClick(400+22*(dx-dy), 300+22*(dx+dy))
end sub