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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Fri Nov 09, 2007 10:14 pm   

[2.10] Manual + Reparse trigger types broken
 
#TR "trig" {pattern} {}
#COND {*} {dosomething} {manual}
#COND {specific message} {#STATE trig 0} {reparse}


Reparse doesn't seem to work on manual trigger types. I also tried with duration trigger types, no luck either.





Here is an example of a script that is not contrived. Yeah I know I can use a separate trigger instead of a reparse trig, but this is neater and it worked at one point back in zmud.. though I am not sure if it worked in the most recent version because I stopped using that script when I changed class a couple of years ago. This system of manual+reparse would be quite handy if it works (%concat on multiline inventory capturing for example). It can be worked around with a separate trigger and #T+/- to toggle it on/off, but I've always preferred the neatness of having a single trigger.

Strangely, the xml page lists the trigger states in the wrong order, which I shall investigate more and perhaps bug (but separately).

Code:
<trigger name="mapcapture" priority="2230" id="223">
  <pattern>~[Map Size: Big~]$</pattern>
  <value>#CAP mapcap</value>
  <trigger type="ReParse">
    <pattern>\--Time: %d usec-----------------------------------------------------------------------------/$</pattern>
    <value>#STATE mapcapture 0
#SAY fired</value>
  </trigger>
  <trigger type="Duration" param="10000">
    <pattern>*</pattern>
    <value>#CAP mapcap</value>
  </trigger>
</trigger>


(Here I was using a duration trig type, but it is the same with manual).
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Nov 10, 2007 12:44 am   
 
That is true. That is because the Manual option is only triggered via the #SSTATE command, and the Reparse option requires a pattern to test the text from the MUD. When using the #STATE command, there isn't any text from the MUD to test by the Reparse, so the reparse can't work.

So yes, these options won't work together. If this isn't a contrived example, let me know what you were trying to do.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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