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


Joined: 29 Jan 2002
Posts: 14
Location: USA

PostPosted: Tue Jan 29, 2002 5:09 am   

AutoOpener
 
I was wondering if anyone could help me out with a trigger to automatically open a door that is closed, once i run into it. I'm looking for one that does something like "open (last direction i was heading)"
For example, im going north, and i run into a closed door, i'd like the trigger to automatically enter "open north".
Any help is greatly appreciated.

The Master Of Necromancers
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Tue Jan 29, 2002 7:07 am   
 
This works for me:

#TR {{is|are} closed.} {#IF !%null(%lastdir) {open %item( %lastdir, 1); %item( %lastdir, 1)}}

Troubadour

Edited by Troubadour to add the missing bracket whose absence caused all the subsequent confusion.
Reply with quote
necropsian
Beginner


Joined: 29 Jan 2002
Posts: 14
Location: USA

PostPosted: Tue Jan 29, 2002 7:17 am   
 
When i entered that trigger, and i run into a closed door, zMUD just responds with "{#IF"
*shrug* I'm new to this whole thing, do i do something besides paste that trigger in?

The Master Of Necromancers
Reply with quote
Castaway
GURU


Joined: 10 Oct 2000
Posts: 793
Location: Swindon, England

PostPosted: Tue Jan 29, 2002 9:13 am   
 
Add another '}' to the end, it looks like Troubadour forgot one :)

Lady C.
Reply with quote
bgunther
Novice


Joined: 20 Dec 2001
Posts: 39
Location: USA

PostPosted: Tue Jan 29, 2002 9:17 am   
 
That trigger command was intended to be entered at the command line of zMud. So if you were to cut and paste, you should paste it into the command line and hit enter. If instead you are trying to put this into the settings editor, you would separate it out like this:

Pattern: {is|are} closed.
Script: #IF !%null(%lastdir) {open %item( %lastdir, 1); %item( %lastdir, 1)

Please note that the pattern may need to be adjusted to exactly what the message looks like when you run into the closed door.


Bob, aka Kayd on SWMud and a few others.
Reply with quote
bgunther
Novice


Joined: 20 Dec 2001
Posts: 39
Location: USA

PostPosted: Tue Jan 29, 2002 9:20 am   
 
Bah... I left off the last } above, too.




Bob, aka Kayd on SWMud and a few others.
Reply with quote
necropsian
Beginner


Joined: 29 Jan 2002
Posts: 14
Location: USA

PostPosted: Wed Jan 30, 2002 3:03 pm   
 
The trigger still isn't working... if anyone can help me out, that'd be great.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Jan 31, 2002 4:23 pm   
 
Do you have the automapper open?

Kjata
Reply with quote
necropsian
Beginner


Joined: 29 Jan 2002
Posts: 14
Location: USA

PostPosted: Sat Feb 02, 2002 12:44 am   
 
No... am i supposed to have it on?

The Master Of Necromancers
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Feb 02, 2002 2:23 pm   
 
Well, the %lastdir function is a mapper function and zMUD can only call it when the mapper is open. If you do not want to have the mapper open, you can use the %lastcom pre-defined variable instead. However, for this to work, no other command may be executed between when you send the direction to the MUD and the trigger fires.

Kjata
Reply with quote
necropsian
Beginner


Joined: 29 Jan 2002
Posts: 14
Location: USA

PostPosted: Sun Feb 03, 2002 3:49 am   
 
that works, thanks

The Master Of Necromancers
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