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
Eowyn
Apprentice


Joined: 19 Jan 2001
Posts: 117
Location: Norway

PostPosted: Fri Sep 13, 2002 4:37 pm   

Closing the door after yourself automatically.
 
I need input/ ideas how to make triggers that close doors after me, - much in the same way as the map automatically opens door.

i.e.:
-The door chould be closed as soon as I enter the room.
-Some doors have different names on each side of the door, so capturing the open door command wount do. Is it possible to get hold of the doorvariable from the map..?

Ideas? Suggestions?

Thx :)

Eowyn
Reply with quote
rufy
Newbie


Joined: 10 Oct 2000
Posts: 6

PostPosted: Fri Sep 13, 2002 6:46 pm   
 
Here's what I came up with:

Set the door string to "usedoor %1 %2".

Create an alias "usedoor":

#if {%2} {
open %2
lastexit=%2
} {
open %1
#if {%1="west"} {lastexit="east"}
#if {%1="east"} {lastexit="west"}
#if {%1="north"} {lastexit="south"}
#if {%1="south"} {lastexit="north"}
#if {%1="up"} {lastexit="down"}
#if {%1="down"} {lastexit="up"}
}

Then in my room exit line trigger:

#if {@lastexit} {
close @lastexit
#unvar lastexit
}


Hope that helps!

Rufy
Reply with quote
Eowyn
Apprentice


Joined: 19 Jan 2001
Posts: 117
Location: Norway

PostPosted: Fri Sep 13, 2002 8:33 pm   
 
My mud has 1001 different doornames, so it's not that easy, no.. :)
Reply with quote
rufy
Newbie


Joined: 10 Oct 2000
Posts: 6

PostPosted: Fri Sep 13, 2002 9:41 pm   
 
For doors with different names, how about using a zmud database? Store the room number, door name front, door name back, then in the usedoor alias do a lookup if the %2 variable is defined. If you find a match, use the "door name back" field for the @lastexit variable.

Dunno what the code would be since I've hardly played with the database stuff, but that should solve your problem with a little manual input beforehand. And if you're using version 6.3x with the new mapper db, you might be able to query that db directly for your doornames.

Rufy
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