Monk Spells

Creating the Spells and Abilities for EQ2Emulator

Moderator: Team Members

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Monk Spells

Post by Jabantiz » Thu Sep 04, 2014 3:45 pm

According to the data tab MinHeal (the 3rd parameter) is 1.1

Code: Select all

-- Painbringer Component (instant heal)
  if MinHeal ~= nil then
    SpellHeal("Heal", MinHeal, 0, Caster)
    -- ModifyHP(Caster, MinHeal) -- heals 2 every 3 seconds for 9 seconds
  end
so the code on the script just passes that value through, we want to heal for that % so we need to turn the 1.1 into a percentage, by dividing by 100, and multiply it by the targets max health to get the heal amount so it would be something like this

Code: Select all

local HealAmount = (MinHeal / 100) * GetMaxHP(Caster)
SpellHeal("Heal", HealAmount, 0, Caster)
There is also a potential issue with float value vs the int that SpellHeal wants, so if this doesn't work as expected let me know, will have to look up the float vs int thing.

Dello0000
Posts: 175
Joined: Fri May 30, 2014 9:18 am
EQ2Emu Server: MHM Laneth
Characters: Dello - Dellos
Location: Scotland!
Contact:

Re: Monk Spells

Post by Dello0000 » Fri Sep 05, 2014 8:09 am

Yeah its working but only healing for 1.1 dmg as apposed to 1.1%
I cant see it killing the server but it may have an incorrect tooltip. Muhahaha :twisted:

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests