Advertisement
Sarada-L2

Class Item Corrigido Yo: Sarada ^^

Nov 25th, 2020
680
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.54 KB | None | 0 0
  1. Index: net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  2.  
  3. -private static void ClassChangeCoin(Player player, String command)
  4. - {
  5. - String nameclasse = player.getTemplate().getClassName();
  6. -
  7. - String type = command;
  8. - if (type.equals("---SELECT---"))
  9. - {
  10. - NpcHtmlMessage html = new NpcHtmlMessage(0);
  11. - html.setFile("data/html/mods/class_changer/Class.htm");
  12. - player.sendPacket(html);
  13. - player.sendPacket(ActionFailed.STATIC_PACKET);
  14. - }
  15. - if (type.equals("Duelist"))
  16. - {
  17. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  18. - {
  19. - if (player.getClassId().getId() == 88)
  20. - {
  21. - player.sendMessage("Your class is already " + nameclasse + ".");
  22. - return;
  23. - }
  24. -
  25. - RemoverSkills(player);
  26. -
  27. - player.setClassId(88);
  28. - if (!player.isSubClassActive())
  29. - player.setBaseClass(88);
  30. -
  31. - Finish(player);
  32. - }
  33. - else
  34. - {
  35. - player.sendMessage("You dont have class card item!");
  36. - return;
  37. - }
  38. - }
  39. - if (type.equals("DreadNought"))
  40. - {
  41. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  42. - {
  43. - if (player.getClassId().getId() == 89)
  44. - {
  45. - player.sendMessage("Your class is already "+nameclasse+".");
  46. - return;
  47. - }
  48. -
  49. - RemoverSkills(player);
  50. -
  51. - player.setClassId(89);
  52. - if (!player.isSubClassActive())
  53. - player.setBaseClass(89);
  54. - Finish(player);
  55. - }
  56. - else
  57. - {
  58. - player.sendMessage("You dont have class card item!");
  59. - return;
  60. - }
  61. - }
  62. - if (type.equals("Phoenix_Knight"))
  63. - {
  64. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  65. - {
  66. - if (player.getClassId().getId() == 90)
  67. - {
  68. - player.sendMessage("Your class is already "+nameclasse+".");
  69. - return;
  70. - }
  71. -
  72. - RemoverSkills(player);
  73. -
  74. - player.setClassId(90);
  75. - if (!player.isSubClassActive())
  76. - player.setBaseClass(90);
  77. - Finish(player);
  78. - }
  79. - else
  80. - {
  81. - player.sendMessage("You dont have class card item!");
  82. - return;
  83. - }
  84. - }
  85. - if (type.equals("Hell_Knight"))
  86. - {
  87. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  88. - {
  89. - if (player.getClassId().getId() == 91)
  90. - {
  91. - player.sendMessage("Your class is already "+nameclasse+".");
  92. - return;
  93. - }
  94. -
  95. - RemoverSkills(player);
  96. -
  97. - player.setClassId(91);
  98. - if (!player.isSubClassActive())
  99. - player.setBaseClass(91);
  100. - Finish(player);
  101. - }
  102. - else
  103. - {
  104. - player.sendMessage("You dont have class card item!");
  105. - return;
  106. - }
  107. - }
  108. - if (type.equals("Sagittarius"))
  109. - {
  110. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  111. - {
  112. - if (player.getClassId().getId() == 92)
  113. - {
  114. - player.sendMessage("Your class is already "+nameclasse+".");
  115. - return;
  116. - }
  117. -
  118. - RemoverSkills(player);
  119. -
  120. - player.setClassId(92);
  121. - if (!player.isSubClassActive())
  122. - player.setBaseClass(92);
  123. - Finish(player);
  124. - }
  125. - else
  126. - {
  127. - player.sendMessage("You dont have class card item!");
  128. - return;
  129. - }
  130. - }
  131. - if (type.equals("Adventurer"))
  132. - {
  133. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  134. - {
  135. - if (player.getClassId().getId() == 93)
  136. - {
  137. - player.sendMessage("Your class is already "+nameclasse+".");
  138. - return;
  139. - }
  140. -
  141. - RemoverSkills(player);
  142. -
  143. - player.setClassId(93);
  144. - if (!player.isSubClassActive())
  145. - player.setBaseClass(93);
  146. - Finish(player);
  147. - }
  148. - else
  149. - {
  150. - player.sendMessage("You dont have class card item!");
  151. - return;
  152. - }
  153. - }
  154. - if (type.equals("Archmage"))
  155. - {
  156. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  157. - {
  158. - if (player.getClassId().getId() == 94)
  159. - {
  160. - player.sendMessage("Your class is already "+nameclasse+".");
  161. - return;
  162. - }
  163. -
  164. - RemoverSkills(player);
  165. -
  166. - player.setClassId(94);
  167. - if (!player.isSubClassActive())
  168. - player.setBaseClass(94);
  169. - Finish(player);
  170. - }
  171. - else
  172. - {
  173. - player.sendMessage("You dont have class card item!");
  174. - return;
  175. - }
  176. - }
  177. - if (type.equals("Soultaker"))
  178. - {
  179. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  180. - {
  181. - if (player.getClassId().getId() == 95)
  182. - {
  183. - player.sendMessage("Your class is already "+nameclasse+".");
  184. - return;
  185. - }
  186. -
  187. - RemoverSkills(player);
  188. -
  189. - player.setClassId(95);
  190. - if (!player.isSubClassActive())
  191. - player.setBaseClass(95);
  192. - Finish(player);
  193. - }
  194. - else
  195. - {
  196. - player.sendMessage("You dont have class card item!");
  197. - return;
  198. - }
  199. - }
  200. - if (type.equals("Arcana_Lord"))
  201. - {
  202. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  203. - {
  204. - if (player.getClassId().getId() == 96)
  205. - {
  206. - player.sendMessage("Your class is already "+nameclasse+".");
  207. - return;
  208. - }
  209. -
  210. - RemoverSkills(player);
  211. -
  212. - player.setClassId(96);
  213. - if (!player.isSubClassActive())
  214. - player.setBaseClass(96);
  215. - Finish(player);
  216. - }
  217. - else
  218. - {
  219. - player.sendMessage("You dont have class card item!");
  220. - return;
  221. - }
  222. - }
  223. - if (type.equals("Cardinal"))
  224. - {
  225. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  226. - {
  227. - if (player.getClassId().getId() == 97)
  228. - {
  229. - player.sendMessage("Your class is already "+nameclasse+".");
  230. - return;
  231. - }
  232. -
  233. - RemoverSkills(player);
  234. -
  235. - player.setClassId(97);
  236. - if (!player.isSubClassActive())
  237. - player.setBaseClass(97);
  238. - Finish(player);
  239. - }
  240. - else
  241. - {
  242. - player.sendMessage("You dont have class card item!");
  243. - return;
  244. - }
  245. - }
  246. - if (type.equals("Hierophant"))
  247. - {
  248. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  249. - {
  250. - if (player.getClassId().getId() == 98)
  251. - {
  252. - player.sendMessage("Your class is already "+nameclasse+".");
  253. - return;
  254. - }
  255. -
  256. - RemoverSkills(player);
  257. -
  258. - player.setClassId(98);
  259. - if (!player.isSubClassActive())
  260. - player.setBaseClass(98);
  261. - Finish(player);
  262. - }
  263. - else
  264. - {
  265. - player.sendMessage("You dont have class card item!");
  266. - return;
  267. - }
  268. - }
  269. - if (type.equals("Eva_Templar"))
  270. - {
  271. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  272. - {
  273. - if (player.getClassId().getId() == 99)
  274. - {
  275. - player.sendMessage("Your class is already "+nameclasse+".");
  276. - return;
  277. - }
  278. -
  279. - RemoverSkills(player);
  280. -
  281. - player.setClassId(99);
  282. - if (!player.isSubClassActive())
  283. - player.setBaseClass(99);
  284. - Finish(player);
  285. - }
  286. - else
  287. - {
  288. - player.sendMessage("You dont have class card item!");
  289. - return;
  290. - }
  291. - }
  292. - if (type.equals("Sword_Muse"))
  293. - {
  294. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  295. - {
  296. - if (player.getClassId().getId() == 100)
  297. - {
  298. - player.sendMessage("Your class is already "+nameclasse+".");
  299. - return;
  300. - }
  301. -
  302. - RemoverSkills(player);
  303. -
  304. - player.setClassId(100);
  305. - if (!player.isSubClassActive())
  306. - player.setBaseClass(100);
  307. - Finish(player);
  308. - }
  309. - else
  310. - {
  311. - player.sendMessage("You dont have class card item!");
  312. - return;
  313. - }
  314. - }
  315. - if (type.equals("Wind_Rider"))
  316. - {
  317. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  318. - {
  319. - if (player.getClassId().getId() == 101)
  320. - {
  321. - player.sendMessage("Your class is already "+nameclasse+".");
  322. - return;
  323. - }
  324. -
  325. - RemoverSkills(player);
  326. -
  327. - player.setClassId(101);
  328. - if (!player.isSubClassActive())
  329. - player.setBaseClass(101);
  330. - Finish(player);
  331. - }
  332. - else
  333. - {
  334. - player.sendMessage("You dont have class card item!");
  335. - return;
  336. - }
  337. - }
  338. - if (type.equals("Moonli_Sentinel"))
  339. - {
  340. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  341. - {
  342. - if (player.getClassId().getId() == 102)
  343. - {
  344. - player.sendMessage("Your class is already "+nameclasse+".");
  345. - return;
  346. - }
  347. -
  348. - RemoverSkills(player);
  349. -
  350. - player.setClassId(102);
  351. - if (!player.isSubClassActive())
  352. - player.setBaseClass(102);
  353. - Finish(player);
  354. - }
  355. - else
  356. - {
  357. - player.sendMessage("You dont have class card item!");
  358. - return;
  359. - }
  360. - }
  361. - if (type.equals("Mystic_Muse"))
  362. - {
  363. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  364. - {
  365. - if (player.getClassId().getId() == 103)
  366. - {
  367. - player.sendMessage("Your class is already "+nameclasse+".");
  368. - return;
  369. - }
  370. -
  371. - RemoverSkills(player);
  372. -
  373. - player.setClassId(103);
  374. - if (!player.isSubClassActive())
  375. - player.setBaseClass(103);
  376. - Finish(player);
  377. - }
  378. - else
  379. - {
  380. - player.sendMessage("You dont have class card item!");
  381. - return;
  382. - }
  383. - }
  384. - if (type.equals("Elemental_Master"))
  385. - {
  386. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  387. - {
  388. - if (player.getClassId().getId() == 104)
  389. - {
  390. - player.sendMessage("Your class is already "+nameclasse+".");
  391. - return;
  392. - }
  393. -
  394. - RemoverSkills(player);
  395. -
  396. - player.setClassId(104);
  397. - if (!player.isSubClassActive())
  398. - player.setBaseClass(104);
  399. - Finish(player);
  400. - }
  401. - else
  402. - {
  403. - player.sendMessage("You dont have class card item!");
  404. - return;
  405. - }
  406. - }
  407. - if (type.equals("Eva_Saint"))
  408. - {
  409. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  410. - {
  411. - if (player.getClassId().getId() == 105)
  412. - {
  413. - player.sendMessage("Your class is already "+nameclasse+".");
  414. - return;
  415. - }
  416. -
  417. - RemoverSkills(player);
  418. -
  419. - player.setClassId(105);
  420. - if (!player.isSubClassActive())
  421. - player.setBaseClass(105);
  422. - Finish(player);
  423. - }
  424. - else
  425. - {
  426. - player.sendMessage("You dont have class card item!");
  427. - return;
  428. - }
  429. - }
  430. - if (type.equals("Shillien_Templar"))
  431. - {
  432. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  433. - {
  434. - if (player.getClassId().getId() == 106)
  435. - {
  436. - player.sendMessage("Your class is already "+nameclasse+".");
  437. - return;
  438. - }
  439. -
  440. - RemoverSkills(player);
  441. -
  442. - player.setClassId(106);
  443. - if (!player.isSubClassActive())
  444. - player.setBaseClass(106);
  445. - Finish(player);
  446. - }
  447. - else
  448. - {
  449. - player.sendMessage("You dont have class card item!");
  450. - return;
  451. - }
  452. - }
  453. - if (type.equals("Spectral_Dancer"))
  454. - {
  455. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  456. - {
  457. - if (player.getClassId().getId() == 107)
  458. - {
  459. - player.sendMessage("Your class is already "+nameclasse+".");
  460. - return;
  461. - }
  462. -
  463. - RemoverSkills(player);
  464. -
  465. - player.setClassId(107);
  466. - if (!player.isSubClassActive())
  467. - player.setBaseClass(107);
  468. - Finish(player);
  469. - }
  470. - else
  471. - {
  472. - player.sendMessage("You dont have class card item!");
  473. - return;
  474. - }
  475. - }
  476. - if (type.equals("Ghost_Hunter"))
  477. - {
  478. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  479. - {
  480. - if (player.getClassId().getId() == 108)
  481. - {
  482. - player.sendMessage("Your class is already "+nameclasse+".");
  483. - return;
  484. - }
  485. -
  486. - RemoverSkills(player);
  487. -
  488. - player.setClassId(108);
  489. - if (!player.isSubClassActive())
  490. - player.setBaseClass(108);
  491. - Finish(player);
  492. - }
  493. - else
  494. - {
  495. - player.sendMessage("You dont have class card item!");
  496. - return;
  497. - }
  498. - }
  499. - if (type.equals("Ghost_Sentinel"))
  500. - {
  501. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  502. - {
  503. - if (player.getClassId().getId() == 109)
  504. - {
  505. - player.sendMessage("Your class is already "+nameclasse+".");
  506. - return;
  507. - }
  508. -
  509. - RemoverSkills(player);
  510. -
  511. - player.setClassId(109);
  512. - if (!player.isSubClassActive())
  513. - player.setBaseClass(109);
  514. - Finish(player);
  515. - }
  516. - else
  517. - {
  518. - player.sendMessage("You dont have class card item!");
  519. - return;
  520. - }
  521. - }
  522. - if (type.equals("Storm_Screamer"))
  523. - {
  524. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  525. - {
  526. - if (player.getClassId().getId() == 110)
  527. - {
  528. - player.sendMessage("Your class is already "+nameclasse+".");
  529. - return;
  530. - }
  531. -
  532. - RemoverSkills(player);
  533. -
  534. - player.setClassId(110);
  535. - if (!player.isSubClassActive())
  536. - player.setBaseClass(110);
  537. - Finish(player);
  538. - }
  539. - else
  540. - {
  541. - player.sendMessage("You dont have class card item!");
  542. - return;
  543. - }
  544. - }
  545. - if (type.equals("Spectral_Master"))
  546. - {
  547. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  548. - {
  549. - if (player.getClassId().getId() == 111)
  550. - {
  551. - player.sendMessage("Your class is already "+nameclasse+".");
  552. - return;
  553. - }
  554. -
  555. - RemoverSkills(player);
  556. -
  557. - player.setClassId(111);
  558. - if (!player.isSubClassActive())
  559. - player.setBaseClass(111);
  560. - Finish(player);
  561. - }
  562. - else
  563. - {
  564. - player.sendMessage("You dont have class card item!");
  565. - return;
  566. - }
  567. - }
  568. - if (type.equals("Shillen_Saint"))
  569. - {
  570. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  571. - {
  572. - if (player.getClassId().getId() == 112)
  573. - {
  574. - player.sendMessage("Your class is already "+nameclasse+".");
  575. - return;
  576. - }
  577. -
  578. - RemoverSkills(player);
  579. -
  580. - player.setClassId(112);
  581. - if (!player.isSubClassActive())
  582. - player.setBaseClass(112);
  583. - Finish(player);
  584. - }
  585. - else
  586. - {
  587. - player.sendMessage("You dont have class card item!");
  588. - return;
  589. - }
  590. - }
  591. - if (type.equals("Titan"))
  592. - {
  593. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  594. - {
  595. - if (player.getClassId().getId() == 113)
  596. - {
  597. - player.sendMessage("Your class is already "+nameclasse+".");
  598. - return;
  599. - }
  600. -
  601. - RemoverSkills(player);
  602. -
  603. - player.setClassId(113);
  604. - if (!player.isSubClassActive())
  605. - player.setBaseClass(113);
  606. - Finish(player);
  607. - }
  608. - else
  609. - {
  610. - player.sendMessage("You dont have class card item!");
  611. - return;
  612. - }
  613. - }
  614. - if (type.equals("Grand_Khauatari"))
  615. - {
  616. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  617. - {
  618. - if (player.getClassId().getId() == 114)
  619. - {
  620. - player.sendMessage("Your class is already "+nameclasse+".");
  621. - return;
  622. - }
  623. -
  624. - RemoverSkills(player);
  625. -
  626. - player.setClassId(114);
  627. - if (!player.isSubClassActive())
  628. - player.setBaseClass(114);
  629. - Finish(player);
  630. - }
  631. - else
  632. - {
  633. - player.sendMessage("You dont have class card item!");
  634. - return;
  635. - }
  636. - }
  637. - if (type.equals("Dominator"))
  638. - {
  639. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  640. - {
  641. - if (player.getClassId().getId() == 115)
  642. - {
  643. - player.sendMessage("Your class is already "+nameclasse+".");
  644. - return;
  645. - }
  646. -
  647. - RemoverSkills(player);
  648. -
  649. - player.setClassId(115);
  650. - if (!player.isSubClassActive())
  651. - player.setBaseClass(115);
  652. - Finish(player);
  653. - }
  654. - else
  655. - {
  656. - player.sendMessage("You dont have class card item!");
  657. - return;
  658. - }
  659. - }
  660. - if (type.equals("Doomcryer"))
  661. - {
  662. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  663. - {
  664. - if (player.getClassId().getId() == 116)
  665. - {
  666. - player.sendMessage("Your class is already "+nameclasse+".");
  667. - return;
  668. - }
  669. -
  670. - RemoverSkills(player);
  671. -
  672. - player.setClassId(116);
  673. - if (!player.isSubClassActive())
  674. - player.setBaseClass(116);
  675. - Finish(player);
  676. - }
  677. - else
  678. - {
  679. - player.sendMessage("You dont have class card item!");
  680. - return;
  681. - }
  682. - }
  683. - if (type.equals("Fortune_Seeker"))
  684. - {
  685. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  686. - {
  687. - if (player.getClassId().getId() == 117)
  688. - {
  689. - player.sendMessage("Your class is already "+nameclasse+".");
  690. - return;
  691. - }
  692. -
  693. - RemoverSkills(player);
  694. -
  695. - player.setClassId(117);
  696. - if (!player.isSubClassActive())
  697. - player.setBaseClass(117);
  698. - Finish(player);
  699. - }
  700. - else
  701. - {
  702. - player.sendMessage("You dont have class card item!");
  703. - return;
  704. - }
  705. - }
  706. - if (type.equals("Maestro"))
  707. - {
  708. - if (player.getInventory().getInventoryItemCount(9590, 0) >= 1)
  709. - {
  710. - if (player.getClassId().getId() == 118)
  711. - {
  712. - player.sendMessage("Your class is already "+nameclasse+".");
  713. - return;
  714. - }
  715. -
  716. - RemoverSkills(player);
  717. -
  718. - player.setClassId(118);
  719. - if (!player.isSubClassActive())
  720. - player.setBaseClass(118);
  721. - Finish(player);
  722. - }
  723. - else
  724. - {
  725. - player.sendMessage("You dont have class card item!");
  726. - return;
  727. - }
  728. - }
  729. - }
  730.  
  731.  
  732. +private static void ClassChangeCoin(Player player, String command)
  733. + {
  734. + String nameclasse = player.getTemplate().getClassName();
  735. +
  736. + String type = command;
  737. + if (type.equals("---SELECT---"))
  738. + {
  739. + NpcHtmlMessage html = new NpcHtmlMessage(0);
  740. + html.setFile("data/html/mods/class_changer/Class.htm");
  741. + player.sendPacket(html);
  742. + player.sendPacket(ActionFailed.STATIC_PACKET);
  743. + }
  744. + if (type.equals("Duelist"))
  745. + {
  746. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  747. + {
  748. + if (player.getClassId().getId() == 88)
  749. + {
  750. + player.sendMessage("Your class is already " + nameclasse + ".");
  751. + return;
  752. + }
  753. +
  754. + RemoverSkills(player);
  755. +
  756. + player.setClassId(88);
  757. + if (!player.isSubClassActive())
  758. + player.setBaseClass(88);
  759. +
  760. + Finish(player);
  761. + }
  762. + else
  763. + {
  764. + player.sendMessage("You dont have class card item!");
  765. + return;
  766. + }
  767. + }
  768. + if (type.equals("DreadNought"))
  769. + {
  770. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  771. + {
  772. + if (player.getClassId().getId() == 89)
  773. + {
  774. + player.sendMessage("Your class is already "+nameclasse+".");
  775. + return;
  776. + }
  777. +
  778. + RemoverSkills(player);
  779. +
  780. + player.setClassId(89);
  781. + if (!player.isSubClassActive())
  782. + player.setBaseClass(89);
  783. + Finish(player);
  784. + }
  785. + else
  786. + {
  787. + player.sendMessage("You dont have class card item!");
  788. + return;
  789. + }
  790. + }
  791. + if (type.equals("Phoenix_Knight"))
  792. + {
  793. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  794. + {
  795. + if (player.getClassId().getId() == 90)
  796. + {
  797. + player.sendMessage("Your class is already "+nameclasse+".");
  798. + return;
  799. + }
  800. +
  801. + RemoverSkills(player);
  802. +
  803. + player.setClassId(90);
  804. + if (!player.isSubClassActive())
  805. + player.setBaseClass(90);
  806. + Finish(player);
  807. + }
  808. + else
  809. + {
  810. + player.sendMessage("You dont have class card item!");
  811. + return;
  812. + }
  813. + }
  814. + if (type.equals("Hell_Knight"))
  815. + {
  816. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  817. + {
  818. + if (player.getClassId().getId() == 91)
  819. + {
  820. + player.sendMessage("Your class is already "+nameclasse+".");
  821. + return;
  822. + }
  823. +
  824. + RemoverSkills(player);
  825. +
  826. + player.setClassId(91);
  827. + if (!player.isSubClassActive())
  828. + player.setBaseClass(91);
  829. + Finish(player);
  830. + }
  831. + else
  832. + {
  833. + player.sendMessage("You dont have class card item!");
  834. + return;
  835. + }
  836. + }
  837. + if (type.equals("Sagittarius"))
  838. + {
  839. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  840. + {
  841. + if (player.getClassId().getId() == 92)
  842. + {
  843. + player.sendMessage("Your class is already "+nameclasse+".");
  844. + return;
  845. + }
  846. +
  847. + RemoverSkills(player);
  848. +
  849. + player.setClassId(92);
  850. + if (!player.isSubClassActive())
  851. + player.setBaseClass(92);
  852. + Finish(player);
  853. + }
  854. + else
  855. + {
  856. + player.sendMessage("You dont have class card item!");
  857. + return;
  858. + }
  859. + }
  860. + if (type.equals("Adventurer"))
  861. + {
  862. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  863. + {
  864. + if (player.getClassId().getId() == 93)
  865. + {
  866. + player.sendMessage("Your class is already "+nameclasse+".");
  867. + return;
  868. + }
  869. +
  870. + RemoverSkills(player);
  871. +
  872. + player.setClassId(93);
  873. + if (!player.isSubClassActive())
  874. + player.setBaseClass(93);
  875. + Finish(player);
  876. + }
  877. + else
  878. + {
  879. + player.sendMessage("You dont have class card item!");
  880. + return;
  881. + }
  882. + }
  883. + if (type.equals("Archmage"))
  884. + {
  885. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  886. + {
  887. + if (player.getClassId().getId() == 94)
  888. + {
  889. + player.sendMessage("Your class is already "+nameclasse+".");
  890. + return;
  891. + }
  892. +
  893. + RemoverSkills(player);
  894. +
  895. + player.setClassId(94);
  896. + if (!player.isSubClassActive())
  897. + player.setBaseClass(94);
  898. + Finish(player);
  899. + }
  900. + else
  901. + {
  902. + player.sendMessage("You dont have class card item!");
  903. + return;
  904. + }
  905. + }
  906. + if (type.equals("Soultaker"))
  907. + {
  908. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  909. + {
  910. + if (player.getClassId().getId() == 95)
  911. + {
  912. + player.sendMessage("Your class is already "+nameclasse+".");
  913. + return;
  914. + }
  915. +
  916. + RemoverSkills(player);
  917. +
  918. + player.setClassId(95);
  919. + if (!player.isSubClassActive())
  920. + player.setBaseClass(95);
  921. + Finish(player);
  922. + }
  923. + else
  924. + {
  925. + player.sendMessage("You dont have class card item!");
  926. + return;
  927. + }
  928. + }
  929. + if (type.equals("Arcana_Lord"))
  930. + {
  931. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  932. + {
  933. + if (player.getClassId().getId() == 96)
  934. + {
  935. + player.sendMessage("Your class is already "+nameclasse+".");
  936. + return;
  937. + }
  938. +
  939. + RemoverSkills(player);
  940. +
  941. + player.setClassId(96);
  942. + if (!player.isSubClassActive())
  943. + player.setBaseClass(96);
  944. + Finish(player);
  945. + }
  946. + else
  947. + {
  948. + player.sendMessage("You dont have class card item!");
  949. + return;
  950. + }
  951. + }
  952. + if (type.equals("Cardinal"))
  953. + {
  954. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  955. + {
  956. + if (player.getClassId().getId() == 97)
  957. + {
  958. + player.sendMessage("Your class is already "+nameclasse+".");
  959. + return;
  960. + }
  961. +
  962. + RemoverSkills(player);
  963. +
  964. + player.setClassId(97);
  965. + if (!player.isSubClassActive())
  966. + player.setBaseClass(97);
  967. + Finish(player);
  968. + }
  969. + else
  970. + {
  971. + player.sendMessage("You dont have class card item!");
  972. + return;
  973. + }
  974. + }
  975. + if (type.equals("Hierophant"))
  976. + {
  977. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  978. + {
  979. + if (player.getClassId().getId() == 98)
  980. + {
  981. + player.sendMessage("Your class is already "+nameclasse+".");
  982. + return;
  983. + }
  984. +
  985. + RemoverSkills(player);
  986. +
  987. + player.setClassId(98);
  988. + if (!player.isSubClassActive())
  989. + player.setBaseClass(98);
  990. + Finish(player);
  991. + }
  992. + else
  993. + {
  994. + player.sendMessage("You dont have class card item!");
  995. + return;
  996. + }
  997. + }
  998. + if (type.equals("Eva_Templar"))
  999. + {
  1000. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1001. + {
  1002. + if (player.getClassId().getId() == 99)
  1003. + {
  1004. + player.sendMessage("Your class is already "+nameclasse+".");
  1005. + return;
  1006. + }
  1007. +
  1008. + RemoverSkills(player);
  1009. +
  1010. + player.setClassId(99);
  1011. + if (!player.isSubClassActive())
  1012. + player.setBaseClass(99);
  1013. + Finish(player);
  1014. + }
  1015. + else
  1016. + {
  1017. + player.sendMessage("You dont have class card item!");
  1018. + return;
  1019. + }
  1020. + }
  1021. + if (type.equals("Sword_Muse"))
  1022. + {
  1023. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1024. + {
  1025. + if (player.getClassId().getId() == 100)
  1026. + {
  1027. + player.sendMessage("Your class is already "+nameclasse+".");
  1028. + return;
  1029. + }
  1030. +
  1031. + RemoverSkills(player);
  1032. +
  1033. + player.setClassId(100);
  1034. + if (!player.isSubClassActive())
  1035. + player.setBaseClass(100);
  1036. + Finish(player);
  1037. + }
  1038. + else
  1039. + {
  1040. + player.sendMessage("You dont have class card item!");
  1041. + return;
  1042. + }
  1043. + }
  1044. + if (type.equals("Wind_Rider"))
  1045. + {
  1046. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1047. + {
  1048. + if (player.getClassId().getId() == 101)
  1049. + {
  1050. + player.sendMessage("Your class is already "+nameclasse+".");
  1051. + return;
  1052. + }
  1053. +
  1054. + RemoverSkills(player);
  1055. +
  1056. + player.setClassId(101);
  1057. + if (!player.isSubClassActive())
  1058. + player.setBaseClass(101);
  1059. + Finish(player);
  1060. + }
  1061. + else
  1062. + {
  1063. + player.sendMessage("You dont have class card item!");
  1064. + return;
  1065. + }
  1066. + }
  1067. + if (type.equals("Moonli_Sentinel"))
  1068. + {
  1069. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1070. + {
  1071. + if (player.getClassId().getId() == 102)
  1072. + {
  1073. + player.sendMessage("Your class is already "+nameclasse+".");
  1074. + return;
  1075. + }
  1076. +
  1077. + RemoverSkills(player);
  1078. +
  1079. + player.setClassId(102);
  1080. + if (!player.isSubClassActive())
  1081. + player.setBaseClass(102);
  1082. + Finish(player);
  1083. + }
  1084. + else
  1085. + {
  1086. + player.sendMessage("You dont have class card item!");
  1087. + return;
  1088. + }
  1089. + }
  1090. + if (type.equals("Mystic_Muse"))
  1091. + {
  1092. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1093. + {
  1094. + if (player.getClassId().getId() == 103)
  1095. + {
  1096. + player.sendMessage("Your class is already "+nameclasse+".");
  1097. + return;
  1098. + }
  1099. +
  1100. + RemoverSkills(player);
  1101. +
  1102. + player.setClassId(103);
  1103. + if (!player.isSubClassActive())
  1104. + player.setBaseClass(103);
  1105. + Finish(player);
  1106. + }
  1107. + else
  1108. + {
  1109. + player.sendMessage("You dont have class card item!");
  1110. + return;
  1111. + }
  1112. + }
  1113. + if (type.equals("Elemental_Master"))
  1114. + {
  1115. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1116. + {
  1117. + if (player.getClassId().getId() == 104)
  1118. + {
  1119. + player.sendMessage("Your class is already "+nameclasse+".");
  1120. + return;
  1121. + }
  1122. +
  1123. + RemoverSkills(player);
  1124. +
  1125. + player.setClassId(104);
  1126. + if (!player.isSubClassActive())
  1127. + player.setBaseClass(104);
  1128. + Finish(player);
  1129. + }
  1130. + else
  1131. + {
  1132. + player.sendMessage("You dont have class card item!");
  1133. + return;
  1134. + }
  1135. + }
  1136. + if (type.equals("Eva_Saint"))
  1137. + {
  1138. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1139. + {
  1140. + if (player.getClassId().getId() == 105)
  1141. + {
  1142. + player.sendMessage("Your class is already "+nameclasse+".");
  1143. + return;
  1144. + }
  1145. +
  1146. + RemoverSkills(player);
  1147. +
  1148. + player.setClassId(105);
  1149. + if (!player.isSubClassActive())
  1150. + player.setBaseClass(105);
  1151. + Finish(player);
  1152. + }
  1153. + else
  1154. + {
  1155. + player.sendMessage("You dont have class card item!");
  1156. + return;
  1157. + }
  1158. + }
  1159. + if (type.equals("Shillien_Templar"))
  1160. + {
  1161. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1162. + {
  1163. + if (player.getClassId().getId() == 106)
  1164. + {
  1165. + player.sendMessage("Your class is already "+nameclasse+".");
  1166. + return;
  1167. + }
  1168. +
  1169. + RemoverSkills(player);
  1170. +
  1171. + player.setClassId(106);
  1172. + if (!player.isSubClassActive())
  1173. + player.setBaseClass(106);
  1174. + Finish(player);
  1175. + }
  1176. + else
  1177. + {
  1178. + player.sendMessage("You dont have class card item!");
  1179. + return;
  1180. + }
  1181. + }
  1182. + if (type.equals("Spectral_Dancer"))
  1183. + {
  1184. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1185. + {
  1186. + if (player.getClassId().getId() == 107)
  1187. + {
  1188. + player.sendMessage("Your class is already "+nameclasse+".");
  1189. + return;
  1190. + }
  1191. +
  1192. + RemoverSkills(player);
  1193. +
  1194. + player.setClassId(107);
  1195. + if (!player.isSubClassActive())
  1196. + player.setBaseClass(107);
  1197. + Finish(player);
  1198. + }
  1199. + else
  1200. + {
  1201. + player.sendMessage("You dont have class card item!");
  1202. + return;
  1203. + }
  1204. + }
  1205. + if (type.equals("Ghost_Hunter"))
  1206. + {
  1207. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1208. + {
  1209. + if (player.getClassId().getId() == 108)
  1210. + {
  1211. + player.sendMessage("Your class is already "+nameclasse+".");
  1212. + return;
  1213. + }
  1214. +
  1215. + RemoverSkills(player);
  1216. +
  1217. + player.setClassId(108);
  1218. + if (!player.isSubClassActive())
  1219. + player.setBaseClass(108);
  1220. + Finish(player);
  1221. + }
  1222. + else
  1223. + {
  1224. + player.sendMessage("You dont have class card item!");
  1225. + return;
  1226. + }
  1227. + }
  1228. + if (type.equals("Ghost_Sentinel"))
  1229. + {
  1230. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1231. + {
  1232. + if (player.getClassId().getId() == 109)
  1233. + {
  1234. + player.sendMessage("Your class is already "+nameclasse+".");
  1235. + return;
  1236. + }
  1237. +
  1238. + RemoverSkills(player);
  1239. +
  1240. + player.setClassId(109);
  1241. + if (!player.isSubClassActive())
  1242. + player.setBaseClass(109);
  1243. + Finish(player);
  1244. + }
  1245. + else
  1246. + {
  1247. + player.sendMessage("You dont have class card item!");
  1248. + return;
  1249. + }
  1250. + }
  1251. + if (type.equals("Storm_Screamer"))
  1252. + {
  1253. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1254. + {
  1255. + if (player.getClassId().getId() == 110)
  1256. + {
  1257. + player.sendMessage("Your class is already "+nameclasse+".");
  1258. + return;
  1259. + }
  1260. +
  1261. + RemoverSkills(player);
  1262. +
  1263. + player.setClassId(110);
  1264. + if (!player.isSubClassActive())
  1265. + player.setBaseClass(110);
  1266. + Finish(player);
  1267. + }
  1268. + else
  1269. + {
  1270. + player.sendMessage("You dont have class card item!");
  1271. + return;
  1272. + }
  1273. + }
  1274. + if (type.equals("Spectral_Master"))
  1275. + {
  1276. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1277. + {
  1278. + if (player.getClassId().getId() == 111)
  1279. + {
  1280. + player.sendMessage("Your class is already "+nameclasse+".");
  1281. + return;
  1282. + }
  1283. +
  1284. + RemoverSkills(player);
  1285. +
  1286. + player.setClassId(111);
  1287. + if (!player.isSubClassActive())
  1288. + player.setBaseClass(111);
  1289. + Finish(player);
  1290. + }
  1291. + else
  1292. + {
  1293. + player.sendMessage("You dont have class card item!");
  1294. + return;
  1295. + }
  1296. + }
  1297. + if (type.equals("Shillen_Saint"))
  1298. + {
  1299. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1300. + {
  1301. + if (player.getClassId().getId() == 112)
  1302. + {
  1303. + player.sendMessage("Your class is already "+nameclasse+".");
  1304. + return;
  1305. + }
  1306. +
  1307. + RemoverSkills(player);
  1308. +
  1309. + player.setClassId(112);
  1310. + if (!player.isSubClassActive())
  1311. + player.setBaseClass(112);
  1312. + Finish(player);
  1313. + }
  1314. + else
  1315. + {
  1316. + player.sendMessage("You dont have class card item!");
  1317. + return;
  1318. + }
  1319. + }
  1320. + if (type.equals("Titan"))
  1321. + {
  1322. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1323. + {
  1324. + if (player.getClassId().getId() == 113)
  1325. + {
  1326. + player.sendMessage("Your class is already "+nameclasse+".");
  1327. + return;
  1328. + }
  1329. +
  1330. + RemoverSkills(player);
  1331. +
  1332. + player.setClassId(113);
  1333. + if (!player.isSubClassActive())
  1334. + player.setBaseClass(113);
  1335. + Finish(player);
  1336. + }
  1337. + else
  1338. + {
  1339. + player.sendMessage("You dont have class card item!");
  1340. + return;
  1341. + }
  1342. + }
  1343. + if (type.equals("Grand_Khauatari"))
  1344. + {
  1345. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1346. + {
  1347. + if (player.getClassId().getId() == 114)
  1348. + {
  1349. + player.sendMessage("Your class is already "+nameclasse+".");
  1350. + return;
  1351. + }
  1352. +
  1353. + RemoverSkills(player);
  1354. +
  1355. + player.setClassId(114);
  1356. + if (!player.isSubClassActive())
  1357. + player.setBaseClass(114);
  1358. + Finish(player);
  1359. + }
  1360. + else
  1361. + {
  1362. + player.sendMessage("You dont have class card item!");
  1363. + return;
  1364. + }
  1365. + }
  1366. + if (type.equals("Dominator"))
  1367. + {
  1368. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1369. + {
  1370. + if (player.getClassId().getId() == 115)
  1371. + {
  1372. + player.sendMessage("Your class is already "+nameclasse+".");
  1373. + return;
  1374. + }
  1375. +
  1376. + RemoverSkills(player);
  1377. +
  1378. + player.setClassId(115);
  1379. + if (!player.isSubClassActive())
  1380. + player.setBaseClass(115);
  1381. + Finish(player);
  1382. + }
  1383. + else
  1384. + {
  1385. + player.sendMessage("You dont have class card item!");
  1386. + return;
  1387. + }
  1388. + }
  1389. + if (type.equals("Doomcryer"))
  1390. + {
  1391. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1392. + {
  1393. + if (player.getClassId().getId() == 116)
  1394. + {
  1395. + player.sendMessage("Your class is already "+nameclasse+".");
  1396. + return;
  1397. + }
  1398. +
  1399. + RemoverSkills(player);
  1400. +
  1401. + player.setClassId(116);
  1402. + if (!player.isSubClassActive())
  1403. + player.setBaseClass(116);
  1404. + Finish(player);
  1405. + }
  1406. + else
  1407. + {
  1408. + player.sendMessage("You dont have class card item!");
  1409. + return;
  1410. + }
  1411. + }
  1412. + if (type.equals("Fortune_Seeker"))
  1413. + {
  1414. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1415. + {
  1416. + if (player.getClassId().getId() == 117)
  1417. + {
  1418. + player.sendMessage("Your class is already "+nameclasse+".");
  1419. + return;
  1420. + }
  1421. +
  1422. + RemoverSkills(player);
  1423. +
  1424. + player.setClassId(117);
  1425. + if (!player.isSubClassActive())
  1426. + player.setBaseClass(117);
  1427. + Finish(player);
  1428. + }
  1429. + else
  1430. + {
  1431. + player.sendMessage("You dont have class card item!");
  1432. + return;
  1433. + }
  1434. + }
  1435. + if (type.equals("Maestro"))
  1436. + {
  1437. + if (player.getInventory().getInventoryItemCount(Config.ITEM_CLASS_ID, 0) >= 1)
  1438. + {
  1439. + if (player.getClassId().getId() == 118)
  1440. + {
  1441. + player.sendMessage("Your class is already "+nameclasse+".");
  1442. + return;
  1443. + }
  1444. +
  1445. + RemoverSkills(player);
  1446. +
  1447. + player.setClassId(118);
  1448. + if (!player.isSubClassActive())
  1449. + player.setBaseClass(118);
  1450. + Finish(player);
  1451. + }
  1452. + else
  1453. + {
  1454. + player.sendMessage("You dont have class card item!");
  1455. + return;
  1456. + }
  1457. + }
  1458. + }
  1459.  
  1460. Index: net/sf/l2j/Config.java
  1461.  
  1462. public static int CONT_DUNGEON_ITEM;
  1463. +public static int ITEM_CLASS_ID;
  1464.  
  1465.  
  1466. DUNGEON_ITEM_RENEWAL5 = L2JDev.getProperty("DungeonRenewalHtml5", 15);
  1467. +ITEM_CLASS_ID = L2JDev.getProperty("ItemCard", 0);
  1468.  
  1469.  
  1470. Index: gameserver\config\custom\L2JDev.properties
  1471.  
  1472.  
  1473. DungeonRenewalHtml4 = 9614
  1474. DungeonRenewalHtml5 = 9615
  1475.  
  1476. +#=============================================================
  1477. +# Class Card Item ID
  1478. +#=============================================================
  1479. +#Item Card para trocar de class
  1480. +ItemCard = 9516
  1481.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement