SwindlersGift.lua 802 B

12345678910111213141516171819202122232425
  1. --[[
  2. Script Name : Spells/Commoner/SwindlersGift.lua
  3. Script Author : neatz09
  4. Script Date : 2020.04.02 12:04:08
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, MinVal, MaxVal)
  9. local Val1 = (GetLevel(Caster) * 1.08) * MinVal
  10. local Val2 = (GetLevel(Caster) * 1.08) * MaxVal
  11. local SkillAmt = randomFloat(Val1, Val2)
  12. AddSkillBonus(Target, GetSkillIDByName("Slashing"), SkillAmt)
  13. AddSkillBonus(Target, GetSkillIDByName("Ranged"), SkillAmt)
  14. AddSkillBonus(Target, GetSkillIDByName("Piercing"), SkillAmt)
  15. AddSkillBonus(Target, GetSkillIDByName("Crushing"), SkillAmt)
  16. end
  17. function randomFloat(Val1, Val2)
  18. return Val1 + math.random() * (Val2 - Val1);
  19. end
  20. function remove(Caster, Target)
  21. RemoveSkillBonus(Target)
  22. end