Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Bug reports ➜ triggers in general

triggers in general

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Tsunami   USA  (204 posts)  Bio
Date Wed 06 Oct 2004 06:43 PM (UTC)
Message
I recently switched to mushclient, and I have found it to be a vastly better client than me previous. However, I cannot get triggers to work. I have several, however they don't fire while testing them, or while playing. Only one has ever fired, and after that, it hasn't fired again. I'm using v3.5 unregistered. Thanks for any help.
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Wed 06 Oct 2004 07:19 PM (UTC)
Message
Can you post your trigger(s)?

Do this by going to the trigger dialog, highlighting the trigger, click the "copy" button (you can highlight more than one at a time) then come paste them here.

Also paste what youre trying to match on.

Its just a syntactical errors.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Tsunami   USA  (204 posts)  Bio
Date Reply #2 on Thu 07 Oct 2004 06:43 PM (UTC)

Amended on Thu 07 Oct 2004 07:19 PM (UTC) by Tsunami

Message
Sure. Here are some assorted random triggers,

<triggers>
<trigger
enabled="y"
group="Reflex"
match="You bleed"
sequence="100"
>
<send>clot</send>
</trigger>
<trigger
enabled="y"
group="Reflex"
match="You drop some gold sovereigns."
sequence="100"
>
<send>get gold
put gold in pack
wear pack</send>
</trigger>
<trigger
enabled="y"
group="Reflex"
match="You look about yourself, frenziedly, wild-eyed."
sequence="100"
>
<send>outr 1 ash
eat ash</send>
</trigger>
<trigger
enabled="y"
group="Reflex"
match="You must first raise yourself from the floor and stand up."
sequence="100"
>
<send>stand</send>
</trigger>
<trigger
enabled="y"
group="Reflex"
match="You must possess equilibrium"
sequence="100"
>
<send>concentrate</send>
</trigger>
</triggers>


I hope its just a syntactical error, since that would be easier to fix. Perhaps the problem is that these are not regex triggers?
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #3 on Thu 07 Oct 2004 07:51 PM (UTC)
Message
If those lines appear as they are in the triggers, they should be matching and firing... Are you sure you don't have "Enable triggers" unchecked in the trigger window?

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #4 on Thu 07 Oct 2004 07:53 PM (UTC)
Message
You could also try pressing Ctrl+Alt+T in the main world window and see if and what triggers.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #5 on Thu 07 Oct 2004 10:10 PM (UTC)
Message
Triggers are pretty reliable. Now you have posted the triggers, post some example lines of what they should be matching on.

Since you are not using regular expressions, the lines must match exactly.

For example the "You bleed" trigger will match on:


You bleed


It will not match on these:


  • <1000hp 100m 110mv>You bleed
  • You bleed.
  • You bleed and fall to the floor.
  • You bleed (space).



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Tsunami   USA  (204 posts)  Bio
Date Reply #6 on Fri 08 Oct 2004 05:10 PM (UTC)

Amended on Fri 08 Oct 2004 06:43 PM (UTC) by Tsunami

Message
I think I see my mistake now. The triggers were enabled, but I assumed that the trigger "You bleed" would match on "You bleed 234 health." for instance. If I understand correctly, the trigger must match the whole line, not just part of it.

Alas. I just tried testing that, and it still didn't work. Here's the trigger:

<triggers>
<trigger
enabled="y"
group="Reflex"
match="You bleed"
sequence="100"
>
<send>clot</send>
</trigger>
</triggers>

And here is what I tested (Ctrl+Shift+F12): 'You bleed' without the quotes. Nothing. The trigger and triggers in general are enabled. However, when I test :
'
You bleed' , ie. with a linefeed in front by pressing Ctrl+Enter, the trigger matches. My conclusion then is that triggers require a linefeed in front to match? Thanks for all your help.
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #7 on Fri 08 Oct 2004 07:10 PM (UTC)
Message
No, triggers require a linefeed AFTERWARDS.
Since they dont 'fire' (dont check anything at all) until a newline is sent.
And what might be happening is you have a prompt (which doesnt have a linefeed) and then youre sending the you bleed test. So the line is actually:
<prompt stuff>You bleed
Which wont match. That could be one reason why you 'need' a linefeed in front.

To match you bleed 1234 health,.

you could use:

You bleed * health.

If you dont care about the rest of the line, just the you bleed part, you could match on:
You bleed *
which would match ANY line with "You bleed" and then a space, and anything else.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #8 on Fri 08 Oct 2004 11:04 PM (UTC)
Message
Normally when I test with Ctrl+Shift+F12 I put a linefeed in first (Ctrl+Shift) and afterwards, to that what gets sent is a complete line. As Flannel says, if you already have a prompt at the start of the line, it justs adds the text to the end of it.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Tsunami   USA  (204 posts)  Bio
Date Reply #9 on Sun 10 Oct 2004 07:17 PM (UTC)
Message
I was testing while not connected, so I didn't have a prompt. Still, it's working now, so thanks for all your help.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


24,813 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.