NPC Auto cast every 30 seconds
I have been trying get an NPC to auto cast a specific spell (spell ID 9412) every 30 seconds.
Scenario -> Teleporter NPC gets crowded by PCs that are afk, making it difficult for other PCs to target him. I want the NPC to cast a PBAE spell that knocks all PCs back 50 ft.
I have created the spell (9412) and have tested it using a script
sub EVENT_SAY {
if ($text=~/fire/i) {
$npc->CastSpell(9412, $userid);
This works and knocks back the PC hailing the NPC.
No, I can't seem to get this to fire every 30 seconds.
Any help?
Thanks.
|