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