PredatorCertificationPapers.lua 12 KB

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