[Realm Relay] What do UPDATE packets contain?

Posts 1–15 of 15 · Page 1 of 1
[Realm Relay] What do UPDATE packets contain?
I know that UPDATE packets contain status effects of enemies somewhere but I can't think of anyway I can check where they are. Most likely they're included in ID_UPDATE.newObjs[i].status.data[j].obf0-2. I tried to do a Sprite World while using this script:
Code:
//debug.js

var ID_UPDATE = $.findPacketId("UPDATE");

function onServerPacket(event) {
	var packet = event.getPacket();
	switch (packet.id()) {
		case ID_UPDATE: {
			for (var i = 0; i < packet.newObjs.length; i++) {
				var objectData = packet.newObjs[i];
				if(objectData == null) {
					continue;
				}
				var type = objectData.objectType;
				if(type == 3334){ // Limon
					for (var j = 0; j < objectData.status.data.length; j++) {
						var statData = objectData.status.data[j];
						$.echo(statData.obf0 + ", " + statData.obf1 + ", " + statData.obf2);
					}
				}
			}
			break;
		}
	}
}
/*
UPDATE
	Tile[] tiles
	Entity[] newObjs
	int[] drops
	
Entity
	short objectType
	Status status
	
Status
	int objectId
	Location pos
	StatData[] data
	
StatData
	int obf0 what does these contain?
	int obf1
	string obf2
*/
And it outputted this:
Code:
1, 9000, null
2, 100, null
21, 16, null
29, 16777216, null
But I still have no idea what's going on @DeVoidCoder @NisuxenZ @JustAnoobROTMG

Edit: Also how is it possible that none of the packets contain ObjectData? (Edit2: I'm dumb, of course they don't have)
Code:
ObjectData
	string id
	int type
	int maxHitPoints
	int maxSize
	int minSize
	int size
	int sizeStep
	int shadowSize
	int color
	float xpMult
	float rotation
	boolean drawOnGround
	boolean enemy
	boolean fullOccupy
	boolean occupySquare
	boolean enemyOccupySquare
	boolean blocksSight
	boolean noMiniMap
	boolean stasisImmune
	boolean protectFromGroundDamage
	boolean protectFromSink
	boolean connects
	float z
How to modify ObjectData if none of the packets contain it?

Edit2: I've tried to use $.findObject(searchterm) to get ObjectData of Scorpion Queen but no matter how I use it, it always returns null. How it should be used to get something else than null?

Edit3: I found out that $.findObject(searchterm) can only be used to walls and some other objects, not for enemies
 
Objects with Id of 0-10000
Rags, 505
Abyss Bones, 506
Spider Ground Rocks, 508
Spider Junk, 509
Spider Egg Prop, 510
Wooden Wall Tutorial, 512
Wooden Wall Torch Tutorial, 513
Spider Silk, 6144
Big Candle, 6145
Small Candle, 6146
Pool of Blood, 6147
Target, 6148
Dummy, 6149
Target Strong, 6150
Dummy Strong, 6151
Target Spawner, 6152
Dummy Spawner, 6153
Gothic Bricks, 6154
Gothic Pillar, 6155
Gothic Arch, 6156
Gothic Candelabra, 6157
Gothic Window 1, 6158
Gothic Window Light Da, 6159
Gothic Window Light Db, 6160
Gothic Window Light Ua, 6161
Gothic Window Light Ub, 6162
Gothic Window Light Ra, 6163
Gothic Window Light Lb, 6164
Gothic Window Light La, 6165
Gothic Window Light Rb, 6166
Gothic Landscape Lf, 6167
Gothic Landscape Rt, 6168
Gothic Portrait, 6169
Gothic Bookshelf, 6170
Death Grass, 6171
Death Flower, 6172
Rock Path, 6173
Death Tree, 6174
Tombstone, 6175
Egypt Plant, 6176
Snake Pit Trap, 6181
GhostShip Wall, 6182
GhostShip Column, 6183
GhostShip Map 1, 6184
GhostShip Map 2, 6185
GhostShip Window, 6186
GhostShip Stairs, 6187
GhostShip Bookshelf Rt, 6188
GhostShip Bookshelf Lf, 6189
GhostShip Barrel, 6190
Ghost Small Candle, 6193
GhostShip Stool, 6194
GhostShip Weapons, 6195
GhostShip Bones, 6196
Ghost Table, 6197
GhostShip Brig, 6198
Castle Pot, 6199
GhostShip Panel, 6200
Castle Door, 6202
Magic Blue Flame, 6243
Big Trees, 6245
Destructible Purple Wall, 6246
Ghost Ship Crate, 6247
GhostShip RedDoor Rt, 6248
GhostShip RedDoor Lf, 6249
GhostShip PurpleDoor Rt, 6250
GhostShip PurpleDoor Lf, 6251
GhostShip GreenDoor Rt, 6252
GhostShip GreenDoor Lf, 6253
GhostShip YellowDoor Rt, 6254
GhostShip YellowDoor Lf, 6255
Ghost Puddle, 6256
GP Center, 6257
GP Rt, 6258
GP Lf, 6259
GP Up, 6260
GP Dn, 6261
GP Cur, 6262
GP Cul, 6263
GP Cdr, 6264
GP Cdl, 6265
Table Edge UL, 6266
Table Edge UR, 6267
Table Edge LR, 6268
Table Edge LL, 6269
Ghost Table Edge UL, 6270
Ghost Table Edge UR, 6271
Ghost Table Edge LR, 6272
Ghost Table Edge LL, 6273
Tesla Coil, 6282
Lab Table, 6283
Lab Wall, 6284
Lab Equipment Wall, 6286
Lab Window Wall, 6287
Cloning Vat, 6298
Monster Tank1, 6300
Monster Tank2, 6301
Monster Tank3, 6302
Monster Tank4, 6303
Partial Horizontal Catwalk, 6304
Partial Vertical Catwalk, 6305
Partial Catwalk, 6306
Mad Lab Bones, 6307
Iron Brick, 6308
Iron Wall, 6309
Iron Deathspike, 6310
Beach Umbrella, 6311
Ice Cave Wall, 6312
Ice Crystal Tree, 6313
Ice Crystal Rock, 6314
Ice Flower, 6315
Lab Table Plain, 6316
Lab Table Beaker, 6317
MadLab Warning R, 6318
MadLab Warning L, 6319
MadLab Warning U, 6320
MadLab Warning D, 6321
MadLab Warning UR, 6322
MadLab Warning UL, 6323
MadLab Warning DR, 6324
MadLab Warning DL, 6325
MadLab Cables Hor, 6326
MadLab Cables Vert, 6327
MadLab Cables UR, 6328
MadLab Cables UL, 6329
MadLab Cables DR, 6330
MadLab Cables DL, 6331
MadLab Warning Inner UR, 6332
MadLab Warning Inner UL, 6333
MadLab Warning Inner DR, 6334
MadLab Warning Inner DL, 6335
Lab Wall Blue Glow, 6336
Lab Wall Green Glow, 6337
Lab Emergency Wall, 6338
Lab Destructible Wall, 6339
Brown Wall Tunnel Left, 6340
Brown Wall Tunnel Middle, 6341
Brown Wall Tunnel Right, 6342
High Sign, 6343
Character Changer NonStatic, 6344
Name Changer NonStatic, 6345
Candy Happy Flower 2, 6350
Candy Happy Flower 1, 6351
Retro Tomb Rock Wall, 6352
Candy Small Tree, 6353
Candy Jelly Bean, 6354
Candy Peppermint Tree, 6355
Candy Ground Flowers, 6356
Candy Marshmallo, 6357
Candy Rock Wall, 6358
Candy Rock Wall Blue, 6359
Candy Rock Wall Green, 6360
Candy Rock Wall Pink, 6361
Candy Rock Wall Yellow, 6362
Candy Rock Wall Blue Basic, 6363
Candy RockCandy, 6364
Candy Choc Column Broken, 6365
Candy Choc Column Whole, 6367
Candy Straw Column Broken, 6368
Candy Straw Column Whole, 6370
Candy Doughnut Sm Flat Choc, 6371
Candy Doughnut Sm Flat Straw, 6372
Candy Doughnut Big Flat Choc, 6373
Candy Doughnut Big Flat Straw, 6374
Candy Doughnut Big Vert Choc, 6375
Candy Doughnut Big Vert Straw, 6376
Candy Peppermint Tree Big, 6377
Gate, 6384
Gate Entry, 6385
Gate End 1, 6386
Gate End 2, 6387
Monument 1, 6389
Monument 2, 6390
Monument 3, 6391
Gate 2, 6392
Holloween Big Jacko, 6393
Holloween Graveyard Wall, 6394
Arena Large Monument 1, 6395
Arena Large Monument 2, 6396
Arena Large Monument 3, 6397
Gate Entry 2, 6398
Holloween Gravestone, 6399
Holloween Leaves, 6400
Holloween Leaves Sm, 6401
Gate Entry 2 Rotated, 6404
Gate Entry Rotated, 6405
Gate Entry LF Rotated, 6406
Gate Entry LF 2 Rotated, 6407
Gate Entry Side, 6408
Gate Entry Side 2, 6409
Dark Table, 6410
Dark Table Edge UL, 6411
Dark Table Edge UR, 6412
Dark Table Edge LR, 6413
Dark Table Edge LL, 6414
Corn, 6415
Pumpkin, 6416
Wooden Bench, 6417
Armoire, 6418
Tailor, 6419
Winter Tree Small, 6420
Winter Tree Big, 6421
Winter Rock, 6422
Winter Snowman Big, 6423
Winter Snowman Small, 6424
Winter Drift, 6425
Japanese Paper Wall A, 6426
Japanese Paper Wall B, 6427
Japanese Paper Wall C, 6428
Japanese Rocks, 6429
Japanese Shrine, 6430
Japanese Trees, 6431
Japanese Sticks, 6432
White Bench Low, 6433
Dragon Wall Purple, 6434
Dragon Wall Red, 6435
Dragon Wall Gold, 6436
Dragon Wall Green, 6437
Dragon Wall Blue, 6438
Dragon Temple Gold Brick, 6439
Ice Destructible Wall, 6443
Forrest Wall, 6444
Forrest Wall Black, 6445
Forrest Wall Single Tree, 6446
All Black Wall, 6447
Dragon Totem, 6448
Big Box, 6449
Dragon Candelabra, 6450
Dragon Table LL, 6451
Dragon Table LM, 6452
Dragon Table LR, 6453
Dragon Table ML, 6454
Dragon Table MM, 6455
Dragon Table MR, 6456
Dragon Table UL, 6457
Dragon Table UM, 6458
Dragon Table UR, 6459
Wood Fence, 6460
Yard Upgrader 1, 6461
Yard Upgrader 2, 6462
Yard Upgrader 3, 6463
Yard Upgrader 4, 6464
Yard Upgrader 5, 6465
Pet Upgrader Terminal, 6466
Pet Upgrader Backup, 6467
White Flowers NoWalk, 6468
Iinvisible NoWalk, 6469
Character Changer LF, 6470
Earth Walls, 6471
Destructible Earth Wall, 6472
Earth Gash Small, 6473
Earth Big Gash TL, 6474
Earth Big Gash TR, 6475
Earth Big Gash BL, 6476
Earth Big Gash BR, 6477
Earth Tile Down, 6478
Earth Tile Right, 6479
Earth Tile Up, 6480
Earth Tile Left, 6481
Earth Tile LU, 6482
Earth Tile LD, 6483
Earth Tile RD, 6484
Earth Tile RU, 6485
Arena Column Short, 6486
Arena Column, 6487
Arena Rug 1, 6489
Arena Rug 2, 6490
Arena Rug 3, 6491
Arena Rug 4, 6492
Arena Rug 5, 6493
Arena Rug 6, 6494
Arena Rug 7, 6495
Arena Rug 8, 6496
Arena Rug 9, 6497
Earthy Bush Large, 6498
Earthy Bush Small, 6499
Earth Huge Gash 1, 6500
Earth Huge Gash 2, 6501
Earth Huge Gash 3, 6502
Earth Huge Gash 4, 6503
Earth Huge Gash 5, 6504
Earth Huge Gash 6, 6505
Earth Blue Flowers, 6506
Earthy Red Rock, 6507
Earthy Red Rock Lighter, 6508
Arena Discarded Sword, 6525
Arena Discarded Lance, 6526
Arena Stone Column, 6527
Arena Wall, 6533
Arena Wall Gate LF, 6534
Arena Wall Gate M, 6535
Arena Wall Gate Rt, 6536
Arena Wall Stands, 6537
Arena Stone High Wall, 6538
Arena Stone High Stands, 6539
Arena Stone Mid Stands, 6545
Arena Guard, 6546
0ADouble, 6547
Spider Web Wall, 6549

Objects (enemies and players and stuff), tiles, and drops
Quote Originally Posted by 059 View Post
Objects (enemies and players and stuff), tiles, and drops
Well that's what I already knew. I just didn't want to put overlengthed title.
Quote Originally Posted by CrazyJani View Post
I know that UPDATE packets contain status effects of enemies somewhere but I can't think of anyway I can check where they are.

Quote Originally Posted by CrazyJani View Post
29, 16777216, null
there they are: 16777216 = 2^24 = 1<<24 and means [s]Invincible[/s] Invulnerable (blue shield icon)

check here for the obf0 and condition reference http://www.mpgh.net/forum/showthread...=1#post8101324
Quote Originally Posted by infern000 View Post
1<<24
What operation << is? That makes no sense for me. Would "PARALYZED = 1<<13" be 2^13=8192?
Quote Originally Posted by infern000 View Post
obf0 and condition(obf1) reference
What's obf0 for?
Quote Originally Posted by CrazyJani View Post

What operation << is? That makes no sense for me. Would "PARALYZED = 1<<13" be 2^13=8192?
http://stackoverflow.com/questions/1...ryption-script
If that doesn't link, its a bitwise shift. Quoted from one of those answers:

| = bitwise or

Code:
1010
0100
----
1110
& = bitwise and

Code:
1011
0110
----
0010
so it's the same as && and || just with the single bits

<< is left shift, so

0110 << 2 shifts the numbers left by two positions, yielding 011000 another way to think of this is multiplication by two, so x<<1 == x*2, x<<2 == x*2*2 and so on, so it's x * Math.pow(2,n) for x<


>> is the opposite, so 0110 >> 2 ---> 0001 you can think of it as division by two, BUT with rounding down, so it equals Math.floor(x/Math.pow(2,n))

that should make sense

Quote Originally Posted by CrazyJani View Post

What's obf0 for?
obf0 contains statdata types I believe, as linked in the above post.
How to modify ObjectData if none of the packets contain it?

Add it?

UPDATE create (or destroy) the object. All its statdatas are initialized at object (ObjectStatusdata) creation.
If you want to modify a particular statdata on a particular on object ONCE (in UPDATE) you have to catch the object creation then MODIFY the statdata.
All objects should have all their statsdata in UPDATE.

NEW_TICK on the contrary is the best place to MODIFY objects (ie statsdata) because ....its the packet purpose
If the ObjectstatusData doesnt exists in a particular NEW_TICK, Create it, and add the Statdata you want to modify

Code:
if (o.data.objectId == proxy.PlayerObjectid) 
                    {
                        proxy.player = new Player(o);
                        //System.out.println("PLAYER IS " + o.data.objectId);

                        //Add/update glowing on player   if requested
                        if (Configuration.Glowing)
                        {
                            StatData stg = new StatData();
                            stg.type =  StatData.GLOWING_EFFECT;
                            stg.value = 7;
                            o.data.updateStat(stg);
                            up.isModified = true;
                        }            
}
up is my UPDATE packet.
updateStat is a stub function . It test if the stat exists or not in o.data , and add it or update it otherwise so i can call the same function in NEW_TICK too.

DO NOT create false UPDATE packet because the client answer to all UPDATE with UPDATE_ACK .
Quote Originally Posted by JustAnoobROTMG View Post
DO NOT create false UPDATE packet because the client answer to all UPDATE with UPDATE_ACK
Good to know. What other packets do the client answer to?


Quote Originally Posted by JustAnoobROTMG View Post
updateStat is a stub function . It test if the stat exists or not in o.data , and add it or update it otherwise so i can call the same
This is where I got stuck. I can't find out how to send ObjectData in NEW_TICK
what do you want to do on the object data anyway? u can get and set it all via editing the .xmls
I'm stuck in about the same place you are. I have been trying to update jOryx and I know that the hello packet is incorrect. I have tried capturing the packet but I have been unable to decrypt it. My plan is to look through the source of the other 2 outdated proxies I have and see what method they use to encrypt the packet.
Quote Originally Posted by CrazyJani View Post

This is where I got stuck. I can't find out how to send ObjectData in NEW_TICK
What are you trying to do exactly? I mean, without talking about the code.

Code:
public class ObjectStatusData
    implements Parsable
{
    public int objectId;
    public Location pos;
    public List<StatData> stats;
For me, stats are just a List. So there is nothing easier than add or modify a Statdata.
RR probably use an array.


I'm stuck in about the same place you are. I have been trying to update jOryx and I know that the hello packet is incorrect. I have tried capturing the packet but I have been unable to decrypt it. My plan is to look through the source of the other 2 outdated proxies I have and see what method they use to encrypt the packet.
There are far more outdated packet in jOryx than Hello
You should browse the SWF Actionscript using a decompiler like Sothink, As3Sorcerer or FFDEC..

Packets definitions always have a very talkative toString()
Quote Originally Posted by JustAnoobROTMG View Post
There are far more outdated packet in jOryx than Hello
You should browse the SWF Actionscript using a decompiler like Sothink, As3Sorcerer or FFDEC..

Packets definitions always have a very talkative toString()
How do I know what to put into the packet? I have all of these variables but I when I send the packet I don't know what value to put in the gibberish ones.
Code:
	public String buildVersion;
	public int gameId;
	public String guid;
	public String password;
	public String secret;
	public int keyTime;
	public byte[] key = new byte[0];
	public byte[]  obf0 = new byte[0];
	public String obf1 = "";
	public String obf2 = "";
	public String obf3 = "";
	public String obf4 = "";
	public String obf5 = "";
Quote Originally Posted by mSteaker View Post
How do I know what to put into the packet? I have all of these variables but I when I send the packet I don't know what value to put in the gibberish ones.
Code:
    public String buildVersion;
    public int gameId;
    public String guid;
    public String password;
    public String secret;
    public int keyTime;
    public byte[] key = new byte[0];
    public byte[]  obf0 = new byte[0];
    public String obf1 = "";
    public String obf2 = "";
    public String obf3 = "";
    public String obf4 = "";
    public String obf5 = "";
I dont know for "obfs". Maybe, make a Realm Relay addon which keep the unknow values and display them using a notification (using yellowAlert from Jani previous post?
Quote Originally Posted by JustAnoobROTMG View Post
What are you trying to do exactly?
I am trying to change the ObjectData values and get the client to receive it.

I've tried changing the size of Scorpion Queen, it worked Realm Relay sidely; Realm Relay always returns the wanted value after changing it. The thing is that I can't find a way to send the change to client to see it in client.
Code:
function yellowAlert(event, text) {
	var textPacket = event.createPacket(ID_TEXT);
	textPacket.name = "";
	textPacket.objectId = -1;
	textPacket.numStars = -1;
	textPacket.bubbleTime = 0;
	textPacket.recipient = "";
	textPacket.text = text;
	textPacket.cleanText = "";
	event.sendToClient(textPacket);
}
The code up there is how to send a text packet showing the text in yellow font. It seems to only take the packet properties(?) and send them to client. NEW_TICK packet has the following properties[SIZE=1](?):
Code:
	
NEW_TICK
	int tickId
	int tickTime
	Status[] statuses
	
Status
	int objectId
	Location pos
	StatData[] data
	
StatData
	int obf0
	int obf1
	string obf2
	
Location
	float x
	float y
	float distanceSquaredTo(Location location)
	float distanceTo(Location location)
It doesn't contain a slot for ObjectData:
Code:
ObjectData
	string id
	int type
	int maxHitPoints
	int maxSize
	int minSize
	int size
	int sizeStep
	int shadowSize
	int color
	float xpMult
	float rotation
	boolean drawOnGround
	boolean enemy
	boolean fullOccupy
	boolean occupySquare
	boolean enemyOccupySquare
	boolean blocksSight
	boolean noMiniMap
	boolean stasisImmune
	boolean protectFromGroundDamage
	boolean protectFromSink
	boolean connects
	float z
The thing that I am trying to ask is how do I send to the client something that is not delivered by any packet by default, the things that client already know about. I mean the client knows that the size of Scorpion Queen is 150, but I want to change it via a command to 50. Something must deliver the information to client but I don't know who or what could it be? How can one include useless (something that doesn't belong in the specified packet) information in the specified packet?
Quote Originally Posted by CrazyJani View Post

The thing that I am trying to ask is how do I send to the client something that is not delivered by any packet by default, the things that client already know about. I mean the client knows that the size of Scorpion Queen is 150, but I want to change it via a command to 50. Something must deliver the information to client but I don't know who or what could it be? How can one include useless (something that doesn't belong in the specified packet) information in the specified packet?
I dont think its possible without client modifications.
For an unknow reason, pets size can be changed on the fly, even if they do no change and are defined in XML.

I suppose the client do this :

if its a pet, apply packet "size"
else apply default size (XMl)

But you can always trying to modify "size" in UPDATE.
If the property is used at object creation only you 'll have to modify the UPDATE packet and not NEW_TICK
Posts 1–15 of 15 · Page 1 of 1

Post a Reply

Similar Threads

Talk with us