PDA

View Full Version : NPC and shout timer


epilz
02-02-2015, 09:24 PM
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
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!


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
KoFFSKdwsro

epilz
02-03-2015, 12:29 PM
lol akka! thanks hah