putting the pathfinding/follow
Posted: 2008-01-07 13:44:41
if possibile to create script with putting the "pathfinding" or "follow" on LastTarget?
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
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