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


Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  flee trigger

flee trigger

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


Posted by Unregistered user   (72 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (23,043 posts)  [Biography] 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
[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,474 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]