|  |  | 
 
  |  |  |  |  
  |  |  |  |  
  |  |  |  |  
  |  |  |  |  
  |  | 
	
		
   
   
      | Quests::Q&A This is the quest support section |  
	
	
		
	
	
 
  |  |  |  |  
	| 
			
			 
			
				10-04-2014, 05:59 PM
			
			
			
		 |  
	| 
		
			
			| Hill Giant |  | 
					Join Date: Jun 2010 
						Posts: 231
					      |  |  
	| 
				 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
			
			
			
			
				  |  
 
  |  |  |  |  
	
		
	
	
	| 
			
			 
			
				10-04-2014, 06:38 PM
			
			
			
		 |  
	| 
		
			
			| Administrator |  | 
					Join Date: May 2013 Location: United States 
						Posts: 1,604
					      |  |  
	| 
 Try $targetid rather than $target->GetID(), as $target isn't defined, nor is it a default variable. |  
	
		
	
	
	| 
			
			 
			
				10-04-2014, 07:28 PM
			
			
			
		 |  
	| 
		
			
			| Hill Giant |  | 
					Join Date: Jun 2010 
						Posts: 231
					      |  |  
	| 
 removed the spell casting completely and it seems that after hpevent 90 nothing else works except when you slay her. |  
	
		
	
	
	| 
			
			 
			
				10-04-2014, 08:43 PM
			
			
			
		 |  
	| 
		
			
			| Hill Giant |  | 
					Join Date: Jul 2012 
						Posts: 212
					      |  |  
	| 
 You might put in some shouts/emotes to see if the events are being generated |  
	
		
	
	
	| 
			
			 
			
				10-04-2014, 08:58 PM
			
			
			
		 |  
	| 
		
			|  | Developer |  | 
					Join Date: Mar 2003 
						Posts: 1,500
					      |  |  
	| 
 Also can't use NPC. Should be lower case. |  
	
		
	
	
	| 
			
			 
			
				10-06-2014, 12:04 PM
			
			
			
		 |  
	| 
		
			
			| Sarnak |  | 
					Join Date: Jun 2013 
						Posts: 81
					      |  |  
	| 
 if (Touch is a spawned mob, i.e. triggered and not a static spawn) {
 you should change EVENT_DEATH to EVENT_DEATH_COMPLETE
 
 }
 |  
	
		
	
	
 
  |  |  |  |  
	| 
			
			 
			
				10-06-2014, 04:18 PM
			
			
			
		 |  
	| 
		
			|  | Dragon |  | 
					Join Date: Nov 2008 Location: GA 
						Posts: 905
					      |  |  
	| 
				  
 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();
      }      
} |  
 
  |  |  |  |  
	
		
	
	
	| 
			
			 
			
				10-06-2014, 04:35 PM
			
			
			
		 |  
	| 
		
			
			| Demi-God |  | 
					Join Date: Apr 2008 Location: MA 
						Posts: 1,164
					      |  |  
	| 
 You may also want to check out the command #questerrors |  
	
		
	
	
	
	
	| 
	|  Posting Rules |  
	| 
		
		You may not post new threads You may not post replies You may not post attachments You may not edit your posts 
 HTML code is Off 
 |  |  |  All times are GMT -4. The time now is 04:40 AM.
 
 |  |  
    |  |  |  |  
    |  |  |  |  
     |  |  |  |  
 |  |