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


Joined: 22 Jul 2002
Posts: 15
Location: USA

PostPosted: Sat May 31, 2003 3:23 am   

#ONINPUT and #COND {reparse}
 
The following trigger doesn't completely work:
#ONINPUT {^Test (%d) (*)} {#GAG;#show %2}
#COND {Test 1} {#ECHO Cond 1 Works!} {reparse}

The first part goes off fine, but the conditional doesn't work when something like "Test 1 Yay" is entered. However, after changing the second line to:
#COND {*} {#ECHO Cond 1 Works!} {reparse}
The trigger state fired, sending the command "Test 1 Yay" to the mud ungagged and then Echoing "Cond one Works!" like it should have. Changing the trigger in the #cond line around to be a universal wildcard was the only way I could get it to work.

I see that there's been notes on similar topics to this before on the beta board, but I couldn't find any with solutions posted. Is there a way to do this that would allow using conditionals in #oninput triggers? I'd rather avoid splitting it up into multiple parts or including 12 if checks, if at all possible.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat May 31, 2003 3:50 am   
 
You don't need an #ONINPUT trigger. An #ALIAS will work fine.

#AL Test {#IF ((%numparam() > 1) AND %isnumber( %1)) {#ECHO Cond 1 Works!} {~Test %-1}}

LightBulb
Advanced Member
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