Realm Relay v1.0.0
The completely open RotMG proxy utility for those who cannot be bothered to figure out how to decrypt, parse, and re-encrypt packets
Simplifies packet hacking
Use an easy JavaScript API to develop hacks which manipulate packets!
Easy installation and use
Works with any client; use it in conjunction with your favorite hacked client!
Customize your proxy
Mix and match scripts various scripts published by members of the community!
Prevent IP bans
Optionally pipe your connection through your favorite Socks4/5 proxy to hide your real ip address
Code:
// spamfilter.js
var ID_TEXT = 20;
var keywords = [
".info",
".net",
".org",
".us",
"% off",
"24/7",
"cheap",
"client",
"customer",
"del|very",
"delivery",
"dellvery",
"pric", // pricing/prices/price
"prize",
"satis", // faction/factory/fied
"service",
"stock",
"www"
];
function onServerPacket(event) {
// get the packet involved in this event
var packet = event.getPacket();
// if this event's packet is a TEXT packet...
if (packet.id() == ID_TEXT) {
// make text lowercase to match the keyword list
var text = packet.text.toLowerCase();
// loop through every keyword for testing
for (var i = 0; i < keywords.length; i++) {
// if keyword exists in the text...
if (text.indexOf(keywords[i]) != -1) {
// cancel the event to stop the packet from being sent to the client
event.cancel();
// break the loop because we already know the packet is spam
break;
}
}
}
}
Code:
// autonexus.js
var ID_MOVE = 74;
var ID_PLAYERHIT = 26;
var ID_SHOOT = 10;
var ID_SHOOT2 = 59;
var ID_UPDATE = 66;
var ID_CREATE_SUCCESS = 47;
var ID_NEW_TICK = 50;
var ID_AOE = 24;
var ID_ESCAPE = 69;
var nexusHealthPercentage = 20;
var playerObjectId = -1;
var health = -1;
var maxHealth = -1;
var defenceBonus = -1;
var bulletIdDamageMap = {};
var bEscapeToNexusSent = false; // true = don't confirm any more hits
var playerLocation = null;
function onClientPacket(event) {
if (bEscapeToNexusSent) {
event.cancel();
return;
}
var packet = event.getPacket();
switch (packet.id()) {
case ID_MOVE: {
playerLocation = packet.newPosition;
break;
}
case ID_PLAYERHIT: {
// predict what the damage will be
health -= getDamageEstimate(bulletIdDamageMap[packet.bulletId]);
// if the predicted health percentage is below nexusHealthPercentage...
if (100 * health / maxHealth <= nexusHealthPercentage) {
// send ESCAPE packet to the server
// and prevent any more packets from being sent after that
var escapePacket = event.createPacket(ID_ESCAPE);
event.sendToServer(escapePacket);
bEscapeToNexusSent = true;
event.cancel();
}
break;
}
}
}
function onServerPacket(event) {
var packet = event.getPacket();
switch (packet.id()) {
case ID_SHOOT2:
case ID_SHOOT: {
// store projectile damage...
bulletIdDamageMap[packet.bulletId] = packet.damage;
break;
}
case ID_UPDATE: {
for (var i = 0; i < packet.newObjs.length; i++) {
var objectData = packet.newObjs[i];
if (objectData.status.objectId == playerObjectId) {
for (var j = 0; j < objectData.status.data.length; j++) {
var statData = objectData.status.data[j];
// update player data...
if (statData.obf0 == 0) {
maxHealth = statData.obf1;
} else if (statData.obf0 == 1) {
health = statData.obf1;
} else if (statData.obf0 == 49) {
defenceBonus = statData.obf1;
}
}
}
}
break;
}
case ID_CREATE_SUCCESS: {
// keep the player's objectId
playerObjectId = packet.objectId;
break;
}
case ID_NEW_TICK: {
for (var i = 0; i < packet.statuses.length; i++) {
var status = packet.statuses[i];
if (status.objectId == playerObjectId) {
for (var j = 0; j < status.data.length; j++) {
var statData = status.data[j];
// update the player's health
if (statData.obf0 == 1) {
health = statData.obf1;
}
}
}
}
break;
}
case ID_AOE: {
if (playerLocation != null && playerLocation.distanceTo(packet.pos) <= packet.radius) {
// predict what the damage will be
health -= getDamageEstimate(packet.damage);
// if the predicted health percentage is below nexusHealthPercentage...
if (100 * health / maxHealth <= nexusHealthPercentage) {
// send ESCAPE packet to the server
// and prevent any more packets from being sent after that
var escapePacket = event.createPacket(ID_ESCAPE);
event.sendToServer(escapePacket);
bEscapeToNexusSent = true;
event.cancel();
}
}
break;
}
}
}
function getDamageEstimate(baseDamage) {
// not a perfect damage calculation at all, but good enough for govt work
var damage = baseDamage - defenceBonus;
if (damage < 0.15 * baseDamage) {
damage = 0.15 * baseDamage;
}
if (isNaN(damage)) {
return 100;
}
return damage;
}
The documentation for developing scripts is available in every download
Want to contribute to the project?
View the source and contribute at https://******.com/DeVoidCoder/Realm-Relay.
Alternatively, publish JavaScript hacks for the rest of the community to use!
Q & A
Q: Help, I have no idea how to use this thing! What do I do?
A: Follow the directions in the readme.txt located inside the .zip file download. If you have any questions, feel free to ask them in this thread.
Q: Why do I get the "Realm Relay listener problem" error?
A: Close any previously opened instances of Realm Relay. Check your task manager for any running instances of java.exe.
Q: The "Realm Relay enabled!" notification does not show up when I enter the game. What did I do wrong?
A: You either did not edit your hosts file correctly or are not connecting to USEAST3. Refer to the readme.txt. If you continue having problems, post here and someone can help you.
Q: What exactly can this proxy do?
A: This proxy has the potential to do all kinds of hacks! You just need to find/create scripts to do them! If you cannot find the hack you want, someone might make it sooner or later.
Report any bugs or issues to this thread
If it seems like I forgot anything, let me know. I am trying to make sure nothing is confusing.
Great work!!! Im sure we can use amazing hacks with this! WOW! U must have worked hard for this! I am sure we are gonna make awesome hacks thanks to this!
People should start making hacks in this format. I've do believe @krazyshank made a 50% godmode using a proxy but he is not up for sharing since he probably doesnt want it to be patched.
Great works.
Is it able to inject complex packets? I mean you have an Autonexus, but an Escape packet contains basically nothing.
Also, i see you still have the + in the notification. Here is how i send notification without it
Code:
/**
* Send a NOTIFICATION on an object
* @param objectId Target ObjectId
* @param color Color of the notification
* @param text Notification text
*/
public void sendNotif (int objectId, int color, String text )
{
NotificationPacket notp = new NotificationPacket();
notp.isModified =true;
notp.objectId = objectId;
notp.color = color;
notp.text = "{\"key\":\"blank\",\"tokens\":{\"data\":\" "+ text +"\"}}";
proxy.serverHose.addArtificialPacketToQueue(notp);
}
Last edited by JustAnoobROTMG; 10-12-2013 at 04:54 AM.
Due to a recent DMCA takedown attempt we had to remove Faintmako brain. Please do not paid attention to what he say or do.
Great works.
Is it able to inject complex packets? I mean you have an Autonexus, but an Escape packet contains basically nothing.
Also, i see you still have the + in the notification. Here is how i send notification without it
Code:
/**
* Send a NOTIFICATION on an object
* @param objectId Target ObjectId
* @param color Color of the notification
* @param text Notification text
*/
public void sendNotif (int objectId, int color, String text )
{
NotificationPacket notp = new NotificationPacket();
notp.isModified =true;
notp.objectId = objectId;
notp.color = color;
notp.text = "{\"key\":\"blank\",\"tokens\":{\"data\":\" "+ text +"\"}}";
proxy.serverHose.addArtificialPacketToQueue(notp);
}
Yes, you are able to create more complex packets and send them, for example (a ripped portion of an auto-loot script I am working on):
how i can change the server i connect on the settings dosnt have a thing
You can change the remoteHost and remotePort in the settings.properties file. For now that is the easiest way, though it is actually possible to create a script that can switch servers for you.
People should start making hacks in this format. I've do believe @krazyshank made a 50% godmode using a proxy but he is not up for sharing since he probably doesnt want it to be patched.
Ofcourse people never credit me. Sigh.
d e a d b o y s
Originally Posted by Dave84311
What do you call a troll with shitty jokes?
Trollaux