Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 03:20

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

Advertisement



read CharId , CharName , Id , ,, ,, ,

Discussion on read CharId , CharName , Id , ,, ,, , within the SRO Coding Corner forum part of the Silkroad Online category.

Closed Thread
 
Old   #1
 
mikroti's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 28
Received Thanks: 2
Question read CharId , CharName , Id , ,, ,, ,

if i have packet for Example
for killed Monster : 0300C
get 05 0C BE 07 0000
05 0C Spawn
BE 07 uniqe ID

BE07 = 1982

how to read that ID to can send it to SQL
Same thing for every thing i need to read and send it
:C#
mikroti is offline  
Old 02/05/2015, 23:07   #2
 
elite*gold: 0
Join Date: Aug 2009
Posts: 152
Received Thanks: 11
Actually Unique ID is 4 bytes not 2, I use this function in C#

Code:
BitConverter.ToUInt32(Buffer, Index);
Buffer is the array you receive from server.
Index is the index of the first byte of the ID
tarek1500 is offline  
Old 02/06/2015, 10:24   #3
dotCom
 
Devsome's Avatar
 
elite*gold: 9842
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 16,856
Received Thanks: 4,683
You need a Packethandler who can handle with the Opcodes like 0300C (for killed Monster)
When you have the event that the Packet was readed successfully then you need to parse it.

What do you mean "can send it to SQL" ?
Devsome is offline  
Thanks
1 User
Old 02/06/2015, 10:29   #4
 
mikroti's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 28
Received Thanks: 2
Quote:
Originally Posted by Devsome View Post
You need a Packethandler who can handle with the Opcodes like 0300C (for killed Monster)
When you have the event that the Packet was readed successfully then you need to parse it.

What do you mean "can send it to SQL" ?
i mean make clientless Char send to SQl table (Killeduniqe,killer,id , time)
mikroti is offline  
Old 02/06/2015, 12:16   #5
 
elite*gold: 0
Join Date: Aug 2009
Posts: 152
Received Thanks: 11
How you read the packets?
tarek1500 is offline  
Old 02/06/2015, 12:21   #6
 
mikroti's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 28
Received Thanks: 2
Exclamation

in Agent.cs

Code:
else if (packet.Opcode == 0x300C) // uniqe killed packet reader
                        {
                            packet.ReadInt8();
                            packet.ReadInt8();
                             packet.ReadInt8();
                             packet.ReadAscii();
result
//[S->C][300C][12 bytes]
//0000000000 06 0C A2 07 00 00 04 00 45 4D 41 44
06 0C killed
A2 07 Id uniqe
00 00 04 00 45 4D 41 44 killer Name
mikroti is offline  
Old 02/06/2015, 13:45   #7
 
elite*gold: 0
Join Date: Aug 2009
Posts: 152
Received Thanks: 11
First Unique ID is 4 bytes as I said before
Second you need then to save it in variable and send it to database which I don't know how to do.

But I think ReadInt8() reads only 1 byte right?
tarek1500 is offline  
Old 02/06/2015, 14:07   #8


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,653
Quote:
Originally Posted by mikroti View Post
i mean make clientless Char send to SQl table (Killeduniqe,killer,id , time)
Ofc you can, just open a db connection and create an insert function and add it to your agent thread.
​Exo is offline  
Old 02/06/2015, 14:13   #9
dotCom
 
Devsome's Avatar
 
elite*gold: 9842
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 16,856
Received Thanks: 4,683
Source for how you can connect in C# with your Database and insert some Strings.


Clientless connection, use Drews (pushedx) api for reading the Packets.
Then create a function for inserting the "unique death information"
Devsome is offline  
Old 02/06/2015, 15:10   #10
 
mikroti's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 28
Received Thanks: 2
When i read and variable it
to can read and send

int Killed= packet.ReadUInt16();
int ID = packet.ReadUInt16();
packet.ReadUInt8();
string name = packet.ReadAscii();
log ("",killed)
log ("",ID)
No Result

and i try More for Convert it firstly
No result
any one can help with any example ,
mikroti is offline  
Old 02/06/2015, 15:17   #11
dotCom
 
Devsome's Avatar
 
elite*gold: 9842
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 16,856
Received Thanks: 4,683
Quote:
Originally Posted by mikroti View Post
When i read and variable it
to can read and send

int Killed= packet.ReadUInt16();
int ID = packet.ReadUInt16();
packet.ReadUInt8();
string name = packet.ReadAscii();
log ("",killed)
log ("",ID)
No Result

and i try More for Convert it firstly
No result
any one can help with any example ,
Please learn the basics from C# .


Also what is
Code:
log("",killed)
for a function ?
If you have any "beginning" show us your Code.
Devsome is offline  
Old 02/06/2015, 15:27   #12
 
mikroti's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 28
Received Thanks: 2
Quote:
Originally Posted by Devsome View Post
Please learn the basics from C# .


Also what is
Code:
log("",killed)
for a function ?
If you have any "beginning" show us your Code.
log (Clientless Monitor )
i know basics from C#
I'm trying for two days at that problem
So used lots and lots function
I am new at this so
I started two days ago and I lack some things
Either help or go from here
mikroti is offline  
Old 02/06/2015, 15:46   #13
dotCom
 
Devsome's Avatar
 
elite*gold: 9842
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 16,856
Received Thanks: 4,683
Quote:
Originally Posted by mikroti View Post
log (Clientless Monitor )
[...]
Either help or go from here
We can't even help when you don't show us your Code ;o
If you don't show it we are supposed to do it for you :3
Devsome is offline  
Old 02/06/2015, 18:27   #14


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,653
Would you upload the whole thing...
​Exo is offline  
Old 02/07/2015, 02:10   #15
 
mikroti's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 28
Received Thanks: 2
Thanks for all i will help myself
##
mikroti is offline  
Thanks
1 User
Closed Thread


Similar Threads Similar Threads
[RELEASE]How to Ban IP By CharName :D
09/06/2016 - SRO PServer Guides & Releases - 10 Replies
:mofo: Credits to :handsdown:@Caipi:handsdown: query to create table to store the ip of the players USE Log_DB CREATE TABLE _IPLogs ( int IDENTITY(1,1) PRIMARY KEY, int, varchar(max), varchar(max), datetime
CharName IP Ban
05/24/2014 - Shaiya PServer Guides & Releases - 3 Replies
* To ban all accounts on IP of a char name* SELECT um.UserIp INTO #Temp FROM PS_GameData.dbo.Chars c INNER JOIN PS_UserData.dbo.Users_Master um ON um.UserUID=c.UserUID WHERE c.CharName = 'ExactNameHere' AND c.Del = 0 UPDATE PS_UserData.dbo.Users_Master SET = -1 WHERE UserIp IN (SELECT UserIp FROM #Temp)
How to Ban IP By CharName
08/05/2012 - SRO PServer Guides & Releases - 7 Replies
Press Thnx if work My Query to Ban Player --By Leandro ( nukertube ) -- USE GO -------------------------------- DECLARE @ChrID INT;
[Help]Charname need to have....
02/14/2009 - Dekaron Private Server - 4 Replies
Ok i editet soem stuff and dont get the massage XXXXX and then i get the massage Charakter need to have atleast 4 charaters in it. Anyone can help me or gimme a hint how i can pass that ? ->or need i any programms like OllyDbG ? greets and thx
DLL's to Read Charname, Level, Arrows, HP, Etc...
04/05/2008 - CO2 Exploits, Hacks & Tools - 6 Replies
Hello people! i have made finally my DLL to read all information, COMemReader.dll and COHPReader.dll this is for COMemreader.dll: here i show you how to make it work if you want to use this DLL: you need to put this DLL's as References to your project :)



All times are GMT +1. The time now is 03:24.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.