9
3

path_of_the_brawler.lua 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. --[[
  2. Script Name : Quests/Hallmark/path_of_the_brawler.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.07 04:12:46
  5. Script Purpose :
  6. Zone : Hallmark
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStep(Quest, 1, "I must defeat a third circle initiate.", 1, 100, "The dojo where I need to prove myself may be found at the eastern end of South Qeynos in the middle row of buildings.", 11)
  14. AddQuestStep(Quest, 2, "I must defeat a second circle initiate.", 1, 100, "The dojo where I need to prove myself may be found at the eastern end of South Qeynos in the middle row of buildings.", 11)
  15. AddQuestStep(Quest, 3, "I must defeat a first circle adept.", 1, 100, "The dojo where I need to prove myself may be found at the eastern end of South Qeynos in the middle row of buildings.", 11)
  16. AddQuestStep(Quest, 4, "I must defeat a white headband initiate.", 1, 100, "The dojo where I need to prove myself may be found at the eastern end of South Qeynos in the middle row of buildings.", 11)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  19. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  20. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  21. end
  22. function Accepted(Quest, QuestGiver, Player)
  23. FaceTarget(QuestGiver, Player)
  24. Dialog.New(QuestGiver, Player)
  25. Dialog.AddDialog("If you're a true brawler, you need to undergo a challenge. In order to join the ranks of the brawlers here in Qeynos, you gotta prove your skills. Enter the dojo and go fist to fist against another brawler. If you manage to defeat 'em, you'll become that which you seek.")
  26. PlayFlavor(QuestGiver, "", "", "agree", 0, 0, Player)
  27. Dialog.AddOption("Thank you, Dagorel. I won't forget your lessons.")
  28. Dialog.Start()
  29. if GetQuestStep(Player,5878)==1 then
  30. SetStepComplete(Player,5878,1)
  31. end
  32. end
  33. function Declined(Quest, QuestGiver, Player)
  34. -- Add dialog here for when the quest is declined
  35. end
  36. function Deleted(Quest, QuestGiver, Player)
  37. -- Remove any quest specific items here when the quest is deleted
  38. end
  39. function Step1Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 1, "I have defeated a third circle initiate.")
  41. QuestCheck(Quest, QuestGiver, Player)
  42. end
  43. function Step2Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 2, "I have defeated a second circle initiate.")
  45. QuestCheck(Quest, QuestGiver, Player)
  46. end
  47. function Step3Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 3, "I have defeated a first circle adept.")
  49. QuestCheck(Quest, QuestGiver, Player)
  50. end
  51. function Step4Complete(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 4, "I have defeated a white headband initiate.")
  53. QuestCheck(Quest, QuestGiver, Player)
  54. end
  55. function QuestCheck(Quest, QuestGiver, Player)
  56. if QuestStepIsComplete(Player,5790,1) and QuestStepIsComplete(Player,5790,2) and QuestStepIsComplete(Player,5790,3)and QuestStepIsComplete(Player,5790,4) then
  57. UpdateQuestTaskGroupDescription(Quest, 1, "I have entered the dojo and defeated each of my four opponents in combat.")
  58. AddQuestStep(Quest, 5, "I must meditate at the altar.", 1, 100, "I must clear my thoughts and concentrate on the events that have passed.", 11)
  59. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  60. end
  61. end
  62. function QuestComplete(Quest, QuestGiver, Player)
  63. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  64. UpdateQuestStepDescription(Quest, 5, "I must meditate at the altar.")
  65. UpdateQuestTaskGroupDescription(Quest, 2, "I have passed the trial and become a brawler.")
  66. if GetClass(Player)== 1 then
  67. SetAdventureClass(Player,5)
  68. SetPlayerLevel(Player,10)
  69. SendMessage(Player, "Congratulations! You are a Brawler.","yellow")
  70. SendPopUpMessage(Player, "Congratulations! You are a Brawler.",250,250,200)
  71. ApplySpellVisual(Player, 324)
  72. PlaySound(Player, "sounds/test/endquest.wav", GetX(Player), GetY(Player), GetZ(Player), Player)
  73. RemoveSpellBookEntry(Player, 2550401)
  74. local level = GetLevel(Player)*5
  75. if not HasSkill(Player, 1408356869) then -- Martial
  76. AddSkill(Player, 1408356869,1,level)
  77. SendMessage(Player, "You have learned the Martial skill")
  78. end
  79. if not HasSkill(Player, 3856706740) then -- Brawling
  80. AddSkill(Player, 3856706740,1,level)
  81. SendMessage(Player, "You have learned the Brawling skill")
  82. end
  83. if not HasSkill(Player, 3850377186) then -- Deflection
  84. AddSkill(Player, 3850377186,1,level)
  85. SendMessage(Player, "You have learned the Deflection skill")
  86. end
  87. if not HasSkill(Player, 3232294366) then -- Safe Fall
  88. AddSkill(Player, 3232294366,1,level)
  89. SendMessage(Player, "You have learned the Safe Fall skill")
  90. end
  91. if not HasSkill(Player, 3421494576) then -- Crushing
  92. AddSkill(Player, 3421494576,1,level)
  93. SendMessage(Player, "You have learned the Crushing skill")
  94. end
  95. if not HasSkill(Player, 418532101) then -- Slashing
  96. AddSkill(Player, 418532101,36,36)
  97. SendMessage(Player, "You have learned the Slashing skill")
  98. end
  99. if not HasSkill(Player, 3048574950) then -- Piercing
  100. AddSkill(Player, 3048574950,1,level)
  101. SendMessage(Player, "You have learned the Piercing skill")
  102. end
  103. if not HasSkill(Player, 2638198038) then -- Focus
  104. AddSkill(Player, 2638198038,1,level)
  105. SendMessage(Player, "You have learned the Focus skill")
  106. end
  107. --WEAPON SKILLS
  108. if not HasSkill(Player, 2897193374) then -- Light Armor
  109. AddSkill(Player, 2897193374,1,level)
  110. SendMessage(Player, "You are now more proficient with Light Armor")
  111. end
  112. if not HasSkill(Player, 3177806075) then -- Fists
  113. AddSkill(Player, 3177806075,1,level)
  114. SendMessage(Player, "You are now more proficient with your Fists")
  115. end
  116. if not HasSkill(Player, 4037812502) then -- Buckler
  117. AddSkill(Player, 4037812502,1,level)
  118. SendMessage(Player, "You are now more proficient with a Buckler")
  119. end
  120. if not HasSkill(Player, 770311065) then -- Mace
  121. AddSkill(Player, 770311065,1,level)
  122. SendMessage(Player, "You are now more proficient with a Mace")
  123. end
  124. if not HasSkill(Player, 554333641) then -- Hammer
  125. AddSkill(Player, 554333641,1,level)
  126. SendMessage(Player, "You are now more proficient with a Hammer")
  127. end
  128. if not HasSkill(Player, 1653482350) then -- Great Hammer
  129. AddSkill(Player, 1653482350,1,level)
  130. SendMessage(Player, "You are now more proficient with a Great Hammer")
  131. end
  132. if not HasSkill(Player, 3180399725) then -- Staff(2h)
  133. AddSkill(Player, 3180399725,1,level)
  134. SendMessage(Player, "You are now more proficient with a Staff")
  135. end
  136. --REMOVED SKILLS
  137. --Removed Advance Fighter
  138. if HasSkill(Player, 1124719197) then -- Tactics/Warrior
  139. RemoveSkill(Player, 1124719197)
  140. end
  141. if HasSkill(Player, 433335062) then -- Berserk/Berserker
  142. RemoveSkill(Player, 433335062)
  143. end
  144. if HasSkill(Player, 1209716810) then -- Protection/Guardian
  145. RemoveSkill(Player, 1209716810)
  146. end
  147. if HasSkill(Player, 2011726342) then -- Tranquility/Monk
  148. RemoveSkill(Player, 2011726342)
  149. end
  150. if HasSkill(Player, 3067436248) then -- Physicality/Bruiser
  151. RemoveSkill(Player, 3067436248)
  152. end
  153. if HasSkill(Player, 3809066846) then -- Faith/Crusader
  154. RemoveSkill(Player, 3809066846)
  155. end
  156. if HasSkill(Player, 90523872) then -- Determined Faith/Paladin
  157. RemoveSkill(Player, 90523872)
  158. end
  159. if HasSkill(Player, 2741805322) then -- Determined Zeal/Shadowknight
  160. RemoveSkill(Player, 2741805322)
  161. end
  162. --Removed Scout for Fighter
  163. if HasSkill(Player, 1921433074) then -- Reconnaissance/Scout
  164. RemoveSkill(Player, 1921433074)
  165. end
  166. if HasSkill(Player, 1311635100) then -- Melodies/Bard
  167. RemoveSkill(Player, 1311635100)
  168. end
  169. if HasSkill(Player, 296246391) then -- Ballads/Troubador
  170. RemoveSkill(Player, 296246391)
  171. end
  172. if HasSkill(Player, 340921594) then -- Dirges/Dirge
  173. RemoveSkill(Player, 340921594)
  174. end
  175. if HasSkill(Player, 1514256692) then -- Skulldugery/Rogue
  176. RemoveSkill(Player, 1514256692)
  177. end
  178. if HasSkill(Player, 2663054519) then -- Swashbuckling/Swashbuckler
  179. RemoveSkill(Player, 2663054519)
  180. end
  181. if HasSkill(Player, 1519965519) then -- Banditry/Brigand
  182. RemoveSkill(Player, 1519965519)
  183. end
  184. if HasSkill(Player, 3167106577) then -- Stalking/Predator
  185. RemoveSkill(Player, 3167106577)
  186. end
  187. if HasSkill(Player, 1400160844) then -- Archery/Ranger
  188. RemoveSkill(Player, 1400160844)
  189. end
  190. if HasSkill(Player, 2711101135) then -- Assassination/Assassin
  191. RemoveSkill(Player, 2711101135)
  192. end
  193. --Removed Priest for Fighter
  194. if HasSkill(Player, 2463145248) then -- Inspirations/Priest
  195. RemoveSkill(Player, 2463145248)
  196. end
  197. if HasSkill(Player, 3341842907) then -- Theurgy/Cleric
  198. RemoveSkill(Player, 3341842907)
  199. end
  200. if HasSkill(Player, 2581053277) then -- Regimens/Templar
  201. RemoveSkill(Player, 2581053277)
  202. end
  203. if HasSkill(Player, 1829443087) then -- Inquisitions/Inquisitor
  204. RemoveSkill(Player, 1829443087)
  205. end
  206. if HasSkill(Player, 3282420779) then -- Archegenesis/Druid
  207. RemoveSkill(Player, 3282420779)
  208. end
  209. if HasSkill(Player, 1624274802) then -- Nature's Reckoning/Fury
  210. RemoveSkill(Player, 1624274802)
  211. end
  212. if HasSkill(Player, 1040683335) then -- Nature's Refuge/Warden
  213. RemoveSkill(Player, 1040683335)
  214. end
  215. if HasSkill(Player, 3343700951) then -- Talismans/Shaman
  216. RemoveSkill(Player, 3343700951)
  217. end
  218. if HasSkill(Player, 3467160477) then -- Fetichisms/Mystic
  219. RemoveSkill(Player, 3467160477)
  220. end
  221. if HasSkill(Player, 3191839982) then -- Vehemence/Defiler
  222. RemoveSkill(Player, 3191839982)
  223. end
  224. --Removed Mage for Fighter
  225. if HasSkill(Player, 3820670534) then -- Evocations/Mage
  226. RemoveSkill(Player, 3820670534)
  227. end
  228. if HasSkill(Player, 287643040) then -- Enchantments/Enchanter
  229. RemoveSkill(Player, 287643040)
  230. end
  231. if HasSkill(Player, 2898101972) then -- Hallucinations/Illusionist
  232. RemoveSkill(Player, 2898101972)
  233. end
  234. if HasSkill(Player, 2950599749) then -- Protean/Coecerer
  235. RemoveSkill(Player, 2950599749)
  236. end
  237. if HasSkill(Player, 2533124061) then -- Sorcery/Sorcerer
  238. RemoveSkill(Player, 2533124061)
  239. end
  240. if HasSkill(Player, 2662430630) then -- Elemental Mastery/Wizard
  241. RemoveSkill(Player, 2662430630)
  242. end
  243. if HasSkill(Player, 193411854) then -- Noctivagance/Warlock
  244. RemoveSkill(Player, 193411854)
  245. end
  246. if HasSkill(Player, 2120065377) then -- Legerdemain/Summoner
  247. RemoveSkill(Player, 2120065377)
  248. end
  249. if HasSkill(Player, 2042842194) then -- Conjurations/Conjurer
  250. RemoveSkill(Player, 2042842194)
  251. end
  252. if HasSkill(Player, 289471519) then -- Sepulchers/Necromancer
  253. RemoveSkill(Player, 289471519)
  254. end
  255. --REMOVED WEAPON
  256. if not HasSkill(Player, 540022425) then -- Parry
  257. RemoveSkill(Player, 540022425)
  258. end
  259. if HasSkill(Player, 241174330) then -- Heavy Armor
  260. RemoveSkill(Player, 241174330)
  261. end
  262. if HasSkill(Player, 3173504370) then -- Roundshield
  263. RemoveSkill(Player, 3173504370)
  264. end
  265. if HasSkill(Player, 2608320658) then -- Kite Shield
  266. RemoveSkill(Player, 2608320658)
  267. end
  268. if HasSkill(Player, 2476073427) then -- Axe
  269. RemoveSkill(Player, 2476073427)
  270. end
  271. if HasSkill(Player, 2954459351) then -- Great Axe
  272. RemoveSkill(Player, 2954459351)
  273. end
  274. if not HasSkill(Player, 1696217328) then -- Sword
  275. RemoveSkill(Player, 1696217328)
  276. end
  277. if not HasSkill(Player, 2292577688) then -- Great Sword
  278. RemoveSkill(Player, 2292577688)
  279. end
  280. if HasSkill(Player, 540022425) then -- Parry
  281. RemoveSkill(Player, 540022425)
  282. end
  283. if HasSkill(Player, 1553857724) then -- Investigation
  284. RemoveSkill(Player, 1553857724)
  285. end
  286. if HasSkill(Player, 3429135390) then -- Mystical Destruction
  287. RemoveSkill(Player, 3429135390)
  288. end
  289. if HasSkill(Player, 2200201799) then -- Disarm Trap
  290. RemoveSkill(Player, 2200201799)
  291. end
  292. if HasSkill(Player, 366253016) then --Ministration
  293. RemoveSkill(Player, 366253016)
  294. end
  295. if HasSkill(Player, 613995491) then -- Disruption
  296. RemoveSkill(Player, 613995491)
  297. end
  298. if HasSkill(Player, 882983852) then -- Subjigation
  299. RemoveSkill(Player, 882983852)
  300. end
  301. if HasSkill(Player, 3587918036) then -- Ordination
  302. RemoveSkill(Player, 3587918036)
  303. end
  304. end
  305. UpdateQuestDescription(Quest, "One by one, I've faced the opponents brought before me. One by one, they have fallen before me. I have proved myself worthy of becoming a brawler.")
  306. GiveQuestReward(Quest, Player)
  307. end
  308. function Reload(Quest, QuestGiver, Player, Step)
  309. if Step == 1 then
  310. Step1Complete(Quest, QuestGiver, Player)
  311. elseif Step == 2 then
  312. Step2Complete(Quest, QuestGiver, Player)
  313. elseif Step == 3 then
  314. Step3Complete(Quest, QuestGiver, Player)
  315. elseif Step == 4 then
  316. Step4Complete(Quest, QuestGiver, Player)
  317. elseif Step == 5 then
  318. QuestComplete(Quest, QuestGiver, Player)
  319. end
  320. end