Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 04-23-2016, 08:00 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default Custom Formation Spawning and boss events.

TLR

As I got bored with just cleaning up, I came up with some boss spawning add plugin and scripts to do various things. Enjoy and manipulate. Feel free to clean up also lol. RandomRange only lands once and applies to all, so I had to put in multiple randoms for each npc spawn. MESSY!

Sorry akka, stole some of your plugin to manipulate lol

plugin bosstool.pl
Code:
#BOSS EVENT TOOLS

#plugin::AEbomb(npcID, xy, z, depop0/1, depoptime, location);
#locations 1 Front, 2 Back, 3 Right, 4 Left, 5 Front/Back, 6 Right/Left, 7 2Front, 8 2Back, 9 2Right, 10 2Left, 11 Corners
#12 Cross, 13 Circle, 14 random4, 15 random8, 16 random12, 17 random16, 18 random20

sub AEbomb{	
my $Mob = $_[0];
my $Range = $_[1];
my $Z = $_[2];
my $Location = $_[3];
my $x = plugin::val('$x');
my $y = plugin::val('$y');
my $npc = plugin::val('$npc');
my $z = $npc->GetZ();

	if($Location == 1){ # Front
	quest::spawn2($Mob, 0, 0, $x, $y + $Range, $z, 0);
	}
	elsif($Location == 2){ # Back
	quest::spawn2($Mob, 0, 0, $x, $y - $Range, $z, 0);
	}
	elsif($Location == 3){ # Right
	quest::spawn2($Mob, 0, 0, $x - $Range, $y, $z, 0);
	}
	elsif($Location == 4){ # Left
	quest::spawn2($Mob, 0, 0, $x + $Range, $y, $z, 0);
	}
	elsif($Location == 5){ #Front/Back
	quest::spawn2($Mob, 0, 0, $x, $y + $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x, $y - $Range, $z, 0);
	}
	elsif($Location == 6){ #Right/Left
	quest::spawn2($Mob, 0, 0, $x - $Range, $y, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $Range, $y, $z, 0);
	}
	elsif($Location == 7){ #2Front
	quest::spawn2($Mob, 0, 0, $x + $Range, $y + $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $Range, $y + $Range, $z, 0);
	}
	elsif($Location == 8){ #2Back
	quest::spawn2($Mob, 0, 0, $x + $Range, $y - $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $Range, $y - $Range, $z, 0);

	}
	elsif($Location == 9){ #2Right
	quest::spawn2($Mob, 0, 0, $x - $Range, $y + $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $Range, $y - $Range, $z, 0);

	}
	elsif($Location == 10){ #2Left
	quest::spawn2($Mob, 0, 0, $x + $Range, $y + $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $Range, $y - $Range, $z, 0);

	}
	elsif($Location == 11){ #Corners
	quest::spawn2($Mob, 0, 0, $x + $Range, $y + $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $Range, $y + $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $Range, $y - $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $Range, $y - $Range, $z, 0);
	}
	elsif($Location == 12){ #Cross
	quest::spawn2($Mob, 0, 0, $x, $y + $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x, $y - $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $Range, $y, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $Range, $y, $z, 0);
	
	}
	elsif($Location == 13){ #Circle
	quest::spawn2($Mob, 0, 0, $x + $Range, $y + $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $Range, $y + $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $Range, $y - $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $Range, $y - $Range, $z, 0);
	quest::spawn2($Mob, 0, 0, $x, $y + $Range + $Range * 0.5, $z, 0); #Front
	quest::spawn2($Mob, 0, 0, $x, $y - $Range - $Range * 0.5, $z, 0); #Back
	quest::spawn2($Mob, 0, 0, $x - $Range - $Range * 0.5, $y, $z, 0); #Right
	quest::spawn2($Mob, 0, 0, $x + $Range + $Range * 0.5, $y, $z, 0); #Left

	}
	elsif($Location == 14){ #Random 4
	my $BR1 = plugin::RandomRange(20, 70);
	my $BR2 = plugin::RandomRange(20, 70);
	my $BR3 = plugin::RandomRange(20, 70);
	my $BR4 = plugin::RandomRange(20, 70);
	quest::spawn2($Mob, 0, 0, $x + $BR1, $y + $BR1, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR2, $y + $BR2, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR3, $y - $BR3, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR4, $y - $BR4, $z, 0);
	}
	elsif($Location == 15){ #Random 8
	my $BR1 = plugin::RandomRange(20, 70);
	my $BR2 = plugin::RandomRange(20, 70);
	my $BR3 = plugin::RandomRange(20, 70);
	my $BR4 = plugin::RandomRange(20, 70);
	my $BR5 = plugin::RandomRange(20, 70);
	my $BR6 = plugin::RandomRange(20, 70);
	my $BR7 = plugin::RandomRange(20, 70);
	my $BR8 = plugin::RandomRange(20, 70);
	quest::spawn2($Mob, 0, 0, $x + $BR1, $y + $BR1, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR2, $y + $BR2, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR3, $y - $BR3, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR4, $y - $BR4, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR5, $y + $BR5 * 0.5, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR6, $y + $BR6 * 0.5, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR7 * 0.5, $y - $BR7, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR8 * 0.5, $y - $BR8, $z, 0);
	}
	elsif($Location == 16){ #Random 12
	my $BR1 = plugin::RandomRange(20, 70);
	my $BR2 = plugin::RandomRange(20, 70);
	my $BR3 = plugin::RandomRange(20, 70);
	my $BR4 = plugin::RandomRange(20, 70);
	my $BR5 = plugin::RandomRange(20, 70);
	my $BR6 = plugin::RandomRange(20, 70);
	my $BR7 = plugin::RandomRange(20, 70);
	my $BR8 = plugin::RandomRange(20, 70);
	my $BR9 = plugin::RandomRange(30, 70);
	my $BR10 = plugin::RandomRange(30, 70);
	my $BR11 = plugin::RandomRange(30, 70);
	my $BR12 = plugin::RandomRange(30, 70);
	quest::spawn2($Mob, 0, 0, $x + $BR1, $y + $BR1, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR2, $y + $BR2, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR3, $y - $BR3, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR4, $y - $BR4, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR5, $y + $BR5 * 0.5, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR6, $y + $BR6 * 0.5, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR7 * 0.5, $y - $BR7, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR8 * 0.5, $y - $BR8, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR9, $y + $BR9 * 2, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR10, $y + $BR10 * 2, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR11 * 2, $y - $BR11, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR12 * 2, $y - $BR12, $z, 0);
	}
	elsif($Location == 17){ #Random 16
	my $BR1 = plugin::RandomRange(20, 70);
	my $BR2 = plugin::RandomRange(20, 70);
	my $BR3 = plugin::RandomRange(20, 70);
	my $BR4 = plugin::RandomRange(20, 70);
	my $BR5 = plugin::RandomRange(20, 70);
	my $BR6 = plugin::RandomRange(20, 70);
	my $BR7 = plugin::RandomRange(20, 70);
	my $BR8 = plugin::RandomRange(20, 70);
	my $BR9 = plugin::RandomRange(30, 70);
	my $BR10 = plugin::RandomRange(30, 70);
	my $BR11 = plugin::RandomRange(30, 70);
	my $BR12 = plugin::RandomRange(30, 70);
	my $BR13 = plugin::RandomRange(30, 70);
	my $BR14 = plugin::RandomRange(30, 70);
	my $BR15 = plugin::RandomRange(30, 70);
	my $BR16 = plugin::RandomRange(30, 70);
	quest::spawn2($Mob, 0, 0, $x + $BR1, $y + $BR1, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR2, $y + $BR2, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR3, $y - $BR3, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR4, $y - $BR4, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR5, $y + $BR5 * 0.5, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR6, $y + $BR6 * 0.5, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR7 * 0.5, $y - $BR7, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR8 * 0.5, $y - $BR8, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR9, $y + $BR9 * 2, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR10, $y + $BR10 * 2, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR11 * 2, $y - $BR11, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR12 * 2, $y - $BR12, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR13, $y + $BR13 * 2.5, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR14, $y + $BR14 * 2.5, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR15 * 2.5, $y - $BR15, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR16 * 2.5, $y - $BR16, $z, 0);
	}
	elsif($Location == 18){ #Random 20
	my $BR1 = plugin::RandomRange(20, 70);
	my $BR2 = plugin::RandomRange(20, 70);
	my $BR3 = plugin::RandomRange(20, 70);
	my $BR4 = plugin::RandomRange(20, 70);
	my $BR5 = plugin::RandomRange(20, 70);
	my $BR6 = plugin::RandomRange(20, 70);
	my $BR7 = plugin::RandomRange(20, 70);
	my $BR8 = plugin::RandomRange(20, 70);
	my $BR9 = plugin::RandomRange(30, 70);
	my $BR10 = plugin::RandomRange(30, 70);
	my $BR11 = plugin::RandomRange(30, 70);
	my $BR12 = plugin::RandomRange(30, 70);
	my $BR13 = plugin::RandomRange(30, 70);
	my $BR14 = plugin::RandomRange(30, 70);
	my $BR15 = plugin::RandomRange(30, 70);
	my $BR16 = plugin::RandomRange(30, 70);
	my $BR17 = plugin::RandomRange(50, 70);
	my $BR18 = plugin::RandomRange(50, 70);
	my $BR19 = plugin::RandomRange(50, 70);
	my $BR20 = plugin::RandomRange(50, 70);
	quest::spawn2($Mob, 0, 0, $x + $BR1, $y + $BR1, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR2, $y + $BR2, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR3, $y - $BR3, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR4, $y - $BR4, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR5, $y + $BR5 * 0.5, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR6, $y + $BR6 * 0.5, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR7 * 0.5, $y - $BR7, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR8 * 0.5, $y - $BR8, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR9, $y + $BR9 * 2, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR10, $y + $BR10 * 2, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR11 * 2, $y - $BR11, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR12 * 2, $y - $BR12, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR13, $y + $BR13 * 2.5, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR14, $y + $BR14 * 2.5, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR15 * 2.5, $y - $BR15, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR16 * 2.5, $y - $BR16, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR17, $y + $BR17 * 1.4, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR18, $y + $BR18 * 1.6, $z, 0);
	quest::spawn2($Mob, 0, 0, $x + $BR19 * 1.4, $y - $BR19, $z, 0);
	quest::spawn2($Mob, 0, 0, $x - $BR20 * 1.6, $y - $BR20, $z, 0);

	}
	quest::set_proximity($x - $Range, $x + $Range, $y - $Range, $y + $Range, $z - $Z, $z + $Z);	
}


#plugin::BombSignal(mobID, spellID, casttype);
sub BombSignal {
my $npc = plugin::val('$npc');
my $entity_list = plugin::val('$entity_list');
my $Bomb = $_[0];
my $spell = $_[1];
my $casttype = $_[2];



if($casttype == 0){ #Do Nothing
}

if($casttype == 1){ #Cast on target
	my @nlist = $entity_list->GetNPCList();
	foreach my $n (@nlist){
		if ($n->GetNPCTypeID() == $Bomb){
			$n->SpellFinished($spell, $n, 0);
		}
	}
}
}
Boss event examples : This also allows the "so called adds" to spawn with the boss no matter where its pulled to, negating setting loc for each add.

Timed explosions
Code:
#AEBomb Variables #plugin::AEbomb(npcID, xy, z, location);
my $Spawn = 999321; #NPC to spawn for AEs and other effects

#BombSignal Variables #plugin::BombSignal(bossID, mobID, spellID, casttype);
my $Boss = 999319;
my $SignalSpawn = 999321;
my $Spell = 85; #Spell to be casted by $Bomb
#my $Casttype = 0;


#Timer contollers
my $StartEvent = "StartEvent"; #Links Starting event timer name and stop event timer
my $StartTimer = 20; #The time when the event starts AFTER Boss Agro
my $SpawnCast = "SpawnCast";
my $SpawnCastTime = 5;
my $Depop = "Depop";
my $Depoptime = 7;

sub EVENT_SPAWN {

}

sub EVENT_SAY {
if($text=~/Hail/i){
	quest::say("I am the test boss for explosions");
}
}

sub EVENT_AGGRO {
quest::settimer("$StartEvent", $StartTimer);
}

sub EVENT_TIMER {
if($timer eq "$StartEvent") { #Check event time
	plugin::AEbomb($Spawn, 20, 0, 16); #Spawn bombs
	quest::settimer("$SpawnCast", $SpawnCastTime); #Start cast timer
	quest::settimer("$Depop", $Depoptime); #Start depop timer
	quest::stoptimer("$StartEvent"); #Stop event timer
}	

if($timer eq "$SpawnCast") { #Check cast time
	plugin::BombSignal($Boss, $SignalSpawn, $Spell, 1); #signal bombs
	quest::stoptimer("$SpawnCast"); #Stop event timer
	}
		
if($timer eq "$Depop") { #Check depop time
	quest::settimer("$StartEvent", $StartTimer); #Restart Event timer
	quest::depopall($Spawn); #Depop all spawned
	quest::stoptimer("$Depop"); #Stop event timer
	}
	
}
Growing/Changing formations
Code:
my $StartEvent = "StartEvent"; #Links Starting event timer name and stop event timer
my $StartTimer = 10; #The time when the event starts AFTER Boss Agro
my $OutOne = 3;
my $OutTwo = 3;
my $OutThree = 3;
my $OutFour = 3;
my $OutFive = 3;
my $OutSix = 3;
my $OutReset = 3;
my $InOne = 3;
my $InTwo = 3;
my $InThree = 3;
my $InFour = 3;
my $InFive = 3;
my $InSix = 3;
my $InReset = 3;
my $MiddleOutOne = 3;
my $MiddleOutTwo = 3;
my $MiddleOutThree = 3;
my $MiddleOutReset = 3;
my $OutMiddleOne = 3;
my $OutMiddleTwo = 3;
my $OutMiddleThree = 3;
my $OutMiddleReset = 3;
my $Spawn = 999332;

sub EVENT_SAY {
if($text=~/Hail/i){
	plugin::Whisper("I am the test boss for explosions");
}
}


sub EVENT_AGGRO {

quest::settimer("$StartEvent", $StartTimer);

}


sub EVENT_TIMER {
if ($timer eq "$StartEvent") {
my $RandomForm = quest::ChooseRandom(1,2,3,4);
if($RandomForm == 1) { #Out
	quest::say("Start Out");
	quest::settimer("OutOne", $OutOne);
	quest::stoptimer("$StartEvent");
}
if($RandomForm == 2) { #In
	quest::say("Start In");
	quest::settimer("InOne", $InOne);
	quest::stoptimer("$StartEvent");
}
if($RandomForm == 3) { #MiddleOut
	quest::say("Start MiddleOut");
	quest::settimer("MiddleOutOne", $MiddleOutOne);
	quest::stoptimer("$StartEvent");
}
if($RandomForm == 4) { #OutMiddle
	quest::say("Start OutMiddle");
	quest::settimer("OutMiddleOne", $OutMiddleOne);
	quest::stoptimer("$StartEvent");
}

}

if($timer eq "OutOne") { #Check event time
	plugin::AEbomb($Spawn, 10, 5, 13); #Spawn bombs
	quest::settimer("OutTwo", $OutTwo);
	quest::stoptimer("OutOne"); #Stop event timer
}
		if($timer eq "OutTwo") { #Check event time
		plugin::AEbomb($Spawn, 20, 5, 13); #Spawn bombs
		quest::settimer("OutThree", $OutThree);
		quest::stoptimer("OutTwo"); #Stop event timer
		}
		if($timer eq "OutThree") { #Check event time
		plugin::AEbomb($Spawn, 30, 5, 13); #Spawn bombs
		quest::settimer("OutFour", $OutFour);
		quest::stoptimer("OutThree"); #Stop event timer
		}
		if($timer eq "OutFour") { #Check event time
		plugin::AEbomb($Spawn, 40, 5, 13); #Spawn bombs
		quest::settimer("OutFive", $OutFive);
		quest::stoptimer("OutFour"); #Stop event timer
		}
		if($timer eq "OutFive") { #Check event time
		plugin::AEbomb($Spawn, 50, 5, 13); #Spawn bombs
		quest::settimer("OutSix", $OutSix);
		quest::stoptimer("OutFive"); #Stop event timer
		}
		if($timer eq "OutSix") { #Check event time
		plugin::AEbomb($Spawn, 60, 5, 13); #Spawn bombs
		quest::settimer("OutReset", $OutReset);
		quest::stoptimer("OutSix"); #Stop event timer
		}
		if($timer eq "OutReset") { #Check event time
		quest::stoptimer("OutReset"); #Stop event timer
		quest::depopall($Spawn); #Depop all spawned
		quest::settimer("$StartEvent", $StartTimer);
		}
	

if($timer eq "InOne") { #Check event time
	plugin::AEbomb($Spawn, 60, 5, 13); #Spawn bombs
	quest::settimer("InTwo", $InTwo);
	quest::stoptimer("InOne"); #Stop event timer
		}
		if($timer eq "InTwo") { #Check event time
		plugin::AEbomb($Spawn, 50, 5, 13); #Spawn bombs
		quest::settimer("InThree", $InThree);
		quest::stoptimer("InTwo"); #Stop event timer
		}
		if($timer eq "InThree") { #Check event time
		plugin::AEbomb($Spawn, 40, 5, 13); #Spawn bombs
		quest::settimer("InFour", $InFour);
		quest::stoptimer("InThree"); #Stop event timer
		}
		if($timer eq "InFour") { #Check event time
		plugin::AEbomb($Spawn, 30, 5, 13); #Spawn bombs
		quest::settimer("InFive", $InFive);
		quest::stoptimer("InFour"); #Stop event timer
		}
		if($timer eq "InFive") { #Check event time
		plugin::AEbomb($Spawn, 20, 5, 13); #Spawn bombs
		quest::settimer("InSix", $InSix);
		quest::stoptimer("InFive"); #Stop event timer
		}
		if($timer eq "InSix") { #Check event time
		plugin::AEbomb($Spawn, 10, 5, 13); #Spawn bombs
		quest::stoptimer("InSix"); #Stop event timer
		quest::settimer("InReset", $InReset);
		}
		if($timer eq "InReset") { #Check event time
		quest::stoptimer("InReset"); #Stop event timer
		quest::depopall($Spawn); #Depop all spawned
		quest::settimer("$StartEvent", $StartTimer);
		}
	

if($timer eq "MiddleOutOne") { #Check event time
	plugin::AEbomb($Spawn, 30, 5, 13); #Spawn bombs
	plugin::AEbomb($Spawn, 40, 5, 13); #Spawn bombs
	quest::settimer("MiddleOutTwo", $MiddleOutTwo);
	quest::stoptimer("MiddleOutOne"); #Stop event timer
		}
		if($timer eq "MiddleOutTwo") { #Check event time
		plugin::AEbomb($Spawn, 50, 5, 13); #Spawn bombs
		plugin::AEbomb($Spawn, 20, 5, 13); #Spawn bombs
		quest::settimer("MiddleOutThree", $MiddleOutThree);
		quest::stoptimer("MiddleOutTwo"); #Stop event timer
		}
		if($timer eq "MiddleOutThree") { #Check event time
		plugin::AEbomb($Spawn, 10, 5, 13); #Spawn bombs
		plugin::AEbomb($Spawn, 60, 5, 13); #Spawn bombs
		quest::settimer("MiddleOutReset", $MiddleOutReset);
		quest::stoptimer("MiddleOutThree"); #Stop event timer
		}
		if($timer eq "MiddleOutReset") { #Check event time
		quest::stoptimer("MiddleOutReset"); #Stop event timer
		quest::depopall($Spawn); #Depop all spawned
		quest::settimer("$StartEvent", $StartTimer);
		}


if($timer eq "OutMiddleOne") { #Check event time
	plugin::AEbomb($Spawn, 10, 5, 13); #Spawn bombs
	plugin::AEbomb($Spawn, 60, 5, 13); #Spawn bombs
	quest::settimer("OutMiddleTwo", $OutMiddleTwo);
	quest::stoptimer("OutMiddleOne"); #Stop event timer
		}
		if($timer eq "OutMiddleTwo") { #Check event time
		plugin::AEbomb($Spawn, 50, 5, 13); #Spawn bombs
		plugin::AEbomb($Spawn, 20, 5, 13); #Spawn bombs
		quest::settimer("OutMiddleThree", $OutMiddleThree);
		quest::stoptimer("OutMiddleTwo"); #Stop event timer
		}
		if($timer eq "OutMiddleThree") { #Check event time
		plugin::AEbomb($Spawn, 30, 5, 13); #Spawn bombs
		plugin::AEbomb($Spawn, 40, 5, 13); #Spawn bombs
		quest::settimer("OutMiddleReset", $OutMiddleReset);
		quest::stoptimer("OutMiddleThree"); #Stop event timer
		}
		if($timer eq "OutMiddleReset") { #Check event time
		quest::stoptimer("OutMiddleReset"); #Stop event timer
		quest::depopall($Spawn); #Depop all spawned
		quest::settimer("$StartEvent", $StartTimer);
		}	



}
Boss that spawns adds and then the adds to assist boss and even randomly change target based on signal
Boss.pl
Code:
#AEBomb Variables #plugin::AEbomb(npcID, xy, z, location);
my $Spawn = 999326; #NPC to spawn for AEs and other effects
my $SpawnA = 999327;
#BombSignal Variables #plugin::BombSignal(bossID, mobID, spellID, casttype);
my $Boss = 999325;
my $SignalSpawn = 999326;
my $SignalSpawnA = 999327;
my $Spell = 85; #Spell to be casted by $Bomb
#my $Casttype = 0;

#$client->SendMarqueeMessage();

#Timer contollers
my $StartEvent = "StartEvent"; #Links Starting event timer name and stop event timer
my $StartTimer = 10; #The time when the event starts AFTER Boss Agro
my $SpawnCast = "SpawnCast";
my $SpawnCastTime = 12;
my $Depop = "Depop";
my $Depoptime = 120;

sub EVENT_SPAWN {
	
}

sub EVENT_SAY {
if($text=~/Hail/i){
	plugin::Whisper("I am the test boss for explosions");
}
}


sub EVENT_AGGRO {
quest::settimer("$StartEvent", $StartTimer);
quest::settimer("Link",3);
}

sub EVENT_TIMER {
if($timer eq "$StartEvent") { #Check event time
	plugin::AEbomb($Spawn, 10, 0, 18); #Spawn bombs
	quest::settimer("$SpawnCast", $SpawnCastTime); #Start cast timer
	quest::settimer("$Depop", $Depoptime); #Start depop timer

	quest::stoptimer("$StartEvent"); #Stop event timer
	plugin::Whisper("start event timer finished");
}	

if($timer eq "$SpawnCast") { #Check cast time
	plugin::Whisper("hit attack timer");
	quest::signalwith($SignalSpawn, 2, 0);
	#quest::stoptimer("$SpawnCast"); #Stop event timer
			}
		
	


if($timer eq "$Depop") { #Check depop time
	quest::settimer("$StartEvent", $StartTimer); #Restart Event timer
	quest::depopall($Spawn); #Depop all spawned
	quest::stoptimer("$Depop"); #Stop event timer
	}
	
if($timer eq "Link") {
	my @nlist = $entity_list->GetNPCList(); 
		foreach my $n (@nlist){
			if (plugin::CheckDistBetween2Ents($npc, $n, 150)) {
			$n->AddToHateList($npc->GetHateRandom());
			}
		}
	}

}	
sub EVENT_DEATH {
quest::stoptimer("$StartEvent"); #Stop event timer
quest::stoptimer("$SpawnCast"); #Stop event timer
quest::depopall($Spawn); #Depop all spawned
quest::stoptimer("$Depop"); #Stop event timer
quest::stoptimer("Link");
}
Adds to assist boss
Code:
sub EVENT_AGGRO {
quest::settimer("ChangeTarget", 11);

}

sub EVENT_SIGNAL {
my $RandomPlayer = $npc->GetHateRandom();
my $SpellsList = quest::ChooseRandom(656,230,383);
if ($signal == 1) {
	$npc->WipeHateList();
	quest::say("removed hate");
	$npc->Attack($RandomPlayer);
	quest::say("changed target");
}

if ($signal == 2) {
	$npc->SpellFinished($SpellsList, $RandomPlayer, 0);
	quest::say("casted");
}

if ($signal == 3) {
	$npc->SpellFinished($SpellsList, $RandomPlayer, 0);
	quest::say("casted");
}		

}


sub EVENT_TIMER {
my $RandomPlayer = $npc->GetHateRandom();
my $SpellsList = quest::ChooseRandom(656,230,383);
if ($timer eq "ChangeTarget") {
	$npc->WipeHateList();
	$npc->Attack($RandomPlayer);
				
			}
		}
	

	



sub EVENT_DEATH {


quest::stoptimer("Cast");



}
Boss that spawns adds that will heal him based on signal
Boss.pl
Code:
#AEBomb Variables #plugin::AEbomb(npcID, xy, z, location);
my $Spawn = 999324; #NPC to spawn for AEs and other effects
my $Boss = 999325;
my $SignalSpawn = 999324;


#Timer contollers
my $StartEvent = "StartEvent"; #Links Starting event timer name and stop event timer
my $StartTimer = 20; #The time when the event starts AFTER Boss Agro
my $SpawnCast = "SpawnCast";
my $SpawnCastTime = 2;
my $Depop = "Depop";
my $Depoptime = 19;

sub EVENT_SPAWN {

}

sub EVENT_SAY {
if($text=~/Hail/i){
	quest::say("I am the test boss for explosions");
		plugin::AEbomb($Spawn, 20, 0, 13); #Spawn bombs
	quest::signalwith($SignalSpawn, 1, 0);
}
}

sub EVENT_AGGRO {
quest::settimer("$StartEvent", $StartTimer);
}

sub EVENT_TIMER {
if($timer eq "$StartEvent") { #Check event time
	plugin::AEbomb($Spawn, 20, 0, 13); #Spawn bombs
	quest::settimer("$SpawnCast", $SpawnCastTime); #Start cast timer
	quest::settimer("$Depop", $Depoptime); #Start depop timer
	quest::stoptimer("$StartEvent"); #Stop event timer
}	

if($timer eq "$SpawnCast") { #Check cast time
quest::signalwith($SignalSpawn, 1, 0);
quest::say("sent signal");
	quest::stoptimer("$SpawnCast"); #Stop event timer
	}
		
if($timer eq "$Depop") { #Check depop time
	quest::settimer("$StartEvent", $StartTimer); #Restart Event timer
	quest::depopall($Spawn); #Depop all spawned
	quest::stoptimer("$Depop"); #Stop event timer
	}
	
}
Adds that heal boss
Code:
my $Add = 999324;
my $Spell = 13;


sub EVENT_SIGNAL {
if ($signal == 1) {
	my @nlist = $entity_list->GetNPCList();
	foreach my $n (@nlist){
	my $Boss = $entity_list->GetNPCByNPCTypeID(999323);
		if ($n->GetNPCTypeID() == $Add){
			$n->SpellFinished($Spell, $Boss, 0);
		}
	}
}	


}
__________________
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 01:45 PM.


 

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