Results 1 to 6 of 6
  1. #1
    Nisuxen's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    164
    Reputation
    10
    Thanks
    95

    Realm Relay /con

    Simple stuff. Kicks you out of wherever you are.

    Updated to current servers.

     
    Code:
    // connect.js
    
    var ID_PLAYER_TEXT = 80;
    var servers = { "usw"	: "54.241.208.233",
    				"usw2"	: "54.193.168.4",
    				"usw3"	: "54.241.223.240",
    				"use"	: "54.224.68.81",
    				"use2"	: "54.204.50.57",
    				"use3"  : "54.226.214.216",
    				"uss"	: "23.22.180.212",
    				"uss2"	: "50.19.7.133",
    				"uss3"	: "54.80.250.47",
    				"usmw"	: "54.80.67.112",
    				"usmw2"	: "50.17.143.165",
    				"ussw"	: "54.219.44.205",
    				"usnw"	: "50.18.24.120",
    				"euw"	: "54.195.57.43",
    				"euw2"	: "54.195.154.140",
    				"eue"	: "46.137.30.179",
    				"eus"	: "54.195.179.215",
    				"eun"	: "54.195.96.152",
    				"eun2"	: "54.216.200.98",
    				"eusw"	: "54.217.63.70",
    				"ae"	: "175.41.201.80",
    				"ase"	: "54.255.15.39", 
    				};
    
    var usage = 
    "Usage: /con <server>\n \
    \t\tusw   	\n \
    \t\tusw2	\n \
    \t\tuse		\n \
    \t\tuse2	\n \
    \t\tuse3	\n \
    \t\tuss		\n \
    \t\tuss2	\n \
    \t\tuss3	\n \
    \t\tusmw	\n \
    \t\tusmw2	\n \
    \t\tussw	\n \
    \t\tusnw	\n \
    \t\teuw		\n \
    \t\teuw2	\n \
    \t\teue		\n \
    \t\teus		\n \
    \t\teun		\n \
    \t\teun2	\n \
    \t\teusw	\n \
    \t\tae		\n \
    \t\tase		\n";
    
    function onClientPacket(event) {
    	var packet = event.getPacket();
    	switch (packet.id()) {
    		case ID_PLAYER_TEXT: {
    			var text = packet.text.toLowerCase();
    			if(text.length() >= 4 && text.substring(0,4) == "/con"){
    				event.cancel();
    
    				if(text.length() <= 5){
    					event.echo(usage)
    					break;
    				}
    				var server = text.substring(5, text.length());
    
    				if(servers[server] == null)
    					event.echo("Server " + server + " not found.");
    				else{
    					event.setGameIdSocketAddress(-2, servers[server], event.getRemotePort());
    					event.kickUser();
    				}
    			}
    			break;
    		}
    	}
    }
    Last edited by Lovroman; 03-13-2014 at 03:11 AM.

  2. The Following 4 Users Say Thank You to Nisuxen For This Useful Post:

    Cyeclops (10-18-2013),ninjalone (10-15-2013),reconscious (10-15-2013),Zasx (10-15-2013)

  3. #2
    Galikin's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    If I wanted to add this do I just make a connect.js in the scripts folder and copy/paste that code in?

  4. #3
    The richest man is not the one who has the most but the one who needs the least.
    MPGH Member
    Alde.'s Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    1,706
    Reputation
    166
    Thanks
    3,627
    My Mood
    Sleepy
    How to make it work :

    Replace
    Code:
    var ID_PLAYER_TEXT = 80;
    with
    Code:
    var ID_PLAYER_TEXT = $.findPacketId("PLAYERTEXT");
    voila


    - ZBorn
    Last edited by Alde.; 12-15-2013 at 02:28 PM.
    Alde is Alde is

  5. #4
    Zasx's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Northern Italy
    Posts
    1,379
    Reputation
    10
    Thanks
    442
    My Mood
    Yeehaw
    Quote Originally Posted by ZBORNOX View Post
    How to make it work :

    Replace
    var ID_PLAYER_TEXT = 80;

    with
    var ID_PLAYER_TEXT = $.findPacketId("PLAYERTEXT");

    voila
    What you mean by "make it work"?
    "First get me some porn accounts"
    . . . . . . . . . . . . . . .-Trapped

  6. #5
    Nisuxen's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    164
    Reputation
    10
    Thanks
    95
    Quote Originally Posted by Zasx View Post
    What you mean by "make it work"?
    This script was made before the findPacketId function was implemented. The updated it code is posted in another thread.

    The script doesn't work fully anymore though and I'm not sure why. Nexusing from vault causes you to connect back to your default server rather than whatever one you were in.

  7. The Following User Says Thank You to Nisuxen For This Useful Post:

    Alde. (12-15-2013)

  8. #6
    Zasx's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Northern Italy
    Posts
    1,379
    Reputation
    10
    Thanks
    442
    My Mood
    Yeehaw
    Quote Originally Posted by Nisuxen View Post
    This script was made before the findPacketId function was implemented. The updated it code is posted in another thread.

    The script doesn't work fully anymore though and I'm not sure why. Nexusing from vault causes you to connect back to your default server rather than whatever one you were in.
    Oh. Right.
    "First get me some porn accounts"
    . . . . . . . . . . . . . . .-Trapped

Similar Threads

  1. PLEASE NEED HELP WITH REALM RElAY
    By DANWARPER in forum Realm of the Mad God Help & Requests
    Replies: 18
    Last Post: 01-04-2014, 05:38 AM
  2. Realm Relay /wc
    By Nisuxen in forum Realm of the Mad God Tutorials & Source Code
    Replies: 5
    Last Post: 10-27-2013, 11:32 PM
  3. [Release] Realm Relay Command Script!
    By angelofsilence123 in forum Realm of the Mad God Hacks & Cheats
    Replies: 7
    Last Post: 10-21-2013, 02:06 AM
  4. [Outdated] Realm Relay v1.0.0 - Proxy for RotMG 17.2
    By DeVoidCoder in forum Realm of the Mad God Hacks & Cheats
    Replies: 126
    Last Post: 10-17-2013, 10:23 PM
  5. Unforgotten Realms.
    By daowner2 in forum General
    Replies: 2
    Last Post: 05-09-2008, 05:10 PM