what if i have 5017 client, will potency work?
And my char+ eternity thingies in packet.cs look way diffrent
Quote:
public byte[] CharacterInfo(Character Charr)
{
ushort PacketType = 0x3ee;
string Spouse = "None";
short Length = (short)(70 + Charr.Name.Length + Spouse.Length);
byte[] Packet = new byte[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)) = (ushort)PacketType;
*((uint*)(p + 4)) = (uint)Charr.UID;
*((uint*)(p + 8)) = (uint)Model;
*((ushort*)(p + 12)) = (ushort)Charr.Hair;
*((uint*)(p + 14)) = (uint)Charr.Silvers;
*((uint*)(p + 18)) = (uint)Charr.CPs;
*((uint*)(p + 22)) = (uint)Charr.Exp;
*((ushort*)(p + 42)) = (ushort)5130;
*((ushort*)(p + 46)) = (ushort)Charr.Str;
*((ushort*)(p + 48)) = (ushort)Charr.Agi;
*((ushort*)(p + 50)) = (ushort)Charr.Vit;
*((ushort*)(p + 52)) = (ushort)Charr.Spi;
*((ushort*)(p + 54)) = (ushort)Charr.StatP;
*((ushort*)(p + 56)) = (ushort)Charr.CurHP;
*((ushort*)(p + 58)) = (ushort)Charr.MaxMana();
*((ushort*)(p + 60)) = (ushort)Charr.PKPoints;
*(p + 62) = Charr.Level;
*(p + 63) = Charr.Job;
*(p + 66) = 1;
*(p + 67) = 2;
*(p + 68) = (byte)Charr.Name.Length;
for (int i = 0; i < Charr.Name.Length; i++)
{
*(p + 69 + i) = Convert.ToByte(Charr.Name[i]);
}
*(p + 70 + Charr.Name.Length) = (byte)Spouse.Length;
for (int i = 0; i < Spouse.Length; i++)
{
*(p + Charr.Name.Length + 71 + i) = Convert.ToByte(Spouse[i]);
}
}
/*
Len|ID |UID |Modell n Avatar |Hair |Silvers |
Cps| Exp| 16 nulls| Nobility rank| str| agi| vit| spi| statp|
hp| nulls| pkp| level| class| nulls| 1 n 2| name..spouse
55 00| ee 03| fa 56 17 00| cb 97 04 00| 7f 02| ba 68 ; U....V.........h
00 00| 00 00 00 00| 66 96 01 00| 00 00 00 00 00 00 ; ......f.........
00 00 00 00 00 00 00 00 00 00| 0a 14 00 00| e3 00| ; ................
42 00| 2f 00| 00 00| 00 00| 2b 08| 00 00| 00 00| 6f| 19| ; B./.....+.....o.
00 00| 01 02| 0b 50 72 69 6d 65 4b 6e 69 67 68 74 ; .....PrimeKnight
04 4e 6f 6e 65|
*
*/
return Packet;
}
|
And this is the eternity part:
Quote:
public byte[] SpawnEntity(Character Player)
{
string[] equip;
long HeadId = 0;
long ArmorId = 0;
long RightHandId = 0;
long LeftHandId = 0;
long GarmentId = 0;
if (Player.Equips[1] != null)
{
equip = Player.Equips[1].Split('-');
HeadId = Convert.ToInt64(equip[0]);
}
if (Player.Equips[3] != null)
{
equip = Player.Equips[3].Split('-');
ArmorId = Convert.ToInt64(equip[0]);
}
if (Player.Equips[4] != null)
{
equip = Player.Equips[4].Split('-');
RightHandId = Convert.ToInt64(equip[0]);
}
if (Player.Equips[5] != null)
{
equip = Player.Equips[5].Split('-');
LeftHandId = Convert.ToInt64(equip[0]);
}
if (Player.Equips[9] != null)
{
equip = Player.Equips[9].Split('-');
GarmentId = Convert.ToInt64(equip[0]);
}
long ToArmor;
if (Player.Equips[9] != null)
ToArmor = GarmentId;
else
ToArmor = ArmorId;
uint Model;
if (Player.Alive)
Model = uint.Parse(Convert.ToString(Player.Avatar) + Convert.ToString(Player.Model));
else
{
if (Player.Model == 1003 || Player.Model == 1004)
Model = uint.Parse(Convert.ToString(Player.Avatar) + 1098.ToString());
else
Model = uint.Parse(Convert.ToString(Player.Avatar) + 1099.ToString());
}
ushort PacketType = 0x3f6;
byte[] Packet = new byte[85 + Player.Name.Length];
fixed (byte* p = Packet)
{
*((ushort*)p) = (ushort)Packet.Length;
*((ushort*)(p + 2)) = (ushort)PacketType;
*((uint*)(p + 4)) = (uint)Player.UID;
*((uint*)(p + 8)) = (uint)Model;
*((uint*)(p + 12)) = (uint)Player.GetStat();
*((ushort*)(p + 20)) = (ushort)Player.GuildID;
*(p + 23) = Player.GuildPosition;
if (Player.Alive)
{
*((uint*)(p + 28)) = (uint)HeadId;
*((uint*)(p + 32)) = (uint)ToArmor;
*((uint*)(p + 36)) = (uint)RightHandId;
*((uint*)(p + 40)) = (uint)LeftHandId;
}
*((ushort*)(p + 52)) = (ushort)Player.LocX;
*((ushort*)(p + 54)) = (ushort)Player.LocY;
*((ushort*)(p + 56)) = (ushort)Player.Hair;
*(p + 58) = Player.Direction;
*(p + 59) = Player.Action;
*(p + 80) = 1;
*(p + 81) = (byte)Player.Name.Length;
for (int i = 0; i < Player.Name.Length; i++)
{
*(p + 82 + i) = Convert.ToByte(Player.Name[i]);
}
}
return Packet;
}
|
I know old post blabla, but it can be helpfull in future.. so please explain me,
Because i get alot errors if i take the 1 from Rebon666 and i can fix errors but then i have to get whole other packets...(liek totally new packet.cs)
(#By the way, potency work, only not see see from other players...)