PDA

View Full Version : npcs saying things on a timer


bbum
07-23-2004, 06:48 PM
how do you make npcs say something every xx minutes?

Dave987
07-24-2004, 12:27 AM
sub EVENT_TIMER
{
quest::say("Where did I put that darn cloth??");
}
#############
{
quest::say("If I can't find it..");
}

#############

sub EVENT_SPAWN
{
quest::settimer(1,300);
quest::settimer(2,400);
}


That should make the NPC say "Where did I put that darn cloth??" every 300 seconds, and also say "If I can't find it..." every 400 seconds.

I think the sub EVENT_TIMER will need a TimerID put in somewhere . If someone can verify this? My PERL is abit rusty, been a while ;)

bbum
07-24-2004, 10:48 AM
what about "quest::starttimer()"

doesnt that need to be somewhere?

Dave987
07-25-2004, 03:46 AM
quest::settimer(timerID,seconds) - Starts timer for use with EVENT_TIMER You can have multiple "timerID"'s that trigger every "seconds".

-shrug- Try that ... the best I can recommend.