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.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ trouble with trigger
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Milty111
USA (4 posts) Bio
|
Date
| Mon 10 Apr 2017 02:26 AM (UTC) |
Message
| new to Mush and trying to make a simple trigger.
There's a "marble fountain"...some type before and after those words so I made it trigger on * marble fountain * then the command "drink fountain". The problem is that even though it worked, it went into a loop and get drinking repeatedly. Any idea why it might do that?
Thanks | Top |
|
Posted by
| hogarius
USA (22 posts) Bio
|
Date
| Reply #1 on Mon 10 Apr 2017 04:09 AM (UTC) Amended on Mon 10 Apr 2017 04:10 AM (UTC) by hogarius
|
Message
| I'm guessing that when you send the command "drink fountain" to the game, the game responds by saying something like, "You drink from a marble fountain in the middle of the square." This matches the trigger you have set up with "* marble fountain *" as a pattern.
To prevent a loop, you need to modify the trigger pattern so it matches when there is a fountain in the room, but doesn't match when you drink from the fountain. | Top |
|
Posted by
| Fiendish
USA (2,535 posts) Bio
Global Moderator |
Date
| Reply #2 on Mon 10 Apr 2017 06:50 AM (UTC) |
Message
| I agree with hogarius. Milty111, if you need help, you can copy/paste enough output from your game, starting from just before you see the fountain until just after you drink from it, and we can help you figure out a better trigger pattern.
 |
To make your code more readable please use [code] tags as described here.
|
|
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Milty111
USA (4 posts) Bio
|
Date
| Reply #3 on Mon 10 Apr 2017 04:40 PM (UTC) |
Message
| So here's what I found
This is in the room description:
A marble fountain covered in moss is here.
My trigger of * marble fountain * activates the command:
drink fountain
As you suspected, the drink action creates output from the game as follows which reactivates the trigger and throws me into a loop:
You drink from a marble fountain covered in moss in the room. | Top |
|
Posted by
| hogarius
USA (22 posts) Bio
|
Date
| Reply #4 on Tue 11 Apr 2017 01:31 AM (UTC) Amended on Tue 11 Apr 2017 02:27 AM (UTC) by hogarius
|
Message
| I suggest making your trigger pattern simply...
A marble fountain covered in moss is here.
Don't use any wildcards in this case. This will make your pattern specific enough to match when you see the fountain, but not match when you drink from the fountain. | Top |
|
Posted by
| Milty111
USA (4 posts) Bio
|
Date
| Reply #5 on Tue 11 Apr 2017 09:22 AM (UTC) |
Message
| That was the very first thing I tried and I also just now tried it again but sad to say it doesn't work for me. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #6 on Tue 11 Apr 2017 08:15 PM (UTC) |
Message
| Please copy and paste your simple trigger here:
 |
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
|
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Milty111
USA (4 posts) Bio
|
Date
| Reply #7 on Tue 11 Apr 2017 09:13 PM (UTC) |
Message
| <triggers>
<trigger
enabled="y"
match="A marble fountain covered in moss is here."
sequence="100"
>
<send>drink fountain</send>
</trigger>
</triggers> | Top |
|
Posted by
| Meerclar
USA (733 posts) Bio
|
Date
| Reply #8 on Sun 23 Apr 2017 05:52 AM (UTC) |
Message
| What I suggest is both more complicated and more elegant at the same time. Create 2 more triggers, one based on your drinking message that disables the original trigger to drink from the fountain, the other to enable the drinking trigger based on whatever thirst messages your mud provides. This has the added benefit of only drinking from fountains when you actually need to do so and cutting down on the overall spam generated by doing so. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | 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.
27,586 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top