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

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Hungry/Thirsy Trigger
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

Hungry/Thirsy Trigger

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

Posted by Meraki   (7 posts)  [Biography] bio
Date Mon 26 May 2014 03:53 PM (UTC)
I have a trigger that isn't firing correctly and I -think- I have the correct syntax. Here is what I have:

Line to match: "You are *."

What is sent to script:

if %1 == "hungry" then
Exectue ("eat meb")
elseif %1 == "thirsty" then
Execute ("drink dec")
Execute ("drink dec")

I run into a problem however. The line is fairly ambiguous and will match to a few different lines one such being:

You are exceptionally intelligent.

This throws the error:

[string "Trigger: "]:1: 'then' expected near 'intelligent'

Is there something I'm doing wrong here?
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 26 May 2014 08:59 PM (UTC)
Template:faq=32 Please read the MUSHclient FAQ - point 32.

- Nick Gammon

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

Posted by Meraki   (7 posts)  [Biography] bio
Date Reply #2 on Wed 28 May 2014 09:55 PM (UTC)
This worked beautifully, Thank you!
[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.


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.


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 FutureQuest]