EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Quest Timers (https://www.eqemulator.org/forums/showthread.php?t=17431)

Scorpx725 12-17-2004 08:14 AM

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

Code:

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?

Quote:

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

Code:

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.


All times are GMT -4. The time now is 04:36 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.