SparzitCogsnibble.lua 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. --[[
  2. Script Name : SpawnScripts/TempleSt/SparzitCogsnibble.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.07.08 03:07:42
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Teeth = 5876
  10. local Design = 5920
  11. function spawn(NPC)
  12. ProvidesQuest(NPC,Teeth)
  13. ProvidesQuest(NPC,Design)
  14. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  15. SetTempVariable(NPC,"CalloutTimer","false")
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function InRange(NPC,Spawn)
  21. if GetTempVariable(NPC,"CalloutTimer")=="false" then
  22. if CanReceiveQuest(Spawn,Teeth) or CanReceiveQuest(Spawn,Design) then
  23. SetTempVariable(NPC,"CalloutTimer","true")
  24. SetTarget(NPC,Spawn)
  25. FaceTarget(NPC,Spawn)
  26. if CanReceiveQuest(Spawn,Teeth) then
  27. PlayFlavor(NPC, "voiceover/english/sparzit_cogsnibble/fprt_hood03/100_barpatronsparzitcogsnibble_callout_ba239822.mp3", "Those voices ... why I do I keep hearing those maddening voices? You there ... do you hear the voices?", "scream", 2305242707, 1619320864, Spawn, 0)
  28. elseif CanReceiveQuest(Spawn,Design) then
  29. PlayFlavor(NPC, "voiceover/english/sparzit_cogsnibble/fprt_hood03/100_barpatronsparzitcogsnibble_callout2_db4179dc.mp3", "Hmmm ... let's see ... yes ... yes ... these teeth are very basic. I must extend the teeth of my snake and draw out its tips ... yesssss ... I see where I went wrong. The barbs I use stick after puncturing a person's vitals. Woohoo! I'm on to something. Here, friend, take this coin for your time.", "tapfoot", 3052258109, 3734604849, Spawn, 0)
  30. end
  31. AddTimer(NPC,24000,"ResetCallout",1,Spawn)
  32. end
  33. end
  34. end
  35. function ResetCallout(NPC,Spawn)
  36. SetTempVariable(NPC,"CalloutTimer","false")
  37. end
  38. function hailed(NPC, Spawn)
  39. SetTarget(NPC,Spawn)
  40. if GetFactionAmount(Spawn,12) <0 then
  41. FaceTarget(NPC, Spawn)
  42. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  43. else
  44. Dialog1(NPC,Spawn)
  45. end
  46. end
  47. function Dialog1(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. Dialog.New(NPC, Spawn)
  50. Dialog.AddDialog("What? Of course I would like a beer. All of those nasty little voices are so much easier to ignore after I've had a few. Now serve up, my good rat.")
  51. Dialog.AddVoiceover("voiceover/english/sparzit_cogsnibble/fprt_hood03/qst_barpatronsparzitcogsnibble.mp3", 1913284555, 4209865742)
  52. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  53. if CanReceiveQuest(Spawn,Teeth) then
  54. Dialog.AddOption("What voices are you talking about?","Dialog2")
  55. elseif GetQuestStep(Spawn,Teeth) == 2 then
  56. Dialog.AddOption("Here are some of fine snake teeth you asked for.","Quest1Done")
  57. end
  58. if CanReceiveQuest(Spawn,Design) then
  59. Dialog.AddOption("Tell me. How are your contraption improvements coming along?","Dialog4")
  60. elseif GetQuestStep(Spawn,Design) == 2 then
  61. Dialog.AddOption("Here are your \"fresh Bone-Rot\" samples.","Quest2Done")
  62. end
  63. Dialog.AddOption("Perhaps you've had enough...")
  64. Dialog.Start()
  65. end
  66. function Dialog2(NPC, Spawn)
  67. FaceTarget(NPC, Spawn)
  68. Dialog.New(NPC, Spawn)
  69. Dialog.AddDialog("Oh, just the voice that whispers in my ear while I whip up gadgets. They say things like, \"more spikes\" and \"make a larger explosion\" ... Hee hee hee ... little things like that. On my latest gadget, the voice says: \"make the fangs sharper\" and \"kill, kill, kill!\"")
  70. Dialog.AddVoiceover("voiceover/english/sparzit_cogsnibble/fprt_hood03/quests/sparzitcogsnibble/sparzit_x1_initial.mp3", 3048716634, 4074203837)
  71. PlayFlavor(NPC,"","","shrug",0,0,Spawn)
  72. Dialog.AddOption("Those voices must keep you busy! What are you working on?","Dialog3")
  73. Dialog.AddOption("Right. I should be going... now.")
  74. Dialog.Start()
  75. end
  76. function Dialog3(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. Dialog.New(NPC, Spawn)
  79. Dialog.AddDialog("I'm building a contraption to solve an annoying problem. Living in such a small neighborhood, people constantly barge into my home, thinking it's theirs. In turn, I'm creating a clockwork snake that keeps people from glancing -- AHA! You can help me!")
  80. Dialog.AddVoiceover("voiceover/english/sparzit_cogsnibble/fprt_hood03/quests/sparzitcogsnibble/sparzit_x1_initial2.mp3", 2187428014, 4274175998)
  81. PlayFlavor(NPC,"","","orate",0,0,Spawn)
  82. Dialog.AddOption("What is it your voices... er you need?","Offer")
  83. Dialog.AddOption("Clockwork snake? I'll pass.")
  84. Dialog.Start()
  85. end
  86. function Offer(NPC,Spawn)
  87. if CanReceiveQuest(Spawn,Teeth) then
  88. FaceTarget(NPC, Spawn)
  89. OfferQuest(NPC,Spawn,Teeth)
  90. end
  91. end
  92. function Quest1Done(NPC, Spawn)
  93. SetStepComplete(Spawn,Teeth,2)
  94. FaceTarget(NPC, Spawn)
  95. Dialog.New(NPC, Spawn)
  96. Dialog.AddDialog("Hmmm ... let's see ... yes ... yes ... these teeth are very basic. Hmmm ... I must extend the teeth and draw out its tips ... yesssss ... I see where I went wrong. The barbs I use stick after puncturing a person's vitals. Woohoo! I'm on to something. Here, friend, take this coin for your time.")
  97. Dialog.AddVoiceover("voiceover/english/sparzit_cogsnibble/fprt_hood03/quests/sparzitcogsnibble/sparzit_x1_finish.mp3", 2748213193, 2852199972)
  98. PlayFlavor(NPC,"","","ponder",0,0,Spawn)
  99. Dialog.AddOption("I'll be sure to stay away once you've perfected them.")
  100. Dialog.Start()
  101. end
  102. function Dialog4(NPC, Spawn)
  103. FaceTarget(NPC, Spawn)
  104. Dialog.New(NPC, Spawn)
  105. Dialog.AddDialog("Marvelously! I re-plated the teeth with a corrosion resistant, super hard conducting alloy that delivers an electrical shock while piercing the toughest conventional armor! The silly people who encounter my mechanisnake will hardly know what bit 'em! Hoo-hoo! Hear that scream? Another victim!")
  106. Dialog.AddVoiceover("voiceover/english/sparzit_cogsnibble/fprt_hood03/quests/sparzitcogsnibble/sparzit_x2_initial.mp3", 3138412668, 1958117669)
  107. PlayFlavor(NPC,"","","scheme",0,0,Spawn)
  108. Dialog.AddOption("Doesn't that seem a bit... harsh?","Dialog5")
  109. Dialog.AddOption("Keep your mad ideas away from me!")
  110. Dialog.Start()
  111. end
  112. function Dialog5(NPC, Spawn)
  113. FaceTarget(NPC, Spawn)
  114. Dialog.New(NPC, Spawn)
  115. Dialog.AddDialog("Not at all! Why, it's an act of mercy, in my opinion. Those who escape the metallic jaws of my snake will be more careful in the future, thus better ensuring their own survival. And those who do not escape ... well, the snake is swift. Performing a public service, I am!")
  116. Dialog.AddVoiceover("voiceover/english/sparzit_cogsnibble/fprt_hood03/quests/sparzitcogsnibble/sparzit_x2_initial2.mp3", 2211265631, 4238303201)
  117. Dialog.AddOption("I suppose that would teach them a lesson before a painful death.","Dialog6")
  118. Dialog.AddOption("You AND your ideas are insane! Stay away from me!")
  119. Dialog.Start()
  120. end
  121. function Dialog6(NPC, Spawn)
  122. FaceTarget(NPC, Spawn)
  123. Dialog.New(NPC, Spawn)
  124. Dialog.AddDialog("I'm glad you follow my logic. Although, the lesson would be more clear if the victims didn't die quite so suddenly. If they had time to go into the streets and tell their neighbors ... perhaps because of a slow-acting poison. That's it! My mechanisnake needs a venom that will kill only after the victim has had time to tell others what has happened! Perhaps you will help me get some venom?")
  125. Dialog.AddVoiceover("voiceover/english/sparzit_cogsnibble/fprt_hood03/quests/sparzitcogsnibble/sparzit_x2_initial3.mp3", 2455502637, 3404107398)
  126. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  127. Dialog.AddOption("Sounds like a worthy cause. What do you need?","Offer2")
  128. Dialog.AddOption("No! I don't think so.")
  129. Dialog.Start()
  130. end
  131. function Offer2(NPC,Spawn)
  132. if CanReceiveQuest(Spawn,Design) then
  133. FaceTarget(NPC, Spawn)
  134. OfferQuest(NPC,Spawn,Design)
  135. end
  136. end
  137. function Quest2Done(NPC, Spawn)
  138. SetStepComplete(Spawn,Design,2)
  139. FaceTarget(NPC, Spawn)
  140. Dialog.New(NPC, Spawn)
  141. Dialog.AddDialog("Spectacular! With all of this grubby matter, I should be able to find a way to inject it into their skin. With a little help from an alchemist, this'll be just dandy! Hollow out the teeth, add this poison ... no, it needs to be excruciating so that those who don't speak their language can still understand. Whoohoo ... this will be great. Here's some coin for your time, friend.")
  142. Dialog.AddVoiceover("voiceover/english/sparzit_cogsnibble/fprt_hood03/quests/sparzitcogsnibble/sparzit_x2_finish.mp3", 3769729864, 234643773)
  143. PlayFlavor(NPC,"","","yes",0,0,Spawn)
  144. Dialog.AddOption("Thanks. Just keep your inventions away from me!")
  145. Dialog.Start()
  146. end