mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
Add XP Rate Multiplier For Non-Bot Worlds
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
"server_debug": false,
|
||||
"file_server": true,
|
||||
"world_id": 1,
|
||||
"bot_world": true,
|
||||
"members_only": false,
|
||||
"tutorial_island_enabled": false,
|
||||
"party_room_enabled": true,
|
||||
|
||||
@@ -25,6 +25,8 @@ public class ConfigLoader {
|
||||
GameConstants.FILE_SERVER = obj.getBoolean("file_server");
|
||||
if(obj.has("world_id"))
|
||||
GameConstants.WORLD = obj.getInt("world_id");
|
||||
if(obj.has("bot_world"))
|
||||
GameConstants.BOT_WORLD = obj.getBoolean("bot_world");
|
||||
if(obj.has("members_only"))
|
||||
GameConstants.MEMBERS_ONLY = obj.getBoolean("members_only");
|
||||
if(obj.has("tutorial_island_enabled"))
|
||||
|
||||
@@ -32,8 +32,8 @@ public class GameConstants {
|
||||
RESPAWN_X = 3222, RESPAWN_Y = 3218;
|
||||
public static boolean FILE_SERVER = true, SERVER_DEBUG = false, MEMBERS_ONLY = false, TUTORIAL_ISLAND = false,
|
||||
PARTY_ROOM_DISABLED = false, CLUES_ENABLED = true, ITEM_REQUIREMENTS = true,
|
||||
ADMIN_CAN_TRADE = false, ADMIN_DROP_ITEMS = false, ADMIN_CAN_SELL_ITEMS = false;
|
||||
public static double XP_RATE = 1 * Player.xpRate;
|
||||
ADMIN_CAN_TRADE = false, ADMIN_DROP_ITEMS = false, ADMIN_CAN_SELL_ITEMS = false, BOT_WORLD = true;
|
||||
public static double XP_RATE = Player.xpRate;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -6137,10 +6137,14 @@ public class DialogueHandler {
|
||||
break;
|
||||
|
||||
case 3116:
|
||||
player.getPacketSender().showInterface(3559);
|
||||
player.canChangeAppearance = true;
|
||||
player.closeTutorialInterface = true;
|
||||
player.nextChat = 0;
|
||||
if(!GameConstants.BOT_WORLD) {
|
||||
player.getDialogueHandler().sendDialogues(10001, -1);
|
||||
} else {
|
||||
player.getPacketSender().showInterface(3559);
|
||||
player.canChangeAppearance = true;
|
||||
player.closeTutorialInterface = true;
|
||||
player.nextChat = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3117:
|
||||
@@ -7594,6 +7598,22 @@ public class DialogueHandler {
|
||||
);
|
||||
player.dialogueAction = 10000;
|
||||
break;
|
||||
case 10001:
|
||||
sendNpcChat(2244, ChatEmotes.HAPPY_JOYFUL, "Please Select The XP Rate You'd Like.", "This Can Be Increased But Not Decreased Later On.");
|
||||
player.nextChat = 10002;
|
||||
break;
|
||||
case 10002:
|
||||
sendOption("x1", "x2", "x5", "x10");
|
||||
player.dialogueAction = 10002;
|
||||
break;
|
||||
case 10003:
|
||||
sendNpcChat(2244, ChatEmotes.HAPPY_JOYFUL, "Are You Sure x" + player.getXPRate() + " Is The XP Rate You'd Like?");
|
||||
player.nextChat = 10004;
|
||||
break;
|
||||
case 10004:
|
||||
sendOption("Yes", "No");
|
||||
player.dialogueAction = 10004;
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void chatboxText(String text, String text1, String text2,
|
||||
|
||||
@@ -618,11 +618,30 @@ public class DialogueOptions {
|
||||
player.getDialogueHandler().sendDialogues(3586, player.npcType);
|
||||
return;
|
||||
}
|
||||
else if (player.dialogueAction == 7559)
|
||||
{
|
||||
else if (player.dialogueAction == 7559) {
|
||||
player.getDialogueHandler().sendDialogues(3864, player.npcType);
|
||||
return;
|
||||
}
|
||||
} else if (player.dialogueAction == 10004) {
|
||||
if(!player.closeTutorialInterface) {
|
||||
player.getPacketSender().sendMessage("Your XP Rate Is Now Set To x" + player.getXPRate() + " You Can Increase Your Rate In The Future By Using");
|
||||
player.getPacketSender().sendMessage("::xprate");
|
||||
player.getPacketSender().showInterface(3559);
|
||||
player.canChangeAppearance = true;
|
||||
player.closeTutorialInterface = true;
|
||||
player.nextChat = 0;
|
||||
player.dialogueAction = 0;
|
||||
} else if (player.getXPRate() != 10) {
|
||||
player.getPacketSender().sendMessage("Your XP Rate Is Now Set To x" + player.getXPRate() + " You Can Increase Your Rate In The Future By Using");
|
||||
player.getPacketSender().sendMessage("::xprate");
|
||||
player.dialogueAction = 0;
|
||||
player.getPacketSender().closeAllWindows();
|
||||
} else {
|
||||
player.getPacketSender().sendMessage("Your XP Rate Is Now Set To x" + player.getXPRate());
|
||||
player.dialogueAction = 0;
|
||||
player.getPacketSender().closeAllWindows();
|
||||
}
|
||||
return;
|
||||
}
|
||||
player.dialogueAction = 0;
|
||||
player.getPacketSender().closeAllWindows();
|
||||
break;
|
||||
@@ -848,6 +867,9 @@ public class DialogueOptions {
|
||||
{
|
||||
player.getDialogueHandler().sendDialogues(3865, player.npcType);
|
||||
return;
|
||||
} else if (player.dialogueAction == 10004) {
|
||||
player.getDialogueHandler().sendDialogues(10002, 2244);
|
||||
return;
|
||||
}
|
||||
player.dialogueAction = 0;
|
||||
player.getPacketSender().closeAllWindows();
|
||||
@@ -922,6 +944,10 @@ public class DialogueOptions {
|
||||
if (player.dialogueAction == 701) {
|
||||
player.getDialogueHandler().sendDialogues(3561, player.npcType);
|
||||
}
|
||||
if (player.dialogueAction == 10002) {
|
||||
player.setXPRate(1);
|
||||
player.getDialogueHandler().sendDialogues(10003, player.npcType);
|
||||
}
|
||||
break;
|
||||
|
||||
case 9179:
|
||||
@@ -991,6 +1017,10 @@ public class DialogueOptions {
|
||||
if (player.dialogueAction == 701) {
|
||||
player.getDialogueHandler().sendDialogues(3562, player.npcType);
|
||||
}
|
||||
if (player.dialogueAction == 10002) {
|
||||
player.setXPRate(2);
|
||||
player.getDialogueHandler().sendDialogues(10003, player.npcType);
|
||||
}
|
||||
break;
|
||||
|
||||
case 9180:
|
||||
@@ -1063,6 +1093,10 @@ public class DialogueOptions {
|
||||
if (player.dialogueAction == 701) {
|
||||
player.getDialogueHandler().sendDialogues(3563, player.npcType);
|
||||
}
|
||||
if (player.dialogueAction == 10002) {
|
||||
player.setXPRate(5);
|
||||
player.getDialogueHandler().sendDialogues(10003, player.npcType);
|
||||
}
|
||||
break;
|
||||
|
||||
case 9181:
|
||||
@@ -1120,6 +1154,10 @@ public class DialogueOptions {
|
||||
if (player.dialogueAction == 701) {
|
||||
player.getDialogueHandler().sendDialogues(3564, player.npcType);
|
||||
}
|
||||
if (player.dialogueAction == 10002) {
|
||||
player.setXPRate(10);
|
||||
player.getDialogueHandler().sendDialogues(10003, player.npcType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public abstract class Player {
|
||||
|
||||
public byte buffer[] = null;
|
||||
public String lastConnectedFrom;
|
||||
public static int xpRate;
|
||||
public static int xpRate = 1;
|
||||
private Compost compost = new Compost(this);
|
||||
private Allotments allotment = new Allotments(this);
|
||||
private Flowers flower = new Flowers(this);
|
||||
|
||||
@@ -45,6 +45,18 @@ public class Commands implements PacketType {
|
||||
|
||||
public static void playerCommands(Player player, String playerCommand, String[] arguments) {
|
||||
switch (playerCommand.toLowerCase()) {
|
||||
case "xprate":
|
||||
case "XPRate":
|
||||
if(player.getXPRate() == 0 || player.playerRights == 3) {
|
||||
player.getDialogueHandler().sendDialogues(10001, 2244);
|
||||
return;
|
||||
} else if (player.getXPRate() == 10) {
|
||||
player.getPacketSender().sendMessage("You Already Have The Highest XP Rate");
|
||||
return;
|
||||
} else {
|
||||
player.getDialogueHandler().sendDialogues(10001, 2244);
|
||||
}
|
||||
break;
|
||||
case "toggleyell":
|
||||
case "tglyell":
|
||||
case "hideyell":
|
||||
|
||||
Reference in New Issue
Block a user