| 
   | 
   | 
  
 
    | 
    | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
   | 
  
	
		
   
   
      | Quests::Q&A This is the quest support section | 
    
    
   
   
   
   
   
   
   
   
		 
	 
 
	
	
		
	
	
 
    | 
   | 
    | 
  
 
	
		
		
		
			
			 
			
				05-12-2009, 08:57 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Dragon 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Dec 2007 
					
					
					
						Posts: 658
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				Multiple Kills spawns boss
			 
			 
			
		
		
		
		I want to do something similar to the Rathe thing in PoEarthB where after all of the councilmen are killed, it spawns the boss. I don't really know how to code this, so I just looked at the quest for that event. 
	Code: 
	sub EVENT_SPAWN { 
   quest::spawn_condition(poearthb,1,0); #Make sure we aren't up yet.
 if (defined $qglobals{poeb_rathe}){
   quest::settimer("rathe",1); #waiting for the global to expire to pop rathe
   }
 if (!defined $qglobals{poeb_rathe}) { 
   quest::spawn_condition($zonesn,1,1); #Rathe pop 
   quest::settimer("avatar",1); 
   } 
} 
sub EVENT_SIGNAL {
  quest::settimer("rathe",1);
}
sub EVENT_TIMER { 
  if ($timer eq "rathe" && !defined $qglobals{poeb_rathe}) {
      quest::stoptimer("rathe");
      quest::spawn_condition($zonesn,1,1); #Rathe pop 
      quest::settimer("avatar",1); #waiting for rathe to go down to pop avatar
  }
  if ($timer eq "avatar" && !defined $qglobals{poeb_rathe}) { 
      $boss = 0; 
      $check_boss = $entity_list->GetMobByNpcTypeID(222008); 
         if($check_boss) { 
            $boss = 1; 
         } 
      $check_boss = $entity_list->GetMobByNpcTypeID(222013); 
         if($check_boss) { 
            $boss = 1; 
         } 
      if($boss == 0) { 
         quest::stoptimer("avatar"); 
         quest::spawn_condition($zonesn,1,0); #Rathe depop 
         quest::spawn2(222014,0,0,2051.1,407.7,-219.2,0); #Avatar of Earth pop 
      } 
   } 
}
 If I wanted to customize this for my own purposes, what would be the main things I would need to change?  
		
	
		
		
		
		
		
		
		
		
		
	
		
			
			
			
			
				 
			
			
			
			
			
			
				
			
			
			
		 
		
	
	
	 | 
 
 
 
    | 
   | 
    | 
  
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				05-12-2009, 09:46 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Aug 2006 
					Location: USA 
					
					
						Posts: 5,946
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		I posted a different way to handle that same event with a bit different results.  This might be easier for you to figure out how to apply for your own setup: 
http://www.eqemulator.net/forums/showthread.php?t=24869
At least you might be able to get some ideas from that.  I am sure it could have been done better, but actually works pretty well as it is.  
		
	
		
		
		
		
		
		
			
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				05-13-2009, 11:46 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Hill Giant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Dec 2007 
					
					
					
						Posts: 182
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Also, see the azarack code and the key master in sky. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				05-15-2009, 08:35 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Sarnak 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Jun 2007 
					Location: Finland 
					
					
						Posts: 65
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		You can either "count" the mobs that die if you are sure they will not die simultaneously, or if you have a lot of mobs that might die at the same time, this method works better: 
	Code: 
	sub EVENT_SIGNAL {
    if ($signal == "blargdeath") { # Signalled when something dies. Diediediedie. Die.
        $mobcheck = $entity_list->GetMobByNpcTypeID(xxxxxx); # Mob id xxxxxx that must 'not' be up
        if(!defined($mobcheck)){ # You sank my battleship.
            quest::spawn2(xxxxxx,0,0,$x,$y,$z-10,69); # Spawn something else
        }
}
 And in each of your mobs that is meant to die, the trigger code:
 
	Code: 
	sub EVENT_DEATH {
	quest::signalwith(xxxxxx,"blargdeath",0); #Signal mob id xxxxxx that we died
}
  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				05-15-2009, 08:49 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Dragon 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2006 
					Location: Cincinnati, OH 
					
					
						Posts: 689
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Damn do I love your comments. Keep up the great scripting =) 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				05-23-2009, 09:29 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Dragon 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Dec 2007 
					
					
					
						Posts: 658
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Ok i tried  to make my own thing like this, but it's not working. I have a quest that goes on the mobs that get killed, and then one on a trigger monster that will spawn the boss. 
	Code: 
	sub EVENT_DEATH {
quest::signalwith(1322,1,1);
}
 thats for the monsters that are killed.
 
	Code: 
	my $counter;
sub EVENT_SPAWN{
 $counter =0;
}
sub EVENT_SIGNAL{
 if($signal ==1){
  $counter+=1;
 if ($counter ==9);
 quest::spawn2(1323,0,0,251, -682.6, -27.2);
 }
}
 I want it to spawn the boss after the 9 mobs are killed  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				05-23-2009, 09:48 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Mar 2003 
					
					
					
						Posts: 1,500
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		spawn2 needs a heading 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				05-23-2009, 10:14 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Dragon 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Dec 2007 
					
					
					
						Posts: 658
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		yeah I already changed that, it makes no difference 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				05-24-2009, 03:21 AM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Aug 2006 
					Location: USA 
					
					
						Posts: 5,946
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		That should be:
 
	Code: 
	 if ($counter == 9) {
 And you will need another bracket to close that out after your spawn2.  
		
	
		
		
		
		
		
		
			
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				05-24-2009, 02:58 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Dragon 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Dec 2007 
					
					
					
						Posts: 658
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Sweet, thank you! It's working now. Just one question though, why does $counter+=1; work? I was thinking it should be =+1, but I'm not going to mess with it if it already works 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				05-24-2009, 03:51 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Aug 2006 
					Location: USA 
					
					
						Posts: 5,946
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		"$counter += 1" means the same as "$counter = $counter + 1". 
		
	
		
		
		
		
		
		
			
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				05-24-2009, 04:12 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Dragon 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2009 
					Location: California 
					
					
						Posts: 814
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		The even shorter shortcut would be "$counter++;". 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
 
	
		
	
	
	
	
	
		
	
		 
		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 09:17 AM. 
 
		 
	 
 
 
     | 
     | 
    
   
      | 
     | 
      | 
    
   
     | 
      | 
     | 
    
   
       | 
      | 
       | 
     
    
    
  | 
   |