path_of_the_sorcerer(Q).lua 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. --[[
  2. Script Name : Quests/Hallmark/path_of_the_sorcerer(Q).lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.06 07:11:55
  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 need to pass Magister Niksel's trial.", 1, 100, "I must pass Magister Niksel's trial in the testing room south of the mage tower in South Qeynos. The chamber is located at the top of the tower.", 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("We shall see. In this trial for aspiring sorcerers, you will face against the arcane creations from the Three-Tower's menagerie. They will each be translocated into the testing chamber, but also taken swiftly out once defeated. All for swift repairs, of course! Defeat these arcane guardians and you will have proven yourself in the art of sorcery.")
  20. PlayFlavor(QuestGiver, "", "", "agree", 0, 0, Player)
  21. Dialog.AddOption("Once I prove myself, should I find you?","GoodbyeSumm")
  22. Dialog.Start()
  23. if GetQuestStep(Player,5877)==1 then
  24. SetStepComplete(Player,5877,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 passed Magister Niksel's trial.")
  36. UpdateQuestTaskGroupDescription(Quest, 1, "I've passed Magister Niksel's trial.")
  37. if GetClass(Player)== 21 then
  38. SetAdventureClass(Player,22)
  39. SetPlayerLevel(Player,10)
  40. SendMessage(Player, "Congratulations! You are a Sorcerer.","yellow")
  41. SendPopUpMessage(Player, "Congratulations! You are a Sorcerer.",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. --WEAPON SKILLS
  46. if not HasSkill(Player, 3820670534) then -- Evocations/Mage
  47. AddSkill(Player, 3820670534,1,level)
  48. SendMessage(Player, "You have learned the Evocations skill")
  49. end
  50. if not HasSkill(Player, 2533124061) then -- Sorcery/Sorcerer
  51. AddSkill(Player, 2533124061,1,level)
  52. SendMessage(Player, "You have learned the Sorcery skill")
  53. end
  54. if not HasSkill(Player, 3421494576) then -- Crushing
  55. AddSkill(Player, 3421494576,1,level)
  56. SendMessage(Player, "You have learned the Crushing skill")
  57. end
  58. if not HasSkill(Player, 3048574950) then -- Piercing
  59. AddSkill(Player, 3048574950,1,level)
  60. SendMessage(Player, "You have learned the Piercing skill")
  61. end
  62. --CASTING SKILLS
  63. if not HasSkill(Player, 613995491) then -- Disruption
  64. AddSkill(Player, 613995491,1,level)
  65. SendMessage(Player, "You have learned the Disruption skill")
  66. end
  67. if not HasSkill(Player, 366253016) then -- Ministration
  68. AddSkill(Player, 366253016,1,level)
  69. SendMessage(Player, "You have learned the Ministration skill")
  70. end
  71. if not HasSkill(Player, 3587918036) then -- Ordination
  72. AddSkill(Player, 3587918036,1,level)
  73. SendMessage(Player, "You have learned the Ordination skill")
  74. end
  75. if not HasSkill(Player, 882983852) then -- Subjugation
  76. AddSkill(Player, 882983852,1,level)
  77. SendMessage(Player, "You have learned the Subjugation skill")
  78. end
  79. if not HasSkill(Player, 2638198038) then -- Focus
  80. AddSkill(Player, 2638198038,1,level)
  81. SendMessage(Player, "You have learned the Focus skill")
  82. end
  83. --WEAPON SKILLS
  84. if not HasSkill(Player, 545043066) then -- Symbol
  85. AddSkill(Player, 545043066,1,level)
  86. SendMessage(Player, "You are now more proficient with a Symbol")
  87. end
  88. if not HasSkill(Player, 887279616) then -- Dagger
  89. AddSkill(Player, 887279616,1,level)
  90. SendMessage(Player, "You are now more proficient with a Dagger")
  91. end
  92. if not HasSkill(Player, 3180399725) then -- Staff(2h)
  93. AddSkill(Player, 3180399725,1,level)
  94. SendMessage(Player, "You are now more proficient with a Staff")
  95. end
  96. --REMOVE SKILLS
  97. -- Remove Fighter
  98. if HasSkill(Player, 1408356869) then -- Martial/Fighter
  99. RemoveSkill(Player, 1408356869)
  100. end
  101. if HasSkill(Player, 1124719197) then -- Tactics/Warrior
  102. RemoveSkill(Player, 1124719197)
  103. end
  104. if HasSkill(Player, 433335062) then -- Berserk/Berserker
  105. RemoveSkill(Player, 433335062)
  106. end
  107. if HasSkill(Player, 1209716810) then -- Protection/Guardian
  108. RemoveSkill(Player, 1209716810)
  109. end
  110. if HasSkill(Player, 3856706740) then -- Brawl/Brawling
  111. RemoveSkill(Player, 3856706740)
  112. end
  113. if HasSkill(Player, 2011726342) then -- Tranquility/Monk
  114. RemoveSkill(Player, 2011726342)
  115. end
  116. if HasSkill(Player, 3067436248) then -- Physicality/Bruiser
  117. RemoveSkill(Player, 3067436248)
  118. end
  119. if HasSkill(Player, 3809066846) then -- Faith/Crusader
  120. RemoveSkill(Player, 3809066846)
  121. end
  122. if HasSkill(Player, 90523872) then -- Determined Faith/Paladin
  123. RemoveSkill(Player, 90523872)
  124. end
  125. if HasSkill(Player, 2741805322) then -- Determined Zeal/Shadowknight
  126. RemoveSkill(Player, 2741805322)
  127. end
  128. --Removed Advance Scout
  129. if HasSkill(Player, 1921433074) then -- Reconnaissance/Scout
  130. RemoveSkill(Player, 1921433074)
  131. end
  132. if HasSkill(Player, 1311635100) then -- Melodies/Bard
  133. RemoveSkill(Player, 1311635100)
  134. end
  135. if HasSkill(Player, 296246391) then -- Ballads/Troubador
  136. RemoveSkill(Player, 296246391)
  137. end
  138. if HasSkill(Player, 340921594) then -- Dirges/Dirge
  139. RemoveSkill(Player, 340921594)
  140. end
  141. if HasSkill(Player, 1514256692) then -- Skulldugery/Rogue
  142. RemoveSkill(Player, 1514256692)
  143. end
  144. if HasSkill(Player, 3167106577) then -- Stalking/Predator
  145. RemoveSkill(Player, 3167106577)
  146. end
  147. if HasSkill(Player, 2663054519) then -- Swashbuckling/Swashbuckler
  148. RemoveSkill(Player, 2663054519)
  149. end
  150. if HasSkill(Player, 1519965519) then -- Banditry/Brigand
  151. RemoveSkill(Player, 1519965519)
  152. end
  153. if HasSkill(Player, 1400160844) then -- Archery/Ranger
  154. RemoveSkill(Player, 1400160844)
  155. end
  156. if HasSkill(Player, 2711101135) then -- Assassination/Assassin
  157. RemoveSkill(Player, 2711101135)
  158. end
  159. --Removed Priest
  160. if HasSkill(Spawn, 2463145248) then -- Inspirations/Priest
  161. RemoveSkill(Spawn, 2463145248)
  162. end
  163. if HasSkill(Player, 3341842907) then -- Theurgy/Cleric
  164. RemoveSkill(Player, 3341842907)
  165. end
  166. if HasSkill(Player, 2581053277) then -- Regimens/Templar
  167. RemoveSkill(Player, 2581053277)
  168. end
  169. if HasSkill(Player, 1829443087) then -- Inquisitions/Inquisitor
  170. RemoveSkill(Player, 1829443087)
  171. end
  172. if HasSkill(Player, 3282420779) then -- Archegenesis/Druid
  173. RemoveSkill(Player, 3282420779)
  174. end
  175. if HasSkill(Player, 1624274802) then -- Nature's Reckoning/Fury
  176. RemoveSkill(Player, 1624274802)
  177. end
  178. if HasSkill(Player, 1040683335) then -- Nature's Refuge/Warden
  179. RemoveSkill(Player, 1040683335)
  180. end
  181. if HasSkill(Player, 3467160477) then -- Fetichisms/Mystic
  182. RemoveSkill(Player, 3467160477)
  183. end
  184. if HasSkill(Player, 3191839982) then -- Vehemence/Defiler
  185. RemoveSkill(Player, 3191839982)
  186. end
  187. --Removed Mage
  188. if HasSkill(Player, 287643040) then -- Enchantments/Enchanter
  189. RemoveSkill(Player, 287643040)
  190. end
  191. if HasSkill(Player, 2898101972) then -- Hallucinations/Illusionist
  192. RemoveSkill(Player, 2898101972)
  193. end
  194. if HasSkill(Player, 2950599749) then -- Protean/Coecerer
  195. RemoveSkill(Player, 2950599749)
  196. end
  197. if HasSkill(Player, 2662430630) then -- Elemental Mastery/Wizard
  198. RemoveSkill(Player, 2662430630)
  199. end
  200. if HasSkill(Player, 193411854) then -- Noctivagance/Warlock
  201. RemoveSkill(Player, 193411854)
  202. end
  203. if HasSkill(Player, 2120065377) then -- Legerdemain/Summoner
  204. RemoveSkill(Player, 2120065377)
  205. end
  206. if HasSkill(Player, 2042842194) then -- Conjurations/Conjurer
  207. RemoveSkill(Player, 2042842194)
  208. end
  209. if HasSkill(Player, 289471519) then -- Sepulchers/Necromancer
  210. RemoveSkill(Player, 289471519)
  211. end
  212. --REMOVE WEAPON
  213. if HasSkill(Player, 2246237129) then -- Medium Armor
  214. RemoveSkill(Player, 2246237129)
  215. end
  216. if HasSkill(Player, 241174330) then -- Heavy Armor
  217. RemoveSkill(Player, 241174330)
  218. end
  219. if HasSkill(Player, 770311065) then -- Mace
  220. RemoveSkill(Player, 770311065)
  221. end
  222. if HasSkill(Player, 3177806075) then -- Fists
  223. RemoveSkill(Player, 3177806075)
  224. end
  225. if HasSkill(Player, 1696217328) then -- Sword
  226. RemoveSkill(Player, 1696217328)
  227. end
  228. if HasSkill(Player, 2292577688) then -- Great Sword
  229. RemoveSkill(Player, 2292577688)
  230. end
  231. if HasSkill(Player, 2292577688) then -- Great Sword
  232. RemoveSkill(Player, 2292577688)
  233. end
  234. if HasSkill(Player, 2954459351) then -- Great Axe
  235. RemoveSkill(Player, 2954459351)
  236. end
  237. if HasSkill(Player, 1653482350) then -- Great Spear
  238. RemoveSkill(Player, 1653482350)
  239. end
  240. if HasSkill(Player, 3173504370) then -- Round Shield
  241. RemoveSkill(Player, 3173504370)
  242. end
  243. if HasSkill(Player, 2608320658) then -- Kite Shield
  244. RemoveSkill(Player, 2608320658)
  245. end
  246. if HasSkill(Player, 570458645) then -- Tower Shield
  247. RemoveSkill(Player, 570458645)
  248. end
  249. if HasSkill(Player, 4037812502) then -- Buckler
  250. RemoveSkill(Player, 4037812502)
  251. end
  252. end
  253. UpdateQuestDescription(Quest, "I passed the trial and will continue on my path as a sorcerer. I know that I cannot be reckless with my power, or these forces may overwhelm me.")
  254. GiveQuestReward(Quest, Player)
  255. end
  256. function Reload(Quest, QuestGiver, Player, Step)
  257. if Step == 1 then
  258. QuestComplete(Quest, QuestGiver, Player)
  259. end
  260. end