Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Lua
➜ temporary tiggers
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Krum
(1 post) Bio
|
Date
| Sun 17 Apr 2005 12:57 AM (UTC) |
Message
| 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)
end
I read something about flags in the help files, but couldn't figure it out. | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #1 on Sun 17 Apr 2005 07:12 AM (UTC) |
Message
| (Almost) independant of the scripting language you happen to be using:
http://www.gammon.com.au/scripts/function.php?name=AddTrigger
Just make sure your flag includes "temporary" (16384), whether you include it with constants, or with numbers themselves. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #2 on Mon 18 Apr 2005 07:14 AM (UTC) |
Message
| 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 | 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.
14,746 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top