Noticias:

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

Menú Principal

Evento Doble XP/SP (Sábados)

Iniciado por Swarlog, Ago 06, 2022, 01:58 AM

Tema anterior - Siguiente tema

Swarlog

Config.java
 
    public static float RATE_XP;
    public static float RATE_SP;
+    public static float SATURDAY_RATE_XP;
+    public static float SATURDAY_RATE_SP;
 
 
    RATE_XP = Float.parseFloat(server.getProperty("RateXp", "1."));
    RATE_SP = Float.parseFloat(server.getProperty("RateSp", "1."));
+    SATURDAY_RATE_XP = Float.parseFloat(server.getProperty("SaturDayXp", "2."));
+    SATURDAY_RATE_SP = Float.parseFloat(server.getProperty("SaturDaySp", "2."));
 
Config.properties
 
# =================================================================
#                              RATES
# =================================================================
 
    # Rate control
    RateXp = 1.
    RateSp = 1.
+    SaturDayXp = 2.
+    SaturDaySp = 2.
 
 
L2Npc.java
_    /**
_    * Return the Exp Reward of this L2Npc contained in the L2NpcTemplate (modified by _RATE_XP).<BR><BR>
_    */
_    public int getExpReward()
_    {   
_      return (int) (getTemplate().rewardExp * Config.RATE_XP);       
_    }
 
+    private int Savvato()
+    {
+      return Calendar.SATURDAY;
+    }
 
+    /**
+    * Return the Exp Reward of this L2Npc contained in the L2NpcTemplate (modified by +RATE_XP).<BR><BR>
+    */
+    public int getExpReward()
+    {
+        if(Savvato() != 0)
+            return (int) (getTemplate().rewardExp * Config.SATURDAY_RATE_XP);
+        else
+            return (int) (getTemplate().rewardExp * Config.RATE_XP);
+         
+    }
 
_    /**
_    * Return the SP Reward of this L2Npc contained in the L2NpcTemplate (modified by _RATE_SP).<BR><BR>
_    */
_    public int getSpReward()
_    {
_        return (int) (getTemplate().rewardSp * Config.RATE_SP);
_    }
 
+    /**
+    * Return the SP Reward of this L2Npc contained in the L2NpcTemplate (modified by +RATE_SP).<BR><BR>
+    */
+    public int getSpReward()
+    {
+        if(Savvato() != 0)
+            return (int) (getTemplate().rewardExp * Config.SATURDAY_RATE_SP);
+        else
+            return (int) (getTemplate().rewardSp * Config.RATE_SP);
+    }

Para la versión High Five:

Es valido para todas las cronicas, solo en H5 cambia el metodo de rewardExp por getRewardExp y ademas:

+    public int getExpReward()
+    {
+        if(Savvato() != 0)
+            return (int) (getTemplate().rewardExp * Config.SATURDAY_RATE_XP);
+        else
+            return (int) (getTemplate().rewardExp * Config.RATE_XP);
+       
+    }

+    public int getExpReward()
+    {
+        if(Savvato() != 0)
+            return (int) (getTemplate().rewardExp * Config.SATURDAY_RATE_XP);
+        return (int) (getTemplate().rewardExp * Config.RATE_XP);
+       
+    }