Results 1 to 7 of 7
  1. #1
    rock.theory's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    109
    Reputation
    10
    Thanks
    4

    Help with packets please?

    Connecting is easy. I just don't know what a hello packet should look like, or what any of the packets look like (pre-encryption)- I already know how they're structured and I can read/write packets, but again, IDK what data goes in them. Anyone able to help please?

  2. #2
    krazyshank's Avatar
    Join Date
    Jan 2012
    Gender
    male
    Location
    RealmStock
    Posts
    2,589
    Reputation
    467
    Thanks
    16,666
    My Mood
    Angelic
    @Botmaker @eth0nic or @DatCoder should be able to help!

    Accepting PayPal - Bitcoin - Giftcards - Items:

    Find it here: MPGH Sales Thread

  3. #3
    RotMGnub's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    205
    Reputation
    49
    Thanks
    915
    I would also love to know this. I need it for my mule maker

  4. #4
    rock.theory's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    109
    Reputation
    10
    Thanks
    4
    Quote Originally Posted by RotMGnub View Post
    I would also love to know this. I need it for my mule maker
    If I find out, I'll teach you and/or release a .dll for you to use (to make life easier)

  5. #5
    Botmaker's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    England
    Posts
    1,360
    Reputation
    89
    Thanks
    7,597
    My Mood
    Amused
    Hello packet
    Code:
    public class HELLO_Packet implements RWable {
    	public String buildVersion_; // String
    	public int gameId_ = 0; // int
    	public String guid_; // String
    	public String password_; // String
    	public String secret_; // String
    	public int keyTime_ = 0; // int
    	public byte[] key_; // ByteArray
    	public String jD; // String
    	public String pk = ""; // String
    	public String Tq = ""; // String
    	public String H = ""; // String
    	public String playPlatform = ""; // String
    	public String unknow1 ="";
    
    	public void parseFromInput(ByteArrayDataInput badi) throws IOException {
    		this.buildVersion_ = badi.readUTF(); // UTF
    		this.gameId_ = badi.readInt(); // Int
    		this.guid_ = badi.readUTF(); // UTF
    		this.password_ = badi.readUTF(); // UTF
    		this.secret_ = badi.readUTF(); // UTF
    		this.keyTime_ = badi.readInt(); // Int
    		this.key_ = new byte[badi.readShort()]; // Short
    		badi.readFully(this.key_); // Bytes
    
    		byte[] buf = new byte[badi.readInt()]; // Int
    		badi.readFully(buf);
    		this.jD = new String(buf, Charset.forName("UTF-8"));		
    
    		this.pk = badi.readUTF(); // UTF
    		this.Tq = badi.readUTF(); // UTF
    		this.H = badi.readUTF(); // UTF
    		this.playPlatform = badi.readUTF(); // UTF
    		
    		//new version 12.4
    		this.unknow1 = badi.readUTF(); // UTF
    		
    	}
    
    	public void writeToOutput(ByteArrayDataOutput bado) throws IOException {
    		bado.writeUTF(this.buildVersion_); // UTF
    		bado.writeInt(this.gameId_); // Int
    		bado.writeUTF(this.guid_); // UTF
    		bado.writeUTF(this.password_); // UTF
    		bado.writeUTF(this.secret_); // UTF
    		bado.writeInt(this.keyTime_); // Int
    		bado.writeShort(this.key_.length); // Short
    		bado.write(this.key_); // Bytes
    		bado.writeInt(this.jD.getBytes().length); // Int
    		bado.write(this.jD.getBytes()); // UTFBytes        
    		
    		bado.writeUTF(this.pk); // UTF
    		bado.writeUTF(this.Tq); // UTF
    		bado.writeUTF(this.H); // UTF
    		bado.writeUTF(this.playPlatform); // UTF
    		
    		//new version 12.4
    		bado.writeUTF(this.unknow1);
    	}
    
    	public int getId() {
    		return Packets.HELLO;
    	}
    
    	public String toString() {
    		return "HELLO [" + buildVersion_ + " , " + gameId_ + " , " + guid_ + " , " + password_ + " , " + secret_ + " , " + keyTime_ + " , " + (key_ == null ? null : DatatypeConverter.printHexBinary(key_)) + " , " + jD + " , " + pk + " , " + Tq + " , " + H + " , " + playPlatform + "]";
    	}
    }
    construct Hello Packet

    Code:
    // Positive values are instanced dungeons
    		public final static int MAP_TESTING = -6;
    		public final static int VAULT = -5;
    		public final static int TUTORIAL_PT2 = -4;
    		public final static int REALM = -3; // seems to auto join a realm?
    		public final static int NORMAL = -2;
    		public final static int TUTORIAL_PT1 = -1;
    
    
    public HELLO_Packet constructHelloPacket(int gm) {
    		HELLO_Packet hp = new HELLO_Packet();
    		hp.buildVersion_ = "14.2";
    		hp.gameId_ = gm;  //NORMAL = -2
    		hp.keyTime_ = -1;
    		hp.secret_ = "";
    		hp.key_ = new byte[0];
    		hp.guid_ = getGuid();
    		hp.password_ = getPassword();
    		hp.jD = "";
    		hp.pk = "";
    		hp.Tq = "rotmg";
    		hp.H = "";
    		hp.playPlatform = "rotmg";
    		return hp;
    	}

    Packet ids
    Code:
    
    public class Packets {
    //	public static final Map<Integer, String> map = new HashMap<Integer, String>();
    	public static final Map<Integer, String> allmap = new HashMap<Integer, String>();
    	
    	public final static int FAILURE = 0;
    	public final static int CANCELTRADE = 1;
    	public final static int USEPORTAL = 3;
    	public final static int INVRESULT = 4;
    	public final static int JOINGUILD = 5;
    	public final static int PING = 6;
    	public final static int MOVE = 7;
    	public final static int GUILDINVITE = 8;
    	public final static int GLOBAL_NOTIFICATION = 9;
    	public final static int SETCONDITION = 10;
    	public final static int UPDATEACK = 11;
    	public final static int TRADEDONE = 12;
    	public final static int SHOOT = 13;
    	public final static int GOTOACK = 14;
    	public final static int CREATEGUILD = 15;
    	public final static int PONG = 16;
    	public final static int HELLO = 17;
    	public final static int TRADEACCEPTED = 18;
    	public final static int SHOOTMULTI = 19;
    	public final static int NAMERESULT = 20;
    	public final static int REQUESTTRADE = 21;
    	public final static int SHOOTACK = 22;
    	public final static int TRADECHANGED = 23;
    	public final static int PLAYERHIT = 24;
    	public final static int TEXT = 25;
    	public final static int UPDATE = 26;
    	public final static int BUYRESULT = 27;
    	public final static int PIC = 28;
    	public final static int USEITEM = 30; 
    	public final static int CREATE_SUCCESS = 31;
    	public final static int CHOOSENAME = 33;
    	public final static int QUESTOBJID = 34;
    	public final static int INVDROP = 35;
    	public final static int CREATE = 36;
    	public final static int CHANGETRADE = 37;
    	public final static int PLAYERSHOOT = 38;
    	public final static int RECONNECT = 39;
    	public final static int CHANGEGUILDRANK = 40;
    	public final static int DEATH = 41;
    	public final static int ESCAPE = 42;
    	public final static int PLAYSOUND = 44;
    	public final static int LOAD = 45;
    	public final static int ACCOUNTLIST = 46;
    	public final static int DAMAGE = 47;
    	public final static int CHECKCREDITS = 48;
    	public final static int TELEPORT = 49;
    	public final static int BUY = 50;
    	public final static int SQUAREHIT = 51;
    	public final static int GOTO = 52;
    	public final static int EDITACCOUNTLIST = 53;
    	public final static int SHOW_EFFECT = 56;
    	public final static int ACCEPTTRADE = 57;
    	public final static int AOEACK = 59;
    	public final static int MAPINFO = 60;
    	public final static int TRADEREQUESTED = 61;
    	public final static int NEW_TICK = 62;
    	public final static int NOTIFICATION = 63;
    	public final static int GROUNDDAMAGE = 64;
    	public final static int INVSWAP = 65;
    	public final static int OTHERHIT = 66;
    	public final static int TRADESTART = 67;
    	public final static int AOE = 68;
    	public final static int PLAYERTEXT = 69;
    	public final static int ALLYSHOOT = 74;
    	public final static int CLIENTSTAT = 75;
    	public final static int ENEMYHIT = 76;
    	public final static int INVITEDTOGUILD = 77;
    	public final static int GUILDREMOVE = 78;
    	public final static int CREATEGUILDRESULT = 83;
    	public final static int CLIENTSTAT_FILE = 86;
    Last edited by Botmaker; 06-22-2013 at 01:50 PM.

  6. The Following User Says Thank You to Botmaker For This Useful Post:

    RotMGnub (06-22-2013)

  7. #6
    RotMGnub's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    205
    Reputation
    49
    Thanks
    915
    @Botmaker
    Thank you. Is the data structure for the other packets(CREATE, ect) the same as in hubble's source? I have been using that with no luck

  8. #7
    rock.theory's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    109
    Reputation
    10
    Thanks
    4
    @Botmaker Nice, thanks! The only thing left would be encryption, but first I need to convert all the code you just gave. Thanks again!

    ---------- Post added at 06:09 PM ---------- Previous post was at 04:42 PM ----------

    @Botmaker idk if I'm supposed to know this already, but what is 'RWable'? Also, what is 'ByteArrayDataInput', 'ByteArrayDataOutput', 'Map', 'HashMap', 'getGuid' and 'getPassword'?
    Last edited by rock.theory; 06-22-2013 at 04:22 PM.

Similar Threads

  1. Help with Unbann please
    By killacrazy2 in forum Combat Arms Hacks & Cheats
    Replies: 8
    Last Post: 08-16-2008, 08:04 PM
  2. A bit of help with packets
    By lapa321 in forum WarRock - International Hacks
    Replies: 3
    Last Post: 02-19-2008, 01:44 PM
  3. A little Help With IE Please
    By chc18 in forum General
    Replies: 9
    Last Post: 10-24-2007, 02:53 PM
  4. Help With Coding Please
    By pbguy145 in forum WarRock - International Hacks
    Replies: 1
    Last Post: 10-10-2007, 06:52 PM
  5. Need help with "packets"
    By Nrak9493 in forum General Game Hacking
    Replies: 3
    Last Post: 01-22-2006, 09:48 AM

Tags for this Thread