|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Custom Custom Quests here |
|
|
|
09-16-2013, 10:30 PM
|
Discordant
|
|
Join Date: Aug 2009
Location: 2131231231
Posts: 255
|
|
Sample Custom Boss Script
I use this for one of my custom raid bosses.
Code:
sub EVENT_SPAWN {
quest::setnexthpevent(90);
quest::shout("My Lands My Domain. Flee you filth.");
}
sub EVENT_AGGRO {
quest::say("You can NEVARUN!");
quest::settimer(1,30);
}
sub EVENT_HP {
my $hate1 = $npc->GetHateRandom();
my $hate2 = $npc->GetHateRandom();
my $hate3 = $npc->GetHateRandom();
my $hate4 = $npc->GetHateRandom();
my $hate5 = $npc->GetHateRandom();
my $hate6 = $npc->GetHateRandom();
my $hate7 = $npc->GetHateRandom();
my $hate8 = $npc->GetHateRandom();
my $hate9 = $npc->GetHateRandom();
my $hate10 = $npc->GetHateRandom();
my $hate11 = $npc->GetHateRandom();
my $hate12 = $npc->GetHateRandom();
if($hpevent == 90) {
quest::say("Assist me my woodland friends!");
$guardian1 = quest::spawn2(15091,0,0,$x,$y,$z,0);
$guardian2 = quest::spawn2(15091,0,0,$x,$y,$z,0);
$guardian3 = quest::spawn2(15025,0,0,$x,$y,$z,0);
$guardian4 = quest::spawn2(15025,0,0,$x,$y,$z,0);
$guardian5 = quest::spawn2(15041,0,0,$x,$y,$z,0);
$guardian6 = quest::spawn2(15041,0,0,$x,$y,$z,0);
$attack1 = $entity_list->GetMobID($guardian1);
$attack2 = $entity_list->GetMobID($guardian2);
$attack3 = $entity_list->GetMobID($guardian3);
$attack4 = $entity_list->GetMobID($guardian4);
$attack5 = $entity_list->GetMobID($guardian5);
$attack6 = $entity_list->GetMobID($guardian6);
$guardian1atk = $attack1->CastToNPC();
$guardian2atk = $attack2->CastToNPC();
$guardian3atk = $attack3->CastToNPC();
$guardian4atk = $attack4->CastToNPC();
$guardian5atk = $attack5->CastToNPC();
$guardian6atk = $attack6->CastToNPC();
$guardian1atk->AddToHateList($hate1, 1);
$guardian2atk->AddToHateList($hate2, 1);
$guardian3atk->AddToHateList($hate3, 1);
$guardian4atk->AddToHateList($hate4, 1);
$guardian5atk->AddToHateList($hate5, 1);
$guardian6atk->AddToHateList($hate6, 1);
quest::setnexthpevent(70);
}
if($hpevent == 70) {
$npc->CastSpell(15975, $mobid, 10, -1);
quest::modifynpcstat("min_hit", 150);
quest::modifynpcstat("max_hit", 250);
quest::setnexthpevent(51);
}
if($hpevent == 51) {
$npc->BuffFadeBySpellID(15975);
quest::modifynpcstat("min_hit", 50);
quest::modifynpcstat("max_hit", 150);
quest::setnexthpevent(50);
}
if($hpevent == 50) {
quest::say("Assist me my woodland friends!");
$guardian4 = quest::spawn2(15025,0,0,$x,$y,$z,0);
$guardian5 = quest::spawn2(15041,0,0,$x,$y,$z,0);
$guardian6 = quest::spawn2(15041,0,0,$x,$y,$z,0);
$attack4 = $entity_list->GetMobID($guardian4);
$attack5 = $entity_list->GetMobID($guardian5);
$attack6 = $entity_list->GetMobID($guardian6);
$guardian4atk = $attack4->CastToNPC();
$guardian5atk = $attack5->CastToNPC();
$guardian6atk = $attack6->CastToNPC();
$guardian4atk->AddToHateList($hate4, 1);
$guardian5atk->AddToHateList($hate5, 1);
$guardian6atk->AddToHateList($hate6, 1);
quest::setnexthpevent(30);
}
if($hpevent == 30) {
$npc->CastSpell(15975, $mobid, 10, -1);
quest::modifynpcstat("min_hit", 150);
quest::modifynpcstat("max_hit", 250);
$guardian1 = quest::spawn2(15091,0,0,$x,$y,$z,0);
$guardian2 = quest::spawn2(15091,0,0,$x,$y,$z,0);
$guardian3 = quest::spawn2(15025,0,0,$x,$y,$z,0);
$guardian4 = quest::spawn2(15025,0,0,$x,$y,$z,0);
$guardian5 = quest::spawn2(15041,0,0,$x,$y,$z,0);
$guardian6 = quest::spawn2(15041,0,0,$x,$y,$z,0);
$guardian7 = quest::spawn2(12177,0,0,$x,$y,$z,0);
$guardian8 = quest::spawn2(12177,0,0,$x,$y,$z,0);
$attack1 = $entity_list->GetMobID($guardian1);
$attack2 = $entity_list->GetMobID($guardian2);
$attack3 = $entity_list->GetMobID($guardian3);
$attack4 = $entity_list->GetMobID($guardian4);
$attack5 = $entity_list->GetMobID($guardian5);
$attack6 = $entity_list->GetMobID($guardian6);
$attack7 = $entity_list->GetMobID($guardian7);
$attack8 = $entity_list->GetMobID($guardian8);
$guardian1atk = $attack1->CastToNPC();
$guardian2atk = $attack2->CastToNPC();
$guardian3atk = $attack3->CastToNPC();
$guardian4atk = $attack4->CastToNPC();
$guardian5atk = $attack5->CastToNPC();
$guardian6atk = $attack6->CastToNPC();
$guardian7atk = $attack7->CastToNPC();
$guardian8atk = $attack8->CastToNPC();
$guardian1atk->AddToHateList($hate1, 1);
$guardian2atk->AddToHateList($hate2, 1);
$guardian3atk->AddToHateList($hate3, 1);
$guardian4atk->AddToHateList($hate4, 1);
$guardian5atk->AddToHateList($hate5, 1);
$guardian6atk->AddToHateList($hate6, 1);
$guardian7atk->AddToHateList($hate7, 1);
$guardian8atk->AddToHateList($hate8, 1);
}
}
sub EVENT_TIMER {
my $hate = $npc->GetHateRandom();
if($timer == 1) {
$npc->SpellFinished(438,$hate);
quest::say("You dont stand a chance!");
}
}
__________________
|
|
|
|
09-16-2013, 10:49 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,595
|
|
Your scripts make me angry. D: You define so many variables for no reason.
|
09-16-2013, 11:42 PM
|
Discordant
|
|
Join Date: Aug 2009
Location: 2131231231
Posts: 255
|
|
lol, Definitely needs cleaned.
__________________
|
09-17-2013, 08:42 AM
|
Dragon
|
|
Join Date: May 2010
Posts: 965
|
|
Quote:
Originally Posted by Kingly_Krab
Your scripts make me angry. D: You define so many variables for no reason.
|
That would be the way all self taught programmers start.
"Don't be a dick" - Wil Wheaton
|
09-17-2013, 11:09 AM
|
Sarnak
|
|
Join Date: Sep 2009
Posts: 32
|
|
Quote:
Originally Posted by sorvani
That would be the way all self taught programmers start.
"Don't be a dick" - Wil Wheaton
|
Never have I loved someone so much, as I love you right now.
|
09-17-2013, 11:11 AM
|
Hill Giant
|
|
Join Date: Oct 2002
Location: Rockville, MD
Posts: 124
|
|
My first scripts were more variable definitions than anything related to the actual script :P gotta learn somewhere before you can start breaking things down.
Perhaps a proper response would have been a trick or two the OP could have used to reduce the variable declarations perhaps
__________________
Bront -Server Admin/Owner and Lead Quest Dev for Kildrukaun's Prophecy
http://kpemu.com/
|
09-17-2013, 01:13 PM
|
Discordant
|
|
Join Date: Dec 2005
Posts: 435
|
|
Quote:
Originally Posted by Dunge0nMastr
My first scripts were more variable definitions than anything related to the actual script :P gotta learn somewhere before you can start breaking things down.
Perhaps a proper response would have been a trick or two the OP could have used to reduce the variable declarations perhaps
|
Agreed there. A lot of us that learned on our own through playing with our own server started with bloated code. Hell most of mine still sucks but it works
Figback65 keep on trucking and thanks for posting something.
__________________
|
09-17-2013, 04:00 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,595
|
|
Sorry, I spoke with him on his server, actually going to talk with him later about lowering his variable count and everything, reducing the size of scripts, but yielding more efficiency. Didn't mean to come across as a dick. :P
|
09-17-2013, 04:19 PM
|
Hill Giant
|
|
Join Date: Oct 2002
Location: Rockville, MD
Posts: 124
|
|
well played then sir :P
__________________
Bront -Server Admin/Owner and Lead Quest Dev for Kildrukaun's Prophecy
http://kpemu.com/
|
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 08:32 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|