Quote:
Originally Posted by hoangphan7
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);
}
}
|
Quote:
Originally Posted by sarkoplata
I said it up above but you probably didn't even read because it wasn't a ready copy/paste code... moron
|
WTF is wrong with you ..
i was asking about something else already..
the code is way different than that is posted ..
Code:
if (FilterMain.Prestige_opcodes.Contains(prestigeop))
{
Logger.WriteLine(Logger.LogLevel.Warning, $"[On recieve from client][opcode captured]");
try
{
Logger.WriteLine(Logger.LogLevel.Warning, $"[On recieve from client][try]");
switch (_pck.ReadUInt8())
{
case 0x11:
{
Logger.WriteLine(Logger.LogLevel.Warning, $"[On recieve from client][0x11]");
int wait = 0;
while (wait < 3)
{
if (wait == 0)
{
Packet cold = new Packet(0x70a2, false, false);
cold.WriteInt32(273);
cold.WriteInt8(1);
m_RemoteSecurity.Send(cold);
Send(true);
Thread.Sleep(50);
wait = 1;
}
else if (wait == 1)
{
Packet fire = new Packet(0x70a2, false, false);
fire.WriteInt32(274);
fire.WriteInt8(1);
m_RemoteSecurity.Send(fire);
Send(true);
Thread.Sleep(50);
wait = 2;
}
else if (wait == 2)
{
Packet light = new Packet(0x70a2, false, false);
light.WriteInt32(275);
light.WriteInt8(1);
m_RemoteSecurity.Send(light);
Thread.Sleep(50);
wait = 3;
Send(false);
}
continue;
}
}
break;
case 0x12:
{
Logger.WriteLine(Logger.LogLevel.Warning, $"[On recieve from client][0x12]");
int wait = 0;
while (wait < 3)
{
if (wait == 0)
{
Packet cold = new Packet(0x70a2, false, false);
cold.WriteInt32(273);
cold.WriteInt8(1);
m_RemoteSecurity.Send(cold);
Send(true);
Thread.Sleep(50);
wait = 1;
}
else if (wait == 1)
{
Packet fire = new Packet(0x70a2, false, false);
fire.WriteInt32(274);
fire.WriteInt8(1);
m_RemoteSecurity.Send(fire);
Send(true);
Thread.Sleep(50);
wait = 2;
}
else if (wait == 2)
{
Packet light = new Packet(0x70a2, false, false);
light.WriteInt32(275);
light.WriteInt8(1);
m_RemoteSecurity.Send(light);
Thread.Sleep(50);
wait = 3;
Send(false);
}
continue;
}
}
break;
case 0x13:
{
Logger.WriteLine(Logger.LogLevel.Warning, $"[On recieve from client][0x13]");
int wait = 0;
while (wait < 3)
{
if (wait == 0)
{
Packet cold = new Packet(0x70a2, false, false);
cold.WriteInt32(273);
cold.WriteInt8(1);
m_RemoteSecurity.Send(cold);
Send(true);
Thread.Sleep(50);
wait = 1;
}
else if (wait == 1)
{
Packet fire = new Packet(0x70a2, false, false);
fire.WriteInt32(274);
fire.WriteInt8(1);
m_RemoteSecurity.Send(fire);
Send(true);
Thread.Sleep(50);
wait = 2;
}
else if (wait == 2)
{
Packet light = new Packet(0x70a2, false, false);
light.WriteInt32(275);
light.WriteInt8(1);
m_RemoteSecurity.Send(light);
Thread.Sleep(50);
wait = 3;
Send(false);
}
continue;
}
}
break;
}
}
catch
{
Logger.WriteLine(Logger.LogLevel.Warning, $"[On recieve from client][{opcode:X4}][{_pck.GetBytes().Length} bytes]");
//continue;
}
}