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
➜ Need help with a simple trig.
|
Need help with a simple trig.
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Ljuvlig
(1 post) Bio
|
| Date
| Fri 11 Dec 2009 08:13 PM (UTC) |
| Message
| Hello.
I'm new to MUSHClient, so please bear with me. I just want a simple auto-login trigger.
Here is the XML of the trig:
<triggers>
<trigger
enabled="y"
group="Multi Line"
lines_to_match="1"
keep_evaluating="y"
match="Do you wish to use ANSI colors? (Y/n): "
regexp="y"
repeat="y"
send_to="2"
sequence="100"
>
<send>y
eesti
password
l
l
</send>
</trigger>
</triggers>
The line I am trying to fire off of is:
Do you wish to use ANSI colors? (Y/n):
Note that there is a space after the colon.
It won't fire; I don't know why. I'm used to zMUD, so it's pretty foreign to me. I look at the regular expression syntax documentation, and tried to tinker with it, but I couldn't get anything out of it. If you could be so kind, I'd love some help. Triggers are pretty crucial to my mudding experience.
I'm using version 4.43.
THanks a lot.
| | Top |
|
| Posted by
| Twisol
USA (2,257 posts) Bio
|
| Date
| Reply #1 on Fri 11 Dec 2009 08:24 PM (UTC) Amended on Fri 11 Dec 2009 08:25 PM (UTC) by Twisol
|
| Message
| Primarily, I think you don't want this trigger to be marked as a regular expression. Uncheck that box and I believe it will work. Triggers marked as non-regex will be matches verbatim for the most part, although any *'s in the match line will be matched up to a single word when it triggers, which you can access in the Send box using %1, %2, and so on. You also don't need it to repeat on the same line, although that won't prevent it from executing.
However, you also don't need to create an auto-login trigger at all. If you go to the Game -> Configure -> Connecting dialog, there's a big textbox there you can use for your on-connect events. You can stick your name and password into the top two boxes, and use %name% and %password% in the text area to have them inserted in. So for you, you'd put something like this:
These commands will be sent immediately after connecting, so if there are any other commands you need to put in before the ANSI-colors query, be sure to add them. |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Sat 12 Dec 2009 12:03 AM (UTC) Amended on Sat 12 Dec 2009 12:04 AM (UTC) by Nick Gammon
|
| Message
|
Why not just put a script in the "on connect" event? That question shows up shortly afterwards anyway. Which is pretty much what Twisol said. :) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Sat 12 Dec 2009 07:14 PM (UTC) |
| Message
| | The link on the FAQ shows some general techniques. The basic problem is that a "question" prompt will not end with a newline, and thus triggers won't activate. A small plugin (of which there are examples elsewhere) can detect "Do you wish to use ANSI colors? (Y/n):" and add a newline to it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | 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.
15,988 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top