Single spawn / group spawn player problem

10/30/2012 14:14 cyberninjah#1
Hey guys,

I try to parse the player spawn packets so i can get the playerames / guildnames and items.

Now im almost got all the information more sometimes my parser fails when ppl teleported.

Is there something that i missed after a player teleported ?

My parse code: [Only registered and activated users can see links. Click Here To Register...]
10/30/2012 16:18 pergian#2
isro?
10/30/2012 19:01 paxemuman#3
Quote:
Originally Posted by cyberninjah View Post
Hey guys,

I try to parse the player spawn packets so i can get the playerames / guildnames and items.

Now im almost got all the information more sometimes my parser fails when ppl teleported.

Is there something that i missed after a player teleported ?

My parse code: [Only registered and activated users can see links. Click Here To Register...]
are you trying to spawn all players on the map, even those who are far away, or only nearby players ?
10/30/2012 19:36 cyberninjah#4
vsro.

i just parse the spawn packets the server send me so not the full map only nearby
10/30/2012 20:27 paxemuman#5
when are you sending it ? immediately after enter the game or after you move some around ?
10/30/2012 20:40 cyberninjah#6
i never send anything i just read the players around me

i found out it bugged with ppl that use prem
got prem+ buffs some extra bytes ?
10/30/2012 20:49 paxemuman#7
Quote:
Originally Posted by cyberninjah View Post
i never send anything i just read the players around me

i found out it bugged with ppl that use prem
got prem+ buffs some extra bytes ?
i see that you count buffs:
Quote:
for (int a = 0; a < buff_count; a++)
premium not effect packets in that case, some of players can use transports(wolfs for example you can teleport with them), then you can see extra bytes in spawn.
10/31/2012 16:46 cyberninjah#8
When i use pet and walk to the character it works.
More if i spawn near it with a teleport its not working i think the teleport status is somewhere in the packet or something i cant figure what i do wrong :(

Code:
Packet data : [3015]

82 07 00 00 22 00 00 00 3B 08 32 05 00 00 00 03 15 00 00 00 DF 14 00 00 00 
E9 04 00 00 00 27 15 00 00 00 0A 06 00 00 00 5F 10 00 00 05 3E 00 00 00 05 
00 00 00 60 33 00 30 5A D3 C1 9F 44 B1 BC 4C 44 5D CA DB 43 50 5F 00 01 01 
50 5F 01 00 03 00 5C 8F E2 41 00 00 B1 42 00 00 C8 42 05 E6 1E 00 00 A7 5A 
01 00 CD 1E 00 00 B5 54 01 00 1F 20 00 00 A1 55 01 00 34 20 00 00 41 C8 04 
00 1C 05 00 00 65 BB 02 00 0A 00 47 69 72 6C 4F 6E 46 69 72 65 02 04 00 00 
00 00 00 00 09 00 49 6E 76 61 6E 73 69 6F 6E DD 1F 00 00 09 00 54 61 73 69 
6B 4A 61 79 61 01 00 00 00 00 00 00 00 00 00 00 00 01 01 00 FF 04
10/31/2012 21:57 pergian#9
yes the teleports are also in the spawn packet and need seperate parse (atleast i do that)
11/02/2012 01:03 OverlimitOnline#10
Quote:
Originally Posted by pergian View Post
yes the teleports are also in the spawn packet and need seperate parse (atleast i do that)
Yes indeed in my private bot that I've coded for myself the teleports needs solo parsing
11/02/2012 09:29 cyberninjah#11
The teleports are in the singple spawn packets to ?
Because i only parse the single spawn packets atm.

More my character parse fails sometimes
11/02/2012 10:50 pergian#12
hm post the packet which gives the error, then i can probably faster tell what give the error in your code

Edit: or was that the packet code you posted before?

section of code you posted which i parsed:

Quote:
//item section
3B 08
32 05 00 00 00
03 15 00 00 00
DF 14 00 00 00
E9 04 00 00 00
27 15 00 00 00
0A 06 00 00 00
5F 10 00 00 05
3E 00 00 00 05

00 00 //avatar

00 //mask

60 33 00 //unique id? missing some byte

//coordinate section
30 5A
D3 C1 9F 44
B1 BC 4C 44
5D CA DB 43
50 5F
as you can see the piece of code you posted the uniqueID contains only 3bytes, which should be normally 4bytes.

thats the only thing that is going wrong so far i can see, all other stuff parse just fine with your code you posted before

Edit2:
all items have item plus byte except arrows/bolt

Quote:
if (itemCodename.StartsWith("SN_ITEM_CH") || itemCodename.StartsWith("SN_ITEM_EU") || itemCodename.StartsWith("SN_ITEM_FORT") || itemCodename.StartsWith("SN_ITEM_ROC_CH") || itemCodename.StartsWith("SN_ITEM_ROC_EU"))
{
byte plus = packet.Read<byte>();
player.Items.Add(new Item(itemID, plus));
}
your code looks with an if statement if something contains plus value yes or no.
that could also be going wrong (couldnt check items id since i dont have database of that sro version)
11/05/2012 10:03 cyberninjah#13
Code:
[?]
Verschuiving en lengte liggen buiten de grenzen voor de matrix of het aantal is groter dan het aantal elementen van de index aan het einde van de bronverzameling.
Items [9]
Items done
Avatars done
Mask done
Position done
Buffs count 0
Buffs done
Character: Supertrader1
Guild found


Packet data : [3015]

29 3A 00 00 32 00 00 00 2D 09 89 37 00 00 07 D1 37 00 00 07 AD 37 00 00 07 
19 38 00 00 07 F5 37 00 00 07 3D 38 00 00 07 13 2C 00 00 07 57 2D 00 00 07 
47 24 00 00 00 05 00 00 AA D4 16 01 30 5A BF 94 24 44 08 D5 57 44 CD 2F 07 
44 52 75 00 01 00 52 75 01 00 00 00 CD CC 8C 41 00 00 5C 42 00 00 C8 42 00 
0C 00 53 75 70 65 72 74 72 61 64 65 72 31 01 01 00 00 00 00 00 00 00 00 00 
FF 03
Code:
Index en aantal moeten naar een locatie binnen de buffer verwijzen.
Parameternaam: bytes
Items [7]
Items done
Avatars done
Mask done
Position done
Buffs count 4
Buffs done


Packet data : [3015]

21 3A 00 00 00 0D 00 00 57 07 84 31 00 00 05 F0 31 00 00 07 CC 31 00 00 05 
38 32 00 00 09 14 32 00 00 09 5C 32 00 00 03 D4 2B 00 00 00 05 05 57 61 00 
00 01 2D 61 00 00 01 9E 24 00 00 00 79 61 00 00 01 77 A3 00 00 03 00 26 6E 
16 01 30 5A 98 F3 9F 44 15 BB 4D 44 5B 82 E1 43 DD 64 01 01 30 5A CE 04 00 
00 EA 01 01 00 03 00 CD CC 0C 42 00 00 DC 42 00 00 C8 42 04 89 0F 00 00 C2 
72 00 00 24 15 00 00 AE 34 02 00 15 2E 00 00 DF B8 02 00 01 9F 2E 00 00 03 
13 02 00 05 00 4D 61 30 61 4D 00 01 00 00 00 00 00 00 06 00 4C 65 47 49 30 
6E B2 0F 00 00 00 00 0C 00 00 00 66 03 00 00 0E 00 00 00 01 00 00 FF 04
Code:
Verschuiving en lengte liggen buiten de grenzen voor de matrix of het aantal is groter dan het aantal elementen van de index aan het einde van de bronverzameling.
Items [8]
Items done
Avatars done
Mask done
Position done
Buffs count 0
Buffs done
Character: WasWRONG
Guild found


Packet data : [3015]

2C 3A 00 00 00 00 00 00 2D 08 68 38 00 00 05 D4 38 00 00 05 B0 38 00 00 05 
1C 39 00 00 05 F8 38 00 00 05 40 39 00 00 05 8C 2B 00 00 07 4F 24 00 00 00 
05 04 20 A2 00 00 00 94 A3 00 00 00 30 5F 00 00 00 58 5F 00 00 03 00 8C D6 
16 01 30 5A 82 A6 28 44 08 D5 57 44 10 96 08 44 30 22 00 01 00 30 22 01 00 
00 00 9A 99 99 41 01 00 70 42 00 00 C8 42 00 08 00 57 61 73 57 52 4F 4E 47 
03 07 00 00 00 00 00 00 00 00 00 FF 03
11/05/2012 17:07 l TaX l#14
mhh what is that?
11/05/2012 19:00 pergian#15
hm though i dont know the pk2 id's since i dont have the database of that sro version,

from the 1st and 3rd one i guess it tries to read:

Quote:
else
{
packet.Read<uint>(); // GuildID
string grantname = packet.ReadString(Encoding.ASCII);
player.grantname = grantname;
packet.Read<uint>(); // Unknown
packet.Read<uint>(); // Unknown
packet.Read<uint>(); // Unknown
packet.Read<ushort>(); // Unknown

if (stall == 4)
{
packet.ReadString(Encoding.ASCII); // Stall title ?
packet.Read<uint>(); // Unknown
packet.Read<ushort>(); // Unknown
}
else
{
packet.Read<ushort>();
}
}
but the packet only has like 3-4bytes left, thats why that error occurred
(not sure when this happens, i made it read until FF byte has reached)

the 2nd one, if every item and buff (one buff has extra byte) is parsed correct then i have no idea what goes wrong there according to your parsing code

ps.
ben ook nl:P