9
3

GogginCogspring.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. hailed(NPC, Spawn)
  12. EmoteLoop(NPC)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. math.randomseed(os.time())
  20. choice = math.random (1,3)
  21. str = tostring(choice)
  22. if choice == 1 then
  23. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1020.mp3", "Some day I'll get out there and work off this tab I have with Galan.", "", 0, 0, Spawn)
  24. elseif choice == 2 then
  25. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1020.mp3", "Wooohaw!", "", 0, 0, Spawn)
  26. elseif choice == 3 then
  27. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1020.mp3", "It's a party!", "", 0, 0, Spawn)
  28. end
  29. end
  30. function EmoteLoop(NPC)
  31. math.randomseed(os.time())
  32. local choice = math.random(1,2)
  33. str = tostring(choice)
  34. if choice == 1 then
  35. PlayAnimation(NPC, 11150)
  36. AddTimer(NPC, 7000, "EmoteLoop")
  37. else
  38. PlayAnimation(NPC, 20601)
  39. AddTimer(NPC, 4000, "EmoteLoop")
  40. end
  41. end