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


Joined: 30 Apr 2003
Posts: 43
Location: Sweden

PostPosted: Mon Mar 22, 2004 2:07 pm   

reverse %additem
 
Hi. I have a question...

I have a trigger that looks something like this:

Pattern: You follow your master %1.

i have a #IF master leaves west then it should
%additem east to a variable named "Follow"

ok, so far so good.

Now the problem is. that since it adds. lets pretend he leaves
3w,4n. it will show: w,w,w,n,n,n,n. But the problem is that
it gives me the first %additem in the list. I want it to start from the last. Uhm let me just show you:

#IF (%1=north) {#VARIABLE follow %addItem( "s", @follow)} {#ABORT}
#IF (%1=northeast) {#VARIABLE follow %addItem( "sw", @follow)} {#ABORT}

The thing is, i want then todo a alias:
pattern: fback
value do @follow.

The problem is that the order is wrong.
It start from the FIRST %additem. so if I follow 2e,2n
and I type "fback"
then it will print: do w,w,s,s.
I want it to put the LAST %additem first and so on.
Any one understand what I am talking about?
If I loose track of my leader, I will just type: fback and I will return to the spot i started from.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Mon Mar 22, 2004 3:27 pm   
 
I would suggest that you take a look at the Speedwalking Commands in the help files. It sounds like what you want to do could be easily handled by recording a path and then retracing it. Start with #MARK and when you're done save the path with #PATH (name). You can get back to where you started with #RETRACE (name). zMUD will reverse the directions for you, provided you have properly configured the directions in your settings for any non-standard directions.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Mar 22, 2004 8:39 pm   
 
Why don't you just use the %pathreverse function?
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