Rotweed.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. function spawn(NPC)
  9. local Level = GetLevel(NPC)
  10. local level1 = 13
  11. local level2 = 14
  12. local difficulty1 = 8
  13. local hp1 = 1770
  14. local power1 = 485
  15. local difficulty2 = 8
  16. local hp2 = 1990
  17. local power2 = 530
  18. if Level == level1 then
  19. SpawnSet(NPC, "difficulty", difficulty1)
  20. SpawnSet(NPC, "hp", hp1)
  21. SpawnSet(NPC, "power", power1)
  22. elseif Level == level2
  23. then
  24. SpawnSet(NPC, "difficulty", difficulty2)
  25. SpawnSet(NPC, "hp", hp2)
  26. SpawnSet(NPC, "power", power2)
  27. end
  28. dmgMod = GetStr(NPC)/10
  29. SetInfoStructUInt(NPC, "override_primary_weapon", 1)
  30. SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(12 + dmgMod))
  31. SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(24 + dmgMod))
  32. end
  33. function aggro(NPC, Spawn)
  34. aggrotimer(NPC)
  35. end
  36. function aggrotimer(NPC)
  37. AddTimer(NPC,600000,"aggrotimer") -- Check is Thistles and Cube are up
  38. local Rotweed = GetSpawnByLocationID(zone, 133779140)
  39. if IsInCombat(Rotweed) and Rotweed ~=nil then
  40. else
  41. Despawn(Rotweed) --Despawns Thistles and Cube, which disables update
  42. end
  43. end
  44. function hailed(NPC, Spawn)
  45. end
  46. function respawn(NPC)
  47. spawn(NPC)
  48. end