NylaDiggs.lua 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. --[[
  2. Script Name : SpawnScripts/TheBaubbleshire/NylaDiggs.lua
  3. Script Purpose : Nyla Diggs
  4. Script Author : Dorbin
  5. Script Date : 2022.01.10
  6. Script Notes : Racial language check for Callout & Quest offering
  7. Quest 'Nyla's Pie Thief' and Nyla's dialogue reconstructed from recovered Voice Overs and Prima Guide
  8. --]]
  9. local PieThief = 5437
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, PieThief)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. QuestStart(NPC,Spawn,conversation)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn) --Provides Language Based Callout with delay
  19. if not HasLanguage(Spawn, 8) then
  20. local choice = math.random(1,2)
  21. if choice == 1 then
  22. PlayFlavor(NPC, "voiceover/english/halfling_base_1/ft/halfling/halfling_base_1_1_garbled_gf_54e55451.mp3", "garbled text not to be translated", "", 1486303618, 2371451914, Spawn, 8)
  23. elseif choice == 2 then
  24. PlayFlavor(NPC, "voiceover/english/halfling_base_1/ft/halfling/halfling_base_1_1_garbled_gf_823f1021.mp3", "garbled text not to be translated", "", 3051197299, 2401133915, Spawn, 8)
  25. end
  26. elseif not HasCompletedQuest (Spawn, PieThief) and not HasQuest (Spawn, PieThief) then
  27. PlayFlavor(NPC, "voiceover/english/nyla_diggs/qey_village06/100_nyla_diggs_nyla_first_d022db59.mp3", "Now where's that pie? I know I had it here.", "", 3499289366, 4159200256, Spawn, 8)
  28. AddTimer(NPC, 2000, "PlayFlavor", Spawn)
  29. end
  30. end
  31. function LeaveRange(NPC, Spawn)
  32. end
  33. function QuestStart(NPC, Spawn, conversation)
  34. if not HasQuest (Spawn, PieThief) then
  35. PlayFlavor(NPC, "voiceover/english/nyla_diggs/qey_village06/nyladiggs001.mp3", "", "", 919242821, 353275540, Spawn, 8)
  36. conversation = CreateConversation()
  37. AddConversationOption(conversation, "I could look for your missing pie.", "Pie1")
  38. StartConversation(conversation, NPC, Spawn, "You see, the pie I baked earlier today, its missing! Not an uncommon event around here if you know what I mean. You'll always find a rummblin' belly around here, love.")
  39. elseif HasQuest (Spawn, PieThief) then
  40. conversation = CreateConversation()
  41. PlayFlavor(NPC, "voiceover/english/nyla_diggs/qey_village06/nyladiggs003.mp3", "", "", 1047555750, 2550790552, Spawn, 8)
  42. if GetQuestStep(Spawn, PieThief) == 5 then
  43. AddConversationOption(conversation, "Lozoria Shinkicker took your pie! He seems to have eaten it though. He offered an ale on the house at the Deepmug Tavern as repayment.", "ThiefFinished")
  44. end
  45. AddConversationOption(conversation, "I'm still looking!")
  46. StartConversation(conversation, NPC, Spawn, "Well, who is it? They're in for a tongue-lashing!")
  47. end
  48. end
  49. function Pie1(NPC, Spawn)
  50. PlayFlavor(NPC, "voiceover/english/nyla_diggs/qey_village06/nyladiggs002.mp3", "", "", 1037348617, 3974383553, Spawn, 8)
  51. conversation = CreateConversation()
  52. AddConversationOption(conversation, "I could look for your missing pie.", "Pie2")
  53. StartConversation(conversation, NPC, Spawn, "You'd do that? Tell you what, you search for the missing pie and when you return I'll have a fresh baked pie waiting for you. Oh, and I'll give the culprit such a scolding, he'll think twice before taking another one of my pies!")
  54. end
  55. function Pie2 (NPC, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. OfferQuest(NPC, Spawn, PieThief)
  58. end
  59. function ThiefFinished(NPC, Spawn)
  60. PlayFlavor(NPC, "voiceover/english/nyla_diggs/qey_village06/nyladiggs004.mp3", "", "", 3185345641, 3927954754, Spawn, 8)
  61. FaceTarget(NPC, Spawn)
  62. conversation = CreateConversation()
  63. AddConversationOption(conversation, "Thanks, the pie smells delicous!", "PieTime")
  64. StartConversation(conversation, NPC, Spawn, "Oh that rascal! Here's your pie, dear. I'll take care of that rapscallion later.")
  65. end
  66. function PieTime(NPC, Spawn)
  67. SetStepComplete(Spawn, PieThief, 5)
  68. end
  69. function hailed(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. if not HasLanguage(Spawn, 8) then -- Language Check for Stout (8)
  72. local choice = math.random(1,2)
  73. if choice == 1 then
  74. PlayFlavor(NPC, "voiceover/english/halfling_base_1/ft/halfling/halfling_base_1_1_garbled_gf_54e55451.mp3", "garbled text not to be translated", "", 1486303618, 2371451914, Spawn, 8)
  75. elseif choice == 2 then
  76. PlayFlavor(NPC, "voiceover/english/halfling_base_1/ft/halfling/halfling_base_1_1_garbled_gf_823f1021.mp3", "garbled text not to be translated", "", 3051197299, 2401133915, Spawn, 8)
  77. end
  78. else
  79. if not HasCompletedQuest(Spawn, PieThief) then
  80. QuestStart(NPC, Spawn)
  81. else
  82. PlayFlavor(NPC, "voiceover/english/nyla_diggs/qey_village06/nyladiggs000.mp3", "Oh, why hello there dear. How are you today? Afraid I can't talk right now", "", 2088434236, 3361269998, Spawn)
  83. end
  84. end
  85. end