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
➜ Tips and tricks
➜ Speedwalk-ish alias
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Brendolino
(19 posts) Bio
|
Date
| Fri 15 Apr 2011 12:31 AM (UTC) |
Message
| I have an alias that sends me through an entire zone:
e;n;w;s;n;w
etc..
But I want to pick up specific objects I run across. I created a trigger to "get all" or "get <object>", and when I use my alias, the trigger fires... but the action doesn't happen until AFTER every command in the alias is executed. Thus.. once the "speedwalk" is done, I have 15 "You don't see that here."
Is there a way to inject a trigger into a speedwalk-style alias, where it goes instantly? | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 15 Apr 2011 04:22 AM (UTC) |
Message
|
Look further down the page to the amended plugin, and in particular the part starting "What you can do if you need to stop automatically and fight is make a trigger that reacts to something ...".
Basically you need to walk slowly enough that you have time to react to messages (like an object is in the room) before you have left the room. So combining the slow speedwalk with your trigger should do it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Brendolino
(19 posts) Bio
|
Date
| Reply #2 on Fri 15 Apr 2011 04:42 AM (UTC) |
Message
| Looks great.. and dunno if I should post issues here or on the primary, but I get...
Alias function "func_handle_speedwalk" not found or had a previous error.
when executing an alias: ! s d u n , as a test. | Top |
|
Posted by
| Brendolino
(19 posts) Bio
|
Date
| Reply #3 on Fri 15 Apr 2011 04:55 AM (UTC) |
Message
| Ok, so I reinstalled the plugin and it tries to work, only problem is, the exit format is different, so I assume this one may not work for me.
Obvious exits:
North - Cockpit
South - Durasteel Corridor
Down - Boarding Ramp | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #4 on Fri 15 Apr 2011 06:35 AM (UTC) |
Message
| Yes, you need to change the regexp near the start of the plugin (about line 11) to match what an exit line looks like, eg.
<!ENTITY exits_trigger
"^((?P<exits>Obvious exits:)|(.*)Alas, you cannot go that way\\.)$" >
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Brendolino
(19 posts) Bio
|
Date
| Reply #5 on Fri 15 Apr 2011 07:35 AM (UTC) |
Message
| Worked great. Only other issue I found was non-cardinal directions (ne, nw, se, sw) are parsed to their cardinal roots. I can bypass for now, but mebbe something to consider.
Thanks Nick, you rock! | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #6 on Fri 15 Apr 2011 07:57 AM (UTC) |
Message
| Well you are supposed to be able to type:
which means 4 x east, 1 x south, 1 x west
If you want to do things like NE and SW put them in brackets, eg.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #7 on Fri 15 Apr 2011 07:58 AM (UTC) |
Message
|
Brendolino said:
Thanks Nick, you rock!
Thanks! |
- 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.
22,932 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top