putting the pathfinding/follow

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
iRuLez
Posts: 104
Joined: 2006-05-04 18:40:42

putting the pathfinding/follow

Post by iRuLez »

if possibile to create script with putting the "pathfinding" or "follow" on LastTarget?
iRuLez
Posts: 104
Joined: 2006-05-04 18:40:42

Post by iRuLez »

I need a script that recognizes the coordinates where the enemy is and makes a double-click-right on those coordinates
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post 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!
iRuLez
Posts: 104
Joined: 2006-05-04 18:40:42

Post 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:
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post 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
Post Reply