I need help :-\

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
Mattthh
Posts: 6
Joined: 2007-02-14 08:14:09

I need help :-\

Post 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
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post 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 ?
Mattthh
Posts: 6
Joined: 2007-02-14 08:14:09

Post 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
Mattthh
Posts: 6
Joined: 2007-02-14 08:14:09

Post by Mattthh »

no one ?
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

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