Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Hell's Wrath; Deals 0.5% of NPC's MaxHP for every 10 points of client (casters) maximum INT
- ## /quests/global/spells/600.pl <-- or whatever spell ID it will be of course
- sub EVENT_SPELL_EFFECT_NPC
- {
- $responsibleclient = $entity_list->GetClientByID($caster_id);
- if ($responsibleclient)
- {
- my $manacost = ($responsibleclient->GetMaxMana() * 0.03);
- if ($manacost <= $responsibleclient->GetMana()) {
- $responsibleclient->SetMana($responsibleclient->GetMana() - $manacost);
- my $basefiredamage = int($responsibleclient->GetMaxMana() * 0.1)); # 10% of clients max mana
- my $damagebonus = int (($responsibleclient->GetMaxINT() / 10) * ($responsibleclient->GetMaxMana() * 0.005));
- my $totalfiredamage = $basefiredamage + $damagebonus;
- $entity_list->MessageClose($responsibleclient, 0, 30, 0, "".$responsibleclient->GetCleanName()." conjurs the wrath of hell to scorch ".$npc->GetCleanName()." for $totalfiredamage damage!");
- $npc->Damage($responsibleclient, $totalfiredamage, 600, 24, 0); # in your spells_new make the mana cost zero as we'll handle that in script below
- } else {
- $client->Message(15, "You have insufficient mana to cast that spell!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement