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
➜ Trigger Help
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Malek
USA (27 posts) Bio
|
Date
| Sat 19 Aug 2006 07:31 PM (UTC) |
Message
| This is a fairly simple question, Really upsets me I can't get something this simple to work.
Here's the deal...
I am trying to get mush to trigger from the promt on my name.
Malek doesn't look so great. (is what I need triggered)
I have tried it as - Malek doesn't look so *
^Malek doesn't look so great\.$
Malek doesn't look so great.
once I get it to trigger on that exact phrase from the mud prompt. I then need it to send a alias command as a response to the mud..
The alias command would be - flask1,flask2,bota
Ifsomeone could help me take care of this simple yet aggrivating issue I am having here I would greatly appreciate it. |
Tod ist gweiss, Lebens est nicht. | Top |
|
Posted by
| Renquist
(11 posts) Bio
|
Date
| Reply #1 on Sat 19 Aug 2006 09:54 PM (UTC) Amended on Sat 19 Aug 2006 09:57 PM (UTC) by Renquist
|
Message
| The problem is not the matched text, it is in where the trigger sends the result. You should set 'Send To:=Execute' in the trigger dialogue to have the results sent via the command line. The command line evaluates alias'. 'Send To:=World' just sends the text in the send box to the MUD.
You can test to see if a trigger fired by sending fake input to MUSHclient. Menu "Game->Test Trigger". You could also set trace on via "Game->Trace".
<triggers>
<trigger
enabled="y"
match="^Malek doesn't look so great\.$"
regexp="y"
send_to="10"
sequence="100"
>
<send>flask1
flask2
bota</send>
</trigger>
</triggers>
| Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #2 on Sat 19 Aug 2006 09:55 PM (UTC) Amended on Sat 19 Aug 2006 09:56 PM (UTC) by Nick Gammon
|
Message
| What is the problem? The trigger isn't firing? Or you can't send the stuff you want?
Can you post the actual trigger you used?
See:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4776
Then post the exact line you received from the MUD. Based on what you described above it should have worked.
However if the line you actually received is:
<100h 200mv 300m> Malek doesn't look so great.
Then it will not fire, because the line starts with extra stuff. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Malek
USA (27 posts) Bio
|
Date
| Reply #3 on Sat 19 Aug 2006 11:09 PM (UTC) |
Message
| The Line I need triggered is this:
Malek doesn't look so great.
The trigger I have set is this:
^Malek doesn\'t look so great\.$
The trigger is sending to mud a set of aliases I have made named FLASK1 and FLASK2 and BOTA. Which is really notwhat I intend to do once I learn how to make scripts.. I would eventualyl like it in Lua script to run FLASK1 only if FLASK1 is in my cloak..
Else run the FLASK2 alias from the pack...
If neither are there then to run the BOTA alias.
As you probably can tell I have no damned clue what I am doing yet until recently I typed all my commands in via Telnet as I went.. if one could help me write a code for it the that would be great..
If it helps the hp and ep on this game shows up as:
HP:220 EP:220 (but not when you are shaped)
That simpley comes up as Malek doesn't look so great. |
Tod ist gweiss, Lebens est nicht. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #4 on Sat 19 Aug 2006 11:46 PM (UTC) |
Message
| Malek, it will help me to assist you if you answer my questions. Did the trigger match, or not? If you edit the trigger you will see (about half-way down) "0 matches" or maybe "5 matches". That will tell if it is matching.
I asked you to show me the actual trigger, I expect some XML code like Renquist posted in his reply.
Renquist is right, if the trigger is supposed to send aliases, then you need to set the "send to" field to "execute", otherwise it just sends the words "flask1" etc. to the MUD. However it is hard to tell exactly what you are doing until you post the actual trigger. Follow the link I gave for how to do that. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Malek
USA (27 posts) Bio
|
Date
| Reply #5 on Sat 19 Aug 2006 11:58 PM (UTC) |
Message
| Opps sorry :)
this is the trigger:
<triggers>
<trigger
enabled="y"
match="^Malek doesn\'t look so great\.$"
sequence="100"
>
<send>flask1</send>
</trigger>
</triggers>
I see no matches and the output is to the world.
The send flask1 is a preset alias that sends:
do get flask from cloak,open flask,drink flask,close flask,put flask into cloak |
Tod ist gweiss, Lebens est nicht. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #6 on Sun 20 Aug 2006 12:25 AM (UTC) |
Message
| OK, that trigger looks like a regular expression, but you don't have regexp checked. Either make it "normal" like this:
match="Malek doesn't look so great."
or, check the "regular expression" checkbox. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Malek
USA (27 posts) Bio
|
Date
| Reply #7 on Sun 20 Aug 2006 12:30 AM (UTC) |
Message
| Regular expression checked now... Still will not fire any other suggestions?
<triggers>
<trigger
enabled="y"
match="^Malek doesn\'t look so great\.$"
regexp="y"
sequence="100"
>
<send>flask1</send>
</trigger>
</triggers>
Also tried it like this...
<triggers>
<trigger
enabled="y"
match="Malek doesn't look so great."
sequence="100"
>
<send>flask1</send>
</trigger>
</triggers>
Still nothing... |
Tod ist gweiss, Lebens est nicht. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #8 on Sun 20 Aug 2006 12:57 AM (UTC) |
Message
| Hmmm - can you copy and paste the text from the MUD that is supposed to trigger it? With a couple of the surrounding lines too please. Don't retype it, copy directly from the output window.
I suspect there is a space there somewhere. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Malek
USA (27 posts) Bio
|
Date
| Reply #9 on Sun 20 Aug 2006 01:00 AM (UTC) |
Message
| had to go get beat up for this :)
do shape all here
Do: starting commands.
HP:106 EP:213>
Malek doesn't look so great.
-------------------------Malek DOESN'T LOOK SO GREAT-------------------------
Troll is in average shape.
-------------------------Troll in AVG SHAPE-------------------------
HP:106 EP:213>
Do: Commands completed.
HP:106 EP:213>
|
Tod ist gweiss, Lebens est nicht. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #10 on Sun 20 Aug 2006 01:18 AM (UTC) |
Message
| I tried that and your trigger worked. I copied and pasted into Game menu -> Test Trigger (Shift+Ctrl+F12) and the trigger fired.
In your trigger list (the list of all triggers) do you have "Enable Triggers" checked? Try setting a colour for the match so you can see if it matches visually. Also if "flask1" is an alias then you should send to Execute and not World. This is what I had in the end:
<triggers>
<trigger
custom_colour="2"
enabled="y"
match="Malek doesn't look so great."
send_to="10"
sequence="100"
>
<send>flask1</send>
</trigger>
</triggers>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #11 on Sun 20 Aug 2006 01:20 AM (UTC) Amended on Sun 20 Aug 2006 01:21 AM (UTC) by Nick Gammon
|
Message
| Ah, and where does this come from ...
-------------------------Malek DOESN'T LOOK SO GREAT-------------------------
Is that another trigger?
If so, each trigger should have "keep evaluating" checked, or only the first matching trigger is processed. If you want to have the same line trigger multiple triggers you need "keep evaluating". |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Malek
USA (27 posts) Bio
|
Date
| Reply #12 on Sun 20 Aug 2006 01:28 AM (UTC) |
Message
| Ok I checked to make sure that all triggers were enabled on my triggers list. (Enable Triggers is checked. I also set a color match.. RED on RED and custom color #7
<triggers>
<trigger
back_colour="9"
custom_colour="7"
enabled="y"
match="Malek doesn't look so great."
match_back_colour="y"
match_text_colour="y"
send_to="10"
sequence="100"
text_colour="9"
>
<send>flask1</send>
</trigger>
</triggers>
Still nothing. |
Tod ist gweiss, Lebens est nicht. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #13 on Sun 20 Aug 2006 01:46 AM (UTC) |
Message
| What about my other question? Does another trigger also match that line? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Malek
USA (27 posts) Bio
|
Date
| Reply #14 on Sun 20 Aug 2006 01:52 AM (UTC) |
Message
| Missed that question earlier..
Yes this is another trigger used to quickly and noticably report the shape of who I shape.. Trigger is as follows
<triggers>
<trigger
custom_colour="7"
enabled="y"
keep_evaluating="y"
match="* doesn't look so great."
send_to="2"
sequence="100"
>
<send>-------------------------%1 DOESN'T LOOK SO GREAT-------------------------</send>
</trigger>
</triggers>
|
Tod ist gweiss, Lebens est nicht. | 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.
57,691 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top