aBloodskulltowerguard.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/aBloodskulltowerguard.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.03.01 06:03:42
  5. Script Purpose :
  6. :
  7. --]]
  8. require("SpawnScripts/Generic/BloodskullVoiceOvers")
  9. local BloodskullIntentions = 403
  10. function spawn(NPC)
  11. end
  12. function hailed(NPC, Spawn)
  13. FaceTarget(NPC, Spawn)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function aggro(NPC, Spawn)
  19. --local chance = MakeRandomInt(0, 100)
  20. --if chance <= 25 then
  21. generic_aggro(NPC, Spawn)
  22. --end
  23. end
  24. function healthchanged(NPC, Spawn)
  25. local chance = MakeRandomInt(0, 100)
  26. if chance <= 25 then
  27. generic_healthchanged(NPC, Spawn)
  28. end
  29. end
  30. function death(NPC, Spawn)
  31. generic_death(NPC, Spawn)
  32. if GetQuestStep(Spawn, BloodskullIntentions) == 2 then
  33. local chance = math.random(1, 100)
  34. if chance >= 50 then
  35. local zone = GetZone(Spawn)
  36. local X = GetX(NPC)
  37. local Y = GetY(NPC)
  38. local Z = GetZ(NPC)
  39. local BloodskullOrders = SpawnMob(zone, 331126, true, X, Y, Z, 33.71)
  40. if BloodskullOrders ~= nil then
  41. AddSpawnAccess(BloodskullOrders, Spawn)
  42. AddTimer(NPC, 300000, "despawn", 1)
  43. end
  44. end
  45. end
  46. end
  47. function despawn(NPC, Spawn)
  48. local BloodskullOrders = GetSpawn(NPC, 331126)
  49. Despawn(BloodskullOrders)
  50. end