Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::LUA

Quests::LUA Section regarding LUA scripts, help, questions, answers

Reply
 
Thread Tools Display Modes
  #1  
Old 01-30-2025, 01:33 PM
lachadan1
Fire Beetle
 
Join Date: Jan 2022
Posts: 1
Default 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.
Reply With Quote
Reply

Tags
spells

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:13 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3