Bleemeb.lua 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. --[[
  2. Script Name : SpawnScripts/Castleview/Bleemeb.lua
  3. Script Purpose : Bleemeb <Spell Scrolls>
  4. Script Author : Dorbin
  5. Script Date : 2022.01.29
  6. Script Notes :
  7. --]]
  8. -- Fetch quest dialog needs to be built
  9. -- PlayFlavor(NPC, "voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb004.mp3", "Finally! T'would have hated to send the Qeynos guard after him. Be sure'st to tell him that his buisness is no longer allowed in this shop.", "thank", 4110253514, 1354021803, Spawn)
  10. local Book = 5468
  11. local Leaves = 5467
  12. local Delivery = 5500
  13. function spawn(NPC)
  14. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  15. ProvidesQuest(NPC, Book)
  16. ProvidesQuest(NPC, Leaves)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function InRange(NPC, Spawn) --Quest Callout
  22. if math.random(1, 100) <= 60 then
  23. if not HasCompletedQuest (Spawn, Book) and not HasCompletedQuest (Spawn, Leaves) then
  24. choice = math.random(1,2)
  25. FaceTarget(NPC, Spawn)
  26. if choice ==1 then
  27. PlayFlavor(NPC, "", "","hello", 0, 0, Spawn)
  28. elseif choice ==2 then
  29. PlayFlavor(NPC, "", "","wave", 0, 0, Spawn)
  30. end
  31. elseif HasCompletedQuest (Spawn, Book) and HasCompletedQuest (Spawn, Leaves) then
  32. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  33. end
  34. end
  35. end
  36. function hailed(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. conversation = CreateConversation()
  39. if GetQuestStep(Spawn, Delivery)==1 then
  40. AddConversationOption(conversation, "I'm returning a book from Barry Viceheart.", "DeliveryReturn")
  41. end
  42. if not HasQuest(Spawn, Book) then
  43. AddConversationOption(conversation, "I'm not from around here. Anything I should know?", "BookStart")
  44. end
  45. if not HasQuest(Spawn, Leaves) then
  46. AddConversationOption(conversation, "What is Yanari doing?", "LeavesStart")
  47. end
  48. if GetQuestStep(Spawn, Book)==4 then
  49. AddConversationOption(conversation, "Here is the book you wanted me to find. It was stored on the shelves at the inn.", "DoneBook")
  50. end
  51. if GetQuestStep(Spawn, Leaves)==2 then
  52. AddConversationOption(conversation, "I've returned with the Eldarr leaves you asked for.", "DoneLeaves")
  53. end
  54. AddConversationOption(conversation, "I'm just browsing. Thank you.")
  55. StartConversation(conversation, NPC, Spawn, "If thou art interested... of items of a scholarly nature. Thou should take a look around. Just don't disturb Yanari! She is busy with her research.")
  56. PlayFlavor(NPC, "voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb000.mp3", "", "", 4182629486, 2797643210, Spawn)
  57. end
  58. function LeavesStart(NPC, Spawn)
  59. conversation = CreateConversation()
  60. AddConversationOption(conversation, "That sounds impressive!", "LeavesStart2")
  61. AddConversationOption(conversation, "I'm busy. Sorry.")
  62. PlayFlavor(NPC, "voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb001.mp3","","happy",813139380,2873385292,Spawn)
  63. StartConversation(conversation, NPC, Spawn, "Currently, she is trying to make her spells more potent. But soon, she will't be working on a spell to help the druids of the Elddar Grove help grow their precious trees.")
  64. end
  65. function LeavesStart2(NPC, Spawn)
  66. conversation = CreateConversation()
  67. AddConversationOption(conversation, "I'll go gather the leaves at the Eldarr Grove.", "QuestBegin2")
  68. AddConversationOption(conversation, "Leaves? I don't have time for this.")
  69. PlayFlavor(NPC, "voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb002.mp3","","agree",1766321211,1856541681,Spawn)
  70. StartConversation(conversation, NPC, Spawn, "It is, it is! FrroOAK! She needs someone to fetch some leaves from the base of the tallest Eldarr tree. Say! I figured thou would'st do nicely for that. Why doth thou head over to the Eldarr grove and pick her up some leaves. Thou'st can't miss the tree! It has elves in it.")
  71. end
  72. function DoneLeaves(NPC, Spawn)
  73. conversation = CreateConversation()
  74. AddConversationOption(conversation, "Thank you.", "RewardLeaves")
  75. PlayFlavor(NPC, "voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb002.mp3","","thank",2698466863,3996998508,Spawn)
  76. StartConversation(conversation, NPC, Spawn, "By the valor of Marr! Tis quite a bundle of them thou has. I am sure they will do nicely for her. I'm in the habbit of paying for services, so please take these coins. frooAK!")
  77. end
  78. function BookStart(NPC, Spawn)
  79. conversation = CreateConversation()
  80. AddConversationOption(conversation, "Certainly, I will go get the book.", "QuestBegin1")
  81. AddConversationOption(conversation, "I can't right now. I appologize.")
  82. PlayFlavor(NPC, "voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb005.mp3","","bow",360212567,1854076529,Spawn)
  83. StartConversation(conversation, NPC, Spawn, "Ahh, a newcomer! Tis grand to meet thee! I have a bit a bit of a task for thou. A resident named Faeadaen hath not returned our Book of Arobos. Privy, could'st thou retrive it from her?")
  84. end
  85. function DoneBook(NPC, Spawn)
  86. conversation = CreateConversation()
  87. AddConversationOption(conversation, "I appreciate it.", "RewardBook")
  88. PlayFlavor(NPC, "voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb006.mp3","","thank",381115316,3913092257,Spawn)
  89. StartConversation(conversation, NPC, Spawn, "Many thanks unto thee! Here is a bit of coin. Spend it wisely!")
  90. end
  91. function DeliveryReturn(NPC, Spawn)
  92. conversation = CreateConversation()
  93. AddConversationOption(conversation, "I will let Viceheart know.", "DeliveryDone")
  94. PlayFlavor(NPC, "voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb004.mp3","","thank",4110253514,1354021803,Spawn)
  95. StartConversation(conversation, NPC, Spawn, "Finally! 'Twould hath hated to send the Qeynos guard after him! Be sure's to tell him that his buisness is no longer allowed in this shop.")
  96. end
  97. function QuestBegin1 (NPC, Spawn)
  98. FaceTarget(NPC, Spawn)
  99. OfferQuest(NPC, Spawn, Book)
  100. end
  101. function QuestBegin2 (NPC, Spawn)
  102. FaceTarget(NPC, Spawn)
  103. OfferQuest(NPC, Spawn, Leaves)
  104. end
  105. function DeliveryDone(NPC, Spawn)
  106. SetStepComplete(Spawn, Delivery, 1)
  107. end
  108. function RewardLeaves(NPC, Spawn)
  109. SetStepComplete(Spawn, Leaves, 2)
  110. end
  111. function RewardBook(NPC, Spawn)
  112. SetStepComplete(Spawn, Book, 4)
  113. end