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
➜ Speedwalk Plugin Exit Alias
Speedwalk Plugin Exit Alias
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Edoren
(31 posts) Bio
|
Date
| Thu 21 Sep 2006 09:17 PM (UTC) Amended on Thu 21 Sep 2006 09:20 PM (UTC) by Edoren
|
Message
| Hi, im having trouble trying to figure out how i should setup the exit trigger for the speedwalk plugin so that it continues and stops depending on what i see. Here is a regular room:
Tunnel bend (road).
The flickering flames of many torches provide a strange ambience to your surroundings that are mostly shrouded in the shadows. The tunnel is at its widest point here, offering much room for less fortunate souls to rest their weary bodies without getting in anyone's way. There is scribbling all over the stone walls although most of it is not intelligible to you in this light. You wonder about the stories these walls must tell and struggle to get your bearings in the dull glow around you.
You see exits leading east and southwest.
839h, 814m ex-
The first line with the room name is highlighted bright yellow, the exit line in bright red, and the (839h, 814m) in bright green. If i walk in an invalid direction i get this:
There is no exit in that direction.
839h, 814m ex-
Can anyone help me out on this? I'm trying to get it to react on the line: "You see exits leading" and the "There is no exit in that direction." I've tried fiddling around with the wildcard expressions but i cant seem to get it right. :P | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Thu 21 Sep 2006 10:14 PM (UTC) |
Message
| It would help if you posted the triggers you have developed so far. Matching on "There is no exit in that direction." should be pretty easy, I can't see how that would fail.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Edoren
(31 posts) Bio
|
Date
| Reply #2 on Thu 21 Sep 2006 10:31 PM (UTC) |
Message
| actually that's not what im having a problem with. i cant figure out how to match the room desc exits so that it continues on instead of timing out on me. i was using this script that you wrote:
<!ENTITY exits_trigger
"^((?P<exits>Exits: .*\.)|(.*)Alas, you cannot go that way\.)$" >
<!ENTITY exits_trigger
"^((?P(.*)You see exits leading .*\.)|There is no exit in that direction\.)$" > | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Fri 22 Sep 2006 10:24 PM (UTC) |
Message
| I can't test right now, but your's doesnt' quite look right.
Try:
<!ENTITY exits_trigger
"^((?P<exits>You see exits leading (.*)\. *)|There is no exit in that direction\. *)$" >
It looks to me like there is a space after the period. I am matching that with (space)* - that matches zero or more spaces.
If that doesn't work, just make a trigger matching that pattern and colour the output line. Then tweak the trigger until it matches (colours the line) and use the working version in the plugin. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Edoren
(31 posts) Bio
|
Date
| Reply #4 on Sun 01 Oct 2006 05:48 AM (UTC) Amended on Sun 01 Oct 2006 06:55 AM (UTC) by Edoren
|
Message
| the speedwalk plugin works like a charm but now im getting stopped for moving too fast. how would i add in a wait timer between rooms, or at least a trigger for when im told im moving too fast so that it will then wait and resume?
Accidently threw myself into a loop. The plugin uninstalled, and now when i install i get this:
Line 9: Expected '>', got Y (problem in this file) | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #5 on Mon 02 Oct 2006 01:22 AM (UTC) |
Message
| It shouldn't move you too fast, the whole idea is it waits until you reach another room.
However you could try adding:
wait (t, 2) -- wait for 2 seconds
just before the line:
Quote:
Accidently threw myself into a loop. The plugin uninstalled, and now when i install i get this:
Don't know what you have done here, try looking at line 9 in the plugin. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Edoren
(31 posts) Bio
|
Date
| Reply #6 on Mon 02 Oct 2006 04:26 AM (UTC) Amended on Mon 02 Oct 2006 04:46 AM (UTC) by Edoren
|
Message
| i cant figure out what's wrong with the line.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient
[
<!ENTITY speedwalk_alias "!*" >
<!ENTITY pause_speedwalk_alias "pause speedwalk" >
<!ENTITY resume_speedwalk_alias "resume speedwalk" >
<!ENTITY abort_speedwalk_alias "abort speedwalk" >
<!ENTITY timeout_secs "10" >
<!ENTITY exits_trigger "^((?P<exits>custom_colour.7,0,"You see exits leading (.*)\. *)"|There is no exit in that direction\. *)$" >
]> | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #7 on Mon 02 Oct 2006 05:48 AM (UTC) |
Message
| The symbols < and > are reserved for the XML parsing.
Replace: <exits>
by: <exits> |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #8 on Mon 02 Oct 2006 05:50 AM (UTC) |
Message
| In fact the whole line looks strange. The MUD isn't going to send down "custom_colour.7,0," is it?
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Edoren
(31 posts) Bio
|
Date
| Reply #9 on Mon 02 Oct 2006 09:12 PM (UTC) Amended on Mon 02 Oct 2006 10:51 PM (UTC) by Edoren
|
Message
| its working even without the color now. the reason i added a wait in there was that the game actually throws out a message saying im going to fast and stops me for a bit.
btw, is there a way to add comments inside the speedwalk, or a way to pause the speedwalk at a certain point without myself having to pause it? | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #10 on Tue 03 Oct 2006 01:11 AM (UTC) |
Message
| Yes, you can add comments. See:
http://www.gammon.com.au/scripts/doc.php?general=speed_walking
Comments are put inside { ... }
I think someone did a script a while ago that paused a speedwalk. Basically it saved the current speedwalk string, and restored it when you wanted to resume it. Search this forum for "pause speedwalk" or something like that. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Edoren
(31 posts) Bio
|
Date
| Reply #11 on Tue 03 Oct 2006 01:12 AM (UTC) |
Message
| nm. im just using a trigger whenever i enter the room to pause the speedwalk. i've noticed however that the pause waits to receive a room confirmation. ex: if there are no exits visible the speedwalk will time-out even if i have already told it to pause. anyway this can be solved by walking to another room where it see's the exit and confirms the pause. | Top |
|
Posted by
| Edoren
(31 posts) Bio
|
Date
| Reply #12 on Tue 03 Oct 2006 02:48 AM (UTC) |
Message
| thanks for the help. this is running perfect for me now. | 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.
28,932 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top