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 02-02-2015, 09:24 PM
epilz
Hill Giant
 
Join Date: Sep 2013
Posts: 247
Default NPC and shout timer

All,

Can anyone provide a small example on how to make an NPC shout a message every 5 minutes or so? Either in the same zone or all zones.

I am still very new in the development of my own eqemu server and this community has been awesome in assisting me. Thank you!
Reply With Quote
  #2  
Old 02-02-2015, 10:32 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by epilz View Post
All,

Can anyone provide a small example on how to make an NPC shout a message every 5 minutes or so? Either in the same zone or all zones.

I am still very new in the development of my own eqemu server and this community has been awesome in assisting me. Thank you!
Code:
sub EVENT_SPAWN {
quest::settimer ("shouting",1);
}

sub EVENT_TIMER {

if ($timer eq "shouting") {
quest::stoptimer ("shouting");
quest::we(258,"Shout shout shouting something to the entire server");
quest::shout ("Shout shout shouting something in just the zone");
quest::settimer ("shouting", 300);
}
}

Last edited by ghanja; 02-02-2015 at 10:37 PM.. Reason: To show just zone shout as well
Reply With Quote
  #3  
Old 02-02-2015, 10:43 PM
epilz
Hill Giant
 
Join Date: Sep 2013
Posts: 247
Default

Thanks ghanja
Reply With Quote
  #4  
Old 02-02-2015, 11:00 PM
epilz
Hill Giant
 
Join Date: Sep 2013
Posts: 247
Default

Would quest::stoptimer ("shouting"); allow the timer to start, or would that be quest::starttimer? Just curious
Reply With Quote
  #5  
Old 02-03-2015, 08:23 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

quest::stoptimer(NAME); Stops whatever timer you pass to it, meaning the "shouting" timer is no longer running, allowing either it, or another timer to be ran through quest::settimer(NAME, SECONDS);
Reply With Quote
  #6  
Old 02-03-2015, 12:19 PM
epilz
Hill Giant
 
Join Date: Sep 2013
Posts: 247
Default

thanks Kingly, what about setting the shout to run indefinitely, without stopping?
Reply With Quote
  #7  
Old 02-03-2015, 12:21 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Reply With Quote
  #8  
Old 02-03-2015, 12:29 PM
epilz
Hill Giant
 
Join Date: Sep 2013
Posts: 247
Default

lol akka! thanks hah
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 03:05 AM.


 

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