Quote:
Originally Posted by I don't have a username
Stop creating an aimbot, you don't even understand the basics.
|
i am trying bro ... its not possible to do or to learn
look here , i got the char id with this code
PHP Code:
private void PacketReceived(byte[] packet)
{
ushort Length = BitConverter.ToUInt16(packet, 0);
ushort ID = BitConverter.ToUInt16(packet, 2);
if (RCV.InvokeRequired)
{
RCV.BeginInvoke(new Action(delegate
{
PacketReceived(packet);
}));
return;
}
if (ID == 1006)
{
int X = BitConverter.ToUInt16(packet, 4);//this assumes X is at offset 32 and is a Ushort.
int Y = BitConverter.ToUInt16(packet, 4);
//string Name = BitConverter.ToString(packet, 80, 81);
//string Name = Encoding.ASCII.GetString(packet, 81, 80);
NameValue.Text = Name;
RCV.Text += "PacketReceived : Character_ID = " + X + " Y = " + Y + "\r\n";
}
RCV.Text += "Received : Packet ID , " + ID + " Packet Length , " + Length + "\r\n";
}
but i am still can not get the char name , any advice tho ?
================================================== =====
EDIT
================================================== =====
hello again guys .... i tried many times but i failed
look here ...
PHP Code:
public unsafe class Packets
{
public byte[] CharacterInfo(Character Charr)
{
byte[] Packet = new byte[120 + Charr.Name.Length + Charr.Spouse.Length];
long Model = Convert.ToInt64(Convert.ToString(Charr.Avatar) + Convert.ToString(Charr.Model));
fixed (byte* p = Packet)
{
*((ushort*)p) = (ushort)Packet.Length;
*((ushort*)(p + 2)) = 1006;
*((uint*)(p + 4)) = (uint)Charr.UID;
*((uint*)(p + 10)) = (uint)Model;
*((ushort*)(p + 14)) = (ushort)Charr.Hair;
*((uint*)(p + 16)) = (uint)Charr.Silvers;
*((uint*)(p + 20)) = (uint)Charr.CPs;
*((uint*)(p + 24)) = (uint)Charr.Exp;
*((ushort*)(p + 42)) = (ushort)5130;
*((ushort*)(p + 52)) = (ushort)Charr.Str;
*((ushort*)(p + 54)) = (ushort)Charr.Agi;
*((ushort*)(p + 56)) = (ushort)Charr.Vit;
*((ushort*)(p + 58)) = (ushort)Charr.Spi;
*((ushort*)(p + 60)) = (ushort)Charr.StatP;
*((ushort*)(p + 62)) = (ushort)Charr.CurHP;
*((ushort*)(p + 64)) = (ushort)Charr.MaxMana();
*((ushort*)(p + 66)) = (ushort)Charr.PKPoints;
*(p + 68) = Charr.Level;
*(p + 69) = Charr.Job;
*((ushort*)(p + 73)) = (ushort)Charr.RBCount;
*(p + 70) = 1;
*(p + 71) = 2;
*(p + 111) = (byte)Charr.Name.Length;
Packet[111 + Charr.Name.Length] = (byte)Charr.Spouse.Length;
for (sbyte i = 0; i < Charr.Name.Length; i++)
{
*(p + 111 + i) = (byte)Charr.Name[i];
}
for (sbyte i = 0; i < Charr.Spouse.Length; i++)
{
*(p + 113 + Charr.Name.Length + i) = (byte)Charr.Spouse[i];
}
}
return Packet;
}
}
PHP Code:
public Character Charr;
PHP Code:
private void Btn1_Click(object sender, EventArgs e)
{
Charr.Doit();
NameValue.Text = Charr.Name;
}
PHP Code:
public COClient MyClient;
public Packets MyPackets;
PHP Code:
public void Doit()
{
MyClient.SendPacket(MyPackets.CharacterInfo(this));
}
PHP Code:
public void SendPacket(byte[] packet)
{
if (packet == null)
throw new Exception("Packet cannot be null");
if (!(packet.Length > 0))
throw new Exception("Packet length cannot be less than 1");
Action sendPacketAsync = (delegate()
{
uint packetLength = (uint)packet.Length;
IntPtr packetAddress = Memory.Allocate(packetLength);
if (packetAddress != IntPtr.Zero)
{
if (Memory.WriteBytes(packetAddress, packet))
{
MemoryStream code = new MemoryStream();
BinaryWriter codeWriter = new BinaryWriter(code);
using (codeWriter)
{
//mov ecx, NetworkClass
codeWriter.Write((byte)0xB9);
codeWriter.Write((uint)networkClass);
//push packet length
codeWriter.Write((byte)0x68);
codeWriter.Write((uint)packetLength);
//push packet address
codeWriter.Write((byte)0x68);
codeWriter.Write((uint)packetAddress);
//mov eax, sendpacket function (codecave)
codeWriter.Write((byte)0xB8);
codeWriter.Write((uint)sendPacketCodeCave);
//call eax
codeWriter.Write(new byte[] { 0xFF, 0xD0 });
//ret
codeWriter.Write((byte)0xC3);
codeWriter.Flush();
ExecuteCode(code.ToArray());
}
}
}
});
sendPacketAsync.BeginInvoke(null, null);
}
but when i press Btn 1 the app is close idk why ??