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
geosmith
Wanderer


Joined: 23 Apr 2005
Posts: 57

PostPosted: Wed Mar 08, 2006 5:27 pm   

Zone triggers
 
Is it possible to create a trigger, based, for example, on the following:

You discern that you are standing in Ancient Sewer Ruins.

.. such that the current room on the mapper is moved to the zone "Ancient Sewer Ruins" if such exists already, or to a newly created zone of that name if it doesn't? (bearing in mind that I don't want to end up with multiple zones with the same name).

Any advice would be appreciated.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Wed Mar 08, 2006 7:58 pm   
 
You can try this... it's untested though.

Code:

#TRIGGER (You discern that you are standing in (*))
{
#IF (%zonenum("%1") == 1 && "%1" != %zonename(1))
// Check if the name matches a known zone, the second part is needed because it will return 1 if no match exists.
  {
     #MATH NewZone (%numzones()+1)
     #NOOP %zonename(@NewZone , "%1")
     #NOOP %roomzone(,@NewZone)
     #UNVAR NewZone
  }
// Else move room to the zone
  {
     #NOOP %roomzone(,%zonenum("%1"))
  }

}


See %zonenum, %zonename, %roomzone, and %numzones for reference.
_________________
Asati di tempari!
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