Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 03-18-2017, 10:26 PM
Nerdgasm
Discordant
 
Join Date: Apr 2013
Posts: 419
Default

Pretty close,

Code:
## Slash; Deals 10% of your hp to your target. (spell ID is 400).
## /quests/global/spells/400.pl

sub EVENT_SPELL_EFFECT_NPC 
{
	$responsibleclient = $entity_list->GetClientByID($caster_id);
	if ($responsibleclient) 
	{
		my $slashdamage = int($responsibleclient->GetMaxHP() * 0.10); ## 10% of clients current HP?
		$entity_list->MessageClose($responsibleclient, 0, 30, 0, "".$responsibleclient->GetCleanName()." delivers a crippling slash to ".$npc->GetCleanName()." for $slashdamage damage!");
		$npc->Damage($responsibleclient, $slashdamage, 400, 1, 0);
		
	}
}
Change in red, I mean it was exactly what I was looking for, however I don't want it to do the current hp, I want it to do the MAX HP, so if they have 3000 max hp but only have 2000 hp left, it'll do 300 damage, instead of 200. However, it did work perfectly, you sir, are amazing.
__________________
I am the All Mighty Mittens!
Reply With Quote
 


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 10:56 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3