Htor Beginner
Joined: 30 Sep 2004 Posts: 11
|
Posted: 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? |
|