 |
GeneralStonewall Magician
Joined: 02 Feb 2004 Posts: 364 Location: USA
|
Posted: 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 |
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: 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
|
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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. |
|
|
 |
GeneralStonewall Magician
Joined: 02 Feb 2004 Posts: 364 Location: USA
|
Posted: Thu Jan 28, 2010 8:15 pm |
Ooo, right. Thanks!
|
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Jan 28, 2010 9:42 pm |
Hm. Sorry. 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.
|
|
|
 |
|
|