Secret Experience

Secret Experience (https://secretexperience.net/index.php)
-   [Lineage] Java Mods (https://secretexperience.net/forumdisplay.php?f=636)
-   -   [Outros] Dobrando a XP e SP aos Sábados (https://secretexperience.net/showthread.php?t=34257)

Setokaiba 03-10-2013 06:13 PM

Dobrando a XP e SP aos Sábados
 
Config.java
Código:

    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
Código:

# =================================================================
#                              RATES
# =================================================================

    # Rate control
    RateXp = 1.
    RateSp = 1.
+    SaturDayXp = 2.
+    SaturDaySp = 2.

L2Npc.java
Código:

_    /**
_    * 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);
+    }

Coded by AbsolutePower


Horários baseados na GMT -3. Agora são 10:44 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.