QeynosWarriorCertificationPapers.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. --[[
  2. Script Name : ItemScripts/QeynosWarriorCertificationPapers.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.06.11 06:06:43
  5. Script Purpose :
  6. :
  7. --]]
  8. function examined(Item, Player)
  9. conversation = CreateConversation()
  10. if GetClass(Player)==0 or GetClass(Player)==1 then
  11. AddConversationOption(conversation, "[Glance over the forms]","Intro")
  12. end
  13. AddConversationOption(conversation, "[Put the certificate away]","CloseItemConversation")
  14. StartDialogConversation(conversation, 2, Item, Player, "This certificate would make you a \"Warrior\" if you signed it and are a Commoner or Fighter.\n\nTHIS ACTION IS FINAL!\n\nRead further if you wish to become a Warrior.")
  15. end
  16. function Intro(Item, Player)
  17. conversation = CreateConversation()
  18. AddConversationOption(conversation, ""..GetName(Player).." the Warrior","Class")
  19. AddConversationOption(conversation, "[Put the certificate away]","CloseItemConversation")
  20. StartDialogConversation(conversation, 2, Item, Player, "-- OFFICIAL DOCUMENT --\n\n I, "..GetName(Player)..", am a Warrior as proof by trainer [illegible scribbles].\n\nSigned,")
  21. end
  22. function Class(Item, Player)
  23. conversation = CreateConversation()
  24. AddConversationOption(conversation, "[Put the signed certificate away]","TaskDone")
  25. StartDialogConversation(conversation, 2, Item, Player, "You are now known as \n\n"..GetName(Player).." the Warrior.")
  26. if GetClass(Player)== 1 or GetClass(Player)== 0 then
  27. SetAdventureClass(Player,2)
  28. local level = GetLevel(Player)*5
  29. if not HasSkill(Player, 1408356869) then -- Martial
  30. AddSkill(Player, 1408356869,1,level)
  31. SendMessage(Player, "You have learned the Martial skill")
  32. end
  33. if not HasSkill(Player, 1124719197) then -- Tactics/Warrior
  34. AddSkill(Player, 1124719197,1,level)
  35. SendMessage(Player, "You have learned the Tactics skill")
  36. end
  37. if not HasSkill(Player, 3421494576) then -- Crushing
  38. AddSkill(Player, 3421494576,1,level)
  39. SendMessage(Player, "You have learned the Crushing skill")
  40. end
  41. if not HasSkill(Player, 418532101) then -- Slashing
  42. AddSkill(Player, 418532101,1,level)
  43. SendMessage(Player, "You have learned the Slashing skill")
  44. end
  45. if not HasSkill(Player, 1756482397) then -- Ranged
  46. AddSkill(Player, 1756482397,1,level)
  47. SendMessage(Player, "You have learned the Ranged skill")
  48. end
  49. if not HasSkill(Player, 2650425026) then -- Thrown Weapon
  50. AddSkill(Player, 2650425026,1,level)
  51. SendMessage(Player, "You have learned the Thrown Weapon skill")
  52. end
  53. if not HasSkill(Player, 3048574950) then -- Piercing
  54. AddSkill(Player, 3048574950,1,level)
  55. SendMessage(Player, "You have learned the Piercing skill")
  56. end
  57. if not HasSkill(Player, 1852383242) then -- Dual Wield
  58. AddSkill(Player, 1852383242,1,level)
  59. SendMessage(Player, "You have learned the Dual Wield skill")
  60. end
  61. if not HasSkill(Player, 2638198038) then -- Focus
  62. AddSkill(Player, 2638198038,1,level)
  63. SendMessage(Player, "You have learned the Focus skill")
  64. end
  65. --WEAPON SKILLS
  66. if not HasSkill(Player, 2897193374) then -- Light Armor
  67. AddSkill(Player, 2897193374,1,level)
  68. SendMessage(Player, "You are now more proficient with Light Armor")
  69. end
  70. if HasSkill(Player, 2246237129) then -- Medium Armor
  71. AddSkill(Player, 2246237129,1,level)
  72. SendMessage(Player, "You are now more proficient with Medium Armor")
  73. end
  74. if not HasSkill(Player, 1743366740) then -- Bow
  75. AddSkill(Player, 1743366740,1,level)
  76. SendMessage(Player, "You are now more proficient with a Bow")
  77. end
  78. if not HasSkill(Player, 4037812502) then -- Buckler
  79. AddSkill(Player, 4037812502,1,level)
  80. SendMessage(Player, "You are now more proficient with a Buckler")
  81. end
  82. if not HasSkill(Player, 3173504370) then -- Roundshield
  83. AddSkill(Player, 3173504370,1,level)
  84. SendMessage(Player, "You are now more proficient with a Roundshield")
  85. end
  86. if not HasSkill(Player, 2476073427) then -- Axe
  87. AddSkill(Player, 2476073427,1,level)
  88. SendMessage(Player, "You are now more proficient with an Axe")
  89. end
  90. if not HasSkill(Player, 2954459351) then -- Great Axe
  91. AddSkill(Player, 2954459351,1,level)
  92. SendMessage(Player, "You are now more proficient with a Great Axe")
  93. end
  94. if not HasSkill(Player, 1696217328) then -- Sword
  95. AddSkill(Player, 1696217328,1,level)
  96. SendMessage(Player, "You are now more proficient with a Sword")
  97. end
  98. if not HasSkill(Player, 2292577688) then -- Great Sword
  99. AddSkill(Player, 2292577688,1,level)
  100. SendMessage(Player, "You are now more proficient with a Great Sword")
  101. end
  102. if not HasSkill(Player, 770311065) then -- Mace
  103. AddSkill(Player, 770311065,1,level)
  104. SendMessage(Player, "You are now more proficient with a Mace")
  105. end
  106. if not HasSkill(Player, 554333641) then -- Hammer
  107. AddSkill(Player, 554333641,1,level)
  108. SendMessage(Player, "You are now more proficient with a Hammer")
  109. end
  110. if not HasSkill(Player, 1653482350) then -- Great Hammer
  111. AddSkill(Player, 1653482350,1,level)
  112. SendMessage(Player, "You are now more proficient with a Great Hammer")
  113. end
  114. if not HasSkill(Player, 3180399725) then -- Staff(2h)
  115. AddSkill(Player, 3180399725,1,level)
  116. SendMessage(Player, "You are now more proficient with a Staff")
  117. end
  118. if not HasSkill(Player, 641561514) then -- Rapier
  119. AddSkill(Player, 641561514,1,level)
  120. SendMessage(Player, "You are now more proficient with a Rapier")
  121. end
  122. if not HasSkill(Player, 1616998748) then -- Spear
  123. AddSkill(Player, 1616998748,1,level)
  124. SendMessage(Player, "You are now more proficient with a Spear")
  125. end
  126. if not HasSkill(Player, 570458645) then -- Tower Shield
  127. AddSkill(Player, 570458645,1,level)
  128. SendMessage(Player, "You are now more proficient with a Tower Shield")
  129. end
  130. if not HasSkill(Player, 2608320658) then -- Kite Shield
  131. AddSkill(Player, 2608320658,1,level)
  132. SendMessage(Player, "You are now more proficient with a Kite Shield")
  133. end
  134. --REMOVED SKILLS
  135. --Removed Advance Fighter
  136. if HasSkill(Player, 433335062) then -- Berserk/Berserker
  137. RemoveSkill(Player, 433335062)
  138. end
  139. if HasSkill(Player, 1209716810) then -- Protection/Guardian
  140. RemoveSkill(Player, 1209716810)
  141. end
  142. if HasSkill(Player, 3856706740) then -- Brawl/Brawling
  143. RemoveSkill(Player, 3856706740)
  144. end
  145. if HasSkill(Player, 2011726342) then -- Tranquility/Monk
  146. RemoveSkill(Player, 2011726342)
  147. end
  148. if HasSkill(Player, 3067436248) then -- Physicality/Bruiser
  149. RemoveSkill(Player, 3067436248)
  150. end
  151. if HasSkill(Player, 3809066846) then -- Faith/Crusader
  152. RemoveSkill(Player, 3809066846)
  153. end
  154. if HasSkill(Player, 90523872) then -- Determined Faith/Paladin
  155. RemoveSkill(Player, 90523872)
  156. end
  157. if HasSkill(Player, 2741805322) then -- Determined Zeal/Shadowknight
  158. RemoveSkill(Player, 2741805322)
  159. end
  160. --Removed Scout for Fighter
  161. if HasSkill(Player, 1921433074) then -- Reconnaissance/Scout
  162. RemoveSkill(Player, 1921433074)
  163. end
  164. if HasSkill(Player, 1311635100) then -- Melodies/Bard
  165. RemoveSkill(Player, 1311635100)
  166. end
  167. if HasSkill(Player, 296246391) then -- Ballads/Troubador
  168. RemoveSkill(Player, 296246391)
  169. end
  170. if HasSkill(Player, 340921594) then -- Dirges/Dirge
  171. RemoveSkill(Player, 340921594)
  172. end
  173. if HasSkill(Player, 1514256692) then -- Skulldugery/Rogue
  174. RemoveSkill(Player, 1514256692)
  175. end
  176. if HasSkill(Player, 2663054519) then -- Swashbuckling/Swashbuckler
  177. RemoveSkill(Player, 2663054519)
  178. end
  179. if HasSkill(Player, 1519965519) then -- Banditry/Brigand
  180. RemoveSkill(Player, 1519965519)
  181. end
  182. if HasSkill(Player, 3167106577) then -- Stalking/Predator
  183. RemoveSkill(Player, 3167106577)
  184. end
  185. if HasSkill(Player, 1400160844) then -- Archery/Ranger
  186. RemoveSkill(Player, 1400160844)
  187. end
  188. if HasSkill(Player, 2711101135) then -- Assassination/Assassin
  189. RemoveSkill(Player, 2711101135)
  190. end
  191. --Removed Priest for Fighter
  192. if HasSkill(Player, 2463145248) then -- Inspirations/Priest
  193. RemoveSkill(Player, 2463145248)
  194. end
  195. if HasSkill(Player, 3341842907) then -- Theurgy/Cleric
  196. RemoveSkill(Player, 3341842907)
  197. end
  198. if HasSkill(Player, 2581053277) then -- Regimens/Templar
  199. RemoveSkill(Player, 2581053277)
  200. end
  201. if HasSkill(Player, 1829443087) then -- Inquisitions/Inquisitor
  202. RemoveSkill(Player, 1829443087)
  203. end
  204. if HasSkill(Player, 3282420779) then -- Archegenesis/Druid
  205. RemoveSkill(Player, 3282420779)
  206. end
  207. if HasSkill(Player, 1624274802) then -- Nature's Reckoning/Fury
  208. RemoveSkill(Player, 1624274802)
  209. end
  210. if HasSkill(Player, 1040683335) then -- Nature's Refuge/Warden
  211. RemoveSkill(Player, 1040683335)
  212. end
  213. if HasSkill(Player, 3343700951) then -- Talismans/Shaman
  214. RemoveSkill(Player, 3343700951)
  215. end
  216. if HasSkill(Player, 3467160477) then -- Fetichisms/Mystic
  217. RemoveSkill(Player, 3467160477)
  218. end
  219. if HasSkill(Player, 3191839982) then -- Vehemence/Defiler
  220. RemoveSkill(Player, 3191839982)
  221. end
  222. --Removed Mage for Fighter
  223. if HasSkill(Player, 3820670534) then -- Evocations/Mage
  224. RemoveSkill(Player, 3820670534)
  225. end
  226. if HasSkill(Player, 287643040) then -- Enchantments/Enchanter
  227. RemoveSkill(Player, 287643040)
  228. end
  229. if HasSkill(Player, 2898101972) then -- Hallucinations/Illusionist
  230. RemoveSkill(Player, 2898101972)
  231. end
  232. if HasSkill(Player, 2950599749) then -- Protean/Coecerer
  233. RemoveSkill(Player, 2950599749)
  234. end
  235. if HasSkill(Player, 2533124061) then -- Sorcery/Sorcerer
  236. RemoveSkill(Player, 2533124061)
  237. end
  238. if HasSkill(Player, 2662430630) then -- Elemental Mastery/Wizard
  239. RemoveSkill(Player, 2662430630)
  240. end
  241. if HasSkill(Player, 193411854) then -- Noctivagance/Warlock
  242. RemoveSkill(Player, 193411854)
  243. end
  244. if HasSkill(Player, 2120065377) then -- Legerdemain/Summoner
  245. RemoveSkill(Player, 2120065377)
  246. end
  247. if HasSkill(Player, 2042842194) then -- Conjurations/Conjurer
  248. RemoveSkill(Player, 2042842194)
  249. end
  250. if HasSkill(Player, 289471519) then -- Sepulchers/Necromancer
  251. RemoveSkill(Player, 289471519)
  252. end
  253. --REMOVED WEAPON
  254. if not HasSkill(Player, 540022425) then -- Parry
  255. RemoveSkill(Player, 540022425)
  256. end
  257. if HasSkill(Player, 241174330) then -- Heavy Armor
  258. RemoveSkill(Player, 241174330)
  259. end
  260. if HasSkill(Player, 3177806075) then -- Fists
  261. RemoveSkill(Player, 3177806075)
  262. end
  263. if HasSkill(Player, 540022425) then -- Parry
  264. RemoveSkill(Player, 540022425)
  265. end
  266. if HasSkill(Player, 1553857724) then -- Investigation
  267. RemoveSkill(Player, 1553857724)
  268. end
  269. if HasSkill(Player, 3429135390) then -- Mystical Destruction
  270. RemoveSkill(Player, 3429135390)
  271. end
  272. if HasSkill(Player, 2200201799) then -- Disarm Trap
  273. RemoveSkill(Player, 2200201799)
  274. end
  275. if HasSkill(Player, 366253016) then --Ministration
  276. RemoveSkill(Player, 366253016)
  277. end
  278. if HasSkill(Player, 613995491) then -- Disruption
  279. RemoveSkill(Player, 613995491)
  280. end
  281. if HasSkill(Player, 882983852) then -- Subjigation
  282. RemoveSkill(Player, 882983852)
  283. end
  284. if HasSkill(Player, 3587918036) then -- Ordination
  285. RemoveSkill(Player, 3587918036)
  286. end
  287. SendMessage(Player, "Congratulations! You are a Warrior.","yellow")
  288. SendPopUpMessage(Player, "Congratulations! You are a Warrior.",250,250,200)
  289. ApplySpellVisual(Player, 324)
  290. PlaySound(Player, "sounds/test/endquest.wav", GetX(Player), GetY(Player), GetZ(Player), Player)
  291. SetPlayerLevel(Player,10)
  292. end
  293. end
  294. function TaskDone(Item,Player)
  295. CloseItemConversation(Item,Player)
  296. if HasItem(Player,1001096) then
  297. RemoveItem(Player,1001096,1)
  298. end
  299. end