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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Script request

Script request

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


Posted by Omega   (1 post)  [Biography] bio
Date Wed 21 Dec 2005 05:07 AM (UTC)
Message
I'm trying to get this thing to work on the mud I play. Basically, there are 12 different things that can be triggered for the same failure.

You turn up empty-handed, despite your best efforts.
You spot a few likely-looking plants, but none turns out to be suitable.
You search diligently, but can't remember how to find what you're looking for.
You search all around, but find nothing.
You look in all the right places, but can't find anything.
You fumble around for a while but find nothing.
You find only a handful of half-rotted plants.
You find only a few half-rotted plants.
You find only a few blighted plants.
You fail to find anything usable.
You can't seem to find anything useful here.
You can't find anything that looks like what you want.

I want to be able to make a trigger that I only have to make 1 trigger for, that way I can go in and manually change what I want to gather. Unless, of course, you can get it to repeat the last command that was inputted, such as "gather strawberry", or the universal command "forage".

Thanks.
[Go to top] top

Posted by RashinLord   Canada  (29 posts)  [Biography] bio
Date Reply #1 on Wed 21 Dec 2005 01:46 PM (UTC)
Message
Type an one of these in your mud. --> ! <--
On most muds the exclemation mark will repeat your last command. So if you set up that trigger to send one it would repeat the same one you used before.

-RL
[Go to top] top

Posted by Nick Gammon   Australia  (22,990 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Wed 21 Dec 2005 09:46 PM (UTC)
Message
You want a regular expression with an "or" test, like this:

Match:

You turn up empty-handed, despite your best efforts\.|You spot a few likely-looking plants, but none turns out to be suitable\.| ... and so on

That will match on any string in the list. You need to escape special characters like periods with a backslash.

See this post for more details about regular expressions:

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=5089



- Nick Gammon

www.gammon.com.au, www.mushclient.com
[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.


10,868 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]