Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-05-2008, 11:13 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default $npc->castSpell(ID,Spell); not working

I don't know why, but I can't seem to get this command working. I have also tried quest::castspell(ID,Spell); but that doesn't seem to work in this quest either. I'm not quite sure what is wrong. This is an NPC that is supposed to be spawned during an event and then switch textures a few times and then depop and cause a really nasty AE if it isn't killed before the last timer finishes. It goes through all of the timers, but stops working on the last one. Though, if I remove "$npc->castSpell($client,6536);" the script completes as it should.

I have it set the variable $client to equal userid so that I am sure it is passing that info into the command. I am testing this with my GM char, but I have tried with invuln on or invuln off and with or without attacking the NPC. I can't get it to work no matter what I have tried.

Code:
#Explosive Storm

my $client;

sub EVENT_SPAWN {
  
quest::npctexture(3);
quest::settimer("start_storm",1);

}

sub EVENT_COMBAT {

  if ($combat_state == 1) {
$client = $userid; 
}
  
}

sub EVENT_TIMER {

  if ($timer eq "start_storm") {
    quest::stoptimer("start_storm");
    quest::npctexture(3);
    quest::settimer("change_storm1",5); }

  if ($timer eq "change_storm1") {
    quest::stoptimer("change_storm1");
    quest::npctexture(2);
    quest::emote("gains more energy and becomes less stable.");
    quest::settimer("change_storm2",5); }

  if ($timer eq "change_storm2") {
    quest::stoptimer("change_storm2");
    quest::npctexture(1);
    quest::emote("gains even more energy and looks extremely dangerous.");
    quest::settimer("change_storm3",5); }
    
  if ($timer eq "change_storm3") {
    quest::stoptimer("change_storm3");
$npc->castSpell($client,6536);
    quest::emote("explodes and disperses.");
    quest::depop(); }

}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
 


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 12:04 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