path_of_the_enchanter(Q).lua 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. --[[
  2. Script Name : Quests/Hallmark/path_of_the_enchanter(Q).lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.06 08:11:22
  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. AddQuestStepZoneLoc(Quest, 1, "I should look to the middle of the southern row of buildings in South Qeynos for the Wayfarer's Rest.", 5, "I must enter the Wayfarer's Rest in South Qeynos and take care of the disturbance.", 11,6.50, -0.15, 0.88,215)
  14. AddQuestStepCompleteAction(Quest, 1, "QuestStep1")
  15. end
  16. function QuestStep1(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I have entered the Wayfarer's Rest.")
  18. UpdateQuestTaskGroupDescription(Quest, 1, "I have entered the Wayfarer's Rest.")
  19. AddQuestStep(Quest, 2, "I need to discover and neutralize the cause of the brawl in the Wayfarer's Rest.", 1, 100, "I must practice 'Crowd Control' in the Wayfarer's Rest.", 11)
  20. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  21. end
  22. function Accepted(Quest, QuestGiver, Player)
  23. FaceTarget(QuestGiver, Player)
  24. Dialog.New(QuestGiver, Player)
  25. Dialog.AddDialog("You'll be an enchanter... yes... perhaps ... First, let's see how you deal with an angry crowd. Not everyone is cut out to deal with the thought required behind this choice ... we need to make sure that you are.")
  26. PlayFlavor(QuestGiver, "", "", "agree", 0, 0, Player)
  27. Dialog.AddOption("Alright. I'll deal with the crowd.","GoodbyeEnch")
  28. Dialog.Start()
  29. if GetQuestStep(Player,5877)==1 then
  30. SetStepComplete(Player,5877,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 QuestComplete(Quest, QuestGiver, Player)
  40. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  41. UpdateQuestStepDescription(Quest, 2, "I have taken care of the disturbance in the Wayfarer's Rest.")
  42. UpdateQuestTaskGroupDescription(Quest, 2, "I have taken care of the disturbance for Niksel and proven myself as an enchanter.")
  43. if GetClass(Player)== 21 then
  44. SetAdventureClass(Player,25)
  45. SetPlayerLevel(Player,10)
  46. SendMessage(Player, "Congratulations! You are an Enchanter.","yellow")
  47. SendPopUpMessage(Player, "Congratulations! You are an Enchanter.",250,250,200)
  48. ApplySpellVisual(Player, 324)
  49. PlaySound(Player, "sounds/test/endquest.wav", GetX(Player), GetY(Player), GetZ(Player), Player)
  50. local level = GetLevel(Player)*5
  51. --WEAPON SKILLS
  52. if not HasSkill(Player, 3820670534) then -- Evocations/Mage
  53. AddSkill(Player, 3820670534,1,level)
  54. SendMessage(Player, "You have learned the Evocations skill")
  55. end
  56. if not HasSkill(Player, 287643040) then -- Enchantments/Enchanter
  57. AddSkill(Player, 287643040,1,level)
  58. SendMessage(Player, "You have learned the Enchantments skill")
  59. end
  60. if not HasSkill(Player, 3421494576) then -- Crushing
  61. AddSkill(Player, 3421494576,1,level)
  62. SendMessage(Player, "You have learned the Crushing skill")
  63. end
  64. if not HasSkill(Player, 3048574950) then -- Piercing
  65. AddSkill(Player, 3048574950,1,level)
  66. SendMessage(Player, "You have learned the Piercing skill")
  67. end
  68. --CASTING SKILLS
  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. if not HasSkill(Player, 2638198038) then -- Focus
  86. AddSkill(Player, 2638198038,1,level)
  87. SendMessage(Player, "You have learned the Focus skill")
  88. end
  89. --WEAPON SKILLS
  90. if not HasSkill(Player, 545043066) then -- Symbol
  91. AddSkill(Player, 545043066,1,level)
  92. SendMessage(Player, "You are now more proficient with a Symbol")
  93. end
  94. if not HasSkill(Player, 887279616) then -- Dagger
  95. AddSkill(Player, 887279616,1,level)
  96. SendMessage(Player, "You are now more proficient with a Dagger")
  97. end
  98. if not HasSkill(Player, 3180399725) then -- Staff(2h)
  99. AddSkill(Player, 3180399725,1,level)
  100. SendMessage(Player, "You are now more proficient with a Staff")
  101. end
  102. --REMOVE SKILLS
  103. -- Removed Fighter
  104. if HasSkill(Player, 1408356869) then -- Martial/Fighter
  105. RemoveSkill(Player, 1408356869)
  106. end
  107. if HasSkill(Player, 1124719197) then -- Tactics/Warrior
  108. RemoveSkill(Player, 1124719197)
  109. end
  110. if HasSkill(Player, 433335062) then -- Berserk/Berserker
  111. RemoveSkill(Player, 433335062)
  112. end
  113. if HasSkill(Player, 1209716810) then -- Protection/Guardian
  114. RemoveSkill(Player, 1209716810)
  115. end
  116. if HasSkill(Player, 3856706740) then -- Brawl/Brawling
  117. RemoveSkill(Player, 3856706740)
  118. end
  119. if HasSkill(Player, 2011726342) then -- Tranquility/Monk
  120. RemoveSkill(Player, 2011726342)
  121. end
  122. if HasSkill(Player, 3067436248) then -- Physicality/Bruiser
  123. RemoveSkill(Player, 3067436248)
  124. end
  125. if HasSkill(Player, 3809066846) then -- Faith/Crusader
  126. RemoveSkill(Player, 3809066846)
  127. end
  128. if HasSkill(Player, 90523872) then -- Determined Faith/Paladin
  129. RemoveSkill(Player, 90523872)
  130. end
  131. if HasSkill(Player, 2741805322) then -- Determined Zeal/Shadowknight
  132. RemoveSkill(Player, 2741805322)
  133. end
  134. --Removed Scout
  135. if HasSkill(Player, 1921433074) then -- Reconnaissance/Scout
  136. RemoveSkill(Player, 1921433074)
  137. end
  138. if HasSkill(Player, 1311635100) then -- Melodies/Bard
  139. RemoveSkill(Player, 1311635100)
  140. end
  141. if HasSkill(Player, 296246391) then -- Ballads/Troubador
  142. RemoveSkill(Player, 296246391)
  143. end
  144. if HasSkill(Player, 340921594) then -- Dirges/Dirge
  145. RemoveSkill(Player, 340921594)
  146. end
  147. if HasSkill(Player, 1514256692) then -- Skulldugery/Rogue
  148. RemoveSkill(Player, 1514256692)
  149. end
  150. if HasSkill(Player, 3167106577) then -- Stalking/Predator
  151. RemoveSkill(Player, 3167106577)
  152. end
  153. if HasSkill(Player, 2663054519) then -- Swashbuckling/Swashbuckler
  154. RemoveSkill(Player, 2663054519)
  155. end
  156. if HasSkill(Player, 1519965519) then -- Banditry/Brigand
  157. RemoveSkill(Player, 1519965519)
  158. end
  159. if HasSkill(Player, 1400160844) then -- Archery/Ranger
  160. RemoveSkill(Player, 1400160844)
  161. end
  162. if HasSkill(Player, 2711101135) then -- Assassination/Assassin
  163. RemoveSkill(Player, 2711101135)
  164. end
  165. --Removed Priest
  166. if HasSkill(Player, 2463145248) then -- Inspirations/Priest
  167. RemoveSkill(Player, 2463145248)
  168. end
  169. if HasSkill(Player, 3341842907) then -- Theurgy/Cleric
  170. RemoveSkill(Player, 3341842907)
  171. end
  172. if HasSkill(Player, 2581053277) then -- Regimens/Templar
  173. RemoveSkill(Player, 2581053277)
  174. end
  175. if HasSkill(Player, 1829443087) then -- Inquisitions/Inquisitor
  176. RemoveSkill(Player, 1829443087)
  177. end
  178. if HasSkill(Player, 3282420779) then -- Archegenesis/Druid
  179. RemoveSkill(Player, 3282420779)
  180. end
  181. if HasSkill(Player, 1624274802) then -- Nature's Reckoning/Fury
  182. RemoveSkill(Player, 1624274802)
  183. end
  184. if HasSkill(Player, 1040683335) then -- Nature's Refuge/Warden
  185. RemoveSkill(Player, 1040683335)
  186. end
  187. if HasSkill(Player, 3467160477) then -- Fetichisms/Mystic
  188. RemoveSkill(Player, 3467160477)
  189. end
  190. if HasSkill(Player, 3191839982) then -- Vehemence/Defiler
  191. RemoveSkill(Player, 3191839982)
  192. end
  193. --Removed Mage
  194. if HasSkill(Player, 2898101972) then -- Hallucinations/Illusionist
  195. RemoveSkill(Player, 2898101972)
  196. end
  197. if HasSkill(Player, 2950599749) then -- Protean/Coecerer
  198. RemoveSkill(Player, 2950599749)
  199. end
  200. if HasSkill(Player, 2533124061) then -- Sorcery/Sorcerer
  201. RemoveSkill(Player, 2533124061)
  202. end
  203. if HasSkill(Player, 2662430630) then -- Elemental Mastery/Wizard
  204. RemoveSkill(Player, 2662430630)
  205. end
  206. if HasSkill(Player, 193411854) then -- Noctivagance/Warlock
  207. RemoveSkill(Player, 193411854)
  208. end
  209. if HasSkill(Player, 2120065377) then -- Legerdemain/Summoner
  210. RemoveSkill(Player, 2120065377)
  211. end
  212. if HasSkill(Player, 2042842194) then -- Conjurations/Conjurer
  213. RemoveSkill(Player, 2042842194)
  214. end
  215. if HasSkill(Player, 289471519) then -- Sepulchers/Necromancer
  216. RemoveSkill(Player, 289471519)
  217. end
  218. --REMOVE WEAPON
  219. if HasSkill(Player, 2246237129) then -- Medium Armor
  220. RemoveSkill(Player, 2246237129)
  221. end
  222. if HasSkill(Player, 241174330) then -- Heavy Armor
  223. RemoveSkill(Player, 241174330)
  224. end
  225. if HasSkill(Player, 770311065) then -- Mace
  226. RemoveSkill(Player, 770311065)
  227. end
  228. if HasSkill(Player, 3177806075) then -- Fists
  229. RemoveSkill(Player, 3177806075)
  230. end
  231. if HasSkill(Player, 1696217328) then -- Sword
  232. RemoveSkill(Player, 1696217328)
  233. end
  234. if HasSkill(Player, 2292577688) then -- Great Sword
  235. RemoveSkill(Player, 2292577688)
  236. end
  237. if HasSkill(Player, 2292577688) then -- Great Sword
  238. RemoveSkill(Player, 2292577688)
  239. end
  240. if HasSkill(Player, 2954459351) then -- Great Axe
  241. RemoveSkill(Player, 2954459351)
  242. end
  243. if HasSkill(Player, 1653482350) then -- Great Spear
  244. RemoveSkill(Player, 1653482350)
  245. end
  246. if HasSkill(Player, 3173504370) then -- Round Shield
  247. RemoveSkill(Player, 3173504370)
  248. end
  249. if HasSkill(Player, 2608320658) then -- Kite Shield
  250. RemoveSkill(Player, 2608320658)
  251. end
  252. if HasSkill(Player, 570458645) then -- Tower Shield
  253. RemoveSkill(Player, 570458645)
  254. end
  255. if HasSkill(Player, 545043066) then -- Symbol
  256. RemoveSkill(Player, 545043066)
  257. end
  258. if HasSkill(Player, 4037812502) then -- Buckler
  259. RemoveSkill(Player, 4037812502)
  260. end
  261. end
  262. UpdateQuestDescription(Quest, "After thinking about it rationally, I realized that there was no way for those tavern patrons to have been so upset. So naturally, I went to find the root of their animosity. Having done so, I find myself in a new role as an enchanter. I suppose I'll have much to learn.")
  263. GiveQuestReward(Quest, Player)
  264. end
  265. function Reload(Quest, QuestGiver, Player, Step)
  266. if Step == 1 then
  267. QuestStep1(Quest, QuestGiver, Player)
  268. elseif Step == 2 then
  269. QuestComplete(Quest, QuestGiver, Player)
  270. end
  271. end