9
3

BrawlerCertificationPapers.lua 11 KB

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