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.
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".
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.
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.
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
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.
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>
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:
-------------------------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".
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
I figured it out.. Due to my shaping triggers not being in Regular expression it was as you said trying to evaluate both sets of triggers at the same time.. I converted my shaping triggers into Regular Expressions and now everything works like a charm... Thanks for your help and time.
no.. I was just trying anything and everything.. But I got it working now and everything is working as it should.. Now to just start figuring out how to run scripts that will use flask1 if it's there. Else flask2 if flask1 is not there. Else bota is flask1 and 2 are not there..
Nick,
You have been a very big help.. I appreciate it more then I can say.. Everything is working great and my client is now alot better then it was when I started. It's almost BOT like in pk mode now.. only thing I have to do is type (sh) to stay alive during pk attempts now.. Well that and my profession commands.. Thank you once again for all your help.