agrizzlybear.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --[[
  2. Script Name : SpawnScripts/MakeshiftArena/agrizzlybear.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.19 05:12:31
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/CombatModule"
  9. function spawn(NPC, Spawn)
  10. combatModule(NPC, Spawn)
  11. AddTimer(NPC,2000,"Pop")
  12. end
  13. function Pop(NPC)
  14. MoveToLocation(NPC,7.31, 0.14, 6.07,1)
  15. end
  16. function death(NPC, Spawn)
  17. zone = GetZone(NPC)
  18. Bear1 = GetSpawnByLocationID(zone,133781388)
  19. Bear2 = GetSpawnByLocationID(zone,133781389)
  20. Lion1 = GetSpawnByLocationID(zone,133781385)
  21. Lion2 = GetSpawnByLocationID(zone,133781386)
  22. Lion3 = GetSpawnByLocationID(zone,133781387)
  23. if IsAlive(Bear1) or IsAlive(Bear2) then
  24. PlaySound(NPC,"sounds/widgets/ecology_city_sounds/ecology_crowd_clap001.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  25. elseif not IsAlive(Bear1) and not IsAlive(Bear2) then
  26. PlaySound(NPC,"sounds/widgets/ecology_city_sounds/ecology_crowd_cheer001.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  27. end
  28. if not IsAlive(Bear1) and not IsAlive(Bear2) then
  29. if GetSpawnByGroupID(zone, 1053518) ==nil then
  30. SpawnGroupByID(zone,1053518)
  31. SendPopUpMessage(Spawn,"Doors to south rattle as your next opponents approach",250,250,250)
  32. end
  33. end
  34. end
  35. function respawn(NPC)
  36. spawn(NPC)
  37. end