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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 10-04-2014, 05:59 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default Quest not working

Cant figure out why this doesn't work... hpevent 90 works but nothing else...

Code:

sub EVENT_SPAWN {
  quest::setnexthpevent(90);

}



sub EVENT_HP {
  if ($hpevent == 90) {
    quest::spawn2(999245,0,0,$x + 10,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x + 20,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x + -10,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x + -20,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y + 10,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y + 20,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y + -10,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y + -20,$z,$h); #a dream defiler
    $NPC->CastSpell(16950);
    quest::setnexthpevent(60);
  }

  if ($hpevent == 60) {
    quest::spawn2(999246,0,0,$x + 70,$y + 80,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y + 70,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y + 60,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y + 40,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y + 20,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y - 80,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y - 70,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y - 60,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y - 40,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y - 20,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y,$z,$h); #a dream defiler
    $NPC->CastSpell(3150, $target->GetID());
    quest::setnexthpevent(36);
  }
  if ($hpevent == 36) {
    quest::spawn2(999245,0,0,$x + 10,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x + 20,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x + -10,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x + -20,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y + 10,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y + 20,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y + -10,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y + -20,$z,$h); #a dream defiler
    $NPC->CastSpell(16950);
  }
}

sub EVENT_DEATH {
  quest::we(15, " $name , Has defeated Touch, The Merciless");
  quest::stoptimer(1);
}



#Touch
Reply With Quote
  #2  
Old 10-04-2014, 06:38 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Try $targetid rather than $target->GetID(), as $target isn't defined, nor is it a default variable.
Reply With Quote
  #3  
Old 10-04-2014, 07:28 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

removed the spell casting completely and it seems that after hpevent 90 nothing else works except when you slay her.
Reply With Quote
  #4  
Old 10-04-2014, 08:43 PM
jdoran
Hill Giant
 
Join Date: Jul 2012
Posts: 212
Default

You might put in some shouts/emotes to see if the events are being generated
Reply With Quote
  #5  
Old 10-04-2014, 08:58 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

Also can't use NPC. Should be lower case.
Reply With Quote
  #6  
Old 10-06-2014, 12:04 PM
Asylum
Sarnak
 
Join Date: Jun 2013
Posts: 81
Default

if (Touch is a spawned mob, i.e. triggered and not a static spawn) {

you should change EVENT_DEATH to EVENT_DEATH_COMPLETE

}
Reply With Quote
  #7  
Old 10-06-2014, 04:18 PM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default

Always good to swap SPAWN to AGGRO when it comes to combat timers/triggers.

First issue, you have + and - in the spawn locations for some of the spawns (ex: $y + - 20). $userid works for the spell casts also.

Code:
sub EVENT_AGGRO {
  quest::setnexthpevent(90);
}

sub EVENT_HP {
  if ($hpevent == 90) {
    quest::spawn2(999245,0,0,$x + 10,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x + 20,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x - 10,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x - 20,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y + 10,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y + 20,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y - 10,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y - 20,$z,$h); #a dream defiler
    $npc->CastSpell(16950,$userid);
    quest::setnexthpevent(60);
  }

  if ($hpevent == 60) {
    quest::spawn2(999246,0,0,$x + 70,$y + 80,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y + 70,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y + 60,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y + 40,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y + 20,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y - 80,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y - 70,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y - 60,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y - 40,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y - 20,$z,$h); #a dream defiler
    quest::spawn2(999246,0,0,$x + 70,$y,$z,$h); #a dream defiler
    $npc->CastSpell(3150, $userid);
    quest::setnexthpevent(36);
  }
		
  if ($hpevent == 36) {
    quest::spawn2(999245,0,0,$x + 10,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x + 20,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x - 10,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x - 20,$y,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y + 10,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y + 20,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y - 10,$z,$h); #a dream defiler
    quest::spawn2(999245,0,0,$x,$y - 20,$z,$h); #a dream defiler
    $npc->CastSpell(16950, $userid);
  }
}

sub EVENT_DEATH {
  quest::we(15, " $name has defeated Touch, The Merciless");
  quest::stoptimer(1);
}
I would also add Combat checks and depops for adds for when players fail the fight. Example below.

Code:
sub EVENT_COMBAT {
#Spawn the door guards to prevent running outside the cave
   if($combat_state == 1) {
      quest::spawn2(1247,0,0,2577,-2068,4,125);
      quest::spawn2(1247,0,0,2559,-2070,4,124);
      }
#DeSpawn door guards and adds if raid wipes   
   if($combat_state == 0) {
      quest::signalwith(1247, 1, 0);
      quest::signalwith(1248, 1, 0);
      }
   }
Put this on adds
Code:
sub EVENT_SIGNAL {
   if ($signal == 1) {
      quest::depop();
      }      
}
__________________
Clumsy's World: Resurgence [2019-Present]
Clumsy's World 2.0 [2014-2016]
Clumsy's World [2006-2012]
Reply With Quote
  #8  
Old 10-06-2014, 04:35 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

You may also want to check out the command #questerrors
Reply With Quote
Reply


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 03:22 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3