diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 1933ec504..e801e8310 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,13 +1,30 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + - + + @@ -246,39 +154,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -288,12 +163,6 @@ - - @@ -315,28 +184,51 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CompiledServer/production/RS-2009/org/crandor/net/registry/AccountRegister$1.class b/CompiledServer/production/RS-2009/org/crandor/net/registry/AccountRegister$1.class index 21446516e..10001809c 100644 Binary files a/CompiledServer/production/RS-2009/org/crandor/net/registry/AccountRegister$1.class and b/CompiledServer/production/RS-2009/org/crandor/net/registry/AccountRegister$1.class differ diff --git a/CompiledServer/production/RS-2009/org/crandor/net/registry/AccountRegister$2.class b/CompiledServer/production/RS-2009/org/crandor/net/registry/AccountRegister$2.class index 3e1e66808..1a9e92151 100644 Binary files a/CompiledServer/production/RS-2009/org/crandor/net/registry/AccountRegister$2.class and b/CompiledServer/production/RS-2009/org/crandor/net/registry/AccountRegister$2.class differ diff --git a/CompiledServer/production/RS-2009/org/crandor/net/registry/AccountRegister.class b/CompiledServer/production/RS-2009/org/crandor/net/registry/AccountRegister.class index a0b348247..37486781a 100644 Binary files a/CompiledServer/production/RS-2009/org/crandor/net/registry/AccountRegister.class and b/CompiledServer/production/RS-2009/org/crandor/net/registry/AccountRegister.class differ diff --git a/CompiledServer/production/RS-2009/org/keldagrim/Management$1.class b/CompiledServer/production/RS-2009/org/keldagrim/Management$1.class index b9d912d79..1f5575ee2 100644 Binary files a/CompiledServer/production/RS-2009/org/keldagrim/Management$1.class and b/CompiledServer/production/RS-2009/org/keldagrim/Management$1.class differ diff --git a/CompiledServer/production/RS-2009/org/keldagrim/Management$2.class b/CompiledServer/production/RS-2009/org/keldagrim/Management$2.class index ea333907a..93edfbbf6 100644 Binary files a/CompiledServer/production/RS-2009/org/keldagrim/Management$2.class and b/CompiledServer/production/RS-2009/org/keldagrim/Management$2.class differ diff --git a/CompiledServer/production/RS-2009/org/keldagrim/Management$3.class b/CompiledServer/production/RS-2009/org/keldagrim/Management$3.class index b19668254..1555fdaa0 100644 Binary files a/CompiledServer/production/RS-2009/org/keldagrim/Management$3.class and b/CompiledServer/production/RS-2009/org/keldagrim/Management$3.class differ diff --git a/CompiledServer/production/RS-2009/org/keldagrim/Management$4.class b/CompiledServer/production/RS-2009/org/keldagrim/Management$4.class index 7e7740266..ce57e7b36 100644 Binary files a/CompiledServer/production/RS-2009/org/keldagrim/Management$4.class and b/CompiledServer/production/RS-2009/org/keldagrim/Management$4.class differ diff --git a/CompiledServer/production/RS-2009/org/keldagrim/Management$5.class b/CompiledServer/production/RS-2009/org/keldagrim/Management$5.class index 2011fb2cc..8f3dd6fa7 100644 Binary files a/CompiledServer/production/RS-2009/org/keldagrim/Management$5.class and b/CompiledServer/production/RS-2009/org/keldagrim/Management$5.class differ diff --git a/CompiledServer/production/RS-2009/org/keldagrim/Management$6.class b/CompiledServer/production/RS-2009/org/keldagrim/Management$6.class index 3573686a3..141c84fc5 100644 Binary files a/CompiledServer/production/RS-2009/org/keldagrim/Management$6.class and b/CompiledServer/production/RS-2009/org/keldagrim/Management$6.class differ diff --git a/CompiledServer/production/RS-2009/org/keldagrim/Management$7.class b/CompiledServer/production/RS-2009/org/keldagrim/Management$7.class index 537e5fcfe..c51799726 100644 Binary files a/CompiledServer/production/RS-2009/org/keldagrim/Management$7.class and b/CompiledServer/production/RS-2009/org/keldagrim/Management$7.class differ diff --git a/CompiledServer/production/RS-2009/org/keldagrim/Management$8.class b/CompiledServer/production/RS-2009/org/keldagrim/Management$8.class index ea8679eea..70dad79f6 100644 Binary files a/CompiledServer/production/RS-2009/org/keldagrim/Management$8.class and b/CompiledServer/production/RS-2009/org/keldagrim/Management$8.class differ diff --git a/CompiledServer/production/RS-2009/org/keldagrim/ServerConstants.class b/CompiledServer/production/RS-2009/org/keldagrim/ServerConstants.class index 5055552ab..027a87370 100644 Binary files a/CompiledServer/production/RS-2009/org/keldagrim/ServerConstants.class and b/CompiledServer/production/RS-2009/org/keldagrim/ServerConstants.class differ diff --git a/CompiledServer/production/RS-2009/org/keldagrim/net/packet/WorldPacketRepository.class b/CompiledServer/production/RS-2009/org/keldagrim/net/packet/WorldPacketRepository.class index 9af9c45cb..8f40b7c26 100644 Binary files a/CompiledServer/production/RS-2009/org/keldagrim/net/packet/WorldPacketRepository.class and b/CompiledServer/production/RS-2009/org/keldagrim/net/packet/WorldPacketRepository.class differ diff --git a/CompiledServer/production/RS-2009/plugin/interaction/inter/GameInterface.class b/CompiledServer/production/RS-2009/plugin/interaction/inter/GameInterface.class index 29ba67819..dd812ceed 100644 Binary files a/CompiledServer/production/RS-2009/plugin/interaction/inter/GameInterface.class and b/CompiledServer/production/RS-2009/plugin/interaction/inter/GameInterface.class differ diff --git a/CompiledServer/production/RS-2009/plugin/tutorial/BasicStarter.class b/CompiledServer/production/RS-2009/plugin/tutorial/BasicStarter.class index e01e03805..1cd4d7691 100644 Binary files a/CompiledServer/production/RS-2009/plugin/tutorial/BasicStarter.class and b/CompiledServer/production/RS-2009/plugin/tutorial/BasicStarter.class differ diff --git a/CompiledServer/production/RS-2009/plugin/tutorial/TutorialCompletionDialogue.class b/CompiledServer/production/RS-2009/plugin/tutorial/TutorialCompletionDialogue.class index ae482412a..9d14416be 100644 Binary files a/CompiledServer/production/RS-2009/plugin/tutorial/TutorialCompletionDialogue.class and b/CompiledServer/production/RS-2009/plugin/tutorial/TutorialCompletionDialogue.class differ diff --git a/Management-Server/src/org/keldagrim/ServerConstants.java b/Management-Server/src/org/keldagrim/ServerConstants.java index 54a1de28d..f0abe3af7 100644 --- a/Management-Server/src/org/keldagrim/ServerConstants.java +++ b/Management-Server/src/org/keldagrim/ServerConstants.java @@ -13,7 +13,7 @@ public final class ServerConstants { /** * The port to be used for communications. */ - public static final String SERVER_NAME = "RS 2009"; + public static final String SERVER_NAME = "2009Scape"; /** * The port to be used for communications. @@ -35,6 +35,11 @@ public final class ServerConstants { */ public static final String HOST_ADDRESS = "127.0.0.1"; + /** + * The setting that determines whether new accounts created will automatically join the Server's default clan chat. + */ + public static boolean NEW_PLAYER_DEFAULT_CLAN = false; + /** * The store path. */ diff --git a/Server/global.sql b/Server/global.sql index 59aa8b4c2..86631864c 100644 --- a/Server/global.sql +++ b/Server/global.sql @@ -132,7 +132,7 @@ CREATE TABLE `members` ( -- INSERT INTO `members` (`UID`, `email`, `username`, `password`, `salt`, `rights`, `email_activated`, `lastActive`, `donatorType`, `donationTotal`, `credits`, `icon`, `perks`, `ip`, `mac`, `serial`, `computerName`, `monthlyVotes`, `netWorth`, `forumUID`, `ironManMode`, `bank`, `inventory`, `equipment`, `ge`, `muteTime`, `banTime`, `profileImage`, `contacts`, `blocked`, `clanName`, `currentClan`, `clanReqs`, `disconnectTime`, `lastWorld`, `chatSettings`, `timePlayed`, `lastLogin`, `lastGameIp`, `countryCode`, `birthday`, `online`, `signature`, `joined_date`, `posts`) VALUES -(0, '', 'rs_2009', '$2a$12$P0OU2A5S.lEYdkTq5kq3/u1UlfVkMYIS7WWbxsjjeyfxqTDbygpEe', '$2a$12$P0OU2A5S.lEYdkTq5kq3/u', 2, 0, '2019-11-06 00:29:03', 0, 0.00, 0, 0, '', '127.0.0.1', NULL, NULL, 'SERVER', 0, 0, -1, 'STANDARD', NULL, NULL, NULL, NULL, -1, -1, '', '', '', 'Rs 2009', 'rs_2009', '0,0,8,9', 1572999889084, 1, '0,0,0', NULL, 1572999890885, '127.0.0.1', 0, NULL, 0, NULL, NULL, 0); +(0, '', '2009Scape', '$2a$12$P0OU2A5S.lEYdkTq5kq3/u1UlfVkMYIS7WWbxsjjeyfxqTDbygpEe', '$2a$12$P0OU2A5S.lEYdkTq5kq3/u', 2, 0, '2019-11-06 00:29:03', 0, 0.00, 0, 0, '', '127.0.0.1', NULL, NULL, 'SERVER', 0, 0, -1, 'STANDARD', NULL, NULL, NULL, NULL, -1, -1, '', '', '', '2009Scape', '2009Scape', '0,0,8,9', 1572999889084, 1, '0,0,0', NULL, 1572999890885, '127.0.0.1', 0, NULL, 0, NULL, NULL, 0); -- -------------------------------------------------------- diff --git a/Server/server.sql b/Server/server.sql index 8671d96a9..28306e248 100644 --- a/Server/server.sql +++ b/Server/server.sql @@ -19623,6 +19623,8 @@ CREATE TABLE `npc_spawns` ( -- INSERT INTO `npc_spawns` (`npc_id`, `loc_data`) VALUES +(4474,'{3214,3252,0,0,0}-{3214,3253,0,0,0}-{3214,3254,0,0,0}'); +(7891,'{3207,3250,0,0,0}-{3208,3250,0,0,0}-{3209,3250,0,0.0}'); (4400, '{3018,10313,0,1,4}-{3016,10315,0,1,4}-{3018,10322,0,1,4}-{3024,10326,0,1,3}-{3030,10332,0,1,4}-{3029,10337,0,1,6}-{3034,10342,0,1,3}-{2072,5200,0,1,7}-{2130,5267,0,1,7}-{2140,5252,0,1,5}-{2141,5252,0,1,1}-{2142,5252,0,1,0}-{2148,5255,0,1,3}-{2125,5270,0,1,1}-{2148,5257,0,1,1}-{2117,5274,0,1,4}-{2146,5307,0,1,2}-{2145,5305,0,1,5}-{2152,5307,0,1,4}-{2148,5252,0,1,0}-{2142,5262,0,1,3}-{2124,5275,0,1,4}-{2121,5276,0,1,3}-{2148,5304,0,1,0}-{2146,5305,0,1,5}-{2148,5304,0,1,1}-{2151,5304,0,1,6}-{2145,5306,0,1,3}-{2134,5272,0,1,6}'), (1, '{3222,3221,0,1,3}-{2804,3427,0,1,2}-{3285,3208,0,1,4}-{3093,3509,0,1,3}-{3098,3508,0,1,7}-{3096,3510,0,1,3}-{3017,3239,0,1,2}-{2712,3484,0,1,4}-{2693,3495,0,1,1}-{3237,3404,0,1,6}-{3237,3408,0,1,0}-{3247,3396,0,1,3}-{3263,3403,0,1,3}-{3210,3223,1,1,4}-{3230,3208,0,1,1}'), (4401, '{2124,5273,0,1,1}-{2072,5200,0,1,6}-{2128,5270,0,1,4}-{2117,5274,0,1,3}-{2154,5273,0,1,3}-{2167,5259,0,1,6}-{2170,5257,0,1,1}-{2170,5256,0,1,0}-{2171,5256,0,1,4}-{2167,5256,0,1,3}-{2153,5273,0,1,3}-{2153,5270,0,1,1}-{2171,5255,0,1,2}-{2168,5250,0,1,4}-{2168,5251,0,1,3}-{2131,5264,0,1,6}-{2096,5248,0,1,6}-{2157,5272,0,1,6}-{2150,5268,0,1,0}-{2133,5272,0,1,2}-{2157,5274,0,1,1}-{2156,5270,0,1,3}-{2154,5271,0,1,5}'), diff --git a/Server/src/org/crandor/net/registry/AccountRegister.java b/Server/src/org/crandor/net/registry/AccountRegister.java index 3061ee427..2d56a0e8f 100644 --- a/Server/src/org/crandor/net/registry/AccountRegister.java +++ b/Server/src/org/crandor/net/registry/AccountRegister.java @@ -9,6 +9,7 @@ import org.crandor.game.system.task.TaskExecutor; import org.crandor.net.Constants; import org.crandor.net.IoSession; import org.crandor.net.event.LoginReadEvent; +import org.keldagrim.ServerConstants; import java.nio.ByteBuffer; import java.sql.*; @@ -152,13 +153,21 @@ public class AccountRegister extends SQLEntryHandler { @Override public void save() throws SQLException { - PreparedStatement statement = getWritingStatement(true, "password", "salt", "birthday", "countryCode", "joined_date"); + PreparedStatement statement = getWritingStatement(true, "password", "salt", "birthday", "countryCode", "joined_date","currentClan"); statement.setString(1, entry.getUsername()); statement.setString(2, entry.getPassword()); statement.setString(3, entry.getPassword().substring(0, 29)); statement.setDate(4, entry.getBirth()); statement.setInt(5, entry.getCountry()); statement.setTimestamp(6, new Timestamp(System.currentTimeMillis())); + + //If the management server's settings register new users with the server's clan chat + //I believe if there was no entry there would be errors during the registration, hence a null entry if the setting is off + if (ServerConstants.NEW_PLAYER_DEFAULT_CLAN == true){ + statement.setString(7,"2009Scape"); + }else{ + statement.setString(7,null); + } statement.executeUpdate(); SQLManager.close(statement.getConnection()); } diff --git a/Server/src/plugin/tutorial/TutorialCompletionDialogue.java b/Server/src/plugin/tutorial/TutorialCompletionDialogue.java index fcceced92..427bd3f27 100644 --- a/Server/src/plugin/tutorial/TutorialCompletionDialogue.java +++ b/Server/src/plugin/tutorial/TutorialCompletionDialogue.java @@ -16,6 +16,8 @@ import org.crandor.game.world.map.Location; import org.crandor.game.world.repository.Repository; import org.crandor.net.amsc.MSPacketRepository; import org.crandor.net.amsc.WorldCommunicator; +import org.keldagrim.ServerConstants; +import org.runite.GameSetting; /** * Handles the tutorial completition dialogue (skippy, magic instructor) @@ -305,6 +307,14 @@ public class TutorialCompletionDialogue extends DialoguePlugin { //Appending the welcome message and some other stuff player.getPacketDispatch().sendMessage("Welcome to " + GameWorld.getName() + "."); + + //If the management server's settings register new users with the server's clan chat, we would have to simulate joining a clan + if (ServerConstants.NEW_PLAYER_DEFAULT_CLAN == true) { + player.getPacketDispatch().sendMessage("Attempting to join channel...:clan:"); + player.getPacketDispatch().sendMessage("Now talking in clan channel " + ServerConstants.SERVER_NAME + ":clan:"); + player.getPacketDispatch().sendMessage("To talk, start each line of chat with the / symbol.:clan:"); + } + player.unlock(); TutorialSession.getExtension(player).setStage(TutorialSession.MAX_STAGE + 1); if (player.getIronmanManager().isIronman() && player.getSettings().isAcceptAid()) {