JrFaust
10-18-2006, 04:13 PM
This is my first attempt at perl let alone a quest but I worked out the bugs, I believe this is the way the spawn should work. Please let me know if there was a better way and/or if I made any mistakes.
This is the apprentice code.
# nadox
# a_Luggald_High_Priest.pl
# a_luggald_apprentice.pl
# respawn named mob on a #Garodizan_Razorfin (227113) death
# Enestox, Angelox
# The High Priest (227081) will spawn Innoruuk (186107) 30 seconds after
# all four luggald apprentices (227089) are dead if the ceremony doesn't end.
# The timer kills the ceremony at 10 minutes from the first kill.
# The 10 minute timer also is the repop time of the apprentices.
# JrFaust
sub EVENT_ATTACK {
quest::signalwith(227081,1,0);
}
sub EVENT_DEATH{
quest::signalwith(227081,2,30);
my $random_result = int(rand(100));
my $a = 227113;#Garodizan_Razorfin
my $x = $npc->GetX();
my $y = $npc->GetY();
my $z = $npc->GetZ();
my $h = $npc->GetHeading();
if (($random_result<=5) && ($grums==2)){
quest::spawn2($a,1,0,$x,$y,$z,$h);
quest::delglobal("razo");
quest::setglobal("razo","3","3","F");
$razo=undef;
}else{
#do nothing
}
}
# EOF zone: nadox NPCs:#Garodizan_Razorfin (227113)
And this is the High Priest code.
# nadox
# a_luggald_apprentice.pl
# a_Luggald_High_Priest.pl
# respawn named mob on a #Garodizan_Razorfin (227113) death
# Enestox, Angelox
# The High Priest (227081) will spawn Innoruuk (186107) 30 seconds after
# all four luggald apprentices (227089) are dead if the ceremony doesn't end.
# The timer kills the ceremony at 10 minutes from the first kill.
# The 10 minute timer also is the repop time of the apprentices.
# JrFaust
my $counter;
sub EVENT_SPAWN {
$counter = 0;
}
sub EVENT_SIGNAL {
$counter += 1;
if ($signal == 1){
if ($counter == 1){
quest::say("And the ceremony begins.");
}
}
if ($signal == 2){
quest::settimer("ceremony",600);
if ($counter == 8){
quest::say("Innoruuk protect us!");
quest::settimer("inny",30);
quest::stoptimer("ceremony");
$counter = 0;
}
}
}
sub EVENT_TIMER{
if ($timername == "ceremony"){
quest::stoptimer("ceremony");
$counter = 0;
}
if ($timername == "inny"){
quest::stoptimer("inny");
quest::unique_spawn(186107,0,0,1714.00,669.00,-87.00);
}
}
sub EVENT_DEATH{
my $random_result = int(rand(100));
my $a = 227113;#Garodizan_Razorfin
my $x = $npc->GetX();
my $y = $npc->GetY();
my $z = $npc->GetZ();
my $h = $npc->GetHeading();
if (($random_result<=5) && ($grums==2)){
quest::spawn2($a,1,0,$x,$y,$z,$h);
quest::delglobal("razo");
quest::setglobal("razo","3","3","F");
$razo=undef;
}else{
#do nothing
}
quest::stoptimer("ceremony");
}
# EOF zone: nadox NPCs:#Garodizan_Razorfin (227113)
This is the apprentice code.
# nadox
# a_Luggald_High_Priest.pl
# a_luggald_apprentice.pl
# respawn named mob on a #Garodizan_Razorfin (227113) death
# Enestox, Angelox
# The High Priest (227081) will spawn Innoruuk (186107) 30 seconds after
# all four luggald apprentices (227089) are dead if the ceremony doesn't end.
# The timer kills the ceremony at 10 minutes from the first kill.
# The 10 minute timer also is the repop time of the apprentices.
# JrFaust
sub EVENT_ATTACK {
quest::signalwith(227081,1,0);
}
sub EVENT_DEATH{
quest::signalwith(227081,2,30);
my $random_result = int(rand(100));
my $a = 227113;#Garodizan_Razorfin
my $x = $npc->GetX();
my $y = $npc->GetY();
my $z = $npc->GetZ();
my $h = $npc->GetHeading();
if (($random_result<=5) && ($grums==2)){
quest::spawn2($a,1,0,$x,$y,$z,$h);
quest::delglobal("razo");
quest::setglobal("razo","3","3","F");
$razo=undef;
}else{
#do nothing
}
}
# EOF zone: nadox NPCs:#Garodizan_Razorfin (227113)
And this is the High Priest code.
# nadox
# a_luggald_apprentice.pl
# a_Luggald_High_Priest.pl
# respawn named mob on a #Garodizan_Razorfin (227113) death
# Enestox, Angelox
# The High Priest (227081) will spawn Innoruuk (186107) 30 seconds after
# all four luggald apprentices (227089) are dead if the ceremony doesn't end.
# The timer kills the ceremony at 10 minutes from the first kill.
# The 10 minute timer also is the repop time of the apprentices.
# JrFaust
my $counter;
sub EVENT_SPAWN {
$counter = 0;
}
sub EVENT_SIGNAL {
$counter += 1;
if ($signal == 1){
if ($counter == 1){
quest::say("And the ceremony begins.");
}
}
if ($signal == 2){
quest::settimer("ceremony",600);
if ($counter == 8){
quest::say("Innoruuk protect us!");
quest::settimer("inny",30);
quest::stoptimer("ceremony");
$counter = 0;
}
}
}
sub EVENT_TIMER{
if ($timername == "ceremony"){
quest::stoptimer("ceremony");
$counter = 0;
}
if ($timername == "inny"){
quest::stoptimer("inny");
quest::unique_spawn(186107,0,0,1714.00,669.00,-87.00);
}
}
sub EVENT_DEATH{
my $random_result = int(rand(100));
my $a = 227113;#Garodizan_Razorfin
my $x = $npc->GetX();
my $y = $npc->GetY();
my $z = $npc->GetZ();
my $h = $npc->GetHeading();
if (($random_result<=5) && ($grums==2)){
quest::spawn2($a,1,0,$x,$y,$z,$h);
quest::delglobal("razo");
quest::setglobal("razo","3","3","F");
$razo=undef;
}else{
#do nothing
}
quest::stoptimer("ceremony");
}
# EOF zone: nadox NPCs:#Garodizan_Razorfin (227113)