TimboAlefirst.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. hailed(NPC, Spawn)
  12. EmoteLoop(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. math.randomseed(os.time())
  17. choice = math.random (1,3)
  18. str = tostring(choice)
  19. if choice == 1 then
  20. PlayFlavor(NPC, "", "Wow, Meri is a great dancer!", "", 0, 0, Spawn)
  21. elseif choice == 2 then
  22. PlayFlavor(NPC, "", "We need a band!", "", 0, 0, Spawn)
  23. else
  24. PlayFlavor(NPC, "", "I hope im not embarrassing myself.", "", 0, 0, Spawn)
  25. end
  26. end
  27. function EmoteLoop(NPC)
  28. math.randomseed(os.time())
  29. local choice = math.random(1,4)
  30. str = tostring(choice)
  31. if choice == 1 then
  32. PlayAnimation(NPC, 11557)
  33. FaceTarget(NPC, 2530055)
  34. AddTimer(NPC, 8000, "EmoteLoop")
  35. elseif choice == 2 then
  36. PlayAnimation(NPC, 11909)
  37. FaceTarget(NPC, 2530055)
  38. AddTimer(NPC, 8000, "EmoteLoop")
  39. elseif choice == 4 then
  40. PlayAnimation(NPC, 298)
  41. FaceTarget(NPC, 2530055)
  42. AddTimer(NPC, 8000, "EmoteLoop")
  43. else
  44. PlayAnimation(NPC, 11681)
  45. FaceTarget(NPC, 2530055)
  46. AddTimer(NPC, 8000, "EmoteLoop")
  47. end
  48. end