9
3

TimboAlefirst.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/TimboAlefirst.lua
  3. Script Author : Zcoretri
  4. Script Date : 2015.07.30
  5. Script Purpose : Timbo Alefirst dialog
  6. Modified Date : 2020.04.09
  7. Modified by : premierio015
  8. Modified Notes : Addded animations, 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.."_1026.mp3", "", "", 0, 0, Spawn)
  22. text = math.random(1,3)
  23. if text == 1 then
  24. Say(NPC, "Wow, Meri is a great dancer!")
  25. elseif text == 2 then
  26. Say(NPC, "We need a band!")
  27. else
  28. Say(NPC, "I hope I'm not embarrassing myself.")
  29. end
  30. end
  31. function EmoteLoop(NPC)
  32. math.randomseed(os.time())
  33. local choice = math.random(1,4)
  34. str = tostring(choice)
  35. if choice == 1 then
  36. -- flirt
  37. PlayAnimation(NPC, 11557)
  38. AddTimer(NPC, 9600, "Idle")
  39. elseif choice == 2 then
  40. -- orate
  41. PlayAnimation(NPC, 11909)
  42. AddTimer(NPC, 8000, "Idle")
  43. elseif choice == 3 then
  44. -- flourish
  45. PlayAnimation(NPC, 298)
  46. AddTimer(NPC, 8000, "Idle")
  47. else
  48. -- heelclick
  49. PlayAnimation(NPC, 11681)
  50. AddTimer(NPC, 2500, "Idle")
  51. end
  52. end
  53. function Idle(NPC)
  54. PlayAnimation(NPC, 323)
  55. EmoteLoop(NPC)
  56. end