Page 1 of 1

I need help :-\

Posted: 2007-02-27 08:47:14
by Mattthh
How can i record a path and follow it :-\ ??


Edit ok i found how to record the path (but is it a good way ?)

Code: Select all

sub record_path() 
   var x
   var y
   var path=""
   UO.DeleteJournal()
   Repeat
      x=UO.GetX()
      y=UO.GetY()
      if waitNewPos(x,y) then
         path=path+extract_dir(x,y,UO.GetX(),UO.GetY())
      endif
   Until UO.InJournal("stop")
   path = compressPath(path)
   UO.TextClear()
   UO.TextOpen()
   UO.TextPrint("Votre chemin est:")
   UO.TextPrint(path)
end sub

Posted: 2007-02-27 12:27:24
by Nmy
1) why do you need such thing ?
2) you meen you run the script and script records every x,y step you make ?

Posted: 2007-02-27 18:54:05
by Mattthh
Because i want my caracter to go buy something and come back home

so i record the path ... and i introduce some buy and drop into the chess soo with my other player i can cast In lor without stop (for magery)

this script record my path ... so now i need to know how my player can follow it

Posted: 2007-03-01 00:54:17
by Mattthh
no one ?

Posted: 2007-03-01 09:37:58
by Nmy
i think the best way is something like this:

Code: Select all

VAR x = uo.getx()
VAR y = uo.gety()
while 1
if x<>uo.getx() or y<>uo.gety() then
 x = uo.getx()
 y = uo.gety()
   UO.TextOpen()
   UO.TextPrint(x,' ',y)
endif
uo.click('backpack')
wait(20)
wend