|
patryn Apprentice
Joined: 26 Sep 2001 Posts: 124
|
Posted: Thu Jan 15, 2004 9:02 am
Is there a function version of #path? - 6.16 |
Here's the problem, the mud im on has recently undergone some changes, and now has huge terrain areas inbetween cities.
A handy solution for this ive found are the speedwalk paths available
Now ive got a whole bunch of paths in my settings, all with unique (yet very long and specific) names.
I notice that the #path command on its own echo's a list of all the paths that are in my settings. Is there any way to capture this list to a variable without having it spam my screen?
Once captured i could then filter the information in there to whatever i need and develop an automatic speedwalking system that doesnt require mapping.
I was thinking there might be some sort of function that returns the list? (something like %path() or %pathlist()) |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Jan 15, 2004 2:33 pm |
You can do it with normal triggers. Start capturing with the #PATH command and end when it sees the "Path Ahead" line (this line may not be in 6.16, in that case, replace the pattern of that trigger with a blank line: $).
#ALIAS getPaths {#GAGON;#T+ getPathsTrigs;#PATH}
#TRIGGER {Path Ahead:} {#GAGOFF;#T- getPathsTrigs} "getPathsTrigs"
#TRIGGER {(*)%s(*)} {#ADDKEY myPaths {%1} {%2}} "getPathsTrigs" |
|
|
|
patryn Apprentice
Joined: 26 Sep 2001 Posts: 124
|
Posted: Thu Jan 15, 2004 4:03 pm |
Thanks Kjata, but the problem with that is that id have to keep echo messaging enabled for it to work.
I have a hell of a lot of settings and when echo messaging is on there is a lot of spam which makes regular mudding rather annoying, so i usually have echo messaging set to off.
This could work if there was a way of switching the echo messaging function via an alias, that way i can just switch it on when i need to update the list of paths, and then switch it back off.
Do you know of a way to programmatically turn the echo messaging functionality on and off?
If not, ive just thought of another possible solution. Is there a way for me to edit how the #path command works? If so, I could make it so that instead of outputting the messages to the screen, it would simply put it in a variable.
Thanks |
|
|
|
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: Thu Jan 15, 2004 4:59 pm |
quote: Originally posted by patryn
Thanks Kjata, but the problem with that is that id have to keep echo messaging enabled for it to work.
I have a hell of a lot of settings and when echo messaging is on there is a lot of spam which makes regular mudding rather annoying, so i usually have echo messaging set to off.
This could work if there was a way of switching the echo messaging function via an alias, that way i can just switch it on when i need to update the list of paths, and then switch it back off.
Do you know of a way to programmatically turn the echo messaging functionality on and off?
If not, ive just thought of another possible solution. Is there a way for me to edit how the #path command works? If so, I could make it so that instead of outputting the messages to the screen, it would simply put it in a variable.
Thanks
You might want to download zMUD version 6.62 as 6.16 is more or less unsupported. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jan 15, 2004 7:35 pm |
quote: Thanks Kjata, but the problem with that is that id have to keep echo messaging enabled for it to work.
You only have to create the list once. You can certainly tolerate Echo Messages that long. After that, just refer to the variable. |
|
|
|
patryn Apprentice
Joined: 26 Sep 2001 Posts: 124
|
Posted: Thu Jan 15, 2004 11:32 pm |
Thanks Roso,
I have tryed 6.62 and to be honest it really isnt my cup of tea. Ive followed every tip, every tutorial, every suggestion no matter how remote on getting it to work properly, and when it was working as properly as i could get it, i found that the mapper was still a lot slower in response then 6.16
Basically for the two months that i had 6.62 installed it didnt go very smoothly, so now i dont particularly want to upgrade.
Thanks Lightbulb,
I only did intend to make the list once, but i wanted it to update itself whenever a new speedwalk path is recorded, without me having to do any sort of manual updating with the mouse.
I can tolerate the echo messaging while it updates, especially with the gagging method Kjata described, but what really annoys is having to use the mouse for updating the list of speedwalk paths.
If I could make an update alias or function, that would be fine also but that requires a way of programmatically switching the echo messaging functionality on or off, which i dont know how to do or even if it's possible. |
|
|
|
patryn Apprentice
Joined: 26 Sep 2001 Posts: 124
|
Posted: Sat Jan 17, 2004 7:25 am |
Ive just tryed to use the gagging method described by Kjata and now ive run into an ever bigger problem.
It seems zmud doesnt put the echo'd output from #path, through the trigger parsing. It completely misses any output that is automatically generated by the internal commands.
You can test this by typing the following into the command line. Just make sure that you have echo messaging on, otherwise the output generated from the #path command will not be seen.
#echo blah
#echo blah
#path
#echo %line %line2
The final output of the last line is 'blah blah'
when it should be 'Path Ahead: <empty> Path Behind: <empty>'
I guess ill just have to approach this problem from a completely different angle because capturing the #path output seems impossible. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Jan 17, 2004 6:25 pm |
The other method is to use COM:
#VAR numPaths {%session.NumPaths}
#LOOP 0,@numPaths-1 {#VAR curPath {%session.PathNum(%i)};#ADDKEY myPaths {@curPath.Name} {@curPath.Value}}
However, the COM functions used and the %session system variable are not available in 6.16, and for some reason they do not want to work on 6.66 neither. |
|
|
|
patryn Apprentice
Joined: 26 Sep 2001 Posts: 124
|
Posted: Sun Jan 18, 2004 2:36 am |
Ive changed my approach somewhat.
Now im updating the path list everytime a new path is created or deleted via aliases.
This only does one path at a time, but it's better then nothing I spose :)
Thanks for the help anyway :) |
|
|
|
|
|