9
3

RebekaLori.lua 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/RebekaLori.lua
  3. Script Purpose : Rebeka Lori
  4. Script Author : Dorbin
  5. Script Date : 2022.02.19
  6. Script Notes :
  7. --]]
  8. local Memorial = 5481
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC, Memorial)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. if not HasCompletedQuest(Spawn,Memorial) then
  18. if math.random(1, 100) <= 80 then
  19. FaceTarget(NPC, Spawn)
  20. local choice = math.random(1, 2)
  21. if choice == 1 then
  22. PlayFlavor(NPC, "voiceover/english/rebeka_lori/qey_village05/100_rebeka_lori_multhail1_ad61d9f4.mp3", "Ah, you seem very busy. Be at peace, dear stranger.", "", 2793985562, 1185191528, Spawn)
  23. elseif choice == 2 then
  24. PlayFlavor(NPC, "voiceover/english/rebeka_lori/qey_village05/100_rebeka_lori_callout_83c7c1f9.mp3", "Another face I do not recognize. Are you new here, good traveler?", "hello", 1155092333, 1712021877, Spawn)
  25. end
  26. end
  27. else
  28. if math.random(1, 100) <= 60 then
  29. PlayFlavor(NPC, "", "", "hello", 2685665398, 3421389957, Spawn)
  30. end
  31. end
  32. end
  33. function hailed(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. conversation = CreateConversation()
  36. PlayFlavor(NPC, "voiceover/english/rebeka_lori/qey_village05/rebekalori000.mp3", "", "hello", 4100326689, 1939729337, Spawn)
  37. if not HasQuest(Spawn, Memorial) and not HasCompletedQuest(Spawn, Memorial) then
  38. AddConversationOption(conversation, "I guess I am doing as well as could be expected.", "GoingWell")
  39. end
  40. if HasCompletedQuest(Spawn, Memorial)then
  41. AddConversationOption(conversation, "Just fine. Thank you.")
  42. end
  43. AddConversationOption(conversation, "Leave me alone.")
  44. StartConversation(conversation, NPC, Spawn, "Good day to you, stranger. I hope you're doing well in these most interesting of times.")
  45. end
  46. function GoingWell(NPC, Spawn)
  47. conversation = CreateConversation()
  48. PlayFlavor(NPC, "voiceover/english/rebeka_lori/qey_village05/rebekalori001.mp3", "", "", 2771148292, 1641607590, Spawn)
  49. AddConversationOption(conversation, "I think I would like to see this memorial.", "QuestBegin")
  50. AddConversationOption(conversation, "Perhaps someday. Good day to you.")
  51. StartConversation(conversation, NPC, Spawn, "That's good to hear. It heartens me to see so many people arriving safely within the gates of Qeynos. Perhaps one day my dear cousins will make it through, and I shall embrace them again. I never lose hope. Some people have given up hope of ever reuniting with their loved ones and have built a memorial in this village.")
  52. end
  53. function QuestBegin(NPC, Spawn)
  54. conversation = CreateConversation()
  55. PlayFlavor(NPC, "voiceover/english/rebeka_lori/qey_village05/rebekalori002.mp3", "", "agree", 3672449477, 161797106, Spawn)
  56. AddConversationOption(conversation, "I'll head that way. Thank you for the information.", "QuestStart")
  57. StartConversation(conversation, NPC, Spawn, "The memorial is near the tunnel to the docks. All visitors are welcome there. And if you go ... please respect the feelings of those who have left items at the memorial. They are struggling through a crisis. ")
  58. end
  59. function QuestStart (NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. OfferQuest(NPC, Spawn, Memorial)
  62. end