Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Ganar puntos XP/SP en PvP

Iniciado por Swarlog, Ago 19, 2022, 12:49 AM

Tema anterior - Siguiente tema

Swarlog

Index: /java/config/pvp.properties
===================================================================
--- java/config/pvp.properties (revision 2839)
+++ java/config/pvp.properties (working copy)
@@ -22,6 +22,11 @@
 # item drop related min/max
 MinimumPKRequiredToDrop = 5
 
+#Exp and SP Award System By Cobra
+# 0 Is by Default!
+AddExpAtPvp = 0
+AddSpAtPvp = 0
+
 # Should we award a pvp point for killing a player with karma?
 AwardPKKillPVPPoint = False
 
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 2839)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -81,6 +81,8 @@
     /** Properties file for telnet configuration */
     public static final String  TELNET_FILE = "./config/telnet.properties";
 
+
+
     /******************************************************************************************************************************************************/
     /** L2J Property File Definitions End Here**/
  /******************************************************************************************************************************************************/
@@ -563,6 +565,7 @@
     public static boolean L2JMOD_ENABLE_WAREHOUSESORTING_FREIGHT;
     public static boolean L2JMOD_ENABLE_MANA_POTIONS_SUPPORT;
     
+   
     /** ************************************************** **/
  /** L2JMods Settings -End                              **/
  /** ************************************************** **/
@@ -612,6 +615,10 @@
     public static boolean KARMA_AWARD_PK_KILL;
     /** Minimum PK required to drop */
     public static int KARMA_PK_LIMIT;
+    /** Add Exp At Pvp! */
+    public static int       ADD_EXP;
+    /** Add Sp At Pvp! */
+    public static int      ADD_SP; 
     /** List of pet items that cannot be dropped (separated by ",") when PVP */
     public static String KARMA_NONDROPPABLE_PET_ITEMS;
     /** List of items that cannot be dropped (separated by ",") when PVP*/
@@ -944,7 +951,8 @@
     public static int     FAST_CONNECTION_LIMIT;
     public static int     NORMAL_CONNECTION_TIME;
     public static int     FAST_CONNECTION_TIME;
-    public static int     MAX_CONNECTION_PER_IP; 
+    public static int     MAX_CONNECTION_PER_IP;

 
     /**
      * This class initializes all global variables for configuration.<br>
@@ -1935,6 +1943,8 @@
                  KARMA_AWARD_PK_KILL         = Boolean.parseBoolean(pvpSettings.getProperty("AwardPKKillPVPPoint", "true"));
 
                  KARMA_PK_LIMIT                      = Integer.parseInt(pvpSettings.getProperty("MinimumPKRequiredToDrop", "5"));
+                 ADD_EXP                             = Integer.parseInt(pvpSettings.getProperty("AddExpAtPvp", "0"));
+                 ADD_SP                              = Integer.parseInt(pvpSettings.getProperty("AddSpAtPvp", "0"));
 
                  KARMA_NONDROPPABLE_PET_ITEMS    = pvpSettings.getProperty("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882");
                  KARMA_NONDROPPABLE_ITEMS        = pvpSettings.getProperty("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390");
@@ -2336,6 +2346,8 @@
         else if (pName.equalsIgnoreCase("CanGMDropEquipment")) KARMA_DROP_GM = Boolean.parseBoolean(pValue);
         else if (pName.equalsIgnoreCase("AwardPKKillPVPPoint")) KARMA_AWARD_PK_KILL = Boolean.parseBoolean(pValue);
         else if (pName.equalsIgnoreCase("MinimumPKRequiredToDrop")) KARMA_PK_LIMIT = Integer.parseInt(pValue);
+        else if (pName.equalsIgnoreCase("AddExpAtPvp")) ADD_EXP = Integer.parseInt(pValue);
+        else if (pName.equalsIgnoreCase("AddSpAtPvp")) ADD_SP = Integer.parseInt(pValue);
 
         else if (pName.equalsIgnoreCase("PvPVsNormalTime")) PVP_NORMAL_TIME = Integer.parseInt(pValue);
         else if (pName.equalsIgnoreCase("PvPVsPvPTime")) PVP_PVP_TIME = Integer.parseInt(pValue);
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 2839)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -5287,6 +5287,10 @@
     {
         // Add karma to attacker and increase its PK counter
         setPvpKills(getPvpKills() + 1);
+        addExpAndSp(Config.ADD_EXP, Config.ADD_SP);
+        {
+        sendMessage("You win Exp and Sp From Pvp Kills!.");
+        }
 
         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
         sendPacket(new UserInfo(this));