DelmaMesspie.lua 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/DelmaMesspie.lua
  3. Script Author : Rylec
  4. Script Date : 2021.08.04 02:08:55
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC, 1000, "EmoteLoop")
  10. SetPlayerProximityFunction(NPC, 20, "InRange")
  11. end
  12. function hailed(NPC, Spawn)
  13. FaceTarget(NPC, Spawn)
  14. local choice = MakeRandomInt(1,6)
  15. if choice == 1 then
  16. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/halfling/halfling_eco_good_1_hail_gf_6594953c.mp3", "If a thing isn't worth saying, you sing it.", "wink", 1056697572, 3706271932, Spawn)
  17. elseif choice == 2 then
  18. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/halfling/halfling_eco_good_1_hail_gf_a3259538.mp3", "You should head by the tavern later on! Every night in Qeynos is cause for celebration.", "cheer", 3875741901, 4154770080, Spawn)
  19. elseif choice == 3 then
  20. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/halfling/halfling_eco_good_1_hail_gf_3dc6b124.mp3", "Get the wash, get the wash. This whole city would fall apart if I didn't deliver the clothes on time.", "frustrated", 4277096439, 928366048, Spawn)
  21. elseif choice == 4 then
  22. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/halfling/halfling_eco_good_1_hail_gf_5b6e8d2f.mp3", "Do you like muffins? Muffins are my favorite, I eat them every chance I get.", "sigh", 4155434475, 829232573, Spawn)
  23. elseif choice == 5 then
  24. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/halfling/halfling_eco_good_1_hail_gf_1b77439f.mp3", "Be on the lookout, friend! I just spoke to the guards. I've no doubt gnolls are scouting the nearby area.", "lookaway", 495282965, 1739106402, Spawn)
  25. else
  26. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/halfling/halfling_eco_good_1_hail_gf_bc49d3d0.mp3", "Laziness is nothing more than the habit of resting before you get tired.", "yawn", 2068417649, 3867807288, Spawn)
  27. end
  28. end
  29. function InRange(NPC, Spawn)
  30. -- These lines will be triggered if you on Live log in next to Delma, but are not included when you hail her. I put them in as a proximity function just to safe keep them (I have yet to trigger them as proximity on Live).
  31. FaceTarget(NPC, Spawn)
  32. local proximityChoice = MakeRandomInt(1,3)
  33. if proximityChoice == 1 then
  34. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/halfling/halfling_eco_good_1_hail_gf_971bdee0.mp3", "Sweetie, you really need to eat more. Put some meat on those bones, that's what I always say.", "scold", 2249843470, 1892258594, Spawn)
  35. elseif proximityChoice == 2 then
  36. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/halfling/halfling_eco_good_1_aoi_gf_86c7855.mp3", [[Let's see, I'm going to need some baubbleshire berries, some elddar root, and a smidgen of spiced fish...]], "ponder", 1080385311, 773701526, Spawn)
  37. else
  38. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/halfling/halfling_eco_good_1_aoi_gf_4745a8ec.mp3", "Hello has anybody seen the baubbleberry pie I set out to cool? Come on, I know one of you took it!", "tapfoot", 3291474479, 2214928642, Spawn)
  39. end
  40. end
  41. function EmoteLoop(NPC)
  42. local emoteChoice = MakeRandomInt(1,8)
  43. if emoteChoice == 1 then
  44. -- agree
  45. PlayAnimation(NPC, 10745)
  46. AddTimer(NPC, MakeRandomInt(4000,9000), "EmoteLoop")
  47. elseif emoteChoice == 2 then
  48. -- applaude
  49. PlayAnimation(NPC, 10760)
  50. AddTimer(NPC, MakeRandomInt(8000,12000), "EmoteLoop")
  51. elseif emoteChoice == 3 then
  52. -- cheer
  53. PlayAnimation(NPC, 11150)
  54. AddTimer(NPC, MakeRandomInt(10000,17000), "EmoteLoop")
  55. elseif emoteChoice == 4 then
  56. -- happy
  57. PlayAnimation(NPC, 11668)
  58. AddTimer(NPC, MakeRandomInt(8000,16000), "EmoteLoop")
  59. elseif emoteChoice == 5 then
  60. -- listen
  61. PlayAnimation(NPC, 11793)
  62. AddTimer(NPC, MakeRandomInt(4000,11000), "EmoteLoop")
  63. elseif emoteChoice == 6 then
  64. -- nod
  65. PlayAnimation(NPC, 11882)
  66. AddTimer(NPC, MakeRandomInt(4000,7000), "EmoteLoop")
  67. elseif emoteChoice == 7 then
  68. -- thanks
  69. PlayAnimation(NPC, 13061)
  70. AddTimer(NPC, MakeRandomInt(8000,13000), "EmoteLoop")
  71. else
  72. -- thumbsup
  73. PlayAnimation(NPC, 13064)
  74. AddTimer(NPC, MakeRandomInt(4000,9000), "EmoteLoop")
  75. end
  76. end
  77. function respawn(NPC)
  78. spawn(NPC)
  79. end