Baggos

Custom Tattoo's At x Pvp Count

Feb 1st, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.72 KB | None | 0 0
  1. Config.Java
  2.  
  3. +
  4. + /** Fighter Tattoo */
  5. + public static boolean FIGHTER_TATTOO_ENABLE;
  6. + public static int PVP_COUNT;
  7. + public static int TATTOO_FIGHTER_ID;
  8. +
  9. + /** Mage Tattoo */
  10. + public static boolean MAGE_TATTOO_ENABLE;
  11. + public static int PVP_COUNT1;
  12. + public static int TATTOO_MAGE_ID;
  13. +
  14.  
  15.  
  16. +
  17. +   /** Fighter Tattoo */
  18. +   FIGHTER_TATTOO_ENABLE = customs.getProperty("FighterTattooEnable", false);
  19. +   PVP_COUNT = customs.getProperty("PvpKillsCount", 100);
  20. +   TATTOO_FIGHTER_ID = customs.getProperty("FighterTattooID", 492);
  21. +
  22. +   /** Mage Tattoo */
  23. +   MAGE_TATTOO_ENABLE = customs.getProperty("MageTattooEnable", false);
  24. +   PVP_COUNT1 = customs.getProperty("PvpKillsCount", 100);
  25. +   TATTOO_MAGE_ID = customs.getProperty("MageTattooID", 493);
  26. +
  27.  
  28.  
  29. L2PcInstance.java
  30.  
  31.         public void setClient(L2GameClient client)
  32.         {
  33.                 _client = client;
  34.         }
  35. +  
  36. +   // Fighter and Mage Tattoo //
  37. +   /**
  38. +   * @param pvpKillCount
  39. +   */
  40. +   public void addItem(int pvpKillCount)
  41. +   {      
  42. +      
  43. +   if (Config.FIGHTER_TATTOO_ENABLE && pvpKillCount == Config.PVP_COUNT && !isMageClass())
  44. +   {
  45. +   addItem(Config.TATTOO_FIGHTER_ID);
  46. +   sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Fighter Tattoo.");
  47. +   getInventory().updateDatabase();
  48. +   }
  49. +   else if(Config.MAGE_TATTOO_ENABLE && pvpKillCount == Config.PVP_COUNT1)
  50. +       {
  51. +       addItem(Config.TATTOO_MAGE_ID);
  52. +   sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Mage Tattoo.");
  53. +   getInventory().updateDatabase();
  54. +       }
  55. +   }
  56. +
  57.  
  58.         // Add PvP point to attacker.
  59.         setPvpKills(getPvpKills() + 1);
  60. +                              
  61. +       // Check pvp kills on part with Tattoo's
Advertisement
Add Comment
Please, Sign In to add comment