Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 12-17-2004, 08:14 AM
Scorpx725
Discordant
 
Join Date: Feb 2003
Location: Wish I knew.
Posts: 251
Default 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:
__________________
* KingMort has left #eqemu
<Richardo> KingDrama has left #EQEMU
<Richardo> the rule my pants!
Reply With Quote
  #2  
Old 12-17-2004, 08:18 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

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!");
    }
}
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #3  
Old 12-17-2004, 08:20 AM
Scorpx725
Discordant
 
Join Date: Feb 2003
Location: Wish I knew.
Posts: 251
Default

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".
__________________
* KingMort has left #eqemu
<Richardo> KingDrama has left #EQEMU
<Richardo> the rule my pants!
Reply With Quote
  #4  
Old 12-17-2004, 08:35 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

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!!!");
    }
}
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #5  
Old 12-17-2004, 08:37 AM
Scorpx725
Discordant
 
Join Date: Feb 2003
Location: Wish I knew.
Posts: 251
Default

Hm.. simple enough. Thanks.
__________________
* KingMort has left #eqemu
<Richardo> KingDrama has left #EQEMU
<Richardo> the rule my pants!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:49 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3