[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Speedwalk Plugin Exit Alias

Speedwalk Plugin Exit Alias

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Edoren   (31 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] 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
[Go to top] top

Posted by Edoren   (31 posts)  [Biography] 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\.)$" >
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] 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
[Go to top] top

Posted by Edoren   (31 posts)  [Biography] 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)
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] 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:


   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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Edoren   (31 posts)  [Biography] 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\. *)$" >
]>
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] 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: &lt;exits&gt;

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] 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
[Go to top] top

Posted by Edoren   (31 posts)  [Biography] 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?
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] 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
[Go to top] top

Posted by Edoren   (31 posts)  [Biography] 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.
[Go to top] top

Posted by Edoren   (31 posts)  [Biography] 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.
[Go to top] 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.


25,947 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]