9
3

VarionSmitelin.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/VarionSmitelin.lua
  3. Script Purpose : Varion Smitelin <Spell Scrolls>
  4. Script Author : Scatman
  5. Script Date : 2009.08.12
  6. Script Notes : Completely restructured script using new format - 07.04.2022 Dorbin
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local QUEST_1 = 311
  10. local REFILL_THE_OAKMYST_SPIDER_SILK_JARS = 312
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, QUEST_1)
  13. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn) --Quest Callout
  19. if GetFactionAmount(Spawn,11)<0 then
  20. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. else
  23. if math.random(1, 100) <= 85 then
  24. if not HasCompletedQuest (Spawn, QUEST_1) and not HasQuest (Spawn, QUEST_1) then
  25. PlayFlavor(NPC, "voiceover/english/scribe_varion_smitelin/qey_village01/qey_village01_sage_varion_smitelin_callout_1a43b9e.mp3", "Drat! I've only a few more bog fairy wings. I need help retrieving more.", "doh", 1849956247, 1756752392, Spawn)
  26. end
  27. end
  28. end
  29. end
  30. function hailed(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. if GetFactionAmount(Spawn,11)<0 then
  33. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  34. else
  35. Dialog1(NPC, Spawn)
  36. end
  37. end
  38. function Dialog1(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. Dialog.New(NPC, Spawn)
  41. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  42. Dialog.AddDialog("Interested in the magical arts, are you?")
  43. Dialog.AddVoiceover("voiceover/english/scribe_varion_smitelin/qey_village01/varionsmitelin.mp3", 1851450511, 1137101449)
  44. if not HasCompletedQuest (Spawn, QUEST_1) and not HasQuest (Spawn, QUEST_1) then
  45. Dialog.AddOption("Oh, very much so.","Dialog4")
  46. end
  47. if GetQuestStep (Spawn, QUEST_1)==2 then
  48. Dialog.AddOption("I'm back with the wings as you requested.","Dialog2")
  49. end
  50. if GetQuestStep(Spawn, REFILL_THE_OAKMYST_SPIDER_SILK_JARS) == 2 then
  51. Dialog.AddOption("Here are a couple jars of spider silk. I noticed you were out.","Dialog6")
  52. end
  53. if GetQuestStep(Spawn, 5604) == 1 then
  54. Dialog.AddOption("I've been sent by Zentomaron Croosinaden to retrieve a scoll of erudite lore. Do you have it?","Dialog7")
  55. end
  56. Dialog.AddOption("Me? No, I don't care for that finger waggling stuff.")
  57. Dialog.Start()
  58. end
  59. -- Bog Fairie Wings
  60. function Dialog4(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. Dialog.New(NPC, Spawn)
  63. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  64. Dialog.AddDialog("Good. That's what I like to hear! I'm working on a levitation spell, but I'm running low on Bog Faeries. If you go to the Peat Bog and round up some of the wings, I'll gladly pay you for this deed.")
  65. Dialog.AddVoiceover("voiceover/english/scribe_varion_smitelin/qey_village01/varionsmitelin003.mp3", 426969291, 1829151300)
  66. Dialog.AddOption("I don't mind getting a little dirty. I'll take the job.", "OfferQuest1")
  67. Dialog.AddOption("Out into the bog? No thanks, I like to keep my clothes clean. ")
  68. Dialog.Start()
  69. end
  70. function OfferQuest1(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. OfferQuest(NPC, Spawn, QUEST_1)
  73. end
  74. function Dialog2(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. Dialog.New(NPC, Spawn)
  77. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  78. SetStepComplete(Spawn, QUEST_1, 2)
  79. Dialog.AddDialog("Excellent! These will do most nicely! I hope getting the wings wasn't too difficult. As promised, here's your reward. ")
  80. Dialog.AddVoiceover("voiceover/english/scribe_varion_smitelin/qey_village01/varionsmitelin005.mp3", 3625693833, 1398155062)
  81. Dialog.AddOption("Difficult? Of course not! The Bog Faeries practically handed them to me.")
  82. Dialog.Start()
  83. end
  84. -- Spider Silk Jars
  85. function Dialog6(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. Dialog.New(NPC, Spawn)
  88. SetStepComplete(Spawn, REFILL_THE_OAKMYST_SPIDER_SILK_JARS, 2)
  89. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  90. Dialog.AddDialog("Thank you for refilling my jars. I knew they were empty, but could not find the time to make the trip to Oakmyst Forest. Please take this payment as a reward for your good deed.")
  91. Dialog.AddVoiceover("voiceover/english/scribe_varion_smitelin/qey_village01/varionsmitelin006.mp3", 3827990998, 3891374789)
  92. Dialog.AddOption("Thank you.")
  93. Dialog.Start()
  94. end
  95. -- Erudite Scroll
  96. function Dialog7(NPC, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. Dialog.New(NPC, Spawn)
  99. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  100. Dialog.AddDialog("Of course he did. I'm sure he gave you the story about needing the scroll for some scholarly debate!")
  101. Dialog.AddVoiceover("voiceover/english/scribe_varion_smitelin/qey_village01/varionsmitelin000.mp3", 3145879327, 1053999680)
  102. Dialog.AddOption("How did you know?","Dialog8")
  103. Dialog.Start()
  104. end
  105. function Dialog8(NPC, Spawn)
  106. FaceTarget(NPC, Spawn)
  107. Dialog.New(NPC, Spawn)
  108. Dialog.AddDialog("I knew because he debated the issue in my shop for fourteen hours! Have you ever tried to stop a debate between two erudites? Fat chance! I was a prisoner in my own keep! At any rate, Zentomaron is no longer welcome here.")
  109. Dialog.AddVoiceover("voiceover/english/scribe_varion_smitelin/qey_village01/varionsmitelin001.mp3", 3217131008, 3632064352)
  110. Dialog.AddOption("But what about the scroll? Do you have it in your shop?","Dialog9")
  111. Dialog.Start()
  112. end
  113. function Dialog9(NPC, Spawn)
  114. FaceTarget(NPC, Spawn)
  115. Dialog.New(NPC, Spawn)
  116. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  117. Dialog.AddDialog("Oh yes- back to that. Tell him I know of the scroll he's looking for but I don't have it! Oh, and if he is pestering my nephew tell him to leave him alone! He doesn't know where the scroll is either.")
  118. Dialog.AddVoiceover("voiceover/english/scribe_varion_smitelin/qey_village01/varionsmitelin002.mp3", 1591190372, 4256691956)
  119. Dialog.AddOption("That is unfortunate. I will let Zentomaron know.","ScrollUpdate")
  120. Dialog.Start()
  121. end
  122. function ScrollUpdate(NPC, Spawn)
  123. FaceTarget(NPC, Spawn)
  124. SetStepComplete(Spawn, 5604, 1)
  125. end