View Single Post
  #2  
Old 01-06-2007, 04:11 PM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

I did a search through the PLs for settimer, which I am sure you looked through as well. Below is the Dark Elf Corruptor script, showing his spawning as setting a 600 second countdown to despawn. Once the 600 seconds expires, EVENT_TIMER pops and removes the timer and the NPC.

Code:
# dark elf corruptor shouts before attacking
#

sub EVENT_SPAWN {
  quest::shout("We come for you, fools. Your reign of weakness over the powers of the land comes to an end now!");
  quest::settimer("despawn",600);
}

sub EVENT_TIMER {
  quest::stoptimer("despawn");
  quest::depop();
}

sub EVENT_DEATH {
  quest::stoptimer("despawn");
}

# EOF zone: eastkarana ID: 15153 NPC: Dark_Elf_Corruptor
Can you set the settimer("castdelay",10) and then use the EVENT_TIMER to kill the timer, then cast the spell?

stoptimer("castdelay")
castspell($userid,spellid)
Reply With Quote