|
Bromax Wanderer
Joined: 03 Jan 2002 Posts: 66
|
Posted: Sat May 31, 2008 11:24 pm
Script help |
Been a while since I wrote anything for zmud or cmud. What I want is to auto close doors behind me. My map in cmud already opens the door and moves in the direction I indicated, I just need it to close after I enter the next room....and I have no idea how to do it. My mud output looks like:
top the Tower of Legends
The uppermost top of the tower has been worn smooth by ages of weather, a
testament to how long something can last despite anything thrown at it. It
is rumored that the Creator, or his avatars, appear at this very spot when
least expected. Whatever the truth, this place has an aura of being outside
of space and time, where anything could happen... Weathered and faded, a
plaque and a sign have been embedded in the stone surface of the tower.
[ obvious exits: D ]
A Warder walks by, every movement potentially lethal.
A serene Aes Sedai glides by.
* HP:Healthy MV:Full > open goldengate
d
Ok.
* HP:Healthy MV:Full > The Top Floor of the Tower
The uppermost level of the Tower of Legends has wide-set windows placed
into its walls that offer fantastic views of the city itself. In every
direction can be seen the very top of the protective wall surrounding the
cities, with the wilds beyond. Several chairs are scattered around the room
with a collection of small tables with them. A spiral staircase along the
wall leads downward and, curiously, upward towards a golden gate set into
the ceiling, which is painted to look like a cloud-covered sky.
[ obvious exits: U D ]
A Child of the Light watches with vigilence.
A battle scarred warrior stands nearby.
* HP:Healthy MV:Full >
The mud output is either "Ok." or "It's already open!"...I want it to close the door in either case.
Thanks for the help, or even a start.
-B |
|
|
|
Bromax Wanderer
Joined: 03 Jan 2002 Posts: 66
|
Posted: Sun Jun 01, 2008 1:05 am |
Helping myself I got:
Code: |
<class name="Autodoor" id="858">
<alias name="open" id="889">
<value>#var currentdoor %1
op %1
#show open %1</value>
</alias>
<trigger priority="7880" id="891">
<pattern>^{Ok.|It's already open!}$</pattern>
<value>#NOOP</value>
<trigger type="Within Lines" param="6">
<pattern>(*)HP:(%w) MV:(%w) >(*)</pattern>
<value>close @currentdoor</value>
</trigger>
</trigger>
</class>
|
This works but has two problems. First (and not a big deal) I have the command to open the door sent to the mud and that same command #SHOW'n to trip the trigger...any cleanup help would be great.
Secondly this works if I move slowly....if I send several commands at once I am usually rooms away when it tries to close the door. I need it to fire right after the first direction command is given.
Thanks again in advance.
-B |
|
|
|
harley Apprentice
Joined: 05 Apr 2008 Posts: 121
|
Posted: Sun Jun 01, 2008 1:39 am |
Probly a bad idea, too much time invested.. but this would work.
change all of the 'door' rooms and have them use 'other' and on the commands
change it to op e;e;close e |
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sun Jun 01, 2008 2:14 am |
How about...
Code: |
#ALIAS od($dir) {open $dir;$dir;close %reversedir($dir)}
|
or something like it since you are now facing the door from the opposite side. |
|
_________________ Sic itur ad astra. |
|
|
|
Bromax Wanderer
Joined: 03 Jan 2002 Posts: 66
|
Posted: Sun Jun 01, 2008 4:11 am |
the mapper already opens doors then sends the command to move through.....I just want to tack on an extra command to that without editing every door in my map or manually opening the doors. Thanks for the help though.
-B |
|
|
|
harley Apprentice
Joined: 05 Apr 2008 Posts: 121
|
Posted: Sun Jun 01, 2008 4:27 am |
you can change the command that the mapper sends to open doors..
its under the configuration somewhere, dont remember offhand. |
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sun Jun 01, 2008 4:56 am |
You can stick the alias I suggested with minor modifications for the mapper to execute as harley suggested. On the mapper menu, click on Edit|Map Properties then select Strings and Doors. There are 2 entries to be modified, one for just opening doors, and the other for opening locked doors. Substitute the parameters expected by the mapper into the alias I gave you above. It should work with little or no adjustment.
|
|
_________________ Sic itur ad astra. |
|
|
|
|
|