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


Joined: 31 Jan 2003
Posts: 49
Location: Australia

PostPosted: Thu Feb 06, 2003 8:17 pm   

Catching #VAR for pathing for Doors
 
Ok peoples, here is what I am trying to do.
On the mud I play if I wish to open a door I have to type open door <<direction>> or if it is locked use key <<direction>> then open door <<direction>>. Since I use slow walk paths alot I used to have them broken into small paths. I would use them like this:
#alias goil {#sl 3w2s3e} and then have to manually open the door before typing the alias that does the next section.

Since I have now discovered #stop, I was wondering if there is a way to capture the last path direction?

I have tried %lastcom commands but they capture all my capture stuff from my prompt to gauges script.

I was thinking of creating a set a triggers with values like these ^N ^S etc but I am sure there is a much more effiecent way to accomplish this.

Any ideas?
Amylon- The lost
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Thu Feb 06, 2003 10:19 pm   
 
%lastdir() is the function you want, i believe

use key %lastdir()
open door %lastdir()

but i don't use the mapper so this is just a hunch

--------

moon.icebound.net:9000
Reply with quote
Amylon
Novice


Joined: 31 Jan 2003
Posts: 49
Location: Australia

PostPosted: Fri Feb 07, 2003 11:53 am   
 
I dont use the mapper either since I can never get it to do anything other than annoy me even with #tag, #map, #nomap, I have tried everything, I think the mapper is just there to infuriate us all.
And so back to the subject, because I am using #SL <<path>> and not the mapper, %lastdir doesnt work so any other ideas?


--------------------
#trigger {(*) tells you, '} {tell %1 NO}
--------------------
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri Feb 07, 2003 1:52 pm   
 
Create new directions that send the command to open a door:
#DIR fc "open door north"
#DIR cf "open door south"
#DIR xv "open door west"
#DIR vx "open door east"

Next, create triggers to send the #OK command when the door is opened. Example:
#TRIGGER {You open the door.} {#OK}

Now just use the new directions in your speedwalk:
#ALIAS goil {#SL 3w2s3ev3e2nfn2nw}

You could also have a trigger that fires on something that you know comes after the slowwalk sends the direction command and before your other triggers fire and do some processing and then use %lastcom to capture the direction.

Kjata
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Feb 07, 2003 1:56 pm   
 
Simply set the link on the map to be a door or locked door. In the map configuration under strings and doors you can set what text to send to handle doors. In that configuration item %1 is replaced with direction, and %2 door name.
Reply with quote
Amylon
Novice


Joined: 31 Jan 2003
Posts: 49
Location: Australia

PostPosted: Fri Feb 07, 2003 2:05 pm   
 
quote:
Can't you include opening the door in the alias? #ALIAS goil {#SL 3w2s3e;open door north;#SL n3w4e}


No you cant use it like that. That will cause the alias to send w;open door north;n all at once. #sl doesn't suspend following commands until it completes, it just fires and if you have another command in the same alias that fires too. I WISH IT DID BUT IT DOESNT

--------------------
#trigger {(*) tells you, '} {tell %1 NO}
--------------------
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri Feb 07, 2003 2:09 pm   
 
Yeah, I noticed just before you posted. For some reason I thought it waited. Anyway, I edited the post above before your reply.

Kjata
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