9
3

CrusaderCertificationPapers.lua 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. --[[
  2. Script Name : ItemScripts/CrusaderCertificationPapers.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.06.11 07:06:47
  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 \"Crusader\" if you signed it and are a Commoner or Fighter.\n\nTHIS ACTION IS FINAL!\n\nRead further if you wish to become a Crusader.")
  15. end
  16. function Intro(Item, Player)
  17. conversation = CreateConversation()
  18. AddConversationOption(conversation, ""..GetName(Player).." the Crusader","Class")
  19. AddConversationOption(conversation, "[Put the certificate away]","CloseItemConversation")
  20. StartDialogConversation(conversation, 2, Item, Player, "-- OFFICIAL DOCUMENT --\n\n I, "..GetName(Player)..", am a Crusader 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 Crusader.")
  26. if GetClass(Player)== 1 or GetClass(Player)== 0 then
  27. SetAdventureClass(Player,8)
  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, 3809066846) then -- Faith/Crusader
  34. AddSkill(Player, 3809066846,1,level)
  35. SendMessage(Player, "You have learned the Faith 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, 3048574950) then -- Piercing
  46. AddSkill(Player, 3048574950,1,level)
  47. SendMessage(Player, "You have learned the Piercing skill")
  48. end
  49. if not HasSkill(Player, 2638198038) then -- Focus
  50. AddSkill(Player, 2638198038,1,level)
  51. SendMessage(Player, "You have learned the Focus skill")
  52. end
  53. if not HasSkill(Player, 613995491) then -- Disruption
  54. AddSkill(Player, 613995491,1,level)
  55. SendMessage(Player, "You have learned the Disruption skill")
  56. end
  57. if not HasSkill(Player, 366253016) then -- Ministration
  58. AddSkill(Player, 366253016,1,level)
  59. SendMessage(Player, "You have learned the Ministration skill")
  60. end
  61. if not HasSkill(Player, 3587918036) then -- Ordination
  62. AddSkill(Player, 3587918036,1,level)
  63. SendMessage(Player, "You have learned the Ordination skill")
  64. end
  65. if not HasSkill(Player, 882983852) then -- Subjugation
  66. AddSkill(Player, 882983852,1,level)
  67. SendMessage(Player, "You have learned the Subjugation 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, 2246237129) then -- Medium Armor
  75. AddSkill(Player, 2246237129,1,level)
  76. SendMessage(Player, "You are now more proficient with Medium Armor")
  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, 2608320658) then -- Kite Shield
  87. AddSkill(Player, 2608320658,1,level)
  88. SendMessage(Player, "You are now more proficient with a Kite Shield")
  89. end
  90. if not HasSkill(Player, 1696217328) then -- Sword
  91. AddSkill(Player, 1696217328,1,level)
  92. SendMessage(Player, "You are now more proficient with a Sword")
  93. end
  94. if not HasSkill(Player, 2292577688) then -- Great Sword
  95. AddSkill(Player, 2292577688,1,level)
  96. SendMessage(Player, "You are now more proficient with a Great Sword")
  97. end
  98. if not HasSkill(Player, 770311065) then -- Mace
  99. AddSkill(Player, 770311065,1,level)
  100. SendMessage(Player, "You are now more proficient with a Mace")
  101. end
  102. if not HasSkill(Player, 554333641) then -- Hammer
  103. AddSkill(Player, 554333641,1,level)
  104. SendMessage(Player, "You are now more proficient with a Hammer")
  105. end
  106. if not HasSkill(Player, 1653482350) then -- Great Hammer
  107. AddSkill(Player, 1653482350,1,level)
  108. SendMessage(Player, "You are now more proficient with a Great Hammer")
  109. end
  110. --REMOVED SKILLS
  111. --Removed Advance Fighter
  112. if HasSkill(Player, 1124719197) then -- Tactics/Warrior
  113. RemoveSkill(Player, 1124719197)
  114. end
  115. if HasSkill(Player, 433335062) then -- Berserk/Berserker
  116. RemoveSkill(Player, 433335062)
  117. end
  118. if HasSkill(Player, 1209716810) then -- Protection/Guardian
  119. RemoveSkill(Player, 1209716810)
  120. end
  121. if HasSkill(Player, 3856706740) then -- Brawl/Brawling
  122. RemoveSkill(Player, 3856706740)
  123. end
  124. if HasSkill(Player, 2011726342) then -- Tranquility/Monk
  125. RemoveSkill(Player, 2011726342)
  126. end
  127. if HasSkill(Player, 3067436248) then -- Physicality/Bruiser
  128. RemoveSkill(Player, 3067436248)
  129. end
  130. if HasSkill(Player, 3809066846) then -- Faith/Crusader
  131. RemoveSkill(Player, 3809066846)
  132. end
  133. if HasSkill(Player, 90523872) then -- Determined Faith/Paladin
  134. RemoveSkill(Player, 90523872)
  135. end
  136. if HasSkill(Player, 2741805322) then -- Determined Zeal/Shadowknight
  137. RemoveSkill(Player, 2741805322)
  138. end
  139. --Removed Scout for Fighter
  140. if HasSkill(Player, 1921433074) then -- Reconnaissance/Scout
  141. RemoveSkill(Player, 1921433074)
  142. end
  143. if HasSkill(Player, 1311635100) then -- Melodies/Bard
  144. RemoveSkill(Player, 1311635100)
  145. end
  146. if HasSkill(Player, 296246391) then -- Ballads/Troubador
  147. RemoveSkill(Player, 296246391)
  148. end
  149. if HasSkill(Player, 340921594) then -- Dirges/Dirge
  150. RemoveSkill(Player, 340921594)
  151. end
  152. if HasSkill(Player, 1514256692) then -- Skulldugery/Rogue
  153. RemoveSkill(Player, 1514256692)
  154. end
  155. if HasSkill(Player, 2663054519) then -- Swashbuckling/Swashbuckler
  156. RemoveSkill(Player, 2663054519)
  157. end
  158. if HasSkill(Player, 1519965519) then -- Banditry/Brigand
  159. RemoveSkill(Player, 1519965519)
  160. end
  161. if HasSkill(Player, 3167106577) then -- Stalking/Predator
  162. RemoveSkill(Player, 3167106577)
  163. end
  164. if HasSkill(Player, 1400160844) then -- Archery/Ranger
  165. RemoveSkill(Player, 1400160844)
  166. end
  167. if HasSkill(Player, 2711101135) then -- Assassination/Assassin
  168. RemoveSkill(Player, 2711101135)
  169. end
  170. --Removed Priest for Fighter
  171. if HasSkill(Player, 2463145248) then -- Inspirations/Priest
  172. RemoveSkill(Player, 2463145248)
  173. end
  174. if HasSkill(Player, 3341842907) then -- Theurgy/Cleric
  175. RemoveSkill(Player, 3341842907)
  176. end
  177. if HasSkill(Player, 2581053277) then -- Regimens/Templar
  178. RemoveSkill(Player, 2581053277)
  179. end
  180. if HasSkill(Player, 1829443087) then -- Inquisitions/Inquisitor
  181. RemoveSkill(Player, 1829443087)
  182. end
  183. if HasSkill(Player, 3282420779) then -- Archegenesis/Druid
  184. RemoveSkill(Player, 3282420779)
  185. end
  186. if HasSkill(Player, 1624274802) then -- Nature's Reckoning/Fury
  187. RemoveSkill(Player, 1624274802)
  188. end
  189. if HasSkill(Player, 1040683335) then -- Nature's Refuge/Warden
  190. RemoveSkill(Player, 1040683335)
  191. end
  192. if HasSkill(Player, 3343700951) then -- Talismans/Shaman
  193. RemoveSkill(Player, 3343700951)
  194. end
  195. if HasSkill(Player, 3467160477) then -- Fetichisms/Mystic
  196. RemoveSkill(Player, 3467160477)
  197. end
  198. if HasSkill(Player, 3191839982) then -- Vehemence/Defiler
  199. RemoveSkill(Player, 3191839982)
  200. end
  201. --Removed Mage for Fighter
  202. if HasSkill(Player, 3820670534) then -- Evocations/Mage
  203. RemoveSkill(Player, 3820670534)
  204. end
  205. if HasSkill(Player, 287643040) then -- Enchantments/Enchanter
  206. RemoveSkill(Player, 287643040)
  207. end
  208. if HasSkill(Player, 2898101972) then -- Hallucinations/Illusionist
  209. RemoveSkill(Player, 2898101972)
  210. end
  211. if HasSkill(Player, 2950599749) then -- Protean/Coecerer
  212. RemoveSkill(Player, 2950599749)
  213. end
  214. if HasSkill(Player, 2533124061) then -- Sorcery/Sorcerer
  215. RemoveSkill(Player, 2533124061)
  216. end
  217. if HasSkill(Player, 2662430630) then -- Elemental Mastery/Wizard
  218. RemoveSkill(Player, 2662430630)
  219. end
  220. if HasSkill(Player, 193411854) then -- Noctivagance/Warlock
  221. RemoveSkill(Player, 193411854)
  222. end
  223. if HasSkill(Player, 2120065377) then -- Legerdemain/Summoner
  224. RemoveSkill(Player, 2120065377)
  225. end
  226. if HasSkill(Player, 2042842194) then -- Conjurations/Conjurer
  227. RemoveSkill(Player, 2042842194)
  228. end
  229. if HasSkill(Player, 289471519) then -- Sepulchers/Necromancer
  230. RemoveSkill(Player, 289471519)
  231. end
  232. --REMOVED WEAPON
  233. if not HasSkill(Player, 540022425) then -- Parry
  234. RemoveSkill(Player, 540022425)
  235. end
  236. if HasSkill(Player, 241174330) then -- Heavy Armor
  237. RemoveSkill(Player, 241174330)
  238. end
  239. if HasSkill(Player, 3177806075) then -- Fists
  240. RemoveSkill(Player, 3177806075)
  241. end
  242. if HasSkill(Player, 2476073427) then -- Axe
  243. RemoveSkill(Player, 2476073427)
  244. end
  245. if HasSkill(Player, 2954459351) then -- Great Axe
  246. RemoveSkill(Player, 2954459351)
  247. end
  248. if HasSkill(Player, 540022425) then -- Parry
  249. RemoveSkill(Player, 540022425)
  250. end
  251. if HasSkill(Player, 3180399725) then -- Staff(2h)
  252. RemoveSkill(Player, 3180399725)
  253. end
  254. if HasSkill(Player, 1553857724) then -- Investigation
  255. RemoveSkill(Player, 1553857724)
  256. end
  257. if HasSkill(Player, 3429135390) then -- Mystical Destruction
  258. RemoveSkill(Player, 3429135390)
  259. end
  260. if HasSkill(Player, 2200201799) then -- Disarm Trap
  261. RemoveSkill(Player, 2200201799)
  262. end
  263. SendMessage(Player, "Congratulations! You are a Crusader.","yellow")
  264. SendPopUpMessage(Player, "Congratulations! You are a Crusader.",250,250,200)
  265. ApplySpellVisual(Player, 324)
  266. PlaySound(Player, "sounds/test/endquest.wav", GetX(Player), GetY(Player), GetZ(Player), Player)
  267. SetPlayerLevel(Player,10)
  268. end
  269. end
  270. function TaskDone(Item,Player)
  271. CloseItemConversation(Item,Player)
  272. if HasItem(Player,1001097) then
  273. RemoveItem(Player,1001097,1)
  274. end
  275. end