|
You last visited: Today at 03:20
Advertisement
read CharId , CharName , Id , ,, ,, ,
Discussion on read CharId , CharName , Id , ,, ,, , within the SRO Coding Corner forum part of the Silkroad Online category.
02/05/2015, 20:14
|
#1
|
elite*gold: 0
Join Date: Jan 2015
Posts: 28
Received Thanks: 2
|
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#
|
|
|
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
|
|
|
02/06/2015, 10:24
|
#3
|
dotCom
elite*gold: 9842
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" ?
|
|
|
02/06/2015, 10:29
|
#4
|
elite*gold: 0
Join Date: Jan 2015
Posts: 28
Received Thanks: 2
|
Quote:
Originally Posted by Devsome
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)
|
|
|
02/06/2015, 12:16
|
#5
|
elite*gold: 0
Join Date: Aug 2009
Posts: 152
Received Thanks: 11
|
How you read the packets?
|
|
|
02/06/2015, 12:21
|
#6
|
elite*gold: 0
Join Date: Jan 2015
Posts: 28
Received Thanks: 2
|
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
|
|
|
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?
|
|
|
02/06/2015, 14:07
|
#8
|
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,653
|
Quote:
Originally Posted by mikroti
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.
|
|
|
02/06/2015, 14:13
|
#9
|
dotCom
elite*gold: 9842
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"
|
|
|
02/06/2015, 15:10
|
#10
|
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 ,
|
|
|
02/06/2015, 15:17
|
#11
|
dotCom
elite*gold: 9842
Join Date: Mar 2009
Posts: 16,856
Received Thanks: 4,683
|
Quote:
Originally Posted by mikroti
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 for a function ?
If you have any "beginning" show us your Code.
|
|
|
02/06/2015, 15:27
|
#12
|
elite*gold: 0
Join Date: Jan 2015
Posts: 28
Received Thanks: 2
|
Quote:
Originally Posted by Devsome
Please learn the basics from C# .
Also what is 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
|
|
|
02/06/2015, 15:46
|
#13
|
dotCom
elite*gold: 9842
Join Date: Mar 2009
Posts: 16,856
Received Thanks: 4,683
|
Quote:
Originally Posted by mikroti
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
|
|
|
02/06/2015, 18:27
|
#14
|
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,653
|
Would you upload the whole thing...
|
|
|
02/07/2015, 02:10
|
#15
|
elite*gold: 0
Join Date: Jan 2015
Posts: 28
Received Thanks: 2
|
Thanks for all i will help myself
##
|
|
|
 |
|
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.
|
|