12345678910111213141516171819202122232425 |
- --[[
- Script Name : Spells/Commoner/SwindlersGift.lua
- Script Author : neatz09
- Script Date : 2020.04.02 12:04:08
- Script Purpose :
- :
- --]]
- function cast(Caster, Target, MinVal, MaxVal)
- local Val1 = (GetLevel(Caster) * 1.08) * MinVal
- local Val2 = (GetLevel(Caster) * 1.08) * MaxVal
- local SkillAmt = randomFloat(Val1, Val2)
- AddSkillBonus(Target, GetSkillIDByName("Slashing"), SkillAmt)
- AddSkillBonus(Target, GetSkillIDByName("Ranged"), SkillAmt)
- AddSkillBonus(Target, GetSkillIDByName("Piercing"), SkillAmt)
- AddSkillBonus(Target, GetSkillIDByName("Crushing"), SkillAmt)
- end
- function randomFloat(Val1, Val2)
- return Val1 + math.random() * (Val2 - Val1);
- end
- function remove(Caster, Target)
- RemoveSkillBonus(Target)
- end
|