Yoko

All sides of Injection
It is currently 2026-01-09 08:56:32

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2004-05-11 08:25:48 
Redacted


Last edited by Praxiiz on 2016-11-18 08:52:30, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2004-05-13 11:30:09 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
i can not check your whole script, but will do some suggestions
1) author of script module said somewhere that it is guaranteed that file will be open and working only once per script life; so most scripts using files open some file then closing it once.
2) try to use uo.Set/GetGlobal to store your data. Example
uo.SetGlobal("myXval"+str(counter),str(tempX))
uo.SetGlobal("myYval"+str(counter),str(tempY))
keep in mind, stored value is a text, so do convertation if needed
tempX=VAL(uo.GetGlobal("myXval"+str(counter))
3)
if (temp == destination ) then
done = 1
uo.print("DONE!!!")
Often there is no need, or there is no possibility to reach exact point.
Make your task finished if distance to target exact or lesser then given Accuracy (accuracy=0 mean exact point)
4) i see no movement subs, so i can not know did it done already or no, but you must know that this must be treated in your script logics:
- uo client is not answerinf movement keystrokes immediately, so in case of lag or just small delay in some moment client may process not keypress you think it do, but some of previous ones.
- uo client have buffer for 2 movement steps.
- you may ask client to do step in some direction, but if it is blocked client may not stop but do step in other direction.
- maybe it is not bad idea use timer to not allow script seek for path ethernaly
- don't forget to check out available stamina before moving
5) i myself started to work on A* before project frozen so i interrested in your results. if you want some tips or just willing to talk about uo pathfinding try use my icq#139629504


Top
   
 Post subject: Pathfinding
PostPosted: 2004-05-21 01:40:47 
Since my last post, I wrote a couple programs in C++ to handle writing the coords to files. The programs do exactly what the above file handling subs do. Now the script runs fine without the unhandled exception errors.

For example, I can use the following code to pathfind:

uo.launch("pathfind.exe", "5502 567 5501 572")

and it will output the same finalstack.dat file as I mentioned in my above post. Then reading it into injection isn't hard.

The problem I have now is the list of walkable coords that my pathfinding algorithm sorts through. At the moment I mapped out the first level of despise and have a list of coords to pathfind with, but it took me a few hours. The pathfinder works fine with those, but I don't really feel like mapping out the rest of Brittania.

Does anyone know the format that the *.mul files use? It would be really nice if I could just read the walkable coords right out of the map and statics files. Or write a program that would extract them.

I can post my c++ code if anyone is interested.


Top
   
 Post subject:
PostPosted: 2004-05-21 22:12:19 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
exactly this work i started before new year and not finished it


Top
   
PostPosted: 2004-05-24 15:57:36 
I found the *.mul file format. If anyone is interested it can be found here:
http://www.wpdev.org/docs/formats/csharp/default.html


Top
   
 Post subject:
PostPosted: 2004-05-24 20:33:54 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
in past year to find them i lost only few minutes. to make it work i lost a day. but this is only a start.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited