9
3

ScholarDemini.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/ScholarDemini.lua
  3. Script Purpose : Scholar Demini
  4. Script Author : Dorbin
  5. Script Date : 2022.04.22
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Age = 5550
  10. local Scholar = 5551
  11. function spawn(NPC)
  12. ProvidesQuest(NPC,5550)
  13. ProvidesQuest(NPC,5551)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function hailed(NPC, Spawn)
  19. if not HasQuest(Spawn,Age) and not HasCompletedQuest(Spawn,Age) then
  20. Dialog1(NPC, Spawn)
  21. elseif HasQuest(Spawn,Age) and GetQuestStep(Spawn,Age)~=4 then
  22. FaceTarget(NPC, Spawn)
  23. PlayFlavor(NPC,"voiceover/english/voice_emotes/greetings/greetings_1_1034.mp3","Please, go hurry friend!","",0,0,Spawn)
  24. elseif GetQuestStep(Spawn,Age)==4 then
  25. AgeDone(NPC,Spawn)
  26. elseif HasCompletedQuest(Spawn,Age) and not HasQuest(Spawn,Scholar) and not HasCompletedQuest(Spawn,Scholar) then
  27. ScholarSearch(NPC, Spawn)
  28. elseif HasQuest(Spawn,Scholar) and not GetQuestStep(Spawn,Scholar)~=4 then
  29. FaceTarget(NPC, Spawn)
  30. PlayFlavor(NPC,"voiceover/english/voice_emotes/greetings/greetings_1_1034.mp3","Please, go hurry friend!","",0,0,Spawn)
  31. end
  32. end
  33. function Dialog1(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. PlayFlavor(NPC,"","","sniff",0,0,Spawn)
  36. Dialog.New(NPC, Spawn)
  37. Dialog.AddDialog("Yes, you must be one of those adventurers, all right. If the stories about you folks are true, then I'm sure you're willing to undertake a dangerous task just for the thrill of it. Am I right?")
  38. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1034.mp3", 0, 0)
  39. if not HasQuest(Spawn,5550) and not HasCompletedQuest(Spawn,5550) then
  40. Dialog.AddOption("That's not exactly how it works, friend. You're forgetting the 'goal' part.", "Dialog3")
  41. end
  42. Dialog.AddOption("Not right now, friend.")
  43. Dialog.Start()
  44. end
  45. function Dialog2(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  48. Dialog.New(NPC, Spawn)
  49. Dialog.AddDialog("Oh, oh, yes. Well, you see, I've been researching the Sage of Ages, and I purchased a book written by one of his attendants. The problem is that the book is missing some pages. According to the traveler I purchased it from, the book was found in Antonica.")
  50. Dialog.AddOption("I'll go find it for you, then.","StartQuest")
  51. Dialog.Start()
  52. end
  53. function StartQuest(NPC,Spawn)
  54. FaceTarget(NPC, Spawn)
  55. OfferQuest(NPC,Spawn,5550)
  56. end
  57. function Dialog3(NPC, Spawn)
  58. FaceTarget(NPC, Spawn)
  59. Dialog.New(NPC, Spawn)
  60. PlayFlavor(NPC,"","","orate",0,0,Spawn)
  61. Dialog.AddDialog("Oh yes, the mysterious items of mystical magic part! Yes, yes, I know all about that too! You see, my name is Demini, and I'm a historian who has read all about you people.")
  62. Dialog.AddOption("Yes, I guess you could put it that way. Is there anything you need, friend?", "Dialog4")
  63. Dialog.AddOption("I don't want to keep you from your studies. I must be off.")
  64. Dialog.Start()
  65. end
  66. function Dialog4(NPC, Spawn)
  67. FaceTarget(NPC, Spawn)
  68. PlayFlavor(NPC,"","","doh",0,0,Spawn)
  69. Dialog.New(NPC, Spawn)
  70. Dialog.AddDialog("What am I thinking? I'm not even doing this right! Brave adventurer, I have a noble quest for you. In return for you undertaking this dangerous task, I shall grant you a mysterious artifact from my personal collection. How's that?")
  71. Dialog.AddOption("Good enough, Demini. Why don't you just tell me what you need?", "Dialog2")
  72. Dialog.AddOption("Close enough, but I'm a bit busy right now. Perhaps another time.")
  73. Dialog.Start()
  74. end
  75. function AgeDone(NPC,Spawn)
  76. FaceTarget(NPC, Spawn)
  77. Dialog.New(NPC, Spawn)
  78. PlayFlavor(NPC,"","","happy",0,0,Spawn)
  79. SetStepComplete(Spawn,Age, 6)
  80. Dialog.AddDialog("Well, what should we do next?", "Option1")
  81. Dialog.AddOption("I'm actually out of time.")
  82. Dialog.AddOption("Oh my, oh my! You found the pages! Excellent! As promised, here's your reward, bold adventurer! Haha! I've always wanted to say that! Now let me look at these pages... yes, yes... just as I thought.. Iit was a diary! And a recent one, too! Oh my! It seems the attendant was actually here! In Karan! Maybe he or she is still nearby!")
  83. Dialog.Start()
  84. end
  85. --Quest 2 -------------------------------------------------------
  86. function ScholarSearch(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. local conversation = CreateConversation()
  89. PlayFlavor(NPC,"voiceover/english/voice_emotes/greetings/greetings_2_1034.mp3","","happy",0,0,Spawn)
  90. AddConversationOption(conversation, "I have some time to offer my assistance. What was it you needed?", "Option1")
  91. AddConversationOption(conversation, "I don't need anything. I was just saying hello.")
  92. StartConversation(conversation, NPC, Spawn, "Oh, it's you, bold adventurer! How can I help you?")
  93. end
  94. function Option1(NPC, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. local conversation = CreateConversation()
  97. AddConversationOption(conversation, "I've got time on my hands. What do you need now?", "Option2")
  98. AddConversationOption(conversation, "I'm a bit busy. Maybe later.")
  99. StartConversation(conversation, NPC, Spawn, "Well, you see, the Sage of Ages is almost a myth. He is a timeless being who relates the events of the Ages after they've passed. This journal was written by one of the scholars who records the Sage's tales. Umm... perhaps you could do something else for me?")
  100. end
  101. function Option2(NPC, Spawn)
  102. FaceTarget(NPC, Spawn)
  103. local conversation = CreateConversation()
  104. AddConversationOption(conversation, "I think I can do that. I'll be back when I find out more information.","StartQuest2")
  105. StartConversation(conversation, NPC, Spawn, "I'm hoping you can find the scholar. According to the last page of this journal, he was camping near the Bells of Vhalen. If I remember correctly, that's in Antonica. Maybe you can find a clue as to his whereabouts?")
  106. end
  107. function StartQuest2(NPC,Spawn)
  108. FaceTarget(NPC, Spawn)
  109. OfferQuest(NPC,Spawn,5551)
  110. end