9
3

Rotweed.lua 995 B

123456789101112131415161718192021222324252627282930313233343536
  1. --[[
  2. Script Name : SpawnScripts/Oakmyst_Classic/Rotweed.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.10.19 03:10:25
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/NPCModule"
  9. function spawn(NPC, Spawn)
  10. dmgMod = GetStr(NPC)/10
  11. Named(NPC)
  12. SetInfoStructUInt(NPC, "override_primary_weapon", 1)
  13. SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(12 + dmgMod))
  14. SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(24 + dmgMod))
  15. end
  16. function aggro(NPC, Spawn)
  17. aggrotimer(NPC)
  18. end
  19. function aggrotimer(NPC)
  20. AddTimer(NPC,600000,"aggrotimer") -- Check is Thistles and Cube are up
  21. local Rotweed = GetSpawnByLocationID(zone, 133779140)
  22. if IsInCombat(Rotweed) and Rotweed ~=nil then
  23. else
  24. Despawn(Rotweed) --Despawns Thistles and Cube, which disables update
  25. end
  26. end
  27. function hailed(NPC, Spawn)
  28. end
  29. function respawn(NPC)
  30. spawn(NPC)
  31. end