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

02/05/2015 20:14 mikroti#1
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 tarek1500#2
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 Devsome#3
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 mikroti#4
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)
02/06/2015 12:16 tarek1500#5
How you read the packets?
02/06/2015 12:21 mikroti#6
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 tarek1500#7
First Unique ID is 4 bytes as I said before :D
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 ​Exo#8
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.
02/06/2015 14:13 Devsome#9
Source for how you can connect in C# with your Database and insert some Strings.
[Only registered and activated users can see links. Click Here To Register...]

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 mikroti#10
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 Devsome#11
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# .
[Only registered and activated users can see links. Click Here To Register...]

Also what is
Code:
log("",killed)
for a function ?
If you have any "beginning" show us your Code.
02/06/2015 15:27 mikroti#12
Quote:
Originally Posted by Devsome View Post
Please learn the basics from C# .
[Only registered and activated users can see links. Click Here To Register...]

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 :mad:
I started two days ago and I lack some things
Either help or go from here :p
02/06/2015 15:46 Devsome#13
Quote:
Originally Posted by mikroti View Post
log (Clientless Monitor :))
[...]
Either help or go from here :p
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 ​Exo#14
Would you upload the whole thing...
02/07/2015 02:10 mikroti#15
Thanks for all i will help myself
##