path_of_the_crusader.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. --[[
  2. Script Name : Quests/Hallmark/path_of_the_crusader.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.07 03:12:29
  5. Script Purpose : QEYNOS CRUSADER 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. AddQuestStep(Quest, 1, "I must defeat the brigands and free the villager from a house in the Harbor.", 1, 100, "I must rescue the villager from the brigands in the Qeynos Harbor.", 11)
  14. AddQuestStepCompleteAction(Quest, 1, "QuestComplete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. Dialog.New(QuestGiver, Player)
  19. Dialog.AddDialog("Prove to me that you've got the courage and conviction to stand up for others when they cannot stand up for themselves. I heard that some outsider thugs are holed up in Qeynos Harbor, and that they've got one of our citizens as a prisoner. If you can rescue him, you'll earn the title of crusader.")
  20. PlayFlavor(QuestGiver, "", "", "nod", 0, 0, Player)
  21. Dialog.AddOption("Thank you, Dagorel. I won't forget your lessons.")
  22. Dialog.Start()
  23. if GetQuestStep(Player,5878)==1 then
  24. QuestStepIsComplete(Player,5878,1)
  25. end
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. -- Add dialog here for when the quest is declined
  29. end
  30. function Deleted(Quest, QuestGiver, Player)
  31. -- Remove any quest specific items here when the quest is deleted
  32. end
  33. function QuestComplete(Quest, QuestGiver, Player)
  34. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  35. UpdateQuestStepDescription(Quest, 1, "I've defeated the brigands and freed the villager.")
  36. UpdateQuestTaskGroupDescription(Quest, 1, "I've defeated the thugs holding the villager hostage and set her free.")
  37. if GetClass(Player)== 1 then
  38. SetAdventureClass(Player,8)
  39. SetPlayerLevel(Player,10)
  40. SendMessage(Player, "Congratulations! You are a Crusader.","yellow")
  41. SendPopUpMessage(Player, "Congratulations! You are a Crusader.",250,250,200)
  42. ApplySpellVisual(Player, 324)
  43. PlaySound(Player, "sounds/test/endquest.wav", GetX(Player), GetY(Player), GetZ(Player), Player)
  44. local level = GetLevel(Player)*5
  45. if not HasSkill(Player, 1408356869) then -- Martial
  46. AddSkill(Player, 1408356869,1,level)
  47. SendMessage(Player, "You have learned the Martial skill")
  48. end
  49. if not HasSkill(Player, 3809066846) then -- Faith/Crusader
  50. AddSkill(Player, 3809066846,1,level)
  51. SendMessage(Player, "You have learned the Faith skill")
  52. end
  53. if not HasSkill(Player, 3421494576) then -- Crushing
  54. AddSkill(Player, 3421494576,1,level)
  55. SendMessage(Player, "You have learned the Crushing skill")
  56. end
  57. if not HasSkill(Player, 418532101) then -- Slashing
  58. AddSkill(Player, 418532101,1,level)
  59. SendMessage(Player, "You have learned the Slashing skill")
  60. end
  61. if not HasSkill(Player, 3048574950) then -- Piercing
  62. AddSkill(Player, 3048574950,1,level)
  63. SendMessage(Player, "You have learned the Piercing skill")
  64. end
  65. if not HasSkill(Player, 2638198038) then -- Focus
  66. AddSkill(Player, 2638198038,1,level)
  67. SendMessage(Player, "You have learned the Focus skill")
  68. end
  69. if not HasSkill(Player, 613995491) then -- Disruption
  70. AddSkill(Player, 613995491,1,level)
  71. SendMessage(Player, "You have learned the Disruption skill")
  72. end
  73. if not HasSkill(Player, 366253016) then -- Ministration
  74. AddSkill(Player, 366253016,1,level)
  75. SendMessage(Player, "You have learned the Ministration skill")
  76. end
  77. if not HasSkill(Player, 3587918036) then -- Ordination
  78. AddSkill(Player, 3587918036,1,level)
  79. SendMessage(Player, "You have learned the Ordination skill")
  80. end
  81. if not HasSkill(Player, 882983852) then -- Subjugation
  82. AddSkill(Player, 882983852,1,level)
  83. SendMessage(Player, "You have learned the Subjugation skill")
  84. end
  85. --WEAPON SKILLS
  86. if not HasSkill(Player, 2897193374) then -- Light Armor
  87. AddSkill(Player, 2897193374,1,level)
  88. SendMessage(Player, "You are now more proficient with Light Armor")
  89. end
  90. if not HasSkill(Player, 2246237129) then -- Medium Armor
  91. AddSkill(Player, 2246237129,1,level)
  92. SendMessage(Player, "You are now more proficient with Medium Armor")
  93. end
  94. if not HasSkill(Player, 4037812502) then -- Buckler
  95. AddSkill(Player, 4037812502,1,level)
  96. SendMessage(Player, "You are now more proficient with a Buckler")
  97. end
  98. if not HasSkill(Player, 3173504370) then -- Roundshield
  99. AddSkill(Player, 3173504370,1,level)
  100. SendMessage(Player, "You are now more proficient with a Roundshield")
  101. end
  102. if not HasSkill(Player, 2608320658) then -- Kite Shield
  103. AddSkill(Player, 2608320658,1,level)
  104. SendMessage(Player, "You are now more proficient with a Kite Shield")
  105. end
  106. if not HasSkill(Player, 1696217328) then -- Sword
  107. AddSkill(Player, 1696217328,1,level)
  108. SendMessage(Player, "You are now more proficient with a Sword")
  109. end
  110. if not HasSkill(Player, 2292577688) then -- Great Sword
  111. AddSkill(Player, 2292577688,1,level)
  112. SendMessage(Player, "You are now more proficient with a Great Sword")
  113. end
  114. if not HasSkill(Player, 770311065) then -- Mace
  115. AddSkill(Player, 770311065,1,level)
  116. SendMessage(Player, "You are now more proficient with a Mace")
  117. end
  118. if not HasSkill(Player, 554333641) then -- Hammer
  119. AddSkill(Player, 554333641,1,level)
  120. SendMessage(Player, "You are now more proficient with a Hammer")
  121. end
  122. if not HasSkill(Player, 1653482350) then -- Great Hammer
  123. AddSkill(Player, 1653482350,1,level)
  124. SendMessage(Player, "You are now more proficient with a Great Hammer")
  125. end
  126. --REMOVED SKILLS
  127. --Removed Advance Fighter
  128. if HasSkill(Player, 1124719197) then -- Tactics/Warrior
  129. RemoveSkill(Player, 1124719197)
  130. end
  131. if HasSkill(Player, 433335062) then -- Berserk/Berserker
  132. RemoveSkill(Player, 433335062)
  133. end
  134. if HasSkill(Player, 1209716810) then -- Protection/Guardian
  135. RemoveSkill(Player, 1209716810)
  136. end
  137. if HasSkill(Player, 3856706740) then -- Brawl/Brawling
  138. RemoveSkill(Player, 3856706740)
  139. end
  140. if HasSkill(Player, 2011726342) then -- Tranquility/Monk
  141. RemoveSkill(Player, 2011726342)
  142. end
  143. if HasSkill(Player, 3067436248) then -- Physicality/Bruiser
  144. RemoveSkill(Player, 3067436248)
  145. end
  146. if HasSkill(Player, 3809066846) then -- Faith/Crusader
  147. RemoveSkill(Player, 3809066846)
  148. end
  149. if HasSkill(Player, 90523872) then -- Determined Faith/Paladin
  150. RemoveSkill(Player, 90523872)
  151. end
  152. if HasSkill(Player, 2741805322) then -- Determined Zeal/Shadowknight
  153. RemoveSkill(Player, 2741805322)
  154. end
  155. --Removed Scout for Fighter
  156. if HasSkill(Player, 1921433074) then -- Reconnaissance/Scout
  157. RemoveSkill(Player, 1921433074)
  158. end
  159. if HasSkill(Player, 1311635100) then -- Melodies/Bard
  160. RemoveSkill(Player, 1311635100)
  161. end
  162. if HasSkill(Player, 296246391) then -- Ballads/Troubador
  163. RemoveSkill(Player, 296246391)
  164. end
  165. if HasSkill(Player, 340921594) then -- Dirges/Dirge
  166. RemoveSkill(Player, 340921594)
  167. end
  168. if HasSkill(Player, 1514256692) then -- Skulldugery/Rogue
  169. RemoveSkill(Player, 1514256692)
  170. end
  171. if HasSkill(Player, 2663054519) then -- Swashbuckling/Swashbuckler
  172. RemoveSkill(Player, 2663054519)
  173. end
  174. if HasSkill(Player, 1519965519) then -- Banditry/Brigand
  175. RemoveSkill(Player, 1519965519)
  176. end
  177. if HasSkill(Player, 3167106577) then -- Stalking/Predator
  178. RemoveSkill(Player, 3167106577)
  179. end
  180. if HasSkill(Player, 1400160844) then -- Archery/Ranger
  181. RemoveSkill(Player, 1400160844)
  182. end
  183. if HasSkill(Player, 2711101135) then -- Assassination/Assassin
  184. RemoveSkill(Player, 2711101135)
  185. end
  186. --Removed Priest for Fighter
  187. if HasSkill(Player, 2463145248) then -- Inspirations/Priest
  188. RemoveSkill(Player, 2463145248)
  189. end
  190. if HasSkill(Player, 3341842907) then -- Theurgy/Cleric
  191. RemoveSkill(Player, 3341842907)
  192. end
  193. if HasSkill(Player, 2581053277) then -- Regimens/Templar
  194. RemoveSkill(Player, 2581053277)
  195. end
  196. if HasSkill(Player, 1829443087) then -- Inquisitions/Inquisitor
  197. RemoveSkill(Player, 1829443087)
  198. end
  199. if HasSkill(Player, 3282420779) then -- Archegenesis/Druid
  200. RemoveSkill(Player, 3282420779)
  201. end
  202. if HasSkill(Player, 1624274802) then -- Nature's Reckoning/Fury
  203. RemoveSkill(Player, 1624274802)
  204. end
  205. if HasSkill(Player, 1040683335) then -- Nature's Refuge/Warden
  206. RemoveSkill(Player, 1040683335)
  207. end
  208. if HasSkill(Player, 3343700951) then -- Talismans/Shaman
  209. RemoveSkill(Player, 3343700951)
  210. end
  211. if HasSkill(Player, 3467160477) then -- Fetichisms/Mystic
  212. RemoveSkill(Player, 3467160477)
  213. end
  214. if HasSkill(Player, 3191839982) then -- Vehemence/Defiler
  215. RemoveSkill(Player, 3191839982)
  216. end
  217. --Removed Mage for Fighter
  218. if HasSkill(Player, 3820670534) then -- Evocations/Mage
  219. RemoveSkill(Player, 3820670534)
  220. end
  221. if HasSkill(Player, 287643040) then -- Enchantments/Enchanter
  222. RemoveSkill(Player, 287643040)
  223. end
  224. if HasSkill(Player, 2898101972) then -- Hallucinations/Illusionist
  225. RemoveSkill(Player, 2898101972)
  226. end
  227. if HasSkill(Player, 2950599749) then -- Protean/Coecerer
  228. RemoveSkill(Player, 2950599749)
  229. end
  230. if HasSkill(Player, 2533124061) then -- Sorcery/Sorcerer
  231. RemoveSkill(Player, 2533124061)
  232. end
  233. if HasSkill(Player, 2662430630) then -- Elemental Mastery/Wizard
  234. RemoveSkill(Player, 2662430630)
  235. end
  236. if HasSkill(Player, 193411854) then -- Noctivagance/Warlock
  237. RemoveSkill(Player, 193411854)
  238. end
  239. if HasSkill(Player, 2120065377) then -- Legerdemain/Summoner
  240. RemoveSkill(Player, 2120065377)
  241. end
  242. if HasSkill(Player, 2042842194) then -- Conjurations/Conjurer
  243. RemoveSkill(Player, 2042842194)
  244. end
  245. if HasSkill(Player, 289471519) then -- Sepulchers/Necromancer
  246. RemoveSkill(Player, 289471519)
  247. end
  248. --REMOVED WEAPON
  249. if not HasSkill(Player, 540022425) then -- Parry
  250. RemoveSkill(Player, 540022425)
  251. end
  252. if HasSkill(Player, 241174330) then -- Heavy Armor
  253. RemoveSkill(Player, 241174330)
  254. end
  255. if HasSkill(Player, 3177806075) then -- Fists
  256. RemoveSkill(Player, 3177806075)
  257. end
  258. if HasSkill(Player, 2476073427) then -- Axe
  259. RemoveSkill(Player, 2476073427)
  260. end
  261. if HasSkill(Player, 2954459351) then -- Great Axe
  262. RemoveSkill(Player, 2954459351)
  263. end
  264. if HasSkill(Player, 540022425) then -- Parry
  265. RemoveSkill(Player, 540022425)
  266. end
  267. if HasSkill(Player, 3180399725) then -- Staff(2h)
  268. RemoveSkill(Player, 3180399725)
  269. end
  270. if HasSkill(Player, 1553857724) then -- Investigation
  271. RemoveSkill(Player, 1553857724)
  272. end
  273. if HasSkill(Player, 3429135390) then -- Mystical Destruction
  274. RemoveSkill(Player, 3429135390)
  275. end
  276. if HasSkill(Player, 2200201799) then -- Disarm Trap
  277. RemoveSkill(Player, 2200201799)
  278. end
  279. end
  280. UpdateQuestDescription(Quest, "I have rescued the frightened villager from the hands of a dangerous band of brigands, in the process proving to both myself and others that I fight for others and for what I believe in. I am now worthy of becoming a crusader.")
  281. GiveQuestReward(Quest, Player)
  282. end
  283. function Reload(Quest, QuestGiver, Player, Step)
  284. if Step == 1 then
  285. QuestComplete(Quest, QuestGiver, Player)
  286. end
  287. end