Speedwalk Plugin Exit Alias

Posted by Edoren on Thu 21 Sep 2006 09:17 PM — 13 posts, 41,656 views.

#0
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
Amended on Thu 21 Sep 2006 09:20 PM by Edoren
Australia Forum Administrator #1
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.
#2
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\.)$" >
Australia Forum Administrator #3
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.
#4
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)
Amended on Sun 01 Oct 2006 06:55 AM by Edoren
Australia Forum Administrator #5
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:


   Send (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.
#6
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\. *)$" >
]>
Amended on Mon 02 Oct 2006 04:46 AM by Edoren
Australia Forum Administrator #7
The symbols < and > are reserved for the XML parsing.

Replace: <exits>

by: &lt;exits&gt;
Australia Forum Administrator #8
In fact the whole line looks strange. The MUD isn't going to send down "custom_colour.7,0," is it?
#9
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?
Amended on Mon 02 Oct 2006 10:51 PM by Edoren
Australia Forum Administrator #10
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.
#11
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.
#12
thanks for the help. this is running perfect for me now.