aTunarianMourner (1).lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --[[
  2. Script Name : SpawnScripts/OutpostOverlord/aTunarianMourner.lua
  3. Script Author : Lemmeron
  4. Script Date : 21.08.2020
  5. Script Purpose : To make the mourners cry randomly
  6. :
  7. --]]
  8. local Mourner1LocID = 394723
  9. local Mourner2LocID = 394725
  10. local MournerID = 2780007
  11. function spawn(NPC)
  12. AddTimer(NPC, 5000, "EmoteLoop",1, NPC)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function EmoteLoop(NPC,Spawn)
  18. local Mourner = GetSpawnID(NPC)
  19. Say(NPC, Mourner)
  20. local WhichOne = GetSpawnLocationID(NPC)
  21. Say(NPC, "WhichOne")
  22. Say(NPC, WhichOne)
  23. if WhichOne == Mourner1LocID then
  24. Say(NPC, "1 chosen")
  25. PlayAnimation(NPC, 11275) -- Cry, it was 13008, Idle
  26. AddTimer(NPC, ((math.random(4 ,9)*2000)+10000) , "EmoteLoop")
  27. local WhichOne = nil
  28. else
  29. Say(NPC, "none chosen 2")
  30. end
  31. if WhichOne == Mourner2LocID then
  32. Say(NPC, "2 chosen")
  33. PlayAnimation(NPC, 11275) -- Cry, it was 13008, Idle
  34. AddTimer(NPC, ((math.random(3 ,8)*2000)+10000) , "EmoteLoop")
  35. local WhichOne = nil
  36. else
  37. Say(NPC, "none chosen 2")
  38. end
  39. -- AddTimer(NPC, 18000, "EmoteLoop")
  40. end