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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUDs
. -> [Folder]  General
. . -> [Subject]  How do I stop a trigger like in zmud?

How do I stop a trigger like in zmud?

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


Posted by Selene   (8 posts)  [Biography] bio
Date Wed 03 Nov 2010 04:34 AM (UTC)
Message
I have some value that I would like to learn how to setup

For example:
trigger = You killed
sanctus

your mind clears of your previous noncombat = sanctus

an important part, the corpse... = This is when I want sanctus to stop triggering
for example in tintin it is #unact sanctus

Same for combat spells

Any information?
I can send my mud file if its needed
Thanks
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 03 Nov 2010 05:08 AM (UTC)
Message
If by "stop" you mean stop the trigger firing you can disable it. Give it a name (label) and then use EnableTrigger to disable it.

Template:function=EnableTrigger EnableTrigger

The documentation for the EnableTrigger script function is available online. It is also in the MUSHclient help file.



(use false as the 2nd argument to disable the trigger).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Selene   (8 posts)  [Biography] bio
Date Reply #2 on Wed 03 Nov 2010 10:31 AM (UTC)
Message
It is not working for me in terms of how to enter the values
and when I go into the scripting window it either asks me for an external scripting file. or

Open
Connect
Get Focus
Lose Focus
Disconnect
Close
Save

For example as I said:
#trig {your mind clears of your previous noncombat} {sanctus}
#trig {a part missing, the corpse...} {sanctus-}
#var {sanctus+}
#var {sanctus-}
#alias {sanctus-} {#untrig {your mind clears of your previous noncombat}}
#alias {sanctus+} {#trig {your mind clears of your previous noncombat}}

or something like that



[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Wed 03 Nov 2010 07:56 PM (UTC)

Amended on Tue 26 Nov 2013 03:36 AM (UTC) by Nick Gammon

Message
Better read up on MUSHclient scripting. It doesn't work the same as tintin or zMUD.

Template:scripting Scripting tutorial

There is extensive information about scripting in MUSHclient at http://mushclient.com/scripting. This includes screen shots and examples.



Also in the Getting Started part of the forum are some simple tutorials (some done on Vimeo) which walk through setting triggers, aliases etc.

http://www.gammon.com.au/forum/?bbtopic_id=120

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Selene   (8 posts)  [Biography] bio
Date Reply #4 on Tue 16 Nov 2010 07:03 PM (UTC)
Message
absolutely no luck on this

There is no way for me to stop casting sanctus or combat spells when there is no target or when there is no corpse.

Read most of your page, just cant find a way to do what I need to.

[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Tue 16 Nov 2010 08:47 PM (UTC)
Message
How far have you got? Do you have a trigger set up? In other words, is the problem that you can't make a trigger at all, or you can't stop it firing?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Selene   (8 posts)  [Biography] bio
Date Reply #6 on Wed 17 Nov 2010 12:28 AM (UTC)
Message
I have all my triggers set up
Problem is I want the spell specific spells to stop casting when there is no target to avoid improper spam

That I havent been able to find
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Wed 17 Nov 2010 01:16 AM (UTC)
Message
OK then. Can you copy a couple and show me please?

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Selene   (8 posts)  [Biography] bio
Date Reply #8 on Wed 17 Nov 2010 02:14 AM (UTC)
Message
<triggers>
<trigger
enabled="y"
match="Your rage calms down, you can cast a combat spell again."
regexp="y"
sequence="100"
>
<send>castus
neo
</send>
</trigger>
</triggers>

<triggers>
<trigger
match="Your mind clears of your previous noncombat spell."
regexp="y"
sequence="100"
>
<send>sanctus</send>
</trigger>
</triggers>


<triggers>
<trigger
custom_colour="4"
enabled="y"
match="You are feeling rather hurt"
regexp="y"
sequence="100"
>
<send>vblood
stop fight
stop fight
stop fight
tend selene
tend selene
tend selene
tend selene
tend selene
k
ksmash
</send>
</trigger>
</triggers>
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Wed 17 Nov 2010 02:29 AM (UTC)

Amended on Wed 17 Nov 2010 02:31 AM (UTC) by Nick Gammon

Message
First I would put all the triggers/aliases that you want to use only during combat into a group, like this:


<triggers>
  <trigger
   group="combat"
   match="Your rage calms down, you can cast a combat spell again."
   regexp="y"
   sequence="100"
  >
  <send>castus
neo
</send>
  </trigger>
</triggers>


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.



Then you set up triggers in another group (or no group) that detects combat:


<triggers>
  <trigger
   enabled="y"
   match="an important part, the corpse"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>

EnableGroup ("combat" , false)
ColourNote ("cyan", "", "Combat group disabled.")

</send>
  </trigger>


  <trigger
   enabled="y"
   match="your mind clears of your previous noncombat"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>

EnableGroup ("combat" , true)
ColourNote ("cyan", "", "Combat group ENABLED.")


</send>
  </trigger>
</triggers>


Note that these triggers are "send to script" as enabling a group is a script operation.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Selene   (8 posts)  [Biography] bio
Date Reply #10 on Wed 17 Nov 2010 02:43 AM (UTC)
Message
Cannot use parentheses when calling a Sub
Line in error:
EnableGroup ("combat" , true)


Also:
no target to cast combat spell
You look around for your target but you cannot seem to locate it. Perhaps
your syntax is wrong or the target has left the area.

How do I stop it from casting nonstop
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #11 on Wed 17 Nov 2010 02:46 AM (UTC)
Message
Set the language to Lua in the Scripting configuration page.

Sounds like you have it at VBscript.

To turn the combat group off manually you could make an alias like this:


<aliases>
  <alias
   match="nocombat"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
EnableGroup ("combat" , false)
ColourNote ("cyan", "", "Combat group disabled.")
</send>
  </alias>
</aliases>


To use that just type "nocombat".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Selene   (8 posts)  [Biography] bio
Date Reply #12 on Wed 17 Nov 2010 02:53 AM (UTC)
Message
Your mind clears of your previous noncombat spell.
Combat group ENABLED.

It stops sanctus and doesnt cast it again, it should stop when it sees the part of the corpse....


Did I do something wrong?
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #13 on Wed 17 Nov 2010 03:11 AM (UTC)
Message
It is hard to work out what you are doing here with just snippets of what you are seeing. How about pasting some whole lines from the MUD, and say what you want to do, when.

But you should be able to work it out from the examples above. I gave a trigger that enables the combat group, and one that disables it. Maybe I misunderstood which should fire when.


If you can't get it to work, paste here:


  • The output from the MUD.

  • Explain what you expect to have happen, and when it should happen.

  • Paste all the relevant triggers you are using


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Selene   (8 posts)  [Biography] bio
Date Reply #14 on Wed 17 Nov 2010 03:41 AM (UTC)
Message
ok to start sanctus
You killed the master dwarven warrior.
sanctus

Your mind clears of your previous non-combat spell.
sanctus (since to destroy the corpse you need to do it twice)

when sanctus should stop:
important component to this spell, the corpse...

combat spells, with the nocombat alias it worked perfectly, also made a trigger for:
You look around for your target but you cannot seem to locate it. Perhaps your syntax is wrong or the target has left the area.
Combat group disabled.

If you give me an email I can send you my mudfile so you can review it if you wish.


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


30,940 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]