flee trigger

Posted by Unregistered user on Wed 07 Mar 2001 06:30 PM — 2 posts, 13,705 views.

#0
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
Australia Forum Administrator #1
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.