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 ➜ Need help setting up a trigger

Need help setting up a trigger

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


Posted by Hardy   (2 posts)  Bio
Date Tue 27 Jul 2004 06:01 PM (UTC)
Message
Howdy! I'm a little new at this whole setting up triggers bit so I thought I'd ask you folks if you could help me.

What I'm trying to do is spam an alias about 10 times, sleep for 60 seconds, wake up and do it again. I want this to repeat until I give a command for it to stop.

So, based on that, how would I set it up?

Any help is greatly appreciate, thanks!
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Tue 27 Jul 2004 09:18 PM (UTC)

Amended on Wed 28 Jul 2004 08:24 AM (UTC) by Flannel

Message
How long does it take the commands to get proccessed? If we can incorperate that into this it will make it much easier.

Basically, all youll need is a timer, with for 60 seconds plus however long it takes for the 10 commands to get sent and go through the server, and back to you.

Your timer would consist of this:
wake
spam
spam
spam
spam
spam
spam
spam
spam
spam
spam
sleep

and then you'd give it a name (label) and then use an alias to turn it on, and another to turn it off (the aliases: send to script, send: enabletimer "[timer's label]", 1 or 0 (1 for on, 0 for off).

If you need to have it spam something thats an alias, then youll need to send to script (for the timer), and then send...
send "wake"
world.execute "spam alias"
world.execute "spam alias"
world.execute "spam alias"
world.execute "spam alias"
world.execute "spam alias"
world.execute "spam alias"
world.execute "spam alias"
world.execute "spam alias"
world.execute "spam alias"
world.execute "spam alias"
send "sleep"

And of course, if there is a variable time for the things to happen, then its still doable, although a bit more complicated. We'll need some real output from the mud and such (so we can trigger on, and know what were dealing with) to write the script.

(edit: for archive purposes, changed to world.execute as per nicks following post)
Also, you'll need to turn scripting on, and set it to VBScript (in game > config > scripting).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Wed 28 Jul 2004 05:51 AM (UTC)
Message
You could make the timer "send to execute" - that way it will pick up aliases if that is in the timer text.

If you are planning to use execute like in Flannel's example, it needs to be world.execute, because execute itself is a keyword in VBscript.

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


10,301 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.