View Single Post
  #1  
Old 08-11-2014, 10:53 PM
Splose
Banned
 
Join Date: Apr 2014
Posts: 279
Default #Vulak_Trigger.pl

I was having serious issues with this script as it was provided through my downloaded quests folder.. I have rewritten it and it works 100% of the time.


#Vulak_Trigger.pl - templeveeshan
http://pastebin.com/gnnQ35q3
Code:
sub EVENT_SPAWN {
	quest::settimer("vulaksearch",10);
	quest::depopall(124021); quest::depopall(124080); quest::depopall(124157);  #Guardian Spirits
	quest::spawn2(124021,0,0,-796,564,129,102); quest::spawn2(124021,0,0,-800,510,129,66); quest::spawn2(124021,0,0,-796,463,129,33);
	quest::spawn2(124080,0,0,-680,509,129,190); quest::spawn2(124080,0,0,-687,562,129,160); quest::spawn2(124080,0,0,-680,461,129,224);
}

sub EVENT_TIMER {
	my $check = 0;	#:: We check every 10 seconds if there are Lords and Ladies spawned
	if($timer eq "vulaksearch") {
		my @lords_and_ladies = (124077, 124076, 124008, 124103, 124074, 124017);
		foreach my $dragons (@lords_and_ladies) {
			if($entity_list->GetNPCByNPCTypeID($dragons)) {
				$check++
			}
		}
		if($check == 0 && !defined $qglobals{"vulak"} && !$entity_list->GetMobByNpcTypeID(124155)) {	#:: The stars have aligned - Let's spawn Vulak
			quest::spawn2(124155,0,0,-739.4,517.2,121,255);
			quest::setglobal("vulak",1,2,H6);
		}
		$check = undef;
	}
}
Reply With Quote