|
necropsian Beginner
Joined: 29 Jan 2002 Posts: 14 Location: USA
|
Posted: 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 |
|
|
|
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: 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. |
|
|
|
necropsian Beginner
Joined: 29 Jan 2002 Posts: 14 Location: USA
|
Posted: 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 |
|
|
|
Castaway GURU
Joined: 10 Oct 2000 Posts: 793 Location: Swindon, England
|
Posted: Tue Jan 29, 2002 9:13 am |
Add another '}' to the end, it looks like Troubadour forgot one :)
Lady C. |
|
|
|
bgunther Novice
Joined: 20 Dec 2001 Posts: 39 Location: USA
|
Posted: 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. |
|
|
|
bgunther Novice
Joined: 20 Dec 2001 Posts: 39 Location: USA
|
Posted: Tue Jan 29, 2002 9:20 am |
Bah... I left off the last } above, too.
Bob, aka Kayd on SWMud and a few others. |
|
|
|
necropsian Beginner
Joined: 29 Jan 2002 Posts: 14 Location: USA
|
Posted: Wed Jan 30, 2002 3:03 pm |
The trigger still isn't working... if anyone can help me out, that'd be great.
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Jan 31, 2002 4:23 pm |
Do you have the automapper open?
Kjata |
|
|
|
necropsian Beginner
Joined: 29 Jan 2002 Posts: 14 Location: USA
|
Posted: Sat Feb 02, 2002 12:44 am |
No... am i supposed to have it on?
The Master Of Necromancers |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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 |
|
|
|
necropsian Beginner
Joined: 29 Jan 2002 Posts: 14 Location: USA
|
Posted: Sun Feb 03, 2002 3:49 am |
that works, thanks
The Master Of Necromancers |
|
|
|
|
|