[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]  temporary tiggers
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

temporary tiggers

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

Posted by Krum   (1 post)  [Biography] bio
Date Sun 17 Apr 2005 12:57 AM (UTC)
I am new to this.

How can I create a temporary trigger, which would disappear after being triggered once?

function unwearArmour ()
Send ("remove armour")

then I want to wait for the message "You have recovered balance on all limbs." And when I get that trigger:

Send ("put armour in "..var.MyBag)

I read something about flags in the help files, but couldn't figure it out.
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #1 on Sun 17 Apr 2005 07:12 AM (UTC)
(Almost) independant of the scripting language you happen to be using:
Just make sure your flag includes "temporary" (16384), whether you include it with constants, or with numbers themselves.


Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Mon 18 Apr 2005 07:14 AM (UTC)
This doesn't auto-delete on firing, it just doesn't save it to the world file. Why would you want to do this? It would be easier to have the trigger disable itself in the script, and then re-enable it when you want it to be active again.

- 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.


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]