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

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 09-16-2013, 10:30 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default 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!");
	}
}
__________________
Reply With Quote
  #2  
Old 09-16-2013, 10:49 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

Your scripts make me angry. D: You define so many variables for no reason.
Reply With Quote
  #3  
Old 09-16-2013, 11:42 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default

lol, Definitely needs cleaned.
__________________
Reply With Quote
  #4  
Old 09-17-2013, 08:42 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

Quote:
Originally Posted by Kingly_Krab View Post
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
Reply With Quote
  #5  
Old 09-17-2013, 11:09 AM
Luccian
Sarnak
 
Join Date: Sep 2009
Posts: 32
Default

Quote:
Originally Posted by sorvani View Post
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.
Reply With Quote
  #6  
Old 09-17-2013, 11:11 AM
Dunge0nMastr
Hill Giant
 
Join Date: Oct 2002
Location: Rockville, MD
Posts: 124
Default

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/
Reply With Quote
  #7  
Old 09-17-2013, 01:13 PM
wolfwalkereci
Discordant
 
Join Date: Dec 2005
Posts: 435
Default

Quote:
Originally Posted by Dunge0nMastr View Post
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.
__________________

Reply With Quote
  #8  
Old 09-17-2013, 04:00 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

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
Reply With Quote
  #9  
Old 09-17-2013, 04:19 PM
Dunge0nMastr
Hill Giant
 
Join Date: Oct 2002
Location: Rockville, MD
Posts: 124
Default

well played then sir :P
__________________
Bront -Server Admin/Owner and Lead Quest Dev for Kildrukaun's Prophecy
http://kpemu.com/
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 11:51 AM.


 

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