Opcode 0xB071

04/25/2017 02:36 Zetson#1
Please if anybody can help me figure out that unknown and what the target ID is based on I would be so thankful
I am trying to log skill damage value and character name or ID who caused the damage to the bot character to build a GM kill event in which the player who caused the highest total damage wins

[S -> C][B071]
01 //static
72 07 00 00 //unknown
70 75 01 00 //target ID (need to know based on what)
01 //static
01 //static
01 //static
70 75 01 00 //target ID (need to know based on what)
80 //0= still alive 80=killed
01 A7 A3 09 //skill damage value
00 00 00 00 //static
04/25/2017 04:36 DaxterSoul#2
Oh my. You picked some of the most complex packets for your project. :rolleyes:

The "target ID (need to know based on what)" is mostly known as UniqueID of a specific Object (char, mob, NPC, COS) in the world. It's not a static value nor reflected in database.

You can read your own characters UniqueID from 0x3013 or much easier from 0x3020.

For accurately tracking surrounding objects you need to read:
  • 0x3015 - single spawn
  • 0x3016 - single despawn
  • 0x3017 - group/range (de-)spawn begin
  • 0x3018 - group/range (de-)spawn end
  • 0x3019 - group/range (de-)spawn data
They provide you with detailed information for every object. But you need to keep the following points in mind.
  • If you spawn nearby or move towards already spawned objects, they'll receive you as single spawn (give they're players). You'll receive them as group spawn, and vice versa.
  • If you fail to properly read the 1st object in a group spawn packet then you won't be able to read the 2nd, 3rd, and so on. That's why most beginners just parse the single spawns but you have to be aware that you might not know about all objects nearby.
  • If you don't know about an object, then you don't know if it even is a character.
You'll probably need [Only registered and activated users can see links. Click Here To Register...].

There are more packets you need to look at when tracking damage.
  • 0xB070 for casting and initial hits
  • 0xB071 for successive hits
  • 0xB0BC for special damage (yellow)

There might also be a database solution here which I'm not aware of.

Have fun :p
04/25/2017 13:28 Zetson#3
Quote:
Originally Posted by DaxterSoul View Post
Oh my. You picked some of the most complex packets for your project. :rolleyes:

The "target ID (need to know based on what)" is mostly known as UniqueID of a specific Object (char, mob, NPC, COS) in the world. It's not a static value nor reflected in database.

You can read your own characters UniqueID from 0x3013 or much easier from 0x3020.

For accurately tracking surrounding objects you need to read:
  • 0x3015 - single spawn
  • 0x3016 - single despawn
  • 0x3017 - group/range (de-)spawn begin
  • 0x3018 - group/range (de-)spawn end
  • 0x3019 - group/range (de-)spawn data
They provide you with detailed information for every object. But you need to keep the following points in mind.
  • If you spawn nearby or move towards already spawned objects, they'll receive you as single spawn (give they're players). You'll receive them as group spawn, and vice versa.
  • If you fail to properly read the 1st object in a group spawn packet then you won't be able to read the 2nd, 3rd, and so on. That's why most beginners just parse the single spawns but you have to be aware that you might not know about all objects nearby.
  • If you don't know about an object, then you don't know if it even is a character.
You'll probably need [Only registered and activated users can see links. Click Here To Register...].

There are more packets you need to look at when tracking damage.
  • 0xB070 for casting and initial hits
  • 0xB071 for successive hits
  • 0xB0BC for special damage (yellow)

There might also be a database solution here which I'm not aware of.

Have fun :p
Such a great answer ! Really thanks, but one last thing if I am not bothering you. How can I read the character's ID or name who is attacking the bot ?
04/25/2017 20:13 DaxterSoul#4
Quote:
Originally Posted by Zetson View Post
Such a great answer ! Really thanks, but one last thing if I am not bothering you. How can I read the character's ID or name who is attacking the bot ?
The spawn packets contain the ID and the Name of a character. You can store them in a dictionary. When you come across the "attack packet" you can look if the ID (key) is in your dictionary and get the matching Name (value).

Zetson spawned with ID 123 has this and that in his inventory.
Daxter spawned with ID 456 has only this in his inventory and is sitting.
Now they're using General (white) chat which is ID based
123: Hey I need help
456: Here is help
132: Thanks for your help
456: No problem

You can basically replace the ID with the object who wrote the text and use their properties such as the Name.

If you don't know about packets in general you should try simpler stuff to begin with.
Get started with [Only registered and activated users can see links. Click Here To Register...]. Try reading the [Only registered and activated users can see links. Click Here To Register...] for practice.
04/25/2017 22:01 illstar#5
.. will contain errors .. feel free to fix ;)

Code:
// 0xB070 Server_WorldObject_Cast_Start 
1 byte isSuccess 
if (isSuccess == 1 )
{
	1 byte unk1 
	1 byte unk2  
	4 byte skillTypId 
	4 byte casterWorldId 
	4 byte unk3
	4 byte targetWorldId
	1 byte instantResponse
	
	if (instantResponse == 1)
	{
		ParseDmg()
	}
	else 
	{
		1 byte hasDmg ?? --> 1 --> yes ?? 
	}
}
else 
{
	2 byte ErrorCode
}
Code:
// 0xB071 Server_WorldObject_Cast_End
1 byte isSuccess 
if (isSuccess == 1)
{
    4 byte castWorldId 
    4 byte castTargetWorldId 

    ParseDmg();
}
else if (isSuccess == 2)
{
    2 byte ErrorCode
    4 byte castWorldId
}
Code:
// ParseDmg				
1 byte hasDmg
if (hasDmg == 1 )
{
	1 byte hitcount
	1 byte targetCount
	for (int i = 0; i < targetCount; i++)	
	{
		4 byte targetWorldId
		for (int ii = 0; ii < hitcount; ii++)
                {
			1 byte effects   // bitmask --> ATTACK_STATE_KNOCKBACK = 0x01,    ATTACK_STATE_BLOCK = 0x02,    ATTACK_STATE_POSITION = 0x04,   abort ? --> 0x08   ATTACK_STATE_DEAD = 0x80
		        1 byte dmgSource // bitmask --> DAMAGE_STATE_NORMAL = 0x01,    DAMAGE_STATE_CRIT = 0x02,    DAMAGE_STATE_STATUS = 0x10
			
			if ((attackState & 0x0A) != 0x00)  // if ATTACK_STATE_BLOCK or abort --> no more data
			{
				continue;
			}
			
			4 byte dmg
			1 byte unk4
			1 byte unk5 
			1 byte unk6
		 }		
	}
}
04/25/2017 22:05 Zetson#6
Quote:
Originally Posted by illstar View Post
.. will contain errors .. feel free to fix ;)

Code:
// 0xB070 Server_WorldObject_Cast_Start 
1 byte isSuccess 
if (isSuccess == 1 )
{
	1 byte unk1 
	1 byte unk2  
	4 byte skillTypId 
	4 byte casterWorldId 
	4 byte unk3
	4 byte targetWorldId
	1 byte instantResponse
	
	if (instantResponse == 1)
	{
		ParseDmg()
	}
	else 
	{
		1 byte hasDmg ?? --> 1 --> yes ?? 
	}
}
else 
{
	2 byte ErrorCode
}
Code:
// 0xB071 Server_WorldObject_Cast_End
1 byte isSuccess 
if (isSuccess == 1)
{
    4 byte castWorldId 
    4 byte castTargetWorldId 

    ParseDmg();
}
else if (isSuccess == 2)
{
    2 byte ErrorCode
    4 byte castWorldId
}
Code:
// ParseDmg				
1 byte hasDmg
if (hasDmg == 1 )
{
	1 byte hitcount
	1 byte targetCount
	for (int i = 0; i < targetCount; i++)	
	{
		4 byte targetWorldId
		for (int ii = 0; ii < hitcount; ii++)
                {
			1 byte effects   // bitmask --> ATTACK_STATE_KNOCKBACK = 0x01,    ATTACK_STATE_BLOCK = 0x02,    ATTACK_STATE_POSITION = 0x04,   abort ? --> 0x08   ATTACK_STATE_DEAD = 0x80
		        1 byte dmgSource // bitmask --> DAMAGE_STATE_NORMAL = 0x01,    DAMAGE_STATE_CRIT = 0x02,    DAMAGE_STATE_STATUS = 0x10
			
			if ((attackState & 0x0A) != 0x00)  // if ATTACK_STATE_BLOCK or abort --> no more data
			{
				continue;
			}
			
			4 byte dmg
			1 byte unk4
			1 byte unk5 
			1 byte unk6
		 }		
	}
}
Let me call you the king of awesomeness
04/25/2017 22:10 illstar#7
no problem but keep in mind any fix to the packets is welcome ;)
12/27/2022 05:54 painmaker_#8
Quote:
Originally Posted by illstar View Post
.. will contain errors .. feel free to fix ;)

Code:
// 0xB070 Server_WorldObject_Cast_Start 
1 byte isSuccess 
if (isSuccess == 1 )
{
	1 byte unk1 
	1 byte unk2  
	4 byte skillTypId 
	4 byte casterWorldId 
	4 byte unk3
	4 byte targetWorldId
	1 byte instantResponse
	
	if (instantResponse == 1)
	{
		ParseDmg()
	}
	else 
	{
		1 byte hasDmg ?? --> 1 --> yes ?? 
	}
}
else 
{
	2 byte ErrorCode
}
Code:
// 0xB071 Server_WorldObject_Cast_End
1 byte isSuccess 
if (isSuccess == 1)
{
    4 byte castWorldId 
    4 byte castTargetWorldId 

    ParseDmg();
}
else if (isSuccess == 2)
{
    2 byte ErrorCode
    4 byte castWorldId
}
Code:
// ParseDmg				
1 byte hasDmg
if (hasDmg == 1 )
{
	1 byte hitcount
	1 byte targetCount
	for (int i = 0; i < targetCount; i++)	
	{
		4 byte targetWorldId
		for (int ii = 0; ii < hitcount; ii++)
                {
			1 byte effects   // bitmask --> ATTACK_STATE_KNOCKBACK = 0x01,    ATTACK_STATE_BLOCK = 0x02,    ATTACK_STATE_POSITION = 0x04,   abort ? --> 0x08   ATTACK_STATE_DEAD = 0x80
		        1 byte dmgSource // bitmask --> DAMAGE_STATE_NORMAL = 0x01,    DAMAGE_STATE_CRIT = 0x02,    DAMAGE_STATE_STATUS = 0x10
			
			if ((attackState & 0x0A) != 0x00)  // if ATTACK_STATE_BLOCK or abort --> no more data
			{
				continue;
			}
			
			4 byte dmg
			1 byte unk4
			1 byte unk5 
			1 byte unk6
		 }		
	}
}

You have no chance getting the dealt dmg to a unique with a correct attacker because 0xB071 is sent to all nearby players with the same data has nothing changed. You have to identify the real attacker by assigning a variable that matches his UniqueID from 0xB070 and add a check before parsing dmg.
01/02/2023 23:22 Devsome#9
Quote:
Originally Posted by painmaker_ View Post
You have no chance getting the dealt dmg to a unique with a correct attacker because 0xB071 is sent to all nearby players with the same data has nothing changed. You have to identify the real attacker by assigning a variable that matches his UniqueID from 0xB070 and add a check before parsing dmg.
Have you looked at the date? From 2017, welcome to 2023
01/28/2025 11:52 dunght#10
Quote:
Originally Posted by Zetson View Post
Please if anybody can help me figure out that unknown and what the target ID is based on I would be so thankful
I am trying to log skill damage value and character name or ID who caused the damage to the bot character to build a GM kill event in which the player who caused the highest total damage wins

[S -> C][B071]
01 //static
72 07 00 00 //unknown
70 75 01 00 //target ID (need to know based on what)
01 //static
01 //static
01 //static
70 75 01 00 //target ID (need to know based on what)
80 //0= still alive 80=killed
01 A7 A3 09 //skill damage value
00 00 00 00 //static
Now I successfully parsed B071
04/29/2025 14:53 patronuscat#11
how can we get all opcodes ?
04/30/2025 04:20 JellyBitz#12
Quote:
Originally Posted by patronuscat View Post
how can we get all opcodes ?
There is a wiki with some packet structures. The 0xB071 opcode is also there.
[Only registered and activated users can see links. Click Here To Register...]