Hey all,
I believe ImmuneOne released this packet(?)
So give him thanks if he posts here!
I believe I pressed enough buttons to make everything stop underlining in red....
Thing is I don't know how to test if I actually did the packet conversion correctly.
These are the original packets
Code:
public static byte[] FlowerPacket(string Flowers,bool CreateInstance)
{// all in order of what they would be on the game from top to bttom never added in client to have them indivudaly yet
//The Flower should be in that order
//AllRedRoses TodayRedRoses AllLilies 2DayLilies AllOrchades 2DayOrchades AllTulips 2day Tulipes
PacketBuilder P = new PacketBuilder(1150, 21 + Flowers.Length);
if (CreateInstance)
{
P.Long(1);
P.Long(0);
P.Long(0);
P.Int(1);
P.Text(Flowers);
P.Long(0);
}
return P.getFinal();
}
public static byte[] TryFlower(string Flowers,int Rank)
{// all in order of what they would be on the game from top to bttom never added in client to have them indivudaly yet
//The Flower should be in that order
//AllRedRoses TodayRedRoses AllLilies 2DayLilies AllOrchades 2DayOrchades AllTulips 2day Tulipes
PacketBuilder P = new PacketBuilder(1150, 21 + Flowers.Length);
P.Long(2);
P.Long(Rank);
P.Long(0);
P.Int(1);
P.Text(Flowers);
P.Long(0);
return P.getFinal();
}
public static byte[] Flower2(int Id,int Type,int Rank,int RoseType)
{
string Flowers = Id.ToString();
PacketBuilder P = new PacketBuilder(1151, 21 + Flowers.Length);
P.Long(Type);
P.Long(Rank);
P.Long(RoseType);
P.Int(1);
P.Text(Flowers);
P.Long(0);
return P.getFinal();
}
public static byte[] SendFlowerScreen(int Id)
{
PacketBuilder Packet = new PacketBuilder(0x3f2, 28);
Packet.Long(0);
Packet.Long(Id);
Packet.Short(0x4e0);
Packet.Short(0);
Packet.Short(0);
Packet.Short(0);
Packet.Short(0);
Packet.Short(0x74);
Packet.Long(0);
return Packet.getFinal();
}
This is the code that I kept pressing buttons until the red lines went away.
(My perfected noob method)
Code:
public static byte[] FlowerPacket(string Flowers, bool CreateInstance)
{
COPacket P = new COPacket(1150, 21 + Flowers.Length);
if (CreateInstance)
{
P.WriteInt32(1);
P.WriteInt32(0);
P.WriteInt32(0);
P.WriteInt16(1);
P.WriteString(Flowers);
P.WriteInt32(0);
}
return P.GetGet();
}
public static byte[] TryFlower(string Flowers, int Rank)
{
COPacket P = new COPacket(1150, 21 + Flowers.Length);
P.WriteInt32(2);
P.Move(Rank);
P.WriteInt32(0);
P.WriteInt16(1);
P.WriteString(Flowers);
P.WriteInt32(0);
return P.GetGet();
}
public static byte[] Flower2(int Id, int Type, int Rank, int RoseType)
{
string Flowers = Id.ToString();
COPacket P = new COPacket(1151, 21 + Flowers.Length);
P.Move(Type);
P.Move(Rank);
P.Move(RoseType);
P.WriteInt16(1);
P.WriteString(Flowers);
P.WriteInt32(0);
return P.GetGet();
}
public static byte[] SendFlowerScreen(int Id)
{
COPacket Packet = new COPacket(0x3f2, 28);
Packet.WriteInt32(0);
Packet.Move(Id);
Packet.WriteInt16(0x4e0);
Packet.WriteInt16(0);
Packet.WriteInt16(0);
Packet.WriteInt16(0);
Packet.WriteInt16(0);
Packet.WriteInt16(0x74);
Packet.WriteInt32(0);
return Packet.GetGet();
}
And the "GetGet" method
Code:
public byte[] GetGet()
{
return PData;
}
Did I do this right?
If so can we move on to actually adding the functions to this packet?
The packet ID is 1150 cause I made a new packet handler that would make an npc talk to me if the packet id was used...
And the npc wouldn't shut up after I used a flower
So I'm sure that is it.