Thread: Timer issue
View Single Post
  #1  
Old 09-10-2014, 09:47 PM
Traul
Hill Giant
 
Join Date: Jun 2005
Posts: 106
Default Timer issue

Hi there, I'm trying to create a template to allow a change in how my named spawns work. I want the nameds to be guaranteed to spawn every, say, hour whether or not the spawngroup is being killed or not. I was trying to get it to work for the ghoul executioner in Lower Guk with no luck. Here's what I got:

Code:
sub EVENT_DEATH {
quest::enable_spawn2(1622);
quest::settimer("a_ghoul_executioner", 3600);
}

sub EVENT_TIMER {

	if($timer eq "a_ghoul_executioner") {
		quest::disable_spawn2(1622);
		quest::spawn2(66146,0,0,-890,622,-203,53.5);
		}
		
}
So upon death, the timer starts, and an hour later whatever is spawned will depop and the ghoul executioner will spawn in its place. That spawngroup then turns off until the ghoul executioner is killed again. But my code doesn't work at all. Does the timer only work if the NPC is alive?

The idea is so nameds will spawn guaranteed every hour but can still be camped for extra chances to spawn in between.
Reply With Quote