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 ➜ VBscript ➜ triggers on/off

triggers on/off

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


Posted by Firgin   (15 posts)  Bio
Date Fri 30 Apr 2004 05:19 PM (UTC)
Message
is it any way to make a trigger to turn of a group or triggers? or an alias..
-thanks
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Fri 30 Apr 2004 06:03 PM (UTC)

Amended on Fri 30 Apr 2004 06:06 PM (UTC) by Flannel

Message
World.EnableTrigger [triggername], 0
World.EnableTriggerGroup [groupname], 0
World.EnableGroup [groupname], 0
World.EnableAlias [aliasname], 0

The names all have to be strings, so if youre just disabling something, youll need quotes, if youre using a pointer, youll just need the variable, assuming its a string.

In most cases you can ditch the "world." and simply use "EnableTrigger [triggername], 0".

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Firgin   (15 posts)  Bio
Date Reply #2 on Sun 02 May 2004 02:45 PM (UTC)
Message
eh? is it possible in any other way? you really got me there... *shrug*
thanks though.
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #3 on Sun 02 May 2004 06:09 PM (UTC)
Message
Alright, The first of these turns off a trigger named "yourtriggername" when you type "triggeroff", the second you type triggeroff [trigger], and it will turn off the trigger with the corresponding name.

You can copy the whole thing (<aliases> to </aliases>) and then click paste on the alias screen and theyll be added.
As seen here:
http://www.gammon.com.au/images/alias_paste.gif

<aliases>
<alias
match="^triggeroff$"
enabled="y"
regexp="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>enabletrigger &quot;YourTriggerName&quot;, 0</send>
</alias>
<alias
match="^triggeroff (\w+)$"
enabled="y"
regexp="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>enabletrigger %1, 0</send>
</alias>
</aliases>


If you want a trigger to do it, then you would have a trigger with the same thing, youd send to : script, and then have that same send string.

If you wanted to manipulate a group, or an alias (turn a group or an alias off) then youd change the send text appropriately (see my last post).

If you want to post less general things, I can show you more definately.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #4 on Sun 02 May 2004 09:47 PM (UTC)
Message
Quote:

<send>enabletrigger %1, 0</send>


You need to quote the argument, like this:

<send>enabletrigger "%1", 0</send>

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #5 on Sun 02 May 2004 09:49 PM (UTC)

Amended on Sun 02 May 2004 09:51 PM (UTC) by Nick Gammon

Message
A simple, one-off, way to do it is to simply type the command in the command window. eg.


/EnableGroup "mygroup", 1



  • The "/" is the "script escape" character (assuming you have enabled scripting and not changed it to something else.

  • The EnableGroup command enables a group.

  • "mygroup" is the name of it (which you set when entering triggers)

  • "1" means "true" (ie. enabled, rather than disabled)


Use this to disable them:


/EnableGroup "mygroup", 0


Then, as Flannel was saying, you can make an alias to automate the process a bit.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Firgin   (15 posts)  Bio
Date Reply #6 on Mon 03 May 2004 03:53 PM (UTC)
Message
Woot! Thank you, I love you guys :P
Top

Posted by Firgin   (15 posts)  Bio
Date Reply #7 on Mon 03 May 2004 06:48 PM (UTC)
Message
one more thing.. is it possible in any way to send to two places, like if I want to send to word, and script, what do I do? with the same trigger message of course.. I've tried making two triggers, but only one of them trigger.
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #8 on Mon 03 May 2004 07:17 PM (UTC)

Amended on Mon 03 May 2004 07:19 PM (UTC) by Flannel

Message
You can either have the script have a "world.send" (or just send as it doesnt need the world.), or you can use the script escape. The former is the recommended, so you'd send to script:

EnableTrigger "Trigger", 0
Send "This Text Goes to Mud"

Youre really only sending to one place, but then youre having the script send to the world.

And, if you do have two triggers, they will work, you just need to check the 'keep evaluating' box, that will make the line go through the rest of the triggers. However, that requires two triggers, and if you want to change the text, youd have to change both, so this way is a lot easier, for numerous reasons.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
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.


28,824 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.