View Full Version : Quest Timers
Scorpx725
12-17-2004, 08:14 AM
Ok, Ive never asked since Ive never used them, and never had a need to. But now I was wondering...
How exactly do you use the timers? I have a few interesting ideas but I dont know how to use the timer commands :cry:
Cisyouc
12-17-2004, 08:18 AM
Example using timers.
sub EVENT_SPAWN
{
quest::say("I'm the Greeter! I say 'Greetings' every minute!");
quest::settimer(1,60);
}
sub EVENT_TIMER
{
quest::say("Greetings!");
quest::settimer(1,60);
}
sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::say("Same to you, friend!");
}
}
Scorpx725
12-17-2004, 08:20 AM
Thanks Cisyouc.
What about having multiple timers in one quest, with each having a different function?
quest::settimer(1,60);
The 1 is the timer number, so for that he says Greetings every minute, but what if I want timer 2 to do something else, like him say "Im bored".
Cisyouc
12-17-2004, 08:35 AM
sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::say("I'm going to say HI!!! in 60 seconds.");
quest::settimer(1, 30);
}
}
sub EVENT_TIMER
{
if($timername == 1)
{
quest::say("Im about to say it...");
quest::settimer(2, 30);
}
else
{
quest::say("HI!!!");
}
}
Scorpx725
12-17-2004, 08:37 AM
Hm.. simple enough. Thanks.
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.