Packet write problem ..

06/26/2019 08:16 -Prestige..#1
i have this packet
Code:
[6/26/2019 6:01:50 AM][Warning] -> [On recieve from client][70A2][5 bytes]
0000000000   12 01 00 00 01                                    ................

i want to resend it, a couple of times.. can anyone provide me with the proper c# code ? ..

am using kryl SRC btw !..
06/26/2019 18:02 hoangphan7#2
for (int i = 0; i < 100; i++)
{
//send packet here!
}
06/26/2019 23:59 -Prestige..#3
Quote:
Originally Posted by hoangphan7 View Post
for (int i = 0; i < 100; i++)
{
//send packet here!
}
thats what i need ...
i want the packet code ..

like
packet x = new packet(0x70a2, true)
smthing
smthing
smthing
06/27/2019 03:14 hoangphan7#4
packet x = new packet(0x70a2, true);
x.WriteUint32(274);
x.WriteUint8(1);
m_RemoteSecurity.Send(x);
Send(true);
06/27/2019 13:57 -Prestige..#5
Quote:
Originally Posted by hoangphan7 View Post
packet x = new packet(0x70a2, true);
x.WriteUint32(274);
x.WriteUint8(1);
m_RemoteSecurity.Send(x);
Send(true);


thanks ..
now i want to send those 3 packets ..

Code:
                                        Packet x = new Packet(0x70a2, true);
                                        x.WriteInt32(274);
                                        x.WriteUInt8(1);
                                        m_RemoteSecurity.Send(x);
                                        Send(true);


                                        Packet y = new Packet(0x70a2, true);
                                        y.WriteInt32(273);
                                        y.WriteUInt8(1);
                                        m_RemoteSecurity.Send(y);
                                        Send(true);

                                        Packet z = new Packet(0x70a2, true);
                                        z.WriteInt32(275);
                                        z.WriteUInt8(1);
                                        m_RemoteSecurity.Send(z);
                                        Send(true);


but it sends only the first one .. which is x

how can i send x,y,z all in one command ?
06/28/2019 02:05 sarkoplata#6
what's the "true" parameter for? is 0x70a2 an encrypted packet?
06/28/2019 07:06 -Prestige..#7
Quote:
Originally Posted by sarkoplata View Post
what's the "true" parameter for? is 0x70a2 an encrypted packet?
idk the true param .. but 0x70a2 isn't enc.
06/28/2019 07:08 sarkoplata#8
then change it to be new Packet(0x70a2)...
06/28/2019 08:17 -Prestige..#9
Quote:
Originally Posted by sarkoplata View Post
then change it to be new Packet(0x70a2)...
i already changed it ..

the problem is ..
I praise 1 packet and want to send 3 packets .. (it only sends one)
so... either i am allowed to send packets as much as i praised ..
or there is a command to write a new packet .. which is like...
Code:
packetwriter xxx = new packetwriter();
xxx.writeuint32(aaa);

m_localsecurity.send(xxx); ([COLOR="Red"]incase of KRYL SRC[/COLOR])
send(true);
continue;

i already tried that but i gives me error .. can't convert framework packetwriter to packet :rtfm:


any suggestions ?...
06/28/2019 08:35 jyotsna3003#10
Why this problems is coming in our life???

Problems are giving various types of challenges in our life and they will boost your mind set and standard of living.
06/28/2019 08:39 sarkoplata#11
The code in the first post doesn't seem problematic at all.

I believe the issue may be with the server response. You're sending another mastery levelup packet without waiting for a server response. The server might be ignoring the ones after the first one.

To test it, you might put a little Thread.Sleep() in between sending packets. If it does the job, then it's as I said. Obviously sleeping the entire thread won't work on a real case, you'll have to check the response and resend the packet.
06/28/2019 09:59 hoangphan7#12
Send/Recever packet performed sequentially. One Packet at a time.
You should use for loop or while

simple ex

PHP Code:
int wait 0;
while (
wait 3)
{
    if (
wait == 0)
    {
    
//send packet 1
    
wait 1;
    } 
    else if (
wait == 1)
    {
    
//send packet 2
    
wait 2;
    } 
    else if (
wait == 2)
    {
    
//send packet 3
    
wait 3;
    }

06/29/2019 04:30 -Prestige..#13
Quote:
Originally Posted by hoangphan7 View Post
Send/Recever packet performed sequentially. One Packet at a time.
You should use for loop or while

simple ex

PHP Code:
int wait 0;
while (
wait 3)
{
    if (
wait == 0)
    {
    
//send packet 1
    
wait 1;
    } 
    else if (
wait == 1)
    {
    
//send packet 2
    
wait 2;
    } 
    else if (
wait == 2)
    {
    
//send packet 3
    
wait 3;
    }

didn't work
06/29/2019 13:50 hoangphan7#14
Quote:
Originally Posted by -Prestige.. View Post
didn't work
add delay each thread

HTML Code:
int wait = 0; 
while (wait < 3) 
{ 
    if (wait == 0) 
    { 
    //send packet 1 
    wait = 1;
    Sleep(10);
    }  
    else if (wait == 1) 
    { 
    //send packet 2 
    wait = 2; 
    Sleep(10);
    }  
    else if (wait == 2) 
    { 
    //send packet 3 
    wait = 3; 
    Sleep(10);
    } 
}  
06/30/2019 05:06 -Prestige..#15
Quote:
Originally Posted by hoangphan7 View Post
add delay each thread

HTML Code:
int wait = 0; 
while (wait < 3) 
{ 
    if (wait == 0) 
    { 
    //send packet 1 
    wait = 1;
    Sleep(10);
    }  
    else if (wait == 1) 
    { 
    //send packet 2 
    wait = 2; 
    Sleep(10);
    }  
    else if (wait == 2) 
    { 
    //send packet 3 
    wait = 3; 
    Sleep(10);
    } 
}  
worked .. ty