ClericCertificationPapers.lua 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. --[[
  2. Script Name : ItemScripts/ClericCertificationPapers.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.06.15 03:06:45
  5. Script Purpose :
  6. :
  7. --]]
  8. local Quest = 5848
  9. function examined(Item, Player)
  10. conversation = CreateConversation()
  11. if GetClass(Player)==0 or GetClass(Player)==11 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 \"Cleric\" if you signed it and are a Commoner or Priest.\n\nTHIS ACTION IS FINAL!\n\nRead further if you wish to become a Cleric.")
  19. end
  20. function Intro(Item, Player)
  21. conversation = CreateConversation()
  22. AddConversationOption(conversation, ""..GetName(Player).." the Cleric","Class")
  23. AddConversationOption(conversation, "[Put the certificate away]","CloseItemConversation")
  24. StartDialogConversation(conversation, 2, Item, Player, "-- OFFICIAL DOCUMENT --\n\n I, "..GetName(Player)..", am a Cleric 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 Cleric.")
  33. if GetClass(Player)== 11 or GetClass(Player)== 0 then
  34. SetAdventureClass(Player,12)
  35. local level = GetLevel(Player)*5
  36. --WEAPON SKILLS
  37. if not HasSkill(Player, 2463145248) then -- Inspirations
  38. AddSkill(Player, 2463145248,1,level)
  39. SendMessage(Player, "You have learned the Inspirations skill")
  40. end
  41. if not HasSkill(Player, 3341842907) then -- Theurgy/Cleric
  42. AddSkill(Player, 3341842907,1,level)
  43. SendMessage(Player, "You have learned the Theurgy skill")
  44. end
  45. if not HasSkill(Player, 3421494576) then -- Crushing
  46. AddSkill(Player, 3421494576,1,level)
  47. SendMessage(Player, "You have learned the Crushing skill")
  48. end
  49. --CASTING SKILLS
  50. if not HasSkill(Player, 613995491) then -- Disruption
  51. AddSkill(Player, 613995491,1,level)
  52. SendMessage(Player, "You have learned the Disruption skill")
  53. end
  54. if not HasSkill(Player, 366253016) then -- Ministration
  55. AddSkill(Player, 366253016,1,level)
  56. SendMessage(Player, "You have learned the Ministration skill")
  57. end
  58. if not HasSkill(Player, 3587918036) then -- Ordination
  59. AddSkill(Player, 3587918036,1,level)
  60. SendMessage(Player, "You have learned the Ordination skill")
  61. end
  62. if not HasSkill(Player, 882983852) then -- Subjugation
  63. AddSkill(Player, 882983852,1,level)
  64. SendMessage(Player, "You have learned the Subjugation skill")
  65. end
  66. if not HasSkill(Player, 2638198038) then -- Focus
  67. AddSkill(Player, 2638198038,1,level)
  68. SendMessage(Player, "You have learned the Focus skill")
  69. end
  70. --WEAPON SKILLS
  71. if not HasSkill(Player, 4037812502) then -- Buckler
  72. AddSkill(Player, 4037812502,1,level)
  73. SendMessage(Player, "You are now more proficient with a Buckler")
  74. end
  75. if not HasSkill(Player, 545043066) then -- Symbol
  76. AddSkill(Player, 545043066,1,level)
  77. SendMessage(Player, "You are now more proficient with a Symbol")
  78. end
  79. if not HasSkill(Player, 770311065) then -- Mace
  80. AddSkill(Player, 770311065,1,level)
  81. SendMessage(Player, "You are now more proficient with a Mace")
  82. end
  83. if not HasSkill(Player, 554333641) then -- Hammer
  84. AddSkill(Player, 554333641,1,level)
  85. SendMessage(Player, "You are now more proficient with a Hammer")
  86. end
  87. if not HasSkill(Player, 1653482350) then -- Great Hammer
  88. AddSkill(Player, 1653482350,1,level)
  89. SendMessage(Player, "You are now more proficient with a Great Hammer")
  90. end
  91. if not HasSkill(Player, 3180399725) then -- Staff(2h)
  92. AddSkill(Player, 3180399725,1,level)
  93. SendMessage(Player, "You are now more proficient with a Staff")
  94. end
  95. --REMOVE SKILLS
  96. -- Remove Fighter
  97. if HasSkill(Player, 1408356869) then -- Martial/Fighter
  98. RemoveSkill(Player, 1408356869)
  99. end
  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, 3856706740) then -- Brawl/Brawling
  110. RemoveSkill(Player, 3856706740)
  111. end
  112. if HasSkill(Player, 2011726342) then -- Tranquility/Monk
  113. RemoveSkill(Player, 2011726342)
  114. end
  115. if HasSkill(Player, 3067436248) then -- Physicality/Bruiser
  116. RemoveSkill(Player, 3067436248)
  117. end
  118. if HasSkill(Player, 3809066846) then -- Faith/Crusader
  119. RemoveSkill(Player, 3809066846)
  120. end
  121. if HasSkill(Player, 90523872) then -- Determined Faith/Paladin
  122. RemoveSkill(Player, 90523872)
  123. end
  124. if HasSkill(Player, 2741805322) then -- Determined Zeal/Shadowknight
  125. RemoveSkill(Player, 2741805322)
  126. end
  127. --Remove Scout
  128. if HasSkill(Player, 1921433074) then -- Reconnaissance/Scout
  129. RemoveSkill(Player, 1921433074)
  130. end
  131. if HasSkill(Player, 1311635100) then -- Melodies/Bard
  132. RemoveSkill(Player, 1311635100)
  133. end
  134. if HasSkill(Player, 296246391) then -- Ballads/Troubador
  135. RemoveSkill(Player, 296246391)
  136. end
  137. if HasSkill(Player, 340921594) then -- Dirges/Dirge
  138. RemoveSkill(Player, 340921594)
  139. end
  140. if HasSkill(Player, 1514256692) then -- Skulldugery/Rogue
  141. RemoveSkill(Player, 1514256692)
  142. end
  143. if HasSkill(Player, 3167106577) then -- Stalking/Predator
  144. RemoveSkill(Player, 3167106577)
  145. end
  146. if HasSkill(Player, 2663054519) then -- Swashbuckling/Swashbuckler
  147. RemoveSkill(Player, 2663054519)
  148. end
  149. if HasSkill(Player, 1519965519) then -- Banditry/Brigand
  150. RemoveSkill(Player, 1519965519)
  151. end
  152. if HasSkill(Player, 1400160844) then -- Archery/Ranger
  153. RemoveSkill(Player, 1400160844)
  154. end
  155. if HasSkill(Player, 2711101135) then -- Assassination/Assassin
  156. RemoveSkill(Player, 2711101135)
  157. end
  158. --Removed Priest
  159. if HasSkill(Player, 2463145248) then -- Inspirations/Priest
  160. RemoveSkill(Player, 2463145248)
  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
  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. --REMOVE WEAPON
  218. if HasSkill(Player, 2246237129) then -- Medium Armor
  219. RemoveSkill(Player, 2246237129)
  220. end
  221. if HasSkill(Player, 241174330) then -- Heavy Armor
  222. RemoveSkill(Player, 241174330)
  223. end
  224. if HasSkill(Player, 3177806075) then -- Fists
  225. RemoveSkill(Player, 3177806075)
  226. end
  227. if HasSkill(Player, 2292577688) then -- Great Sword
  228. RemoveSkill(Player, 2292577688)
  229. end
  230. if HasSkill(Player, 2954459351) then -- Great Axe
  231. RemoveSkill(Player, 2954459351)
  232. end
  233. if HasSkill(Player, 1653482350) then -- Great Spear
  234. RemoveSkill(Player, 1653482350)
  235. end
  236. if HasSkill(Player, 1616998748) then -- Spear
  237. RemoveSkill(Player, 1616998748)
  238. end
  239. if HasSkill(Player, 3173504370) then -- Round Shield
  240. RemoveSkill(Player, 3173504370)
  241. end
  242. if HasSkill(Player, 2608320658) then -- Kite Shield
  243. RemoveSkill(Player, 2608320658)
  244. end
  245. if HasSkill(Player, 570458645) then -- Tower Shield
  246. RemoveSkill(Player, 570458645)
  247. end
  248. SendMessage(Player, "Congratulations! You are a Cleric.","yellow")
  249. SendPopUpMessage(Player, "Congratulations! You are a Cleric.",250,250,200)
  250. ApplySpellVisual(Player, 324)
  251. PlaySound(Player, "sounds/test/endquest.wav", GetX(Player), GetY(Player), GetZ(Player), Player)
  252. SetPlayerLevel(Player,10)
  253. end
  254. end
  255. function QuestStart(Item,Player)
  256. OfferQuest(nil,Player,Quest)
  257. conversation = CreateConversation()
  258. AddConversationOption(conversation, "[Put the signed certificate away]","TaskDone")
  259. StartDialogConversation(conversation, 2, Item, Player, "The Shady Swashbuckler might have some gear I can use...")
  260. end
  261. function TaskDone(Item,Player)
  262. CloseItemConversation(Item,Player)
  263. if HasItem(Player,1001102) then
  264. RemoveItem(Player,1001102,1)
  265. end
  266. end