NecroticVenom.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --[[
  2. Script Name : Spells/Traditions/NecroticVenom.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.08.29 03:08:53
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, MainVal, DoTVal)
  9. Level = GetLevel(Caster)
  10. SpellLevel = 3
  11. Mastery = SpellLevel + 5
  12. if Level < Mastery then
  13. LvlBonus = Level - SpellLevel
  14. else LvlBonus = Mastery - SpellLevel
  15. end
  16. TotalDmg = MainVal + LvlBonus
  17. SpellDamage(Target, 2, TotalDmg, TotalDmg)
  18. if IsPlayer(Target) and GetClientVersion(Target) <= 526 then
  19. SpawnSet(Target,"visual_state",2774)
  20. else
  21. SpawnSet(Target,"visual_state",2774)
  22. end
  23. end
  24. function tick(Caster, Target, MainVal, DoTVal)
  25. Level = GetLevel(Caster)
  26. SpellLevel = 3
  27. Mastery = SpellLevel + 5
  28. if Level < Mastery then
  29. LvlBonus = Level - SpellLevel
  30. else LvlBonus = Mastery - SpellLevel
  31. end
  32. PowerDrain = 0 - DoTVal - LvlBonus
  33. ModifyPower(Target, PowerDrain)
  34. --Emote(Caster, "'s Necrotic Venom poisons"...Target..."draining"...PowerDrain..."points of power.")
  35. if IsPlayer(Target) and GetClientVersion(Target) <= 526 then
  36. SpawnSet(Target,"visual_state",2774)
  37. else
  38. SpawnSet(Target,"visual_state",2774)
  39. end
  40. end
  41. function remove(Caster, Target)
  42. SpawnSet(Target,"visual_state",35542)
  43. end