• Welcome to ForumKorner!
    Join today and become a part of the community.

[Project Insanity Base] Automatic Double EXP Weekend [No server restart required]

T A K 3 N

Member
Reputation
0
This is VERY easy to add..

Notes:
Server updating is not needed, player logging is not needed. All this does is take your SERVER BONUS from Config which is usually 1, and makes it 2 on Saturday and on Sunday.

First, go into your Config class and declare:
Code:
public static boolean doubleEXPWeekend = false;

Also, in your Config class, find:
Code:
	public static final double SERVER_EXP_BONUS = 1;
and change it to:
Code:
	public static double SERVER_EXP_BONUS = 1;

Next, go into your Client class and add in one of your welcome messages (OPTIONAL):
Code:
			if (Config.doubleEXPWeekend == true) {
				sendMessage("Enjoy Double EXP Weekend!");
			}

Now, in PlayerHandler, add this method in there:
Code:
	public final void getDoubleEXPWeekend() {
		Calendar calendar = new GregorianCalendar();
		int day = calendar.get(Calendar.DAY_OF_WEEK);
		Config.doubleEXPWeekend = false;
		if (day > 6) {
			Config.doubleEXPWeekend = true;
			Config.SERVER_EXP_BONUS = 2;
			return;
		} else if (day < 2) {
			Config.doubleEXPWeekend = true;
			Config.SERVER_EXP_BONUS = 2;
			return;
		}
		Config.SERVER_EXP_BONUS = 1;
	}

And, still in PlayerHandler add this below updatePlayerNames();:
Code:
			getDoubleEXPWeekend();

Also, in PlayerHandler, add this import:
Code:
import java.util.Calendar;
import java.util.GregorianCalendar;

Enjoy.
 

Skrillexx

New Member
Reputation
0
Sweet, I use to have runescape private server, I was thinking of opening one again, if any good source out there, and I will use this, because it's always fun for double exp weekend.
 
Top