Bleemeb.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. require "SpawnScripts/Generic/DialogModule"
  9. local Book = 5468
  10. local Leaves = 5467
  11. local Delivery = 5500
  12. function spawn(NPC)
  13. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  14. ProvidesQuest(NPC, Book)
  15. ProvidesQuest(NPC, Leaves)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function InRange(NPC, Spawn) --Quest Callout
  21. if MakeRandomInt(1, 100) <= 60 then
  22. if not HasCompletedQuest (Spawn, Book) and not HasCompletedQuest (Spawn, Leaves) then
  23. choice = MakeRandomInt(1,2)
  24. FaceTarget(NPC, Spawn)
  25. if choice ==1 then
  26. PlayFlavor(NPC, "", "","hello", 0, 0, Spawn)
  27. elseif choice ==2 then
  28. PlayFlavor(NPC, "", "","wave", 0, 0, Spawn)
  29. end
  30. elseif HasCompletedQuest (Spawn, Book) and HasCompletedQuest (Spawn, Leaves) then
  31. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  32. end
  33. end
  34. end
  35. function hailed(NPC, Spawn)
  36. if GetFactionAmount(Spawn,11) <0 then
  37. FactionChecking(NPC, Spawn, faction)
  38. else
  39. FaceTarget(NPC, Spawn)
  40. Dialog.New(NPC, Spawn)
  41. Dialog.AddDialog("If thou art interested in items of a scholarly nature, thou should take a look around... just don't disturb Yanari; she is busy with her research.")
  42. Dialog.AddVoiceover("voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb000.mp3", 4182629486, 2797643210)
  43. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  44. if GetQuestStep(Spawn, Delivery)==1 then
  45. Dialog.AddOption("I'm returning a book from Barry Viceheart.", "DeliveryReturn")
  46. end
  47. if not HasQuest(Spawn, Book) and not HasCompletedQuest(Spawn, Book) then
  48. Dialog.AddOption("I'm not from around here. Anything I should know?", "BookStart")
  49. end
  50. if not HasQuest(Spawn, Leaves) and GetLevel(Spawn)>=7 then
  51. Dialog.AddOption("What is Yanari doing?", "LeavesStart")
  52. end
  53. if GetQuestStep(Spawn, Book)==3 then
  54. Dialog.AddOption("Here is the book you wanted me to find. It was stored on the shelves at the inn.", "DoneBook")
  55. end
  56. if GetQuestStep(Spawn, Leaves)==2 then
  57. Dialog.AddOption("I've brought back the leaves for Yanari.", "DoneLeaves")
  58. end
  59. Dialog.AddOption("I'm just browsing. Thank you.")
  60. Dialog.Start()
  61. end
  62. end
  63. function LeavesStart(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. Dialog.New(NPC, Spawn)
  66. Dialog.AddDialog("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 grow their precious trees.")
  67. Dialog.AddVoiceover("voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb001.mp3",813139380,2873385292)
  68. PlayFlavor(NPC, "", "", "sniff", 0,0 , Spawn)
  69. Dialog.AddOption("That sounds impressive!", "QuestBegin2")
  70. Dialog.AddOption( "I'm busy. Sorry.")
  71. Dialog.Start()
  72. end
  73. function DoneLeaves(NPC, Spawn)
  74. SetStepComplete(Spawn, Leaves, 2)
  75. FaceTarget(NPC, Spawn)
  76. Dialog.New(NPC, Spawn)
  77. Dialog.AddDialog("By the valor of Marr! 'Tis quite a bundle of them thou hast. I am sure they wilt do nicely for her. I'm in the habit of paying for services ... so please, take these coins. FroooOOOooaak!")
  78. Dialog.AddVoiceover("voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb003.mp3",2698466863,3996998508)
  79. PlayFlavor(NPC, "", "", "thanks", 0,0 , Spawn)
  80. Dialog.AddOption("Thank you scribe.")
  81. Dialog.Start()
  82. end
  83. function BookStart(NPC, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. Dialog.New(NPC, Spawn)
  86. Dialog.AddDialog("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?")
  87. Dialog.AddVoiceover("voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb005.mp3",360212567,1854076529)
  88. PlayFlavor(NPC, "", "", "bow", 0,0 , Spawn)
  89. Dialog.AddOption("Certainly, I will go get the book.", "QuestBegin1")
  90. Dialog.AddOption( "I can't right now. I appologize.")
  91. Dialog.Start()
  92. end
  93. function DoneBook(NPC, Spawn)
  94. SetStepComplete(Spawn, Book, 3)
  95. FaceTarget(NPC, Spawn)
  96. Dialog.New(NPC, Spawn)
  97. Dialog.AddDialog("Many thanks unto thee! Here is a bit of coin. Spend it wisely!")
  98. Dialog.AddVoiceover("voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb006.mp3",381115316,3913092257)
  99. PlayFlavor(NPC, "", "", "thanks", 0,0 , Spawn)
  100. Dialog.AddOption("I appreciate it.")
  101. Dialog.Start()
  102. end
  103. function DeliveryReturn(NPC, Spawn)
  104. FaceTarget(NPC, Spawn)
  105. Dialog.New(NPC, Spawn)
  106. Dialog.AddDialog("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.")
  107. Dialog.AddVoiceover("voiceover/english/scribe_bleemeb/qey_village04/qst_scribebleemeb004.mp3",4110253514,1354021803)
  108. PlayFlavor(NPC, "", "", "thanks", 0,0 , Spawn)
  109. Dialog.AddOption("I will let Viceheart know.", "DeliveryDone")
  110. Dialog.Start()
  111. end
  112. function QuestBegin1 (NPC, Spawn)
  113. FaceTarget(NPC, Spawn)
  114. OfferQuest(NPC, Spawn, Book)
  115. end
  116. function QuestBegin2 (NPC, Spawn)
  117. FaceTarget(NPC, Spawn)
  118. OfferQuest(NPC, Spawn, Leaves)
  119. end
  120. function DeliveryDone(NPC, Spawn)
  121. SetStepComplete(Spawn, Delivery, 1)
  122. end