Second World Setup (#518)
* Start Setting Up Second World Added World Number To Login Message Added World Number To Login Interface Made World 2 Listen On Different Port Made Client Connect To 43597 For World 2 * Small Cleanup For World 2 Support Calculate Port For World Based On World Number Use Existing World int For World In Server * Woops Wrong Ports * Set Server Port After Loading Config * Add xpRate Var & Include With XPRate Calculations * Add -w/-world arg to client * Add XP Rate Multiplier For Non-Bot Worlds * More Multi World Stuff Update Integrations(Discord Bot/Website Stuff) For Multiple Worlds Added More XP Rate Dialogue Stuff * Add Kick Command To Discord Bot & Fix Type In ConfigLoader * Create/Use commandPrefix Var For Discord Bot * Small Fixup For World 2 Renamed BOT_WORLD to VARIABLE_XP_RATE Fixed Dialogue/Message grammar Added a check for VARIABLE_XP_RATES to ::xprate command * More Discord Commands(GameKick, MoveHome & Update) *GameKick kicks A player if their client froze but acc stayed logged in *MoveHome removes the need for ::stuck which removes potential for abuse *Update schedules A server update * Minor fixup * 43597 → 43598 * Fix XP Rate Multiplier & add ::xprate to cooamnds list if enabled * Use Either VARIABLE_SKILL_RATE OR XP_RATE Not Both TODO(Convert Player.xpRate Into An Array For Easier Rate Changes) * Create/Use PLAYER_XP_RATES For Easier Rate Changes * Fixed Abusive Client Command Privileges & Added myxprate/checkxprate * Allow Loading VARIABLE_XP_RATES & PLAYER_XP_RATES From Config * Properly Update Client Title Logo If The Cache Has Already Been Downloaded You Will Need To Delete It & Let The Client ReDownload It * Fix Cache CRC Checks For The Client(Allows Cache To Actually Check For Updates) * Add -no-crc & -dev Arguments To Client * Fix Naming For Some Vars * Make CHECK_CRC Description More Descriptive * Fix More Var Descriptions * Cleanup Unused GameConstants Vars & Add More Vars To ConfigLoader Co-authored-by: Danial <admin@redsparr0w.com>
This commit is contained in:
1 parent
1c5b400f00
commit
e1a8d85408
32 files changed
+406
-149
No files matched your search
@@ -116,7 +116,7 @@ public class PacketSender {
|
||||
if (player.tutorialProgress > 35) {
|
||||
player.getPlayerAssistant().sendSidebars();
|
||||
Weight.updateWeight(player);
|
||||
player.getPacketSender().sendMessage("Welcome to @blu@" + GameConstants.SERVER_NAME + "@bla@ - we are currently in Server Stage v@blu@" + GameConstants.TEST_VERSION + "@bla@.");
|
||||
player.getPacketSender().sendMessage("Welcome to @blu@" + GameConstants.SERVER_NAME + " World: " + GameConstants.WORLD + "@bla@ - we are currently in Server Stage v@blu@" + GameConstants.TEST_VERSION + "@bla@.");
|
||||
player.getPacketSender().sendMessage("@red@Did you know?@bla@ We're open source! Pull requests are welcome");
|
||||
player.getPacketSender().sendMessage("Source code at github.com/2006-Scape/2006Scape");
|
||||
player.getPacketSender().sendMessage("Join our Discord: https://discord.gg/hZ6VfWG");
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.rs2.Connection;
|
||||
import com.rs2.GameConstants;
|
||||
import com.rs2.GameEngine;
|
||||
import com.rs2.game.bots.BotHandler;
|
||||
import com.rs2.game.content.combat.magic.SpellTeleport;
|
||||
import com.rs2.game.npcs.NpcHandler;
|
||||
import com.rs2.game.players.*;
|
||||
import com.rs2.game.players.antimacro.AntiSpam;
|
||||
@@ -45,6 +44,34 @@ public class Commands implements PacketType {
|
||||
|
||||
public static void playerCommands(Player player, String playerCommand, String[] arguments) {
|
||||
switch (playerCommand.toLowerCase()) {
|
||||
case "myxprate":
|
||||
case "checkxprate":
|
||||
if(GameConstants.VARIABLE_XP_RATE) {
|
||||
player.getPacketSender().sendMessage("Your current XP rate is x" + player.getXPRate());
|
||||
break;
|
||||
}
|
||||
case "xprate":
|
||||
if(GameConstants.VARIABLE_XP_RATE) {
|
||||
if (player.getXPRate() == GameConstants.VARIABLE_XP_RATES[0]) {
|
||||
player.getDialogueHandler().sendDialogues(10005, 2244);
|
||||
return;
|
||||
} else if (player.getXPRate() == GameConstants.VARIABLE_XP_RATES[1]) {
|
||||
player.getDialogueHandler().sendDialogues(10006, 2244);
|
||||
return;
|
||||
} else if (player.getXPRate() == GameConstants.VARIABLE_XP_RATES[2]) {
|
||||
player.getDialogueHandler().sendDialogues(10007, 2244);
|
||||
return;
|
||||
} else if (player.getXPRate() == GameConstants.VARIABLE_XP_RATES[3]) {
|
||||
player.getPacketSender().sendMessage("You already have the highest XP rate.");
|
||||
return;
|
||||
} else {
|
||||
player.getDialogueHandler().sendDialogues(10001, 2244);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
player.getPacketSender().sendMessage("You can't use this command in this world.");
|
||||
}
|
||||
break;
|
||||
case "toggleyell":
|
||||
case "tglyell":
|
||||
case "hideyell":
|
||||
@@ -257,9 +284,6 @@ public class Commands implements PacketType {
|
||||
"::loc, ::pos, ::coord",
|
||||
"Get your current world position",
|
||||
"",
|
||||
"::stuck",
|
||||
"Return to Lumbridge when stuck",
|
||||
"",
|
||||
"::randomtoggle",
|
||||
"Enable/Disable random events",
|
||||
"",
|
||||
@@ -280,6 +304,8 @@ public class Commands implements PacketType {
|
||||
"",
|
||||
"::snow",
|
||||
"Add some snow in your mainscreen(works only in december)",
|
||||
(GameConstants.VARIABLE_XP_RATE ? "\\n" + "::xprate\\n" + "Opens dialogue for the player to set/increase their XP rate." : ""),
|
||||
(GameConstants.VARIABLE_XP_RATE ? "\\n" + "::checkxprate(::myxprate)\\n" + "Displays the players currently set XP rate." : ""),
|
||||
};
|
||||
|
||||
// Clear all lines
|
||||
@@ -294,17 +320,6 @@ public class Commands implements PacketType {
|
||||
}
|
||||
player.getPacketSender().showInterface(8134);
|
||||
break;
|
||||
case "stuck":
|
||||
if (player.getCombatAssistant().inCombat()) {
|
||||
player.getPacketSender().sendMessage("You cannot do that while in combat.");
|
||||
return;
|
||||
}
|
||||
player.getPlayerAssistant().movePlayer(SpellTeleport.LUMBRIDGE.getDestX(), SpellTeleport.LUMBRIDGE.getDestY(), 0);
|
||||
player.getPacketSender().sendMessage("How did you manage that one...");
|
||||
player.getPacketSender().sendMessage("If it's bug related, please report on Github/Discord!");
|
||||
player.gfx100(80);
|
||||
player.startAnimation(404);
|
||||
break;
|
||||
case "randomtoggle":
|
||||
case "togglerandom":
|
||||
case "random":
|
||||
|
||||
Reference in new issue
Block a user