9
3

GogginCogspring.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/GogginCogspring.lua
  3. Script Author : Zcoretri
  4. Script Date : 2015.07.30
  5. Script Purpose : Goggin Cogspring dialog
  6. Modified Date : 2020.04.09
  7. Modiefied by : premierio015
  8. Modified Notes : Addded animations and dialogues
  9. --]]
  10. function spawn(NPC)
  11. EmoteLoop(NPC)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. math.randomseed(os.time())
  19. voice = math.random (1,3)
  20. str = tostring(voice)
  21. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..voice.."_1020.mp3", "", "", 0, 0, Spawn)
  22. text = math.random(1,3)
  23. if text == 1 then
  24. Say(NPC, "Some day I'll get out there and work off this tab I have with Galan.")
  25. elseif text == 2 then
  26. Say(NPC, "Woooohaw!")
  27. else
  28. Say(NPC, "It's a party!")
  29. end
  30. end
  31. function EmoteLoop(NPC)
  32. math.randomseed(os.time())
  33. local choice = math.random(1,2)
  34. str = tostring(choice)
  35. if choice == 1 then
  36. PlayAnimation(NPC, 11150)
  37. AddTimer(NPC, 7000, "EmoteLoop")
  38. else
  39. PlayAnimation(NPC, 11152)
  40. AddTimer(NPC, 11000, "EmoteLoop")
  41. end
  42. end