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, 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 ➜ General ➜ using an alias to switch a trigger on / off

using an alias to switch a trigger on / off

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


Posted by Scouse   (17 posts)  Bio
Date Thu 21 Jul 2005 05:57 AM (UTC)

Amended on Thu 21 Jul 2005 06:01 AM (UTC) by Scouse

Message
been looking through forums and cant figure this one out ..

so ,
I have an alias that responds to a variable when im fighting someone -

*Nargus* smites your head into bloody fragments.

*Nargus* is then my target variable.

Now , im setting up a trigger for when he flees in X direction like -

*Nargus* panics and attempts to flee.
*Nargus* leaves west.

then I will capture the target has fled in that direction and i will follow and attempt to hit it .

However , and heres the bit I cant find .

In some situations , I dont want to follow him when he flees , so I need to be able to turn off the trigger that fires on seeing -

*Nargus* flees west.

I wanna use my macros for this , which I know how to do , I just dont know how to make an alias enable / disable a trigger .

so , ideally , heres the chain of events ...

I hit F1 which calls ThisisF1
in my aliases list ThisisF1 sends a command to toggle my trigger - on / off

I get a message -
Flee kill trigger ON
or
Flee kill trigger OFF

then ,

*Nargus* flees west. ( next line from the mud I want to trigger on )

would look summit like -

\**\* flees * ( this line isnt tested but I beleive it should work so that %1 is Nargus without the astericts

I would in game move in %2 direction ( or not if its toggeled off )
then would
K %1

I just cant figure out the toggling part , any help greatly appreciated .

scouse
Top

Posted by Larkin   (278 posts)  Bio
Date Reply #1 on Thu 21 Jul 2005 06:04 PM (UTC)
Message
If you want to toggle your trigger, you'll need to look into using one of the supported scripting languages and make use of the EnableTrigger function. You won't be able to do it without scripting.
Top

Posted by Scouse   (17 posts)  Bio
Date Reply #2 on Fri 16 Sep 2005 07:23 AM (UTC)
Message
ok , i figured it out , heres my 2 tracking triggers which im still working on :P

<triggers>
<trigger
expand_variables="y"
match="@target leaves * riding *"
name="chase"
sequence="90"
>
<send>%1 k @target</send>
</trigger>
</triggers>


<triggers>
<trigger
expand_variables="y"
match="@target leaves * "
name="chase2"
sequence="100"
>
<send>%1 k @target</send>
</trigger>
</triggers>


now i know @target wont work , im still figuring that part out yet on how to do that bit :P

heres the alias I came up with to turn em on and off
<aliases>
<alias
match="thisisF8"
enabled="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.enabletrigger "chase", true
world.enabletrigger "chase2", true</send>
</alias>
</aliases>
<aliases>
<alias
match="thisisF9"
enabled="y"
send_to="12"
sequence="100"
>
<send>world.enabletrigger "chase", false
world.enabletrigger "chase2", false</send>
</alias>
</aliases>


Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #3 on Fri 16 Sep 2005 08:31 AM (UTC)
Message
Why wont @target work?
And you can add a note to those aliases to tell you on/off (note "trigger on", etc).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Ekerim   Sweden  (18 posts)  Bio
Date Reply #4 on Fri 16 Sep 2005 05:23 PM (UTC)
Message
These kind of triggers is why triggers are banned (mostly) on MUME. Trigger-Player-Killing is not fun :(

// Fredrik
Top

Posted by Scouse   (17 posts)  Bio
Date Reply #5 on Sat 03 Dec 2005 07:59 PM (UTC)
Message
im not actually sure why @target wont work , im still tinkering with it to try and figure out why .
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #6 on Sat 03 Dec 2005 08:33 PM (UTC)
Message

<triggers>
  <trigger
   enabled="y"
   expand_variables="y"
   match="@target leaves * riding *"
   name="chase"
   sequence="90"
  >
  <send>%1
k @target</send>
  </trigger>
</triggers>


Assuming you have enabled the trigger, and you have the variable "target" set up, it works for me.

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


24,917 views.

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

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.