Register for your free account! | Forgot your password?

You last visited: Today at 01:57

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Opcode 0xB071

Discussion on Opcode 0xB071 within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
Zetson's Avatar
 
elite*gold: 15
Join Date: Sep 2012
Posts: 131
Received Thanks: 18
Exclamation Opcode 0xB071

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
Zetson is offline  
Old 04/25/2017, 04:36   #2
 
elite*gold: 0
Join Date: Jan 2009
Posts: 313
Received Thanks: 667
Oh my. You picked some of the most complex packets for your project.

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 .

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
DaxterSoul is offline  
Thanks
5 Users
Old 04/25/2017, 13:28   #3
 
Zetson's Avatar
 
elite*gold: 15
Join Date: Sep 2012
Posts: 131
Received Thanks: 18
Quote:
Originally Posted by DaxterSoul View Post
Oh my. You picked some of the most complex packets for your project.

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 .

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
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 ?
Zetson is offline  
Old 04/25/2017, 20:13   #4
 
elite*gold: 0
Join Date: Jan 2009
Posts: 313
Received Thanks: 667
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 . Try reading the for practice.
DaxterSoul is offline  
Thanks
1 User
Old 04/25/2017, 22:01   #5
 
elite*gold: 0
Join Date: Jan 2008
Posts: 21
Received Thanks: 12
.. 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
		 }		
	}
}
illstar is offline  
Thanks
2 Users
Old 04/25/2017, 22:05   #6
 
Zetson's Avatar
 
elite*gold: 15
Join Date: Sep 2012
Posts: 131
Received Thanks: 18
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
Zetson is offline  
Old 04/25/2017, 22:10   #7
 
elite*gold: 0
Join Date: Jan 2008
Posts: 21
Received Thanks: 12
no problem but keep in mind any fix to the packets is welcome
illstar is offline  
Thanks
1 User
Old 12/27/2022, 05:54   #8
 
painmaker_'s Avatar
 
elite*gold: 0
Join Date: Dec 2021
Posts: 85
Received Thanks: 72
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.
painmaker_ is offline  
Old 01/02/2023, 23:22   #9
dotCom
 
Devsome's Avatar
 
elite*gold: 12400
The Black Market: 104/0/0
Join Date: Mar 2009
Posts: 15,881
Received Thanks: 4,386
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
Devsome is offline  
Reply

Tags
b071, clientless bot, opcodes, packets, s-->c


Similar Threads Similar Threads
Someone know what mean this opcode ?
12/03/2010 - SRO Coding Corner - 7 Replies
http://img835.imageshack.us/img835/8371/95671826.j pg is because of capture the flag or what ? ...
[Dev Help]Custom mode Opcode editing
07/25/2010 - Shaiya Private Server - 14 Replies
hey guy's n girls Wondering if anyone has come across this, when editing the Opcode for the mode statpoints. Underland Dev team have found that if set to anything above 9, 10 for example, it jumps straight to 16 ingame. is there anything we can do to edit this without the huge jump in points we do not want... Thanks in advance Shikari
[AutoIt] OpCode Isro probleme Find Gold
10/04/2009 - Silkroad Online - 1 Replies
hi all :) with this page http://www.elitepvpers.com/forum/sro-exploits-hacks -bots-guides/298129-misc-nubecoder-ini-updates.htm l ( Liste OpCode ) i can find HP,MP,X,Y,CharName,ServerName,ExpPoint,Sp but I can not use a (Gold, Guild Name, Lvl , STR, INT ) I use a Script AutoIt ( Find in web ) for can read in my memory. #include <nomadmemory.au3>
OpCode Gold And Lvl Not Work
09/29/2009 - Silkroad Online - 0 Replies
hi all :) with that http://www.elitepvpers.com/forum/sro-exploits-hacks -bots-guides/298129-misc-nubecoder-ini-updates.htm l ( In Opcode Liste ) i can use opcode for read in memory my HP,MP,SP,NameChar,Server,X,Y but I can not read i use Autoit and i use a script find in web This Script Work for Client ISRO ( 1.215 ) #include <nomadmemory.au3>
Did the opcode change for Silkroad?
01/20/2009 - Silkroad Online - 21 Replies
If it did please tell me how to change it for SR33



All times are GMT +2. The time now is 01:57.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.