EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   NPC and shout timer (https://www.eqemulator.org/forums/showthread.php?t=39303)

epilz 02-02-2015 09:24 PM

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!

ghanja 02-02-2015 10:32 PM

Quote:

Originally Posted by epilz (Post 237364)
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);
}
}


epilz 02-02-2015 10:43 PM

Thanks ghanja

epilz 02-02-2015 11:00 PM

Would quest::stoptimer ("shouting"); allow the timer to start, or would that be quest::starttimer? Just curious

Kingly_Krab 02-03-2015 08:23 AM

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);

epilz 02-03-2015 12:19 PM

thanks Kingly, what about setting the shout to run indefinitely, without stopping?

Akkadius 02-03-2015 12:21 PM


epilz 02-03-2015 12:29 PM

lol akka! thanks hah


All times are GMT -4. The time now is 10:44 PM.

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