Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Churlant
Novice


Joined: 17 Oct 2002
Posts: 44
Location: USA

PostPosted: Fri Dec 07, 2007 9:42 pm   

Another Quickie
 
I'm trying to record runs in the proper format using hunt. Now I can capture directions, but consolidating duplicate movements is tricky (or so it is for me.)

Basically here's what I have at the end of a hunt:

run down|down|down|down|down|east|east|north|west

How do I write a trigger (or whatever) that will change the above input to:

run 5d2enw

?
_________________
>-Churlant-<
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Dec 07, 2007 9:54 pm   
 
I think you are looking for the %pathcompress function. Post back it you can't get what you want done from that.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Churlant
Novice


Joined: 17 Oct 2002
Posts: 44
Location: USA

PostPosted: Fri Dec 07, 2007 10:36 pm   
 
It has promise, but I think my zmud isn't a big fan of the function. I expect there's some checkbox I need to fix or something... this is what I get

As as an example, I enter:

#SHOW %pathcompress(n|n|n|n)

And I get:

(n);(n);(n);(n)

Any ideas?
_________________
>-Churlant-<
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Dec 07, 2007 10:54 pm   
 
The only idea I have is that you do not have #DIRECTION settings enabled for the standard English directions. The defaults include such definitions and enable them by default. Wiithout more information to go on I really can not say what the failure is.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Dec 08, 2007 3:32 am   
 
To add more detail, open the package editor and select Show Default Packages on the View menu. You should have two packages called EnglishDirections and EnglishKeypad loaded. The untitled session doesn't load these packages, so don't use that for this kind of testing.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Sat Dec 08, 2007 2:09 pm   
 
Guys, its ZMud General Forum :P

Btw, I did enter the %pathcompress example you gave, Churlant, and it gave .4n as supposed to. I guess the best I could suggest is to check if you have "." set as "speedwalking character". I'm not sure, however, if that would do the trick.


Prog
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Dec 08, 2007 2:27 pm   
 
I pulled a Tech :(

Sorry, Churlant.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Churlant
Novice


Joined: 17 Oct 2002
Posts: 44
Location: USA

PostPosted: Mon Dec 10, 2007 4:23 pm   
 
Well I fiddled with the directions (re-added them, as suggested they were absent), but the function still doesn't seem to like me...

...SO... can anyone think of another way to get what I'm after? The mud will actually take run nnnneuuuss commands in place of run 4ne3u2s... so the hurdle is the | character I suppose.

Any suggestions?
_________________
>-Churlant-<
Reply with quote
Churlant
Novice


Joined: 17 Oct 2002
Posts: 44
Location: USA

PostPosted: Mon Dec 10, 2007 11:25 pm   
 
Stupidity on my part.. as always, making things complicated.

Okay, so I have a very simple:

#TR {You catch the scent of *, heading (%w)} {#ADD direction %1}

After the hunt, I just clear the variable. Now all I need is to cut down full directions (north, south, etc) to their first letters (n, s). Please don't kill me.. I KNOW that function is out there, but I'm fried... soon as someone can give me a way to capture the first letter only, I'm in business.

Thanks again!
_________________
>-Churlant-<
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Mon Dec 10, 2007 11:29 pm   
 
Code:


#TR {You catch the scent of *, heading (%w)} {#ADD direction %left(%1,1)}



Prog
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
Churlant
Novice


Joined: 17 Oct 2002
Posts: 44
Location: USA

PostPosted: Tue Dec 11, 2007 3:26 pm   
 
Brilliant again.. it is done. Proving once again there is more than one way to skin a cat. :)

Thanks all for the help!

-JC
_________________
>-Churlant-<
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net