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

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 11-30-2013, 02:36 PM
Township EQ
Hill Giant
 
Join Date: Sep 2013
Posts: 118
Default Simple but fun custom boss fight

Hey everyone.

This is just a simple boss I scripted. Every time I see a code submission from a more experienced person such as Kingly Krab, he seems to do it in the least amount of lines possible without defining most things that I would define. I tried to make this boss in the least amount of lines possible. Here it is. Constructive criticism, tips, etc are all welcomed.

The objective in this fight is to burn the boss and kill the "corpses" immediately. The corpses are non-aggro NPCs with low health so they're easy enough to keep down, but if you let them pile up you're dead pretty fast.

Boss:
Code:
sub EVENT_COMBAT {
  if($combat_state == 1) {
  quest::say("You won't be the first to desecrate the land of the unliving.");
  quest::settimer("dostuff",int(rand(24)) + 1);
  quest::settimer("spawncorpse",1);
  }
  elsif($combat_state == 0) {
  $npc->SetHP($npc->GetMaxHP());
  quest::depopall(999348);
  quest::stoptimer("dostuff"); 
  quest::stoptimer("spawncorpse"); 
  }  
}

sub EVENT_DEATH {
  quest::stoptimer("dostuff"); 
  quest::stoptimer("spawncorpse"); 
  quest::depopall(999348);
  quest::say("My ancestors will make you pay for this intrusion.");
 }
 
sub EVENT_TIMER {  
  if($timer == "dostuff") { 
   quest::stoptimer("dostuff"); 
   quest::emote("begins to draw power from his undead victims.");
   quest::signalwith(999348,1,0); #signal 1 to adventurercorpse for damage increase.. if alive they signal back signal 2
   quest::settimer("dostuff",int(rand(24)) + 1);
   }
   if($timer == "spawncorpse") {
   quest::stoptimer("spawncorpse");  
   quest::spawn2(999348,0,0,$x + int(rand(35)),$y + int(rand(35)),$z,0);
   quest::settimer("spawncorpse",int(rand(24)) + 1);
   }   
}

 
sub EVENT_SIGNAL {
  if($signal == 2) { #Players didn't kill corpses.. increase min/max damage by 10/25 respectively
   quest::modifynpcstat("min_hit", $npc->GetMinDMG() + 10);
   quest::modifynpcstat("max_hit", $npc->GetMaxDMG() + 25);
   }
  if($signal == 3) { #Player killed corpse reducing damage
   quest::modifynpcstat("min_hit", $npc->GetMinDMG() - 10);
   quest::modifynpcstat("max_hit", $npc->GetMaxDMG() - 25);
   quest::emote("has lost a portion of his stolen power.");
   }
}
Corpses
Code:
sub EVENT_SPAWN	{ 
	my $random_race = quest::ChooseRandom(1,4,6,7,);
	my $random_texture = quest::ChooseRandom(1,2);
	my $random_weapon = quest::ChooseRandom(1,2,3,7,8,14);
	my $random_gender = int(rand(2));
	
			$npc->SetAppearance(3);
	        quest::npcgender($random_gender);
	        quest::npcrace($random_race);
            quest::npctexture($random_texture);
            quest::wearchange(7, $random_weapon);
	}
	
sub EVENT_SIGNAL {
  if($signal == 1) { #signal from boss to increase damage if players have not killed corpses
   quest::signalwith(1620,2,int(rand(5)))
   }
}	

sub EVENT_DEATH {
   quest::signalwith(1620,3,int(rand(5))) #were signaling back that this corpse has been killed and it will reduce boss damage
}
Reply With Quote
  #2  
Old 09-13-2017, 09:01 AM
phentop
Sarnak
 
Join Date: Jul 2010
Location: Army
Posts: 36
Default

I know most of these posts are old, but - what do you do with these scripts? save them as .pl files? put them in the quest folder? put them in the plugins folder? Global? I have 0 knowledge of writing these quests, but I can follow directions. Anyone have directions for quests like these on the forums.
Reply With Quote
  #3  
Old 10-01-2017, 12:15 PM
Nerdgasm
Discordant
 
Join Date: Apr 2013
Posts: 419
Default

Quote:
Originally Posted by phentop View Post
I know most of these posts are old, but - what do you do with these scripts? save them as .pl files? put them in the quest folder? put them in the plugins folder? Global? I have 0 knowledge of writing these quests, but I can follow directions. Anyone have directions for quests like these on the forums.
You can do it one of two ways... Take the script and put it in Notepad ++ and save the file under whatever zone you have that npc and name the script Mob_Name.pl

Example; if I had a mob in Tipt with that script and his name was Deathbringer_Greo I would paste this script into notepad ++

Code:
sub EVENT_COMBAT {
  if($combat_state == 1) {
  quest::say("You won't be the first to desecrate the land of the unliving.");
  quest::settimer("dostuff",int(rand(24)) + 1);
  quest::settimer("spawncorpse",1);
  }
  elsif($combat_state == 0) {
  $npc->SetHP($npc->GetMaxHP());
  quest::depopall(999348);
  quest::stoptimer("dostuff"); 
  quest::stoptimer("spawncorpse"); 
  }  
}

sub EVENT_DEATH {
  quest::stoptimer("dostuff"); 
  quest::stoptimer("spawncorpse"); 
  quest::depopall(999348);
  quest::say("My ancestors will make you pay for this intrusion.");
 }
 
sub EVENT_TIMER {  
  if($timer == "dostuff") { 
   quest::stoptimer("dostuff"); 
   quest::emote("begins to draw power from his undead victims.");
   quest::signalwith(999348,1,0); #signal 1 to adventurercorpse for damage increase.. if alive they signal back signal 2
   quest::settimer("dostuff",int(rand(24)) + 1);
   }
   if($timer == "spawncorpse") {
   quest::stoptimer("spawncorpse");  
   quest::spawn2(999348,0,0,$x + int(rand(35)),$y + int(rand(35)),$z,0);
   quest::settimer("spawncorpse",int(rand(24)) + 1);
   }   
}

 
sub EVENT_SIGNAL {
  if($signal == 2) { #Players didn't kill corpses.. increase min/max damage by 10/25 respectively
   quest::modifynpcstat("min_hit", $npc->GetMinDMG() + 10);
   quest::modifynpcstat("max_hit", $npc->GetMaxDMG() + 25);
   }
  if($signal == 3) { #Player killed corpse reducing damage
   quest::modifynpcstat("min_hit", $npc->GetMinDMG() - 10);
   quest::modifynpcstat("max_hit", $npc->GetMaxDMG() - 25);
   quest::emote("has lost a portion of his stolen power.");
   }
}
and name is Deathbringer_Greo.pl saving it inside ::Quests/tipt::

Do the same for the rest of the scripts but name them as needed (the corpses would be corpses.pl in ::Quests/Tipt:: etc)

If you need extensive help I can help you via Teamviewer or what not... just let me know. =)
__________________
I am the All Mighty Mittens!
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 06:30 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