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.