Jump to content
Sign in to follow this  
kostantinosftw

[Share] Double Exp In Saturday

Recommended Posts

Config.java

 

@@ 511

 

  public static double RATE_XP;
  public static double RATE_SP;
+public static double SATURDAY_RATE_XP;
  public static double RATE_PARTY_XP;
  public static double RATE_PARTY_SP;

 

 
 
@@ 1171
 
  RATE_XP = server.getProperty("RateXp", 1.);
  RATE_SP = server.getProperty("RateSp", 1.);
+ SATURDAY_RATE_XP = server.getProperty("SaturDayXp", 1.);
  RATE_PARTY_XP = server.getProperty("RatePartyXp", 1.);
  RATE_PARTY_SP = server.getProperty("RatePartySp", 1.);

 

 
 
Config.properties 
 
# =================================================================
#                               RATES
# =================================================================
 
     # Rate control
     RateXp = 1.
     RateSp = 1.
+   SaturDayXp = 2.
     RatePartyXp = 2.
     RatePartySp = 2.

 

 
L2Npc.java
 
@@ 18
 
import java.text.DateFormat;
+import java.util.Calendar;
import java.util.ArrayList;

 

 
 
@@ 1516
 
/**
* @return the Exp Reward of this L2Npc contained in the L2NpcTemplate (modified by RATE_XP).<br><br>
*/
 
-  public int getExpReward()
-    {  
-      return (int) (getTemplate().getRewardExp() * Config.RATE_XP);  
-    }
 
+    private int Savvato()
+   {
+     return Calendar.SATURDAY;
+    }
+
+   public int getExpReward()
+    {
+     if(Savvato() != 0)
+        return (int) (getTemplate().getRewardExp() * Config.SATURDAY_RATE_XP);
+     else
+     return (int) (getTemplate().getRewardExp() * Config.RATE_XP);
+    
+    }
 
/**
* @return the SP Reward of this L2Npc contained in the L2NpcTemplate (modified by RATE_SP).
*/
 

 

 
 
Credits goes to absolutepower, i just changed/added few things in order to work on Acis. (My first java share)
Edited by kostantinosftw

Share this post


Link to post
Share on other sites

Rate,1 day in month.

	public int getRateDay(){
		Calendar c=new GregorianCalendar();
		//c.set(Calendar.DAY_OF_MONTH, 1);
		c.set(Calendar.DAY_OF_MONTH, Config.DAY_MONTH_RATE);
		return c.get(Calendar.DAY_OF_WEEK);
	}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.



×