Oid structure

Forum for any discussion not Dawn of Light related

Moderator: Support Team

Oid structure

Postby lion228 » Tue Mar 15, 2016 10:02 am

hello how would i make the Oid packet structure reversed ? it makes the Oid from this sturcture
Out.WriteUInt16(Oid);

i want to add another Out.WriteUInt16(Oid); but how i make it so it reverses the Oid

example Out.WriteUInt16(Oid); makes random Oid say = 2622 which is = 0A 3E
so how i make is reverse the Oid random so it be = 3E 0A

0A 3E 00 00 00 00 3E 0A
lion228
DOL Acolyte
 
Posts: 103
Joined: Sat Oct 03, 2009 12:01 am

Re: Oid structure

Postby Graveen » Tue Mar 15, 2016 12:28 pm

The OID is something that should be related to an object (item, mob, player, npc...)

You can simply recreate this object and affect it the OID you read from packet.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Oid structure

Postby lion228 » Tue Mar 15, 2016 1:19 pm

yes its for npc. the stucture is for packet (03 FC 00 00 03 FC) what i use for the last structure so it reverces it for 03 FC Out.WriteUInt16(Oid); = 03 FC
Out.WriteByte(0); 00
Out.WriteByte(0); 00

Out.WriteUInt16() 03 FC ???????
03 FC 00 00 03 FC
lion228
DOL Acolyte
 
Posts: 103
Joined: Sat Oct 03, 2009 12:01 am

Re: Oid structure

Postby Dinberg » Tue Mar 15, 2016 8:02 pm

Is this for DOL or WAR?
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: Oid structure

Postby lion228 » Tue Mar 15, 2016 11:19 pm

yes war the packet above is wrong this is the correct one with the reversed Oid = FC 03
03 FC 00 00 FC 03
lion228
DOL Acolyte
 
Posts: 103
Joined: Sat Oct 03, 2009 12:01 am

Re: Oid structure

Postby Dinberg » Wed Mar 16, 2016 7:28 pm

So you want to send low-endian not big-endian?

I think you want something like
ushort originalOID = 12341;
Out.WriteByte(originalOID && 0xFF);
Out.WriteByte(originalOID >> 8 && 0xFF);

But tbh I always get the bitwise operators wrong so I would double check that.

Also - Please stop asking questions about another game/emulator without explicitly saying its for that game/emulator. You have a million posts where you ask about packets and fail to mention they are for WAR every time. And once again I emphasise this is not a forum for WAR :)
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: Oid structure

Postby lion228 » Thu Mar 17, 2016 6:23 pm

ok sorry and thanks i will try that. yeh i dont say its for war because i know you dont like war and just needed the info on how to send it reversed
lion228
DOL Acolyte
 
Posts: 103
Joined: Sat Oct 03, 2009 12:01 am

Re: Oid structure

Postby Dinberg » Thu Mar 17, 2016 10:31 pm

It's not that we don't like WAR, its just that these forums are for a different project :)

Did the code work?
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: Oid structure

Postby lion228 » Fri Mar 18, 2016 8:56 am

the packet structure is this

Out.WriteUInt16(Oid);
Out.WriteByte(0);
Out.WriteByte(0);
Out.WriteUInt16(0);

The orignal sniffed packet is 0A 3E 00 00 3E 0A
but when useing sniffer i get this 0A 3E 00 00 00 00 so 3E 0A is the Oid so need the last structure Out.WriteUInt16(0); to reverse it .so when i use sniffer it should look like this 0A 3E 00 00 3E 0A so the 0A 3E is been reversed on the last 2 bytes
lion228
DOL Acolyte
 
Posts: 103
Joined: Sat Oct 03, 2009 12:01 am


Return to “%s” Other Discussion

Who is online

Users browsing this forum: No registered users and 1 guest