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
Htor
Beginner


Joined: 30 Sep 2004
Posts: 11

PostPosted: Fri Dec 17, 2004 1:49 pm   

Conditions help please
 
I am trying to set some conditons, but am completely lost, and the help file isn't very helpfull. I am trying to set conditions for this trigger:

#TRIGGER "come" {@one *- &roomname}

I am looking to make a list of all room names in the current zone, and compair them against @roomname. IF there is only one room with that name I want it to execute, if > 1 #say Mult rooms found and if = 0 #say no rooms found.

I imagine that it will be something close to this:

#VAR Flee {Found21232RoomNameMeandering Dirt Track through Kandor}
#TRIGGER "FleeTrig" {^You flee head over heels.$} {Flee=""}
#COND {^(*)$} {Flee.Found="";Flee.RoomName=%replace( "%1", "'", "''");#PRIORITY {#FORALL %roomexit {#FORALL %roomlink( ,%i) {#IF (%ismember( %j, %mapquery( {Name = '@Flee.RoomName'}))) {#ADDITEM Flee.Found %j}}}};#IF (%numitems( @Flee.Found)=1) {#say Room Found Teleporting;#TELEPORT @Flee.Found} {#IF (%numitems( @Flee.Found)>1) {#SAY Multi Rooms Found Teleporting to First;#TELEPORT %item( @Flee.Found, 1)} {#SAY No Connecting Rooms Found}}} {within|param=1}

Minus the dual variable and param=1

Can anyone point me in the right direction?
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