Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Alejandro
Newbie


Joined: 22 Apr 2020
Posts: 2

PostPosted: Wed Apr 22, 2020 7:39 pm   

OnInput Trigger Challenge
 
Hey all,

I'm having challenges with this trigger in CMud. Most of the time it works great, then for reasons I don't understand, it will just stop working. It's pretty frustrating when it stops as it quickly becomes game over and I'm stuck doing a quick post-mortem, only to realize that this has just stopped midstream for no reason I'm aware of.

Any ideas on how to make this work consistently? Or why this just sometimes stops working?

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger type="Command Input" priority="3570" copy="yes">
    <pattern>Quaff (*) @PotionContainer</pattern>
    <value>#ADD QuaffCount 1
#IF @QuaffCount>7 {
  Drink Spring;Quaff %1 @PotionContainer
  #VAR QuaffCount 0
  } {}</value>
  </trigger>
</cmud>
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Thu Apr 23, 2020 1:45 am   
 
Your variable in the pattern should be in braces:

Quaff (*) {@PotionContainer}

Your #IF expression should be in parenthesis:

#IF (@QuaffCount>7) {


Hmmm, I would delete the following bit:

copy="yes"

I have no idea what that is supposed to be doing.
_________________
Discord: Shalimarwildcat
Reply with quote
Alejandro
Newbie


Joined: 22 Apr 2020
Posts: 2

PostPosted: Thu Apr 23, 2020 4:25 am   
 
Thanks a ton, I made those changes and let you know if I run into any further issues. Thanks for the quick feedback! I think the copy="yes" might just be referring to me copying directly from the settings file and pasting here, but who knows!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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