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
➜ help with a trigger or script
|
help with a trigger or script
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Tal
(2 posts) Bio
|
| Date
| Thu 01 Jan 2004 03:13 AM (UTC) |
| Message
| I have been using mushclient for a little while now and i was just wondering if someone could help me with a trigger or a script as i am a complete newbie to it all.
what i need to do is activate a timer on an event and disable it on another event.
so....
a monster has a few wounds. (timer activated to send the "kick" command every 5 seconds.
a mosnster is in awful condition (timer stoped)
i have no idea how to use scripts so any help i would be thankful for.
| | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Thu 01 Jan 2004 06:23 AM (UTC) Amended on Thu 01 Jan 2004 07:42 PM (UTC) by Nick Gammon
|
| Message
| OK, you need a couple of triggers and a timer. Like this:
<timers>
<timer name="KickTimer" enabled="n" second="5" >
<send>kick</send>
</timer>
</timers>
<triggers>
<trigger
custom_colour="2"
enabled="y"
match="* has a few wounds"
send_to="12"
sequence="100"
>
<send>EnableTimer "KickTimer", vbTrue
ColourNote "white", "green", "Kick timer now enabled"</send>
</trigger>
<trigger
custom_colour="1"
enabled="y"
match="* is in awful condition"
send_to="12"
sequence="100"
>
<send>EnableTimer "KickTimer", vbFalse
ColourNote "white", "red", "Kick timer now disabled"</send>
</trigger>
</triggers>
You will need to enable scripting for this to work (VBscript language). No script file is needed.
Copy between the lines above and go to File -> Import -> Clipboard. This will import one timer and two triggers. You will need to modify the triggers to match exactly what the MUD sends. (eg. if it is really "a monster is in awful condition." then the trailing period is needed). I made the trigger with a wildcard (*) so that it would match on any monster name.
Then you can inspect the timer and triggers to see what they do. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Tal
(2 posts) Bio
|
| Date
| Reply #2 on Thu 01 Jan 2004 06:57 AM (UTC) |
| Message
| it works great...
the little mesages were a nice touch
thanks heaps nick | | Top |
|
| Posted by
| Firgin
(15 posts) Bio
|
| Date
| Reply #3 on Mon 15 Mar 2004 05:43 PM (UTC) |
| Message
| Hey, I tried out a simple walking script, from the example above, but it won't work.. anyone know what I did wrong?
<timers>
<timer name="WalkTimer" enabled="n" second="5">
<send>west</send>
</timer>
</timers>
| | Top |
|
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #4 on Mon 15 Mar 2004 06:05 PM (UTC) |
| Message
| | Did you change "KickTimer" to WalkTimer in the script? |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Firgin
(15 posts) Bio
|
| Date
| Reply #5 on Mon 15 Mar 2004 06:36 PM (UTC) |
| Message
| |
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #6 on Mon 15 Mar 2004 06:54 PM (UTC) |
| Message
| | I don't know what it could be, maybe the triggers do not match? |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Firgin
(15 posts) Bio
|
| Date
| Reply #7 on Mon 15 Mar 2004 07:04 PM (UTC) |
| Message
| | I dun have any triggs, I just tried to make a timer to check out how it works.. what kind of triggers do I need? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #8 on Mon 15 Mar 2004 08:16 PM (UTC) |
| Message
| | You have the timer disabled (enabled="n") - that means it is there but not doing anything. Edit the timer and check the "enabled" box. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Firgin
(15 posts) Bio
|
| Date
| Reply #9 on Mon 15 Mar 2004 08:49 PM (UTC) |
| Message
| |
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,492 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top