SHARE
TWEET

Untitled

a guest Oct 20th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Spirit Mend.
  2. ## Cost: 1% Max Mana.
  3. ## Effect:  
  4. ## CRIT:
  5. ## Made by Maze!
  6. ## Updated by Mittens.
  7.  
  8. sub EVENT_SPELL_EFFECT_BUFF_TIC_CLIENT
  9. {
  10.         my $responsibleclient = $entity_list->GetClientByID($caster_id);
  11.         my $critmultiplier = $responsibleclient->GetAGI();
  12.         my $critscale = int (($responsibleclient->GetAGI() * 1));
  13.         my $critchancescale = int (($responsibleclient->GetAGI() / 1));
  14.         my $critchance = int(100/10 + $critchancescale);
  15.         my $critroll = int(rand(100));        
  16.         my $iscrit = $critroll <= $critchance;        
  17.         my $notcrit = $critroll > $critchance;
  18.         my $critdmgmultiplier = $responsibleclient->GetDEX();
  19.         my $critscale = (($critdmgmultiplier / 100));
  20.        
  21.     if ($responsibleclient && $notcrit)
  22.     {
  23.         my $manacost = ($responsibleclient->GetMaxMana() * 0.01);
  24.             if ($manacost <= $responsibleclient->GetMana())
  25.             {
  26.                 $responsibleclient->SetMana($responsibleclient->GetMana() - $manacost);
  27.                 my $HTHeal = int($responsibleclient->GetMaxMana() * 1.2);
  28.                 my $HTHealBonus = int (($responsibleclient->GetWIS() * 1.5));
  29.                 my $manarestore = ($responsibleclient->GetMaxMana() * .2);
  30.                 my $healingtarget = $responsibleclient->GetTarget();
  31.                     if ($responsibleclient->GetMana() >= $manacost)
  32.                         {
  33.                             $healingtarget->CastToClient()->HealDamage($HTHeal + $HTHealBonus);
  34.                             $responsibleclient->SetMana($responsibleclient->GetMana() - $manacost);
  35.                             #$entity_list->MessageClose($responsibleclient, 0, 30, 0, "".$responsibleclient->GetCleanName()." heals ".$healingtarget->GetCleanName()." for $HTHeal + $HTHealBonus !");
  36.                         }
  37.                     if ($responsibleclient->GetMana + $manarestore <= $responsibleclient->GetMaxMana())
  38.                     {
  39.                         $responsibleclient->SetMana($responsibleclient->GetMana() + $manarestore);
  40.                     }
  41.                         else
  42.                         {
  43.                             $responsibleclient->SetMana($responsibleclient->GetMaxMana());
  44.                         }
  45.             }
  46.     }
  47.     if ($responsibleclient && $iscrit)
  48.     {
  49.         my $manacost = ($responsibleclient->GetMaxMana() * 0.03);
  50.             if ($manacost <= $responsibleclient->GetMana())
  51.             {
  52.                 $responsibleclient->SetMana($responsibleclient->GetMana() - $manacost);
  53.                 my $FHeal = int($responsibleclient->GetMaxMana() *2);
  54.                 my $FHealBonus = int (($responsibleclient->GetWIS() * 3));
  55.                 my $manarestore = ($responsibleclient->GetMaxMana() * .2);
  56.                 my $healingtarget = $responsibleclient->GetTarget();
  57.                     if ($responsibleclient->GetMana() >= $manacost)
  58.                         {
  59.                             $healingtarget->CastToClient()->HealDamage($FHeal + $FHealBonus);
  60.                             $responsibleclient->SetMana($responsibleclient->GetMana() - $manacost);
  61.                             #$entity_list->MessageClose($responsibleclient, 0, 30, 0, "".$responsibleclient->GetCleanName()." heals(crit) ".$healingtarget->GetCleanName()." for $FHeal + $FHealBonus + $critscale!");
  62.                         }
  63.                     if ($responsibleclient->GetMana + $manarestore <= $responsibleclient->GetMaxMana())
  64.                     {
  65.                         $responsibleclient->SetMana($responsibleclient->GetMana() + $manarestore);
  66.                     }
  67.                         else
  68.                         {
  69.                             $responsibleclient->SetMana($responsibleclient->GetMaxMana());
  70.                         }
  71.             }
  72.     }
  73. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top