|
I have made some snippets and now a tutorial in hopes that people will leave 317 behind and move on to OSRS.
If you haven't fixed these issues yet please read, or just scroll down to skip to password saving
Fix Central Server Running on 144.217.10.42 and not localhost:
Go to io.ruin.api.netty > NettyServer.javaCode:Kronos Central Server is now listening on 144.217.10.42:3845
Find:
Change it to:Code:host = "144.217.10.42";
Should now startup saying:Code:host = "127.0.0.1";
Code:Kronos Central Server is now listening on 127.0.0.1:3845
Next fix is the Update Server not finding server.properties
Go to the update-server package and go to io.ruin.update > Server.javaCode:java.io.FileNotFoundException: server.properties (The system cannot find the file specified)
Find:
Change it toCode:File systemProps = new File("server.properties");
Code:File systemProps = new File("../kronos-server/server.properties");
Now onto the RuneLite client error
Error message: "Please check your internet connection and your DNS settings." (Error while loading!) / "Bad Code Base"
You must update the jav_config file line in the client. If you don't have your own webserver to upload the file to, you can just use OSRS's jav_config.
To do that find ClientConfigLoader.java in net.runelite.client.rs > ClientConfigLoader.java
Replace this line:
with:Code:private static final String CONFIG_URL = "http://community.kronos.rip/jav_config.ws";
If you ever get this client error just ignore it, it won't impact anything:Code:private static final String CONFIG_URL = "http://oldschool6b.runescape.com/jav_config.ws";
Code:Caused by: java.lang.IllegalStateException: Expected a name but was NUMBER at line 1 column 90 path $.2.ge_limit
If you would like to add usergroup/rank saving see this snippet: https://www.rune-server.ee/runescape...nk-groups.html
You're on a roll with these Kronos based contributions. Definitely going to help me out when I finally move away from 317s. Thank you!
Should highlight the exact code changes instead of saying to replace an entire block of code.
Sorry, was a bit lazy but I might edit it
Updated the 2 different load methods to thread, better way of doing it:
PlayerFile.java load method:
PlayerLogin.java load method:Code:public static Player load(PlayerLogin login) { try { Player player; if(login.info.saved == null || login.info.saved.isEmpty()) player = new Player(); else player = GSON_LOADER.fromJson(login.info.saved, Player.class); Config.load(player); return player; } catch(Throwable t) { Server.logError("", t); return null; } }
Code:private void load(int index) { LOADING[index] = true; Server.worker.execute(() -> PlayerFile.load(this), player -> { if (player == null) { deny(Response.ERROR_LOADING_ACCOUNT); return; } if(player.getPassword() != null) { if (!info.password.equalsIgnoreCase(player.getPassword())) { deny(Response.INVALID_LOGIN); return; } } player.setIndex(index); player.init(info); //reconstruct players if their before the char fuck up //PlayerRestore.reconstructPlayer(player); World.players.set(index, player); LOADING[index] = false; player.getPacketSender().sendLogin(info); player.getChannel().pipeline().replace("decoder", "decoder", player.getDecoder()); }); }
I still have to do the friends/clan chat part but for the worldlist just look at the worldlist part of this thread: https://www.rune-server.ee/runescape...orld-list.html
Unless you don't have a webserver I will have to look into that. I don't think it needs to be used if you're only running 1 world.
Yeah without would be nice for most. I did get it working with the world list. But I don't think its really needed, unless you're like a major RSPS with 100+ people.
Edit: It may be nice to just keep to just have that functionality, but i'm not sure if the changes for friends list/clan chat, etc will need central server or not.
Some questions:
(I have multiple methods getPlayer in World.java) I added another one (Urs) like u said..
io.ruin.central.model > Player.java
I can't find: private String password;
I only can find it in io/ruin/model/entity/player
But you said above: io.ruin.central.model - Maybe u missed to add entity here?
Sorry, I made a mistake. There is 2 Player.java files, one in the central server and one in the main server.
For private String password; that would be in the main server Player.java
and the load, save, getSaveFile methods are in the central server Player.java
By the way, those aren't errors they are warnings. Don't worry about them
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |