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 20, 2002 2:53 pm   

Flagging special rooms (water)
 
Is it possible to flag a room so that commands will be slightly different for that room?

If for example I have a room with water where I have to swim to pass - can I give that room a "water-room flag" and have Zmud send
swim <direction>
in all rooms flagged as water-rooms, and just
<direction>
in any other room?

Thx :)

-Eowyn
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Fri Sep 20, 2002 9:25 pm   
 
Yes, in the Room Properties window, under the Other tab, there is a box labeled "Room Flags". Put something like WATER_SWIM in there. If you use other flags, you might want to set it up as a string list.

You were unclear as to whether you had to swim to enter a water room or you had to swim to leave a water room.

If it's the latter, use this trigger:

#ONINPUT {^({@directions})$} {#IF %ismember("WATER_SWIM",%roomflags(%roomlink(%roomnum,%1))) {swim %1} {%1}}

It peeks into the next room and looks for the flag, then sends the appropriate command.

If you must swim to leave a water room, use:

#ONINPUT {^({@directions})$} {#IF %ismember("WATER_SWIM",%roomflags(%roomnum)) {swim %1} {%1}}

In either cast the @directions variable is filled with all possible directions:

#VAR directions {n|e|w|s|u|d|ne|nw|se|sw|north|south|east|west|up|down|northwest|northeast|southeast|southwest}


Troubadour
(Win 98, Pentium III, 550 MHz)
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