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
This commit is contained in:
Dark98
2021-11-12 02:56:14 +00:00
parent ba7f84fc45
commit 45450dbb9c
6 changed files with 13 additions and 8 deletions
@@ -18,12 +18,17 @@ public class ClientSettings {
public final static String SERVER_WEBSITE = "www.2006Scape.org";
/**
* The Servers Ip
*
* You don't have to change this, the client will automatically connect to the server
* on localhost (Assuming you're running Client and LocalGame respectively)
*
*/
public static String SERVER_IP = "www.2006Scape.org";
/**
* The Servers World
* This Determines The Port The Server Will Connect On
* World 1 Will Connect On Port 43594
* World 2 Will Connect On Port 43597
*/
public final static int SERVER_WORLD = 1;
/**
* The Npc Bits for the Server
*/
+1 -1
View File
@@ -5927,7 +5927,7 @@ public class Game extends RSApplet {
loginMessage2 = "Connecting to server...";
drawLoginScreen(true);
}
socketStream = new RSSocket(this, openSocket(43594 + portOff));
socketStream = new RSSocket(this, openSocket((ClientSettings.SERVER_WORLD == 1) ? 43594 : 43597 + portOff));
long l = TextClass.longForName(s);
int i = (int) (l >> 16 & 31L);
stream.currentOffset = 0;
@@ -5,7 +5,7 @@ public class GameConstants {
public final static boolean SERVER_DEBUG = false;
public final static String SERVER_NAME = "2006Scape", SERVER_VERSION = "Server Stage v " + GameConstants.TEST_VERSION + ".";
public final static int SERVER_WORLD = 1;
public final static String WEBSITE_LINK = "https://2006Scape.org";
public final static boolean WEBSITE_TOTAL_CHARACTERS_INTEGRATION = false;
public final static double TEST_VERSION = 2.3;
@@ -135,7 +135,7 @@ public class GameEngine {
* Port and Cycle rate.
*/
static {
serverlistenerPort = 43594;
serverlistenerPort = (GameConstants.SERVER_WORLD == 1) ? 43594 : 43597;
shutdownServer = false;
}
@@ -95,7 +95,7 @@ public class PlayerAssistant {
public void loginScreen() {
player.getPacketSender().showInterface(15244);
player.getPacketSender().sendString("Welcome to " + GameConstants.SERVER_NAME + "\\n", 15257);
player.getPacketSender().sendString("Welcome to " + GameConstants.SERVER_NAME + " World: " + GameConstants.SERVER_WORLD + "\\n", 15257);
int currentDay = player.getLastLogin() - player.lastLoginDate;
if (player.playerLevel[GameConstants.HERBLORE] < 3) {
@@ -1833,7 +1833,7 @@ public class PlayerAssistant {
player.getItemAssistant().clearBank();
player.getPlayerAssistant().addStarter();
player.getPlayerAssistant().movePlayer(3233, 3229, 0);
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.SERVER_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 and pull requests are welcome!");
player.getPacketSender().sendMessage("Source code: github.com/2006-Scape/2006Scape");
player.getPacketSender().sendMessage("Discord: https://discord.gg/hZ6VfWG");
@@ -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.SERVER_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");