simple timed trigger (I hope) <- wanting one, not providing

Posted by Thokerk on Sat 29 Jan 2005 10:00 PM — 4 posts, 15,080 views.

#0
i have no idea how to script (only recently actually discovered it existed. All I would like to ask now, is if anyone is able to write me a script or trigger.
It should do an action 2 seconds after a certain thing happens in the mud (<- means with a trigger of some sort i believe)(let's say, a rat attacks, 2 seconds later i want to automaticaly attack it, and this every time one or another rat attacks).
I would just like a trigger where i just have to write the required trigger message( e.g. "a rat hits you...") and the action (e.g. "you punch a rat ...")

Thank you to anyone that can, would and will help.
Thokerk
#1
Me again.
It's just to add, that if possible I would like a step by step explanation on how to create this particular script, because I can't even use triggers decently.
sorry for the annoyance.
Thokerk
USA #2
The trigger for the rat thing is easy enough, just create a new trigger, for the match text (thats the wide text field across the top) type in whatever you want to match on (careful though, it requires an exact match, including spaces and punctuation and such) you can replace things that are variable with * which is a wildcard.
Then for the send text (thats the large box in the middle) you type whatever you want to send to the mud.
I also suggest checking ignore case (and maybe changing the color of the matched text, to give you a visual clue that the trigger is matching, while youre learning triggers anyway.

As for the two second thing, again, you'll need to know what you want to match on, and what you want to send (repeat the stuff in the first paragraph) except that you'll change the 'send to' dropdown menu to script, and then in the send box youll type:
DoAfter 2, "this gets sent after two seconds"
and obviously, change the stuff sent (keep it in quotes though).
Oh, if you havent done any scripting yet, you'll need to enable it (game > configuration > scripting) check enable, and choose a language (VBScript is what that example is in).
#3
thank you, that was exactly what i needed!!