Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Plugins & Mods

Quests::Plugins & Mods Completed plugins for public use as well as modifications.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-06-2010, 06:30 PM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default plugin::AERampageEffect

On live, AE rampage often did not hit the same values as the regular melee of the NPC. The way it is coded on emu it is often too strong to use on raid mobs.

This plugin lets you fine tune your AE rampage damage by either setting a value to scale your NPC's max min hits when rampage.

Ie. plugin::AERampageEffect(50) ;
Max hit 20,000, Min Hit 10,000. If you scale to 50. It will Max 10k, Min 5k when it does the rampage effect using the plugin.

This should be used in a timer loop.

Ideally it would be nice if regular AE rampage had some more fine tuning options to it.

Code:
#Usage plugin::AERampageEffect($Scale, $Skill, $Max_Distance, $Max_Damage, $Min_Damage);
#Use scale alone to modifiy ramapage damage by a set amount IE 50% max hit, would be 50 and not set Max/Min
#Max Distance is AE rampage radius

sub AERampageEffect {

	my $npc = plugin::val('$npc');
	my $entity_list = plugin::val('$entity_list');
	my $Scale = $_[0];
	my $Skill = $_[1];
	my $Max_Distance = $_[2];
	my $Max_Damage = $_[3];
	my $Min_Damage = $_[4];
	my $NPC_NAME = $npc->GetCleanName();
	my $MAX_HIT = $npc->GetMaxDMG(); 
	#my $MIN_HIT = $npc->GetMinDMG(); #Upon Testing, this function doesn't appear to be working yet...
        my $MIN_HIT = int($MAX_HIT/4); #Temporary min hit value until above is resolved.
	
	if (!$Max_Damage) { $Max_Damage = int($MAX_HIT * ($Scale/100)); }
	if (!$Min_Damage) { $Min_Damage = int($MIN_HIT * ($Scale/100)); }
	if (!$Skill) { $Skill = 0; }
	if (!$MaxDistance) { $MaxDistance = 37; }

	$entity_list->MessageClose($npc, 1, 200, 13, "$NPC_NAME goes on a RAMPAGE");
	my @hatelist = $npc->GetHateList(); 

	foreach $ent (@hatelist)  {
	my $h_ent = $ent->GetEnt();

		if($h_ent) {
		my $distanceCHK = $h_ent->CalculateDistance($x, $y, $z);
	   	
			if ($distanceCHK <= $Max_Distance) {
			$npc->DoSpecialAttackDamage($h_ent, $Skill, $Max_Damage, $Min_Damage);
			}
		}
	}
}
Kayen
GM Storm Haven
Reply With Quote
  #2  
Old 12-06-2010, 11:35 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by Kayen View Post
On live, AE rampage often did not hit the same values as the regular melee of the NPC. The way it is coded on emu it is often too strong to use on raid mobs.

This plugin lets you fine tune your AE rampage damage by either setting a value to scale your NPC's max min hits when rampage.

Ie. plugin::AERampageEffect(50) ;
Max hit 20,000, Min Hit 10,000. If you scale to 50. It will Max 10k, Min 5k when it does the rampage effect using the plugin.

This should be used in a timer loop.

Ideally it would be nice if regular AE rampage had some more fine tuning options to it.

Code:
#Usage plugin::AERampageEffect($Scale, $Skill, $Max_Distance, $Max_Damage, $Min_Damage);
#Use scale alone to modifiy ramapage damage by a set amount IE 50% max hit, would be 50 and not set Max/Min
#Max Distance is AE rampage radius

sub AERampageEffect {

	my $npc = plugin::val('$npc');
	my $entity_list = plugin::val('$entity_list');
	my $Scale = $_[0];
	my $Skill = $_[1];
	my $Max_Distance = $_[2];
	my $Max_Damage = $_[3];
	my $Min_Damage = $_[4];
	my $NPC_NAME = $npc->GetCleanName();
	my $MAX_HIT = $npc->GetMaxDMG(); 
	#my $MIN_HIT = $npc->GetMinDMG(); #Upon Testing, this function doesn't appear to be working yet...
        my $MIN_HIT = int($MAX_HIT/4); #Temporary min hit value until above is resolved.
	
	if (!$Max_Damage) { $Max_Damage = int($MAX_HIT * ($Scale/100)); }
	if (!$Min_Damage) { $Min_Damage = int($MIN_HIT * ($Scale/100)); }
	if (!$Skill) { $Skill = 0; }
	if (!$MaxDistance) { $MaxDistance = 37; }

	$entity_list->MessageClose($npc, 1, 200, 13, "$NPC_NAME goes on a RAMPAGE");
	my @hatelist = $npc->GetHateList(); 

	foreach $ent (@hatelist)  {
	my $h_ent = $ent->GetEnt();

		if($h_ent) {
		my $distanceCHK = $h_ent->CalculateDistance($x, $y, $z);
	   	
			if ($distanceCHK <= $Max_Distance) {
			$npc->DoSpecialAttackDamage($h_ent, $Skill, $Max_Damage, $Min_Damage);
			}
		}
	}
}
Kayen
GM Storm Haven

Still, very nice simple addition. I will commit it, you can always post modifications and those can replace the old functions.

Good job 8 D.
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 12:41 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