Thread: 731 Skeleton | RSEmu

Results 1 to 7 of 7
  1. #1 731 Skeleton | RSEmu 
    Registered Member

    Join Date
    Jan 2014
    Posts
    595
    Thanks given
    328
    Thanks received
    231
    Rep Power
    153
    Well I decided to take toms ieldor 530 and convert it, going to continue this with Marcus. Hopefully make a fun server with it. I removed a lot of the stuff past login that's sir tom had on the original 530
    We will release updated versions later on.


    I will also Release our client with renamed information once we get further into development.

    Download RSEmu.rar @ UppIT
    https://mega.co.nz/#!p8AT0DyR!3BKms6...2z3mKK-1OnH2-A
    Post minors if you want

    Features
    Netty 4 Alpha
    JS5 Complete
    Note: I will update the networking to the final release later and rerelease.

    Credits
    Sir Tom
    maffia-rpg
    Myself


    Spoiler for 731 Stuff:

    Quote Originally Posted by maffia-rpg View Post
    Spoiler for Media:








    Quote Originally Posted by maffia-rpg View Post
    For the ones who don't want to disconnect in-game, handle the ping packet:

    Incoming ping packet:
    Code:
    	/**
    	 * The ping packet.
    	 */
    	public static final int PING_PACKET = 51;
    Outgoing ping packet:
    Code:
    	@Override
    	public OutputStream send(EmptyContext context) {
    		OutputStream outputStream = new OutputStream(0);
    		outputStream.writePacket(context.getPlayer(), 154);
    		return outputStream;
    	}


    Spoiler for JS5 Constants:


    Code:
    package org.matrix.utils;
    
    import java.math.BigInteger;
    
    import org.matrix.node.map.Location;
    
    /**
     * Holds the constants for this server.
     * @author Apache Ah64
     */
    public class Constants {
    
    	/**
    	 * The server name.
    	 */
    	public final static String SERVER_NAME = "Matrix";
    
    	/**
    	 * The server port.
    	 */
    	public final static int GAME_PORT = 43594;
    
    	/**
    	 * The client build.
    	 */
    	public static final int CLIENT_BUILD = 731;
    
    	/**
    	 * The client sub build.
    	 */
    	public static final int CLIENT_SUB_BUILD = 1;
    
    	/**
    	 * If developer mode is supposed to be active {@code true}.
    	 */
    	public static final boolean DEVELOPER_MODE = true;
    
    	/**
    	 * The player save path.
    	 */
    	public static final String PLAYER_SAVE_PATH = "data/characters/";
    
    	/**
    	 * The cache path.
    	 */
    	public static final String CACHE_PATH = "data/cache/";
    
    	/**
    	 * The plugins path.
    	 */
    	public static final String PLUGINS_PATH = "data/plugins";
    
    	/**
    	 * The punishments path.
    	 */
    	public static final String PUNISHMENTS_PATH = "data/punishments.mx";
    
    	/**
    	 * The maximum amount of players.
    	 */
    	public static final int MAX_PLAYERS = 2048;
    
    	/**
    	 * The maximum amount of players in the friendschat.
    	 */
    	public static final int MAX_FRIENDS_CHAT_PLAYERS = 100;
    
    	/**
    	 * The maximum amount of channels in the friendschat.
    	 */
    	public static final int MAX_FRIENDS_CHANNELS = 100;
    
    	/**
    	 * The maximum amount of friends/ignores in the friends/ignores list.
    	 */
    	public static final int MAX_FRIENDS_IGNORES = 200;
    
    	/**
    	 * The maximum amount of NPC's.
    	 */
    	public static final int MAX_NPCS = 32767;
    
    	/**
    	 * The default player location.
    	 */
    	public static final Location DEFAULT_PLAYER_LOCATION = Location.create(3093, 3107, 0);
    
    	/**
    	 * The receive data limit.
    	 */
    	public static final int RECEIVE_DATA_LIMIT = 7500;
    
    	/**
    	 * The RSA update server exponent.
    	 */
    	public static final BigInteger UPDATE_SERVER_MODULUS = new BigInteger("120939379545801108457092146136811590420117523610064329653999963622953411640892324098339081283171912438928542907153945666535787774120650877051372580500361985127885543638857782912119058293779031071351842051170733225061372133137112279533742782156137403056226682880755263648445207569855678164101699535411202797793");
    
    	/**
    	 * The RSA update server module.
    	 */
    	public static final BigInteger UPDATE_SERVER_EXPONENT = new BigInteger("116004886039759144924823894633541160086361107263064741368072992557329757480223601473883297476296381153369317984839380600812353736737209150313264789782783070454203314363903974971831420929231516330529864396566068512185632885056062640327840641734302009883004782591064275287500533212626993040798901609596793942785");
    
    
    	/**
    	 * The RSA login exponent.
    	 */
    	public static final BigInteger LOGIN_EXPONENT = new BigInteger("101521344376230457116763561496333896118695200540835390012618067855812374446350530514392703350814315018503110480442155922899944749721401059449237430604591161867291224191408527439687174591056126248154359079088357096501314949835473694915241698749310876797275868196620118592705041178439340344507921261568334113727");
    
    	/**
    	 * The RSA login module.
    	 */
    	public static final BigInteger LOGIN_MODULUS = new BigInteger("97986368593595336449957719798748807528389534312076271346692034762339010720721162208949302690934273715541057012685484121992706488603799746943886868072896419858554730745006745702106841094486101183626653010817229035482795500077179203008407982492006628927520348330563549085690263875487431928517959476709053202513");
    
    	/**
    	 * The grab server keys.
    	 */
    	public static final int[] GRAB_SERVER_KEYS = {1441,78700,44880,39771,363186,44375,0,16140,7316 ,271148,810710,
    		216189,379672,454149,933950,21006,25367,17247,1244,1,14856,1494,119,882901,1818764,3963,3618};
    
    	/**
    	 * The server token.
    	 */
    	public static final String SERVER_TOKEN = "tTV1IqwcDf3dBRuoX+3/+eB0Kafa2rMW";
    
    	/**
    	 * The second server token.
    	 */
    	public static final String SECOND_SERVER_TOKEN = "wwGlrZHF5gKT9J40b*IknPyblWPzbLzKKmc7smulyiQ";
    
    	/**
    	 * The packet sizes.
    	 */
    	public static final int[] PACKET_SIZES = new int[104];
    
    	static {
    		PACKET_SIZES[0] =  -1;
    		PACKET_SIZES[1] =  8;
    		PACKET_SIZES[2] =  -2;
    		PACKET_SIZES[3] =  8;
    		PACKET_SIZES[4] =  2;
    		PACKET_SIZES[5] =  18;
    		PACKET_SIZES[6] =  1;
    		PACKET_SIZES[7] =  -1;
    		PACKET_SIZES[8] =  16;
    		PACKET_SIZES[9] =  9;
    		PACKET_SIZES[10] =  -1;
    		PACKET_SIZES[11] =  3;
    		PACKET_SIZES[12] =  3;
    		PACKET_SIZES[13] =  5;
    		PACKET_SIZES[14] =  8;
    		PACKET_SIZES[15] =  7;
    		PACKET_SIZES[16] =  -2;
    		PACKET_SIZES[17] =  8;
    		PACKET_SIZES[18] =  2;
    		PACKET_SIZES[19] =  8;
    		PACKET_SIZES[20] =  4;
    		PACKET_SIZES[21] =  3;
    		PACKET_SIZES[22] =  3;
    		PACKET_SIZES[23] =  8;
    		PACKET_SIZES[24] =  7;
    		PACKET_SIZES[25] =  3;
    		PACKET_SIZES[26] =  -1;
    		PACKET_SIZES[27] =  2;
    		PACKET_SIZES[28] =  0;
    		PACKET_SIZES[29] =  8;
    		PACKET_SIZES[30] =  8;
    		PACKET_SIZES[31] =  7;
    		PACKET_SIZES[32] =  9;
    		PACKET_SIZES[33] =  8;
    		PACKET_SIZES[34] =  -1;
    		PACKET_SIZES[35] =  -1;
    		PACKET_SIZES[36] =  3;
    		PACKET_SIZES[37] =  6;
    		PACKET_SIZES[38] =  9;
    		PACKET_SIZES[39] =  9;
    		PACKET_SIZES[40] =  4;
    		PACKET_SIZES[41] =  3;
    		PACKET_SIZES[42] =  4;
    		PACKET_SIZES[43] =  -1;
    		PACKET_SIZES[44] =  17;
    		PACKET_SIZES[45] =  -2;
    		PACKET_SIZES[46] =  4;
    		PACKET_SIZES[47] =  2;
    		PACKET_SIZES[48] =  7;
    		PACKET_SIZES[49] =  9;
    		PACKET_SIZES[50] =  -1;
    		PACKET_SIZES[51] =  0;
    		PACKET_SIZES[52] =  6;
    		PACKET_SIZES[53] =  3;
    		PACKET_SIZES[54] =  1;
    		PACKET_SIZES[55] =  16;
    		PACKET_SIZES[56] =  3;
    		PACKET_SIZES[57] =  -1;
    		PACKET_SIZES[58] =  4;
    		PACKET_SIZES[59] =  -1;
    		PACKET_SIZES[60] =  0;
    		PACKET_SIZES[61] =  3;
    		PACKET_SIZES[62] =  3;
    		PACKET_SIZES[63] =  3;
    		PACKET_SIZES[64] =  9;
    		PACKET_SIZES[65] =  -1;
    		PACKET_SIZES[66] =  -1;
    		PACKET_SIZES[67] =  4;
    		PACKET_SIZES[68] =  8;
    		PACKET_SIZES[69] =  4;
    		PACKET_SIZES[70] =  1;
    		PACKET_SIZES[71] =  -1;
    		PACKET_SIZES[72] =  -1;
    		PACKET_SIZES[73] =  -1;
    		PACKET_SIZES[74] =  4;
    		PACKET_SIZES[75] =  -1;
    		PACKET_SIZES[76] =  -2;
    		PACKET_SIZES[77] =  3;
    		PACKET_SIZES[78] =  -1;
    		PACKET_SIZES[79] =  7;
    		PACKET_SIZES[80] =  -1;
    		PACKET_SIZES[81] =  -2;
    		PACKET_SIZES[82] =  11;
    		PACKET_SIZES[83] =  7;
    		PACKET_SIZES[84] =  -1;
    		PACKET_SIZES[85] =  6;
    		PACKET_SIZES[86] =  7;
    		PACKET_SIZES[87] =  -1;
    		PACKET_SIZES[88] =  -1;
    		PACKET_SIZES[89] =  4;
    		PACKET_SIZES[90] =  1;
    		PACKET_SIZES[91] =  12;
    		PACKET_SIZES[92] =  11;
    		PACKET_SIZES[93] =  -1;
    		PACKET_SIZES[94] =  3;
    		PACKET_SIZES[95] =  3;
    		PACKET_SIZES[96] =  3;
    		PACKET_SIZES[97] =  -1;
    		PACKET_SIZES[98] =  3;
    		PACKET_SIZES[99] =  9;
    		PACKET_SIZES[100] =  -2;
    		PACKET_SIZES[101] =  15;
    		PACKET_SIZES[102] =  -2;
    		PACKET_SIZES[103] =  -2;
    	}
    
    }


    Spoiler for PacketsDecoder:

    Code:
    	@Override
    	public void decode(Session session, InputStream inputStream) throws Throwable {
    		Player player = session.getPlayer();
    		while(inputStream.getRemaining() > 0 && session.getChannel().isConnected() && player.isActive()) {
    			int opcode = inputStream.readPacket(player);
    			if(opcode >= Constants.PACKET_SIZES.length || opcode < 0) {
    				continue;
    			}
    			int length = Constants.PACKET_SIZES[opcode];
    			if(inputStream.getRemaining() > 0) {
    				if (length == -1) {
    					length = inputStream.readUnsignedByte();
    				} else if(length == -2) {
    					length = inputStream.readUnsignedShort();
    				} else if (length == -3) {
    					length = inputStream.readInt();
    				}
    				if(length > inputStream.getRemaining()) {
    					continue;
    				}
    				byte[] payload = new byte[length];
    				inputStream.readBytes(payload);
    				IncomingPacket packet = PacketRepository.getIncoming(opcode);
    				if (packet != null) {
    					int offset = inputStream.getOffset();
    					PacketRepository.handle(player, packet, payload, opcode);
    					inputStream.setOffset(offset + length);
    				} else {
    					Logger.log("PacketsDecoder", "Unhandled opcode: " + opcode);
    				}
    			}
    		}
    	}


    Spoiler for Map Region Packet:

    Code:
    	@Override
    	public OutputStream send(UpdateSceneGraphContext context) {
    		final Player player = context.getPlayer();
    		final OutputStream stream = new OutputStream();
    		stream.writePacketVarShort(player, 51);
    		if (context.isLogin()) {
    			player.getPlayerUpdater().initialize(stream);
    		}
    		stream.writeShort128(player.getLocation().getChunkY());
    		stream.writeNegativeByte(0);
    		stream.writeNegativeByte(0);
    		stream.writeShort(player.getLocation().getChunkX());
    		for (int regionX = (player.getLocation().getChunkX() - 6) / 8; regionX <= ((player.getLocation().getChunkX() + 6) / 8); regionX++) {
    			for (int regionY = (player.getLocation().getChunkY() - 6) / 8; regionY <= ((player.getLocation().getChunkY() + 6) / 8); regionY++) {
    				int regionHash = regionY | (regionX << 8);
    				int[] xteaKeys = new int[4];//MapXTEAKeys.getKeys(regionHash);
    				for (int i = 0; i < xteaKeys.length; i++) {
    					stream.writeInt(xteaKeys[i]);
    				}
    			}
    		}
    		stream.endPacketVarShort();
    		return stream;
    	}


    Spoiler for Windowpane Packet:

    Code:
    	@Override
    	public OutputStream send(WindowPaneContext context) {
    		OutputStream outputStream = new OutputStream();
    		int[] keys = new int[4];
    		outputStream.writePacket(context.getPlayer(), 46);
    		outputStream.writeIntLE(keys[3]);
    		outputStream.writeInt(keys[0]);
    		outputStream.writeIntV2(keys[1]);
    		outputStream.writeIntV2(keys[2]);
    		outputStream.writeShortLE128(context.getWindowId());
    		outputStream.writeByte(context.getType());
    		return outputStream;
    	}


    Spoiler for Game Interface Packet:

    Code:
    	@Override
    	public OutputStream send(InterfaceContext context) {
    		int[] keys = new int[4];
    		OutputStream outputStream = new OutputStream();
    		outputStream.writePacket(context.getPlayer(), 110);
    		outputStream.writeInt(keys[2]);
    		outputStream.writeInt(context.getWindowId() | context.getWindowComponentId());
    		outputStream.writeIntLE(keys[1]);
    		outputStream.writeIntV2(keys[3]);
    		outputStream.writeShort(context.getInterfaceId());
    		outputStream.writeInt(keys[0]);
    		outputStream.writeNegativeByte(context.isWalkable() ? 1 : 0);
    		return outputStream;
    	}


    Client: 731 Deob.zip
    Cache: https://mega.co.nz/#!MEUiXDYb!GMgc7Q...529NHp8JOxEors

    Credits:
    Major
    Lazaro
    Me




    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member
    maffia-rpg's Avatar
    Join Date
    Jul 2011
    Posts
    2,775
    Thanks given
    587
    Thanks received
    759
    Rep Power
    120
    For the ones who don't want to disconnect in-game, handle the ping packet:

    Incoming ping packet:
    Code:
    	/**
    	 * The ping packet.
    	 */
    	public static final int PING_PACKET = 51;
    Outgoing ping packet:
    Code:
    	@Override
    	public OutputStream send(EmptyContext context) {
    		OutputStream outputStream = new OutputStream(0);
    		outputStream.writePacket(context.getPlayer(), 154);
    		return outputStream;
    	}
    Reply With Quote  
     

  4. Thankful users:


  5. #3  
    Registered Member

    Join Date
    Jan 2014
    Posts
    595
    Thanks given
    328
    Thanks received
    231
    Rep Power
    153
    Quote Originally Posted by maffia-rpg View Post
    For the ones who don't want to disconnect in-game, handle the ping packet:

    Incoming ping packet:
    Code:
    	/**
    	 * The ping packet.
    	 */
    	public static final int PING_PACKET = 51;
    Outgoing ping packet:
    Code:
    	@Override
    	public OutputStream send(EmptyContext context) {
    		OutputStream outputStream = new OutputStream(0);
    		outputStream.writePacket(context.getPlayer(), 154);
    		return outputStream;
    	}
    You have mapdata for this revision?




    Reply With Quote  
     

  6. #4  
    Registered Member
    medic's Avatar
    Join Date
    Sep 2013
    Posts
    1,581
    Thanks given
    821
    Thanks received
    560
    Rep Power
    1129


    Reply With Quote  
     

  7. #5  
    Registered Member
    maffia-rpg's Avatar
    Join Date
    Jul 2011
    Posts
    2,775
    Thanks given
    587
    Thanks received
    759
    Rep Power
    120
    Quote Originally Posted by Belthazar View Post
    You have mapdata for this revision?
    Savions packed real 742 maps in my 731, but he wont share it and I am not allowed to.
    Reply With Quote  
     

  8. Thankful user:


  9. #6  
    Registered Member

    Join Date
    Jan 2014
    Posts
    595
    Thanks given
    328
    Thanks received
    231
    Rep Power
    153




    Reply With Quote  
     

  10. #7  
    Registered Member
    medic's Avatar
    Join Date
    Sep 2013
    Posts
    1,581
    Thanks given
    821
    Thanks received
    560
    Rep Power
    1129
    always thought you where more of an rs3 kinda coder, due to seeing all your dl's..., but anyways, nice work


    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. josem 731 source
    By Fearless in forum Requests
    Replies: 9
    Last Post: 08-18-2010, 07:18 PM
  2. Replies: 16
    Last Post: 05-01-2010, 11:55 AM
  3. [Perl] IRC Bot Skeleton
    By ark+ in forum Application Development
    Replies: 5
    Last Post: 04-03-2010, 12:28 AM
  4. Packet Skeleton
    By samuraiblood2 in forum Tutorials
    Replies: 20
    Last Post: 12-17-2007, 12:04 PM
  5. Haloween Skeleton Armor Crafting + Pumpkin Crafting
    By Crazy Cam10 in forum Tutorials
    Replies: 15
    Last Post: 09-23-2007, 07:27 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •