Instinct.lua 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. Script Name : Spells/Priest/Druid/Warden/Instinct.lua
  3. Script Author : neatz09
  4. Script Date : 2020.03.01 10:03:52
  5. Script Purpose :
  6. :
  7. --]]
  8. -- On a combat hit this spell may cast Primal Instincts on target of attack. Lasts for 6.0 seconds. Triggers about 2.4 times per minute.
  9. -- Inflicts 90 - 109 piercing damage on target
  10. -- Inflicts 45 - 55 piercing damage on target every 3 seconds
  11. -- If target is a player or a mercenary
  12. -- On a hostile ability cast this spell may cast Primal Instincts on target of spell. Lasts for 6.0 seconds. Triggers about 7.0 times per minute.
  13. -- Inflicts 90 - 109 piercing damage on target
  14. -- Inflicts 45 - 55 piercing damage on target every 3 seconds
  15. -- This effect can only trigger once every 8.0 seconds.
  16. -- If target is a player or a mercenary
  17. -- Increases Crushing, Piercing, Slashing and Ranged of target by 14.0
  18. -- Pets cannot trigger Primal Instincts.
  19. function cast(Caster, Target, DmgType, MinVal, MaxVal, Skills)
  20. AddProc(Target, 3, 100) --combat
  21. --AddProc(Target, 5, 28) hostile commented out due to spell change
  22. AddSkillBonus(Target, GetSkillIDByName("Slashing"), Skills)
  23. AddSkillBonus(Target, GetSkillIDByName("Piercing"), Skills)
  24. AddSkillBonus(Target, GetSkillIDByName("Crushing"), Skills)
  25. AddSkillBonus(Target, GetSkillIDByName("Ranged"), Skills)
  26. end
  27. function proc(Caster, Target, Type, DmgType, MinVal, MaxVal, TickType, TickMin, TickMax, Skills)
  28. Spell = GetSpell(5435, GetSpellTier())
  29. -- if IsPlayer(Caster) and Type == 3 or Type == 5 then this spell was changed at some point
  30. if IsPlayer(Caster) and Type == 3 then
  31. SetSpellDataIndex(Spell, 0, DmgType)
  32. SetSpellDataIndex(Spell, 1, MinVal)
  33. SetSpellDataIndex(Spell, 2, MaxVal)
  34. SetSpellDataIndex(Spell, 3, TickType)
  35. SetSpellDataIndex(Spell, 4, TickMin)
  36. SetSpellDataIndex(Spell, 5, TickMax)
  37. CastCustomSpell(Spell, Caster, Target)
  38. end
  39. end
  40. function remove(Caster, Target)
  41. RemoveProc(Target)
  42. RemoveSkillBonus(Target)
  43. end