9
3

SwindlersLuck.lua 802 B

12345678910111213141516171819202122232425
  1. --[[
  2. Script Name : Spells/Commoner/SwindlersLuck.lua
  3. Script Author : neatz09
  4. Script Date : 2020.03.29 05:03:16
  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(Caster, GetSkillIDByName("Slashing"), SkillAmt)
  13. AddSkillBonus(Caster, GetSkillIDByName("Ranged"), SkillAmt)
  14. AddSkillBonus(Caster, GetSkillIDByName("Piercing"), SkillAmt)
  15. AddSkillBonus(Caster, 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(Caster)
  22. end