Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Spirit Mend.
- ## Cost: 1% Max Mana.
- ## Effect:
- ## CRIT:
- ## Made by Maze!
- ## Updated by Mittens.
- sub EVENT_SPELL_EFFECT_BUFF_TIC_CLIENT
- {
- my $responsibleclient = $entity_list->GetClientByID($caster_id);
- my $critmultiplier = $responsibleclient->GetAGI();
- my $critscale = int (($responsibleclient->GetAGI() * 1));
- my $critchancescale = int (($responsibleclient->GetAGI() / 1));
- my $critchance = int(100/10 + $critchancescale);
- my $critroll = int(rand(100));
- my $iscrit = $critroll <= $critchance;
- my $notcrit = $critroll > $critchance;
- my $critdmgmultiplier = $responsibleclient->GetDEX();
- my $critscale = (($critdmgmultiplier / 100));
- if ($responsibleclient && $notcrit)
- {
- my $manacost = ($responsibleclient->GetMaxMana() * 0.01);
- if ($manacost <= $responsibleclient->GetMana())
- {
- $responsibleclient->SetMana($responsibleclient->GetMana() - $manacost);
- my $HTHeal = int($responsibleclient->GetMaxMana() * 1.2);
- my $HTHealBonus = int (($responsibleclient->GetWIS() * 1.5));
- my $manarestore = ($responsibleclient->GetMaxMana() * .2);
- my $healingtarget = $responsibleclient->GetTarget();
- if ($responsibleclient->GetMana() >= $manacost)
- {
- $healingtarget->CastToClient()->HealDamage($HTHeal + $HTHealBonus);
- $responsibleclient->SetMana($responsibleclient->GetMana() - $manacost);
- #$entity_list->MessageClose($responsibleclient, 0, 30, 0, "".$responsibleclient->GetCleanName()." heals ".$healingtarget->GetCleanName()." for $HTHeal + $HTHealBonus !");
- }
- if ($responsibleclient->GetMana + $manarestore <= $responsibleclient->GetMaxMana())
- {
- $responsibleclient->SetMana($responsibleclient->GetMana() + $manarestore);
- }
- else
- {
- $responsibleclient->SetMana($responsibleclient->GetMaxMana());
- }
- }
- }
- if ($responsibleclient && $iscrit)
- {
- my $manacost = ($responsibleclient->GetMaxMana() * 0.03);
- if ($manacost <= $responsibleclient->GetMana())
- {
- $responsibleclient->SetMana($responsibleclient->GetMana() - $manacost);
- my $FHeal = int($responsibleclient->GetMaxMana() *2);
- my $FHealBonus = int (($responsibleclient->GetWIS() * 3));
- my $manarestore = ($responsibleclient->GetMaxMana() * .2);
- my $healingtarget = $responsibleclient->GetTarget();
- if ($responsibleclient->GetMana() >= $manacost)
- {
- $healingtarget->CastToClient()->HealDamage($FHeal + $FHealBonus);
- $responsibleclient->SetMana($responsibleclient->GetMana() - $manacost);
- #$entity_list->MessageClose($responsibleclient, 0, 30, 0, "".$responsibleclient->GetCleanName()." heals(crit) ".$healingtarget->GetCleanName()." for $FHeal + $FHealBonus + $critscale!");
- }
- if ($responsibleclient->GetMana + $manarestore <= $responsibleclient->GetMaxMana())
- {
- $responsibleclient->SetMana($responsibleclient->GetMana() + $manarestore);
- }
- else
- {
- $responsibleclient->SetMana($responsibleclient->GetMaxMana());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement