9
3

ArmsdealerShinska.lua 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. --[[
  2. Script Name : SpawnScripts/TempleStreet/ArmsdealerShinska.lua
  3. Script Purpose : Armsdealer Shinska
  4. Script Author : Dorbin
  5. Script Date : 10/31/2023
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local TrollsAndArms = 5618
  10. local VlepoPlan = 5917
  11. local Netherot = 5918
  12. function spawn(NPC)
  13. ProvidesQuest(NPC,Netherot)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function hailed(NPC, Spawn)
  19. if GetFactionAmount(Spawn,12) <0 then
  20. FaceTarget(NPC, Spawn)
  21. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  22. else
  23. if GetQuestStep(Spawn, TrollsAndArms) == 1 then
  24. SetStepComplete(Spawn, TrollsAndArms, 1)
  25. end
  26. Dialog1(NPC, Spawn)
  27. end
  28. end
  29. --Ahh ... that is very good. The Shinska will remembers that you offered her helps. You go into the sewers and finds the Netherot Chanters. Kills the beasts. That will teach them not to say bad things about the Shinska. Comes back and I give you reward, yes?
  30. --Yes. I sells many weapons to many people, Shinska do. I consider selling new, enchanted weapons, but since those horrid Netherots told peoples not to do business with the Shinska, no one will makes my enchanted weapons. You help the Shinska with this, no?
  31. --The Shinska doesn'ts buy weapons from trolls. She buys weapons from a humans who makes Shinska a very good deal. I will sells to the troll, but I will not buys from him.
  32. --You no haves money. You can't buy Shinska weapons. Go away!
  33. --You no kills the beasts? Shinska's not happy! Go kills them now!
  34. function Dialog1(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. Dialog.New(NPC, Spawn)
  37. if GetQuestStep(Spawn,Netherot) ==1 then
  38. PlayFlavor(NPC, "","","swear",0,0, Spawn)
  39. Dialog.AddDialog("You no kills the beasts? Shinska's not happy! Go kills them now!")
  40. Dialog.AddOption("I'll crawl into the sewer when I'm ready!")
  41. else
  42. Dialog.AddDialog("You need weapons on your journey. You come see Shinska... you come see her now!")
  43. Dialog.AddVoiceover("voiceover/english/optional5/arms_dealer_shinska/ks_rarmdlrshinska_callout_64.mp3", 1984880476, 917173949)
  44. Dialog.AddOption("I am not interested.")
  45. end
  46. if GetQuestStep(Spawn, VlepoPlan)==1 then
  47. Dialog.AddOption("[Lie] Haven't you heard? You are in danger!","Dialog2")
  48. end
  49. if CanReceiveQuest(Spawn,Netherot) then
  50. Dialog.AddOption("Your buisness appears to be doing well.","Dialog5")
  51. elseif GetQuestStep(Spawn,Netherot)==2 then
  52. Dialog.AddOption("I have killed some netherot chanters.","Dialog6")
  53. end
  54. Dialog.Start()
  55. end
  56. function Dialog2(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. Dialog.New(NPC, Spawn)
  59. Dialog.AddDialog("Shinska has not heard... Why is Shinska in danger? It better nots be those trolls again! Tell me!")
  60. PlayFlavor(NPC, "","","stare",0,0, Spawn)
  61. if GetQuestStep(Spawn, VlepoPlan)==1 then
  62. Dialog.AddOption("The gnomes are plotting to take over your business!","Dialog2Gnome")
  63. Dialog.AddOption("The Overlord is sending the Militia to confiscate your goods!","Dialog3")
  64. Dialog.AddOption("The trolls! Yes! They are angry about the weapons sold them!","Dialog2Troll")
  65. end
  66. Dialog.AddOption("Wait, I was mistakened.")
  67. Dialog.Start()
  68. end
  69. function Dialog2Gnome(NPC, Spawn)
  70. Dialog.AddDialog("Gnomes? Hehehe! Shinksa not worried about little gnomes and their business. Shinksa just gut them!")
  71. PlayFlavor(NPC, "","","chuckle",0,0, Spawn)
  72. Dialog.AddOption("I mean...the Militia is coming to confiscate your goods!","Dialog3")
  73. Dialog.AddOption("Actually..the trolls! Yes! They are coming to eat you!","Dialog2Troll")
  74. Dialog.Start()
  75. end
  76. function Dialog2Troll(NPC, Spawn)
  77. Dialog.AddDialog("Trolls want to eat me?... No no. Shinksa do business with them! They wouldn't want that...")
  78. PlayFlavor(NPC, "","","confused",0,0, Spawn)
  79. Dialog.AddOption("I mean... the Militia is coming to confiscate your goods!","Dialog3")
  80. Dialog.AddOption("Actually... gnomes are plotting to take over your business!","Dialog2Gnome")
  81. Dialog.Start()
  82. end
  83. function Dialog3(NPC, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. Dialog.New(NPC, Spawn)
  86. Dialog.AddDialog("What?! Where?!... They weres already dead when Shinksa found their weapons! Shinksa must knows!")
  87. PlayFlavor(NPC, "","","boggle",0,0, Spawn)
  88. Dialog.AddOption("They'll be here soon! Look out behind you!","Dialog4")
  89. Dialog.Start()
  90. end
  91. function Dialog4(NPC, Spawn)
  92. local zone = GetZone(NPC)
  93. local Spezi = GetSpawnByLocationID(zone, 420509)
  94. FaceTarget(NPC, Spezi)
  95. Dialog.New(NPC, Spawn)
  96. Dialog.AddDialog("...")
  97. PlayFlavor(NPC, "","","doubletake",0,0, Spawn)
  98. Dialog.AddOption("[ Quietly steal a weapon off the display ]","DialogSwipe")
  99. Dialog.Start()
  100. end
  101. function DialogSwipe(NPC, Spawn)
  102. local Heading = GetHeading(NPC)
  103. if Heading < 100 then
  104. PlayFlavor(Spawn, "", "", "converse_male06", 0, 0,NPC)
  105. SendMessage(Spawn,"You've obtained a weapon at random from Shinska's display.")
  106. SetStepComplete(Spawn,VlepoPlan,1)
  107. else
  108. SendPopUpMessage(Spawn,"Shinksa has spotted you!",250,0,0)
  109. SendMessage(Spawn,"Shinksa has spotted you!","red")
  110. PlayFlavor(NPC,"","Hey! Shinksa sees you. Pay up or keep your hands off mys weapons!","shakefist",0,0,Spawn)
  111. FaceTarget(NPC, Spawn)
  112. PlaySound(Spawn,"sounds/ui/ui_warning.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  113. end
  114. end
  115. function Dialog5(NPC, Spawn)
  116. Dialog.New(NPC, Spawn)
  117. Dialog.AddDialog("Yes. I sells many weapons to many people, Shinska do. I consider selling new, enchanted weapons, but since those horrid Netherots told peoples not to do business with the Shinska, no one will makes my enchanted weapons. You help the Shinska with this, no?")
  118. PlayFlavor(NPC, "","","agree",0,0, Spawn)
  119. Dialog.AddOption("Perhaps I could look into this for you.","Offer")
  120. Dialog.AddOption("I don't think so!")
  121. Dialog.Start()
  122. end
  123. function Offer(NPC,Spawn)
  124. OfferQuest(NPC,Spawn,Netherot)
  125. end
  126. function Dialog6(NPC, Spawn)
  127. Dialog.New(NPC, Spawn)
  128. Dialog.AddDialog("The Shinska says to you, \"thanks you,\" she does. Here is your coin. Now maybes other chanters comes to the Shinska and makes her weapons very magically!")
  129. PlayFlavor(NPC, "","","scheme",0,0, Spawn)
  130. Dialog.AddOption("Even so, I hope this helps improve your wares.")
  131. Dialog.Start()
  132. SetStepComplete(Spawn,Netherot,2)
  133. end
  134. function RandomGreeting(NPC, Spawn)
  135. PlayFlavor(NPC, "voiceover/english/optional5/arms_dealer_shinska/ks_rarmdlrshinska_callout_64.mp3", "You need weapons on your journey. You come see Shinska... you come see her now!", "", 1984880476, 917173949, Spawn, 0)
  136. end