Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Realm of the Mad God Hacks & Cheats › Realm of the Mad God Help & Requests › KRelay reconnect handler bug

KRelay reconnect handler bug

Posts 1–9 of 9 · Page 1 of 1
TM
tmwilliamlin168
KRelay reconnect handler bug
Whenever I connect to a portal with multiple clients all in about a second, only one of them makes it into the portal and the others go to nexus or get disconnected. I think KRelay's reconnect handler might be messing up the portal keys, or maybe it has trouble reading/writing to files in the reconnect folder since multiple threads are trying to read the file at once.
Please solve it asap, any help appreciated.
#1 · 10y ago
DonJuan13
DonJuan13
As a first note make sure you are using the most up to date k-relay, preferably from KrazyShank/Kronks as older versions do not support multiple clients. Are you trying to enter the portal on each client one after another. This messes up the reconnect packet for me. If you wait for the client to load and then enter the portal on the next client does this work for you?
#2 · 10y ago
TM
tmwilliamlin168
Quote Originally Posted by DonJuan13 View Post
As a first note make sure you are using the most up to date k-relay, preferably from KrazyShank/Kronks as older versions do not support multiple clients. Are you trying to enter the portal on each client one after another. This messes up the reconnect packet for me. If you wait for the client to load and then enter the portal on the next client does this work for you?
Yes I downloaded the krelay with version i think 27.7.3/4.
And thanks for the suggestion, it works when I wait for one client to connect.
Sometimes i get the error when krelay cant access currentservers.txt because it is being used by another process/thread, and I wonder if using files are required.
#3 · 10y ago
DonJuan13
DonJuan13
Quote Originally Posted by tmwilliamlin168 View Post
I wonder if using files are required
I'm not exactly sure what you mean by this. I may be misinformed but k-relay does not write to currentservers.txt. Those servers are not the realm or portal servers/keys. I think this error is incurred when the game is updated and k-relay is run with the old packets.xml. As long as you keep that up to date you shouldn't have a problem with the server text file. Correct me if I am wrong.
#4 · 10y ago
TM
tmwilliamlin168
Quote Originally Posted by DonJuan13 View Post
I'm not exactly sure what you mean by this. I may be misinformed but k-relay does not write to currentservers.txt. Those servers are not the realm or portal servers/keys. I think this error is incurred when the game is updated and k-relay is run with the old packets.xml. As long as you keep that up to date you shouldn't have a problem with the server text file. Correct me if I am wrong.
From ******.com/TheKronks/K_Relay/blob/ca2c36af13b67fcc393acc13e031a456a3c3a052/K_Relay/Util/ConClient.cs (one of krelay's class sources) (I hope this link is allowed):
Code:
public void Save(string text)
{
	if (_toConnect.PlayerData.Name == "") return;

	string path = Directory.GetCurrentDirectory();
	path += "\\Plugins\\";
	Directory.CreateDirectory(path);
	path += "CurrentServers.txt";
	if (!File.Exists(path))
	{
		File.WriteAllLines(path, new string[] { String.Empty });
	}
	string[] lines = File.ReadAllLines(path);
	bool found = false;
	for (int i = 0; i < lines.Length; i++)
	{
		string line = lines[i];
		string[] values = line.Split(',');
		if (values[0] == _toConnect.PlayerData.Name)
		{
			found = true;
			lines[i] = _toConnect.PlayerData.Name + "," + text + "," + lastRealm + "," + lastRealmIP + "," + lastRealmTime;
		}
	}
	File.WriteAllLines(path, new string[] { String.Empty });
	File.WriteAllLines(path, lines);
	if (!found)
	{
		using (StreamWriter file = File.AppendText(path))
		{
			file.WriteLine(_toConnect.PlayerData.Name + "," + text + "," + lastRealm + "," + lastRealmIP + "," + lastRealmTime);
		}
	}
}
When I open currentservers.txt, I see character name, server name, realm name, ip address, and a number that I think represents some sort of time.

Oh, and to answer your question, I mean that do they need to access files, or do they have an alternative for using files, because multiple processes accessing a file at the same time causes problems
#5 · edited 10y ago · 10y ago
DonJuan13
DonJuan13
Make sure to run K-Relay as administrator. Other than that it should have no problems accessing the file.
#6 · 10y ago
TM
tmwilliamlin168
I created my own external reconnect handler, without using files.
However, I still can't use portals at the same time without messing up the reconnect packets.
#7 · 10y ago
DonJuan13
DonJuan13
Have you tried the PluginUtils.Delay method? Since waiting to use the portals on each client worked for you maybe it would work to just simply delay the sending of each Packet. I assume you store your clients in some sort of dictionary or array (i.e. _clients) so maybe something to the effect of:
Code:
foreach (cl in _clients) {
    PluginUtils.Delay(1500, () =>
    {
        SendReconPacket(cl); //insert magical method for sending the reconnect packet
    }
}
Or perhaps just wait for the HELLO packet of the previous client before sending the next reconnect packet.

If you want to send me the code I can try to better help. (Sorry for crappy syntax. Mainly Java developer + not on main computer = fakeittillimakeit)

In addition can you print out each of the reconnect packets that you send and see if all the values seem to be correct.
#8 · edited 10y ago · 10y ago
TM
tmwilliamlin168
Quote Originally Posted by DonJuan13 View Post
Have you tried the PluginUtils.Delay method? Since waiting to use the portals on each client worked for you maybe it would work to just simply delay the sending of each Packet. I assume you store your clients in some sort of dictionary or array (i.e. _clients) so maybe something to the effect of:
Code:
foreach (cl in _clients) {
    PluginUtils.Delay(1500, () =>
    {
        SendReconPacket(cl); //insert magical method for sending the reconnect packet
    }
}
Or perhaps just wait for the HELLO packet of the previous client before sending the next reconnect packet.

If you want to send me the code I can try to better help. (Sorry for crappy syntax. Mainly Java developer + not on main computer = fakeittillimakeit)

In addition can you print out each of the reconnect packets that you send and see if all the values seem to be correct.
I kind of already solved the issue by waiting for the proxy client_connected listener to see if the client connected or not before sending another useportalpacket (sent when you use a portal).

I'm good with my plugin now, it's just that I want to make this a tiny bit faster, and hopefully I can gain some experience with krelay during this process.

However, by going through the code, I think the reconnect packets are fine, it's just that the way krelay is set up makes it unable to process two reconnects at the same time.

What seems to be happening is that krelay modifies the reconnect packets to make them connect to localhost (this part is fine). The first client connects, and the variable Proxy.defTempServer (which i think stands for default temporary server) has the ip address 54.168.179.62 (one of the servers). When the second client connects while the first has not finished the variable is not the same (the ip becomes the nexus ip), which might be causing the problem. Every time if I wait for the first client to finish, the variable is always the same.

The reconnect packets are same except for their time and i think key.

Maybe kronks might know more, just don't know how to contact him.

P.S. I'm mostly java too, can't really find a java proxy.
#9 · edited 10y ago · 10y ago
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

  • krelay realm reconnect hotkey?By CatInTh3Hat in Realm of the Mad God Help & Requests
    2Last post 10y ago
  • Req: Torncity hacks/bugs/exploits.By dakiddy in Hack Requests
    39Last post 16y ago
  • BugsBy Dave84311 in WarRock - International Hacks
    16Last post 20y ago
  • Find a bug or have a suggestion?By Dave84311 in Suggestions, Requests & General Help
    15Last post 20y ago

Tags for this Thread

None