Advertisement
Baggos

Custom Tattoo's At x Pvp Count

Feb 2nd, 2015
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.54 KB | None | 0 0
  1. Config.java
  2.  
  3. +
  4. +   // Custom Tattoo's
  5. +
  6. +   /** Fighter Tattoo */
  7. +   public static boolean REWARD_TATTOOS_ENABLE;
  8. +   public static int FIGHTER_TATTOO_COUNT;
  9. +   public static int TATTOO_FIGHTER_ID;
  10. +  
  11. +   /** Mage Tattoo */
  12. +   public static int MAGE_TATTOO_COUNT;
  13. +   public static int TATTOO_MAGE_ID;
  14. +  
  15. +   /** Pvp Kills they need */
  16. +   public static int PVP_COUNT;
  17. +  
  18.  
  19.  
  20. +                                
  21. +   // Custom Tattoo's
  22. +   ExProperties customs = load(CUSTOMS_FILE);
  23. +   /** Fighter Tattoo */
  24. +   REWARD_TATTOOS_ENABLE = customs.getProperty("RewardTattooEnable", false);
  25. +   TATTOO_FIGHTER_ID = customs.getProperty("FighterTattooID", 492);
  26. +          
  27. +   /** Mage Tattoo */
  28. +   TATTOO_MAGE_ID = customs.getProperty("MageTattooID", 493);
  29. +          
  30. +   /** Pvp Kills */
  31. +   PVP_COUNT = customs.getProperty("PvpKillsCount", 100);
  32. +          
  33.  
  34.  
  35.  
  36. L2PcIstance.java
  37.  
  38.      // Add PvP point to attacker.
  39.     setPvpKills(getPvpKills() + 1);
  40.     {
  41. +
  42. +   // Add Fighter or Mage Tattoos
  43. +   if (Config.REWARD_TATTOOS_ENABLE)
  44. +   {
  45. +   if (getPvpKills() == Config.PVP_COUNT)
  46. +   {
  47. +   if (!isMageClass())
  48. +   {
  49. +   addItem("Tattoo", Config.TATTOO_FIGHTER_ID, Config.FIGHTER_TATTOO_COUNT, this, true);
  50. +   sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Fighter Tattoo.");
  51. +   }
  52. +   else
  53. +   {
  54. +   addItem("Tattoo", Config.TATTOO_MAGE_ID, Config.MAGE_TATTOO_COUNT, this, true);
  55. +   sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Mage Tattoo.");
  56. +   }
  57. +   }
  58. +   }
  59. +   }
  60. +
  61.     // Send UserInfo packet to attacker with its Karma and PK Counter
  62.     sendPacket(new UserInfo(this));
  63.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement