9
3

ShadySwashbucklerXVII.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/ShadySwashbucklerXVII.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.14 04:12:12
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local BARBARIAN = 0
  10. local DARK_ELF = 1
  11. local DWARF = 2
  12. local ERUDITE = 3
  13. local FROGLOK = 4
  14. local GNOME = 5
  15. local HALF_ELF = 6
  16. local HALFLING = 7
  17. local HIGH_ELF = 8
  18. local HUMAN = 9
  19. local IKSAR = 10
  20. local KERRA = 11
  21. local OGRE = 12
  22. local RATONGA = 13
  23. local TROLL = 14
  24. local WOOD_ELF = 15
  25. local FAE = 16
  26. local ARASAI = 17
  27. local SARNAK = 18
  28. local VAMPIRE = 19
  29. local AERAKYN = 20
  30. local AntonicaQuest = 5858
  31. function spawn(NPC)
  32. SetInfoStructString(NPC, "action_state", "ponder")
  33. end
  34. function hailed(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. Dialog.New(NPC, Spawn)
  37. Dialog.AddDialog("My apologies, friend. I did not see you there ... What is it you need?")
  38. Dialog.AddVoiceover("voiceover/english/scribe_duvo/qey_elddar/100_scribe_halfling_duvo_callout1_c6eaefe5.mp3", 3948051330, 1166584264)
  39. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  40. if GetQuestStep(Spawn,5717)==2 or HasCompletedQuest(Spawn, 5717) then
  41. Dialog.AddOption("Get me out of here!\n[EMU Test Buff]","Item_Buff1")
  42. elseif GetQuestStep(Spawn,5758)==2 or HasCompletedQuest(Spawn, 5758) then
  43. Dialog.AddOption("I've seen enough here.\n[EMU Test Buff]","Item_Buff1")
  44. else
  45. Dialog.AddOption("I've seen enough here. [EMU Test Buff]","Fail")
  46. end
  47. Dialog.AddOption("Can you sneak me off the island? \n[EMU Fast-Track]","FastTrack")
  48. Dialog.AddOption("Good day to you!")
  49. Dialog.Start()
  50. end
  51. function Fail(NPC,Spawn)
  52. local con = CreateConversation()
  53. PlayFlavor(NPC, "voiceover/english/scribe_duvo/qey_elddar/100_scribe_halfling_duvo_multhail1_a72f47c8.mp3", "I'm sorry. I cannot help you.", "no", 1448300901, 17119076, Spawn)
  54. AddConversationOption(con, "Close window using X above","CloseConversation")
  55. StartDialogConversation(con, 1, NPC, Spawn, "Before you can EMU Test buff you must: \n\n 1) Pick an Archetype class from Garven Tralk at the beach. \n\n 2) Speak with an ambassador and select a city.\n\n 3) Secure a boat off the island with Duke Ferrin.")
  56. end
  57. function FastTrack(NPC, Spawn)
  58. FaceTarget(NPC, Spawn)
  59. Dialog.New(NPC, Spawn)
  60. Dialog.AddDialog("...")
  61. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  62. -- Dialog.AddVoiceover("voiceover/english/broker_algernon/qey_harbor/034_con_merchant_algernon_human_1_hail_55be2bc8.mp3", 99913618, 1474936299)
  63. Dialog.AddOption("Take me to Antonica.","ToAntonica")
  64. Dialog.AddOption("Nevermind.")
  65. Dialog.Start()
  66. end
  67. function ToAntonica(NPC,Spawn)
  68. FaceTarget(NPC, Spawn)
  69. Dialog.New(NPC, Spawn)
  70. Dialog.AddDialog("Find me once you arrive. Alright, see this barrel here? Climb in.")
  71. Dialog.AddOption("Umm...")
  72. Dialog.Start()
  73. OfferQuest(NPC,Spawn,AntonicaQuest)
  74. end
  75. function CloseConvo(NPC,Spawn)
  76. CloseConversation(NPC,Spawn)
  77. end
  78. function respawn(NPC)
  79. spawn(NPC)
  80. end
  81. function Item_Buff1(NPC,Spawn)
  82. if GetClientVersion(Spawn) <= 546 then
  83. local con = CreateConversation()
  84. AddConversationOption(con, "EMU Buff and Leave Island", "Item_Buff2")
  85. AddConversationOption(con, "Stay","Cancel")
  86. StartDialogConversation(con, 1, NPC, Spawn, "Are you sure you wish to leave the Isle of Refuge?\n\nBuff Includes:\n\n- Adventure Level to 6\n- Solo Quested Gean\n- 6 silver\n- Port to Racial Hood\n\n[ Complete Citizenship once in the city ]")
  87. else
  88. window = CreateOptionWindow();
  89. AddOptionWindowOption(window, " EMU Buff and Leave Island", "Buff Includes:\n\nLevel to 6 // Solo Quested Gear // 6 silver // Port to Racial Hood\n\n[ Complete Citizenship once in the city ]", 0, 2297, "Item_Buff2")
  90. AddOptionWindowOption(window, "Refuse Buff", "Stay on the island and continue playing here.", 0, 2296, "Cancel")
  91. SendOptionWindow(window, Spawn, "Are you sure you wish to leave the Isle of Refuge?", "Cancel")
  92. end
  93. end
  94. function Item_Buff2(NPC,Spawn)
  95. AddTimer(NPC,1500,"Trip",1,Spawn)
  96. local Class = GetClass(Spawn)
  97. if GetLevel(Spawn) <=5 then
  98. SetPlayerLevel(Spawn,6)
  99. end
  100. AddCoin(Spawn,600)
  101. if not HasItem(Spawn,20728)then --Goblin Satchle
  102. SummonItem(Spawn,20728,1)
  103. end
  104. if not HasItem(Spawn,1130007)then --Scrimshaw Necklace
  105. SummonItem(Spawn,1130007,1)
  106. end
  107. if not HasItem(Spawn,140253)then --Constructed Wrist Spanner
  108. SummonItem(Spawn,140253,1)
  109. end
  110. if not HasItem(Spawn,137914)then --Castaway Sash
  111. SummonItem(Spawn,137914,1)
  112. end
  113. if not HasItem(Spawn,136170)then --Bone Bracelet
  114. SummonItem(Spawn,136170,1)
  115. end
  116. if Class == 1 then -- FIGHTER
  117. if not HasItem(Spawn,152754)then --Boots
  118. SummonItem(Spawn,152754,1)
  119. end
  120. if not HasItem(Spawn,152756)then --Legs
  121. SummonItem(Spawn,152756,1)
  122. end
  123. if not HasItem(Spawn,152757)then --Chest
  124. SummonItem(Spawn,152757,1)
  125. end
  126. if not HasItem(Spawn,152755)then --Gloves
  127. SummonItem(Spawn,152755,1)
  128. end
  129. elseif Class == 11 then -- PRIEST
  130. if not HasItem(Spawn,130119)then --Boots
  131. SummonItem(Spawn,130119,1)
  132. end
  133. if not HasItem(Spawn,130121)then --Legs
  134. SummonItem(Spawn,130121,1)
  135. end
  136. if not HasItem(Spawn,130122)then --Chest
  137. SummonItem(Spawn,130122,1)
  138. end
  139. if not HasItem(Spawn,130120)then --Gloves
  140. SummonItem(Spawn,130120,1)
  141. end
  142. elseif Class == 21 then --MAGE
  143. if not HasItem(Spawn,132364)then --Boots
  144. SummonItem(Spawn,132364,1)
  145. end
  146. if not HasItem(Spawn,132366)then --Legs
  147. SummonItem(Spawn,132366,1)
  148. end
  149. if not HasItem(Spawn,132367)then --Chest
  150. SummonItem(Spawn,132367,1)
  151. end
  152. if not HasItem(Spawn,132365)then --Gloves
  153. SummonItem(Spawn,132365,1)
  154. end
  155. elseif Class == 31 then --SCOUT
  156. if not HasItem(Spawn,40984)then --Bow
  157. SummonItem(Spawn,40984,1)
  158. end
  159. if not HasItem(Spawn,20528)then --Arrows
  160. SummonItem(Spawn,20528,1)
  161. SummonItem(Spawn,20528,0)
  162. SummonItem(Spawn,20528,0)
  163. SummonItem(Spawn,20528,0)
  164. SummonItem(Spawn,20528,0)
  165. SummonItem(Spawn,20528,0)
  166. SummonItem(Spawn,20528,0)
  167. SummonItem(Spawn,20528,0)
  168. SummonItem(Spawn,20528,0)
  169. SummonItem(Spawn,20528,0)
  170. SummonItem(Spawn,20528,0)
  171. SummonItem(Spawn,20528,0)
  172. SummonItem(Spawn,20528,0)
  173. SummonItem(Spawn,20528,0)
  174. SummonItem(Spawn,20528,0)
  175. SummonItem(Spawn,20528,0)
  176. SummonItem(Spawn,20528,0)
  177. SummonItem(Spawn,20528,0)
  178. SummonItem(Spawn,20528,0)
  179. SummonItem(Spawn,20528,0)
  180. end
  181. if not HasItem(Spawn,158693)then --Boots
  182. SummonItem(Spawn,158693,1)
  183. end
  184. if not HasItem(Spawn,158695)then --Legs
  185. SummonItem(Spawn,158695,1)
  186. end
  187. if not HasItem(Spawn,158696)then --Chest
  188. SummonItem(Spawn,158696,1)
  189. end
  190. if not HasItem(Spawn,158694)then --Gloves
  191. SummonItem(Spawn,158694,1)
  192. end
  193. end
  194. end
  195. function Trip(NPC,Spawn)
  196. if GetQuestStep(Spawn,5717)==2 or HasCompletedQuest(Spawn, 5717) then
  197. LeaveIslandQ(NPC, Spawn)
  198. elseif GetQuestStep(Spawn,5758)==2 or HasCompletedQuest(Spawn, 5758) then
  199. LeaveIslandFP(NPC, Spawn)
  200. end
  201. end
  202. function LeaveIslandQ(NPC, Spawn)
  203. PlaySound(Spawn,"sounds/objectsandparticlesounds/amb_marinersbell_005.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  204. local Race = GetRace(Spawn)
  205. -- Kerra
  206. if Race == 11 then
  207. -- AddSpellBookEntry(Spawn, 8057, 1)
  208. ZoneRef = GetZone("Nettleville")
  209. Zone(ZoneRef,Spawn)
  210. -- Erudite
  211. elseif Race == 3 or Race == 20 then
  212. -- AddSpellBookEntry(Spawn, 8057, 1)
  213. ZoneRef = GetZone("Starcrest")
  214. Zone(ZoneRef,Spawn)
  215. elseif Race == 9 then --Human
  216. if GetClientVersion(Spawn) <= 546 then
  217. local con = CreateConversation()
  218. AddConversationOption(con, "Nettleville Hovel", "HumanQNettleville")
  219. AddConversationOption(con, "Starcrest Commune", "HumanQStarcrest")
  220. AddConversationOption(con, "Tell me about these places", "Human2")
  221. AddConversationOption(con, "Stay","CloseConversation")
  222. StartDialogConversation(con, 1, NPC, Spawn, "Humans must select their next desitnation in Qeynos.")
  223. else
  224. window = CreateOptionWindow();
  225. AddOptionWindowOption(window, " Nettleville Hovel", "Depart for Nettleville - Home to the reserved Kerra and diverse Humans of Qeynos. It’s a busy district area with plenty of opportunties for adventure seekers and back-alley trade.", 2, 26, "HumanQNettleville")
  226. AddOptionWindowOption(window, " Starcrest Commune", "Depart for Starcrest - Starcrest is a grand political experiment implemented by the intellectual Erudites to serve as their home in Qeynos. Residents often frown on noise and distraction that might hinder their research, so be mindful of your activities. ", 2, 27, "HumanQStarcrest")
  227. AddOptionWindowOption(window, " Stay", "Stay on the Island. Continue your adventures here and return to this bell when you are ready to leave.", 0, 2296, "Cancel")
  228. SendOptionWindow(window, Spawn, "Humans Must Select Their Next Desitnation", "Cancel")
  229. end
  230. -- Barbarian / Dwarf
  231. elseif Race == 0 or Race == 2 then
  232. -- AddSpellBookEntry(Spawn, 8057, 1)
  233. ZoneRef = GetZone("Graystone")
  234. Zone(ZoneRef,Spawn)
  235. -- Froglok / High Elf
  236. elseif Race == 4 or Race == 8 then
  237. -- AddSpellBookEntry(Spawn, 8057, 1)
  238. ZoneRef = GetZone("Castleview")
  239. Zone(ZoneRef,Spawn)
  240. -- Half Elf / Wood Elf
  241. elseif Race == 6 or Race == 15 then
  242. -- AddSpellBookEntry(Spawn, 8057, 1)
  243. ZoneRef = GetZone("Willowwood")
  244. Zone(ZoneRef,Spawn)
  245. -- Gnome / Halfling
  246. elseif Race == 5 or Race == 7 then
  247. -- AddSpellBookEntry(Spawn, 8057, 1)
  248. ZoneRef = GetZone("Baubbleshire")
  249. Zone(ZoneRef,Spawn)
  250. else
  251. SendMessage(Spawn,"There doesn't seem to be a boat available for you to Qeynos right now. [Report this!]")
  252. end
  253. end
  254. function Human2(NPC,Spawn)
  255. local con = CreateConversation()
  256. AddConversationOption(con, "Nettleville Hovel", "HumanQNettleville")
  257. AddConversationOption(con, "Starcrest Commune", "HumanQStarcrest")
  258. AddConversationOption(con, "Stay","CloseConversation")
  259. StartDialogConversation(con, 1, NPC, Spawn, "Nettlevilel Hovel:\n\nHome to the reserved Kerra and diverse Humans of Qeynos. It’s a busy district area with plenty of opportunties for adventure seekers and back-alley trade.\n\nStarcrest Commune:\n\nStarcrest is a grand political experiment implemented by the intellectual Erudites to serve as their home in Qeynos. Residents often frown on noise and distraction that might hinder their research, so be mindful of your activities.")
  260. end
  261. function LeaveIslandFP(NPC, Spawn)
  262. PlaySound(Spawn,"sounds/objectsandparticlesounds/amb_marinersbell_005.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  263. Race = GetRace(Spawn)
  264. -- Erudite / Kerra
  265. if Race == 3 or Race == 11 then
  266. -- AddSpellBookEntry(Spawn, 8057, 1)
  267. ZoneRef = GetZone("Stonestair")
  268. Zone(ZoneRef,Spawn)
  269. -- Ratonga / Gnome
  270. elseif Race == 5 or Race == 13 then
  271. -- AddSpellBookEntry(Spawn, 8057, 1)
  272. ZoneRef = GetZone("TempleSt")
  273. Zone(ZoneRef,Spawn)
  274. -- Human / Half Elf
  275. elseif Race == 9 or Race == 6 then
  276. -- AddSpellBookEntry(Spawn, 8057, 1)
  277. ZoneRef = GetZone("BeggarsCourt")
  278. Zone(ZoneRef,Spawn)
  279. -- Orge / Troll
  280. elseif Race == 12 or Race == 14 then
  281. -- AddSpellBookEntry(Spawn, 8057, 1)
  282. ZoneRef = GetZone("BigBend")
  283. Zone(ZoneRef,Spawn)
  284. -- Dark Elf
  285. elseif Race == 1 then
  286. -- AddSpellBookEntry(Spawn, 8057, 1)
  287. ZoneRef = GetZone("Longshadow")
  288. Zone(ZoneRef,Spawn)
  289. -- Barbarian / Iksar
  290. elseif Race == 0 or Race == 10 then
  291. -- AddSpellBookEntry(Spawn, 8057, 1)
  292. ZoneRef = GetZone("ScaleYard")
  293. Zone(ZoneRef,Spawn)
  294. else
  295. -- AddSpellBookEntry(Spawn, 8057, 1)
  296. ZoneRef = GetZone("BeggarsCourt")
  297. Zone(ZoneRef,Spawn)
  298. end
  299. end