Guys, I have a problem with the 4th pet on my server where one gives very high damage and the other doesn't even have an effect, follow the code on how they are in my skilleffect.lua
function Telf_effect(role,target) -- Thunder Fairy Effect Bonus
local hp = Hp(target)
location pet_lv = 1
local statelv = 2 * pet_lv
local time = statelv*2
local atk_rad = 1
local hpdmg = Atk_Raise ( atk_rad , role , target )
if ((hp - hpdmg) > 1) then
HP_Endure_Dmg ( target , hpdmg )
PlayEffect(target,907)
SystemNotice (role, "Spirit Activated Thunder Skill to help you in battle!")
SystemNotice ( target , "Opponents Fairy activated Thunder Skill")
ALLExAttrSet(role)
end
end
function Lelf_effect(role,target) -- Light Fairy Effect Bonus
location pet_lv = 1
local statelv = 2 * pet_lv
local time = statelv*2
PlayEffect(role,168 )
AddState(role, role, STATE_TSHD, statelv, time)
-- SystemNotice (role, "Spirit Activated Light Skill to help you in battle!")
-- SystemNotice ( target , "Opponents Fairy activated Light Skill")
ALLExAttrSet(role)
end
function Delf_effect(role,target) -- Darkness Fairy Effect Bonus
location pet_lv = 1
local statelv = 3 * pet_lv
local time = statelv*2
PlayEffect(target,322 )
AddState ( role , target , STATE_XN , 1 , time )
AddState ( role , target , STATE_PJ , statelv , time )
Check_Ys_Rem (role, target)
-- SystemNotice (role, "Spirit Activated Darkness Skill to help you in battle!")
-- SystemNotice ( target , "Opponents Fairy activated Darkness Skill")
ALLExAttrSet(role)
end
function Telf_effect(role,target) -- Thunder Fairy Effect Bonus
local hp = Hp(target)
location pet_lv = 1
local statelv = 2 * pet_lv
local time = statelv*2
local atk_rad = 1
local hpdmg = Atk_Raise ( atk_rad , role , target )
if ((hp - hpdmg) > 1) then
HP_Endure_Dmg ( target , hpdmg )
PlayEffect(target,907)
SystemNotice (role, "Spirit Activated Thunder Skill to help you in battle!")
SystemNotice ( target , "Opponents Fairy activated Thunder Skill")
ALLExAttrSet(role)
end
end
function Lelf_effect(role,target) -- Light Fairy Effect Bonus
location pet_lv = 1
local statelv = 2 * pet_lv
local time = statelv*2
PlayEffect(role,168 )
AddState(role, role, STATE_TSHD, statelv, time)
-- SystemNotice (role, "Spirit Activated Light Skill to help you in battle!")
-- SystemNotice ( target , "Opponents Fairy activated Light Skill")
ALLExAttrSet(role)
end
function Delf_effect(role,target) -- Darkness Fairy Effect Bonus
location pet_lv = 1
local statelv = 3 * pet_lv
local time = statelv*2
PlayEffect(target,322 )
AddState ( role , target , STATE_XN , 1 , time )
AddState ( role , target , STATE_PJ , statelv , time )
Check_Ys_Rem (role, target)
-- SystemNotice (role, "Spirit Activated Darkness Skill to help you in battle!")
-- SystemNotice ( target , "Opponents Fairy activated Darkness Skill")
ALLExAttrSet(role)
end