Gammon Forum
Entire forum
MUSHclient
General
flee trigger
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Unregistered user
(72 posts) bio
|
Date
| Wed 07 Mar 2001 06:30 PM (UTC) |
Message
| what i'm trying to do now, is make a flee trigger, but i dont want it to be on all the time
on the mud i play, the output for a failed flee is "PANIC! You couldn't escape!"
i have a trigger set to "flee" again when it sees that text, but its not always the best idea to try to flee if you cant the first time, say if i was in a room and someone closed the door, i would just keep fleeing over and over and couldnt get out, or on the mud there is a prismatic cube spell where if i flee into it, it might do damage to me. so i wouldnt want to flee into it over and over...
what i would like to do, is make an alias, possibly called "fleeon", that would activate my flee trigger, then if i wanted to turn it off, i could have another alias called "fleeoff" which would disable the flee trigger.
how can i go about doing this?
- borixanon | top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #1 on Wed 07 Mar 2001 06:38 PM (UTC) Amended on Wed 07 Mar 2001 11:30 PM (UTC) by Nick Gammon
|
Message
| This is pretty straightforward ...
You will need two aliases, fleeon and fleeoff. They will need to call a script each. Start by putting the following lines into your script file, assuming you are using VBscript:
sub OnFleeOn (thename, theoutput, thewildcards)
World.EnableTrigger "flee_trigger", TRUE
end sub
sub OnFleeOff (thename, theoutput, thewildcards)
World.EnableTrigger "flee_trigger", FALSE
end sub
Then make your two aliases:
Alias: fleeon
Send: (nothing)
Label: fleeon
Script: OnFleeOn
Alias: fleeoff
Send: (nothing)
Label: fleeoff
Script: OnFleeOff
Finally, edit the trigger that matches on the words "PANIC! You couldn't escape!" and give it a label: "flee_trigger".
Now when you type "fleeon" it will call the script which enables your flee trigger, and when you type "fleeoff" it will call the script that disables the trigger.
|
- 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.
9,993 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
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.