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

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  using an alias to switch a trigger on / off
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

using an alias to switch a trigger on / off

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Scouse   (17 posts)  [Biography] bio
Date Thu 21 Jul 2005 05:57 AM (UTC)  quote  ]

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
[Go to top] top

Posted by Larkin   (250 posts)  [Biography] bio
Date Thu 21 Jul 2005 06:04 PM (UTC)  quote  ]
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.
[Go to top] top

Posted by Scouse   (17 posts)  [Biography] bio
Date Fri 16 Sep 2005 07:23 AM (UTC)  quote  ]
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>


[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Fri 16 Sep 2005 08:31 AM (UTC)  quote  ]
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.
[Go to top] top

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

// Fredrik
[Go to top] top

Posted by Scouse   (17 posts)  [Biography] bio
Date Sat 03 Dec 2005 07:59 PM (UTC)  quote  ]
Message
im not actually sure why @target wont work , im still tinkering with it to try and figure out why .
[Go to top] top

Posted by Nick Gammon   Australia  (15,726 posts)  [Biography] bio
Date Sat 03 Dec 2005 08:33 PM (UTC)  quote  ]
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
[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.


2,339 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]