trigger and time delays

Posted by Gasman on Wed 12 Nov 2003 11:39 PM — 3 posts, 18,229 views.

#0
ok, i want to be able to grat people when they complete a quest, or gain a level. but i want mushclient to do it for me. but i dont want the grat to come right after they complete the quest, so how can i put a time delay in there?
any ideaS? oh and if you need this it would say

"Name has completed a quest!" or "Name has gained a level!"
thanx
Australia Forum Administrator #1
Good idea. A delay makes it look less automated.

In the trigger, you can "send to script" and in the "send" box put something like this:

DoAfter 10, "%1 has completed a quest!"
Canada #2
Put this in your main script file:

Sub DoRand (MinTime, Maxtime, String)
	Dim DelayTime
	DelayTime = Int(((MaxTime-MinTime+1) * Rnd) + MinTime)
	World.DoAfter DelayTime, String
End Sub

...Then you could use that whenever you want to have a delayed send, with random time. For example:

DoRand 5,10, "say Hello"  ' Send the line at a random time between 5 and 10 seconds.
DoRand 1,5 "grat " & TargetPlayerName