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
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: Thu Jan 28, 2010 10:57 am   

[3.12] BUG?: #ONINPUT not firing off #send from trigger. (SOLVED, NOBUG)
 
#ONINPUT triggers don't appear to be firing when using #SEND from another trigger. If I manually execute the other trigger, or use #say to trigger it then it seems to work fine. However, if the text comes from the MUD the #ONINPUT trigger seems to be ignored. Here's a simple example that should reproduce the issue. Just replace the pattern of test_trig to whatever.

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger type="Command Input" priority="22890">
    <pattern>testme</pattern>
    <value>#print {ONINPUT TRIGGER FIRED!}
#noinput</value>
  </trigger>
  <trigger name="test_trig" priority="25080" trigontrig="false" regex="true" prompt="true" enabled="false">
    <pattern><![CDATA[^<(\d+)/(\d+)h (\d+)/(\d+)m (\d+)e (\d+)w <([-lrbe ]+)> <([cspdba]*)>>]]></pattern>
    <value>#print {PATTERN TRIGGER FIRED!}
#send {testme}
#T- test_trig</value>
  </trigger>
</cmud>


Last edited by GeneralStonewall on Thu Jan 28, 2010 8:15 pm; edited 1 time in total
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Jan 28, 2010 3:24 pm   
 
I think the problem is more basic than that. #SEND is not working from triggers. It works from the command line, from an alias, and from an event, but it is not sending anything when used in a trigger.

Simple example. In a blank session, turn on Echo Commands in the preferences, then type the following:
Code:

#alias testsend {#send alias works}
#event testsend {#send event works}
#trigger testsend {#send event works}
#send commandline works
testsend
#raise testsend
#show testsend
Reply with quote
Zugg
MASTER


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

PostPosted: Thu Jan 28, 2010 5:27 pm   
 
Rahab, you forgot to put {} around your trigger pattern. It should be this:

#trigger {testsend} {#send event works}

In your example, "testsend" was set as the ID name of the trigger and "#send event works" was being taken as the trigger pattern.

GeneralStonewall: The problem with the script that you posted is that your trigger has the "trigontrig" option set to false. That prevents *any* other trigger from firing when executing your script, including any #oninput trigger. If you enable the "Trigger on Trigger" option for your second trigger and then test it, then you will see the #oninput trigger firing successfully. So it's all working as designed.
Reply with quote
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: Thu Jan 28, 2010 8:15 pm   
 
Ooo, right. Thanks!
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Jan 28, 2010 9:42 pm   
 
Hm. Sorry. Embarassed I first tested it by making the trigger in the Package Editor, so I know the trigger pattern was correct then and it didn't seem to work. But it is working now when I test it. Oh well.
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