path_of_the_warrior.lua 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. --[[
  2. Script Name : Quests/Hallmark/path_of_the_warrior.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.07 04:12:38
  5. Script Purpose : WARRIOR CLASS QUEST
  6. Zone : Hallmark
  7. Quest Giver: Master at Arms Dagorel
  8. Preceded by: Fighter Training pt II
  9. Followed by: None
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I must defeat the bears in the arena.", 2, 100, "I must defeat the challenge set before me in the make-shift arena set up in the warehouse of northern Qeynos.", 11,8320025)
  14. AddQuestStepKill(Quest, 2, "I must defeat the lions in the arena.", 3, 100, "I must defeat the challenge set before me in the make-shift arena set up in the warehouse of northern Qeynos.", 11, 8320024)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. FaceTarget(QuestGiver, Player)
  20. Dialog.New(QuestGiver, Player)
  21. Dialog.AddDialog("Whoa, now! Not yet, you're not! You have to prove you can last in the fray. You didn't think I'd wave a magic wand and make you a warrior, did you? No, no, we got a make shift arena set up in the warehouse, where you'll prove yourself, a true warrior of Qeynos. No need to return to me, I've taught you all I can.")
  22. PlayFlavor(QuestGiver, "", "", "scold", 0, 0, Player)
  23. Dialog.AddOption("I will step forth victorious! Wait and see!")
  24. Dialog.Start()
  25. if GetQuestStep(Player,5878)==1 then
  26. SetStepComplete(Player,5878,1)
  27. end
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. -- Add dialog here for when the quest is declined
  31. end
  32. function Deleted(Quest, QuestGiver, Player)
  33. -- Remove any quest specific items here when the quest is deleted
  34. end
  35. function Step1Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 1, "I've defeated the bears in the arena.")
  37. QuestCheck(Quest, QuestGiver, Player)
  38. end
  39. function Step2Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I've defeated the lions in the arena.")
  41. QuestCheck(Quest, QuestGiver, Player)
  42. end
  43. function QuestCheck(Quest, QuestGiver, Player)
  44. if QuestStepIsComplete(Player,5791,1) and QuestStepIsComplete(Player,5791,2) then
  45. UpdateQuestTaskGroupDescription(Quest, 1, "I've defeated all the creatures in the arena in front of the cheering onlookers.")
  46. AddQuestStep(Quest, 3, "I've defeated the arena creatures, and must declare myself victor on the dais.", 1, 100, "I must stand on the dais and declare my victory!", 957)
  47. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  48. end
  49. end
  50. function QuestComplete(Quest, QuestGiver, Player)
  51. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  52. UpdateQuestStepDescription(Quest, 3, "I declared myself victorious.")
  53. UpdateQuestTaskGroupDescription(Quest, 2, "I've declared my victory.")
  54. if GetClass(Player)== 1 then
  55. SetAdventureClass(Player,2)
  56. SetPlayerLevel(Player,10)
  57. SendMessage(Player, "Congratulations! You are a Warrior.","yellow")
  58. SendPopUpMessage(Player, "Congratulations! You are a Warrior.",250,250,200)
  59. ApplySpellVisual(Player, 324)
  60. PlaySound(Player, "sounds/test/endquest.wav", GetX(Player), GetY(Player), GetZ(Player), Player)
  61. local level = GetLevel(Player)*5
  62. if not HasSkill(Player, 1408356869) then -- Martial
  63. AddSkill(Player, 1408356869,1,level)
  64. SendMessage(Player, "You have learned the Martial skill")
  65. end
  66. if not HasSkill(Player, 1124719197) then -- Tactics/Warrior
  67. AddSkill(Player, 1124719197,1,level)
  68. SendMessage(Player, "You have learned the Tactics skill")
  69. end
  70. if not HasSkill(Player, 3421494576) then -- Crushing
  71. AddSkill(Player, 3421494576,1,level)
  72. SendMessage(Player, "You have learned the Crushing skill")
  73. end
  74. if not HasSkill(Player, 418532101) then -- Slashing
  75. AddSkill(Player, 418532101,1,level)
  76. SendMessage(Player, "You have learned the Slashing skill")
  77. end
  78. if not HasSkill(Player, 1756482397) then -- Ranged
  79. AddSkill(Player, 1756482397,1,level)
  80. SendMessage(Player, "You have learned the Ranged skill")
  81. end
  82. if not HasSkill(Player, 2650425026) then -- Thrown Weapon
  83. AddSkill(Player, 2650425026,1,level)
  84. SendMessage(Player, "You have learned the Thrown Weapon skill")
  85. end
  86. if not HasSkill(Player, 3048574950) then -- Piercing
  87. AddSkill(Player, 3048574950,1,level)
  88. SendMessage(Player, "You have learned the Piercing skill")
  89. end
  90. if not HasSkill(Player, 1852383242) then -- Dual Wield
  91. AddSkill(Player, 1852383242,1,level)
  92. SendMessage(Player, "You have learned the Dual Wield skill")
  93. end
  94. if not HasSkill(Player, 2638198038) then -- Focus
  95. AddSkill(Player, 2638198038,1,level)
  96. SendMessage(Player, "You have learned the Focus skill")
  97. end
  98. --WEAPON SKILLS
  99. if not HasSkill(Player, 2897193374) then -- Light Armor
  100. AddSkill(Player, 2897193374,1,level)
  101. SendMessage(Player, "You are now more proficient with Light Armor")
  102. end
  103. if not HasSkill(Player, 2246237129) then -- Medium Armor
  104. AddSkill(Player, 2246237129,1,level)
  105. SendMessage(Player, "You are now more proficient with Medium Armor")
  106. end
  107. if not HasSkill(Player, 1743366740) then -- Bow
  108. AddSkill(Player, 1743366740,1,level)
  109. SendMessage(Player, "You are now more proficient with a Bow")
  110. end
  111. if not HasSkill(Player, 4037812502) then -- Buckler
  112. AddSkill(Player, 4037812502,1,level)
  113. SendMessage(Player, "You are now more proficient with a Buckler")
  114. end
  115. if not HasSkill(Player, 3173504370) then -- Roundshield
  116. AddSkill(Player, 3173504370,1,level)
  117. SendMessage(Player, "You are now more proficient with a Roundshield")
  118. end
  119. if not HasSkill(Player, 2476073427) then -- Axe
  120. AddSkill(Player, 2476073427,1,level)
  121. SendMessage(Player, "You are now more proficient with an Axe")
  122. end
  123. if not HasSkill(Player, 2954459351) then -- Great Axe
  124. AddSkill(Player, 2954459351,1,level)
  125. SendMessage(Player, "You are now more proficient with a Great Axe")
  126. end
  127. if not HasSkill(Player, 1696217328) then -- Sword
  128. AddSkill(Player, 1696217328,1,level)
  129. SendMessage(Player, "You are now more proficient with a Sword")
  130. end
  131. if not HasSkill(Player, 2292577688) then -- Great Sword
  132. AddSkill(Player, 2292577688,1,level)
  133. SendMessage(Player, "You are now more proficient with a Great Sword")
  134. end
  135. if not HasSkill(Player, 770311065) then -- Mace
  136. AddSkill(Player, 770311065,1,level)
  137. SendMessage(Player, "You are now more proficient with a Mace")
  138. end
  139. if not HasSkill(Player, 554333641) then -- Hammer
  140. AddSkill(Player, 554333641,1,level)
  141. SendMessage(Player, "You are now more proficient with a Hammer")
  142. end
  143. if not HasSkill(Player, 1653482350) then -- Great Hammer
  144. AddSkill(Player, 1653482350,1,level)
  145. SendMessage(Player, "You are now more proficient with a Great Hammer")
  146. end
  147. if not HasSkill(Player, 3180399725) then -- Staff(2h)
  148. AddSkill(Player, 3180399725,1,level)
  149. SendMessage(Player, "You are now more proficient with a Staff")
  150. end
  151. if not HasSkill(Player, 641561514) then -- Rapier
  152. AddSkill(Player, 641561514,1,level)
  153. SendMessage(Player, "You are now more proficient with a Rapier")
  154. end
  155. if not HasSkill(Player, 1616998748) then -- Spear
  156. AddSkill(Player, 1616998748,1,level)
  157. SendMessage(Player, "You are now more proficient with a Spear")
  158. end
  159. if not HasSkill(Player, 570458645) then -- Tower Shield
  160. AddSkill(Player, 570458645,1,level)
  161. SendMessage(Player, "You are now more proficient with a Tower Shield")
  162. end
  163. if not HasSkill(Player, 2608320658) then -- Kite Shield
  164. AddSkill(Player, 2608320658,1,level)
  165. SendMessage(Player, "You are now more proficient with a Kite Shield")
  166. end
  167. --REMOVED SKILLS
  168. --Removed Advance Fighter
  169. if HasSkill(Player, 433335062) then -- Berserk/Berserker
  170. RemoveSkill(Player, 433335062)
  171. end
  172. if HasSkill(Player, 1209716810) then -- Protection/Guardian
  173. RemoveSkill(Player, 1209716810)
  174. end
  175. if HasSkill(Player, 3856706740) then -- Brawl/Brawling
  176. RemoveSkill(Player, 3856706740)
  177. end
  178. if HasSkill(Player, 2011726342) then -- Tranquility/Monk
  179. RemoveSkill(Player, 2011726342)
  180. end
  181. if HasSkill(Player, 3067436248) then -- Physicality/Bruiser
  182. RemoveSkill(Player, 3067436248)
  183. end
  184. if HasSkill(Player, 3809066846) then -- Faith/Crusader
  185. RemoveSkill(Player, 3809066846)
  186. end
  187. if HasSkill(Player, 90523872) then -- Determined Faith/Paladin
  188. RemoveSkill(Player, 90523872)
  189. end
  190. if HasSkill(Player, 2741805322) then -- Determined Zeal/Shadowknight
  191. RemoveSkill(Player, 2741805322)
  192. end
  193. --Removed Scout for Fighter
  194. if HasSkill(Player, 1921433074) then -- Reconnaissance/Scout
  195. RemoveSkill(Player, 1921433074)
  196. end
  197. if HasSkill(Player, 1311635100) then -- Melodies/Bard
  198. RemoveSkill(Player, 1311635100)
  199. end
  200. if HasSkill(Player, 296246391) then -- Ballads/Troubador
  201. RemoveSkill(Player, 296246391)
  202. end
  203. if HasSkill(Player, 340921594) then -- Dirges/Dirge
  204. RemoveSkill(Player, 340921594)
  205. end
  206. if HasSkill(Player, 1514256692) then -- Skulldugery/Rogue
  207. RemoveSkill(Player, 1514256692)
  208. end
  209. if HasSkill(Player, 2663054519) then -- Swashbuckling/Swashbuckler
  210. RemoveSkill(Player, 2663054519)
  211. end
  212. if HasSkill(Player, 1519965519) then -- Banditry/Brigand
  213. RemoveSkill(Player, 1519965519)
  214. end
  215. if HasSkill(Player, 3167106577) then -- Stalking/Predator
  216. RemoveSkill(Player, 3167106577)
  217. end
  218. if HasSkill(Player, 1400160844) then -- Archery/Ranger
  219. RemoveSkill(Player, 1400160844)
  220. end
  221. if HasSkill(Player, 2711101135) then -- Assassination/Assassin
  222. RemoveSkill(Player, 2711101135)
  223. end
  224. --Removed Priest for Fighter
  225. if HasSkill(Player, 2463145248) then -- Inspirations/Priest
  226. RemoveSkill(Player, 2463145248)
  227. end
  228. if HasSkill(Player, 3341842907) then -- Theurgy/Cleric
  229. RemoveSkill(Player, 3341842907)
  230. end
  231. if HasSkill(Player, 2581053277) then -- Regimens/Templar
  232. RemoveSkill(Player, 2581053277)
  233. end
  234. if HasSkill(Player, 1829443087) then -- Inquisitions/Inquisitor
  235. RemoveSkill(Player, 1829443087)
  236. end
  237. if HasSkill(Player, 3282420779) then -- Archegenesis/Druid
  238. RemoveSkill(Player, 3282420779)
  239. end
  240. if HasSkill(Player, 1624274802) then -- Nature's Reckoning/Fury
  241. RemoveSkill(Player, 1624274802)
  242. end
  243. if HasSkill(Player, 1040683335) then -- Nature's Refuge/Warden
  244. RemoveSkill(Player, 1040683335)
  245. end
  246. if HasSkill(Player, 3343700951) then -- Talismans/Shaman
  247. RemoveSkill(Player, 3343700951)
  248. end
  249. if HasSkill(Player, 3467160477) then -- Fetichisms/Mystic
  250. RemoveSkill(Player, 3467160477)
  251. end
  252. if HasSkill(Player, 3191839982) then -- Vehemence/Defiler
  253. RemoveSkill(Player, 3191839982)
  254. end
  255. --Removed Mage for Fighter
  256. if HasSkill(Player, 3820670534) then -- Evocations/Mage
  257. RemoveSkill(Player, 3820670534)
  258. end
  259. if HasSkill(Player, 287643040) then -- Enchantments/Enchanter
  260. RemoveSkill(Player, 287643040)
  261. end
  262. if HasSkill(Player, 2898101972) then -- Hallucinations/Illusionist
  263. RemoveSkill(Player, 2898101972)
  264. end
  265. if HasSkill(Player, 2950599749) then -- Protean/Coecerer
  266. RemoveSkill(Player, 2950599749)
  267. end
  268. if HasSkill(Player, 2533124061) then -- Sorcery/Sorcerer
  269. RemoveSkill(Player, 2533124061)
  270. end
  271. if HasSkill(Player, 2662430630) then -- Elemental Mastery/Wizard
  272. RemoveSkill(Player, 2662430630)
  273. end
  274. if HasSkill(Player, 193411854) then -- Noctivagance/Warlock
  275. RemoveSkill(Player, 193411854)
  276. end
  277. if HasSkill(Player, 2120065377) then -- Legerdemain/Summoner
  278. RemoveSkill(Player, 2120065377)
  279. end
  280. if HasSkill(Player, 2042842194) then -- Conjurations/Conjurer
  281. RemoveSkill(Player, 2042842194)
  282. end
  283. if HasSkill(Player, 289471519) then -- Sepulchers/Necromancer
  284. RemoveSkill(Player, 289471519)
  285. end
  286. --REMOVED WEAPON
  287. if not HasSkill(Player, 540022425) then -- Parry
  288. RemoveSkill(Player, 540022425)
  289. end
  290. if HasSkill(Player, 241174330) then -- Heavy Armor
  291. RemoveSkill(Player, 241174330)
  292. end
  293. if HasSkill(Player, 3177806075) then -- Fists
  294. RemoveSkill(Player, 3177806075)
  295. end
  296. if HasSkill(Player, 540022425) then -- Parry
  297. RemoveSkill(Player, 540022425)
  298. end
  299. if HasSkill(Player, 1553857724) then -- Investigation
  300. RemoveSkill(Player, 1553857724)
  301. end
  302. if HasSkill(Player, 3429135390) then -- Mystical Destruction
  303. RemoveSkill(Player, 3429135390)
  304. end
  305. if HasSkill(Player, 2200201799) then -- Disarm Trap
  306. RemoveSkill(Player, 2200201799)
  307. end
  308. if HasSkill(Player, 366253016) then --Ministration
  309. RemoveSkill(Player, 366253016)
  310. end
  311. if HasSkill(Player, 613995491) then -- Disruption
  312. RemoveSkill(Player, 613995491)
  313. end
  314. if HasSkill(Player, 882983852) then -- Subjigation
  315. RemoveSkill(Player, 882983852)
  316. end
  317. if HasSkill(Player, 3587918036) then -- Ordination
  318. RemoveSkill(Player, 3587918036)
  319. end
  320. end
  321. UpdateQuestDescription(Quest, "I managed to defeat the creatures brought before me in the arena that was set up, and have proved myself worthy of being a warrior. Forever shall I wear this as a badge of courage and honor.")
  322. GiveQuestReward(Quest, Player)
  323. end
  324. function Reload(Quest, QuestGiver, Player, Step)
  325. if Step == 1 then
  326. Step1Complete(Quest, QuestGiver, Player)
  327. elseif Step == 2 then
  328. Step2Complete(Quest, QuestGiver, Player)
  329. elseif Step == 3 then
  330. QuestComplete(Quest, QuestGiver, Player)
  331. end
  332. end