Shop Flags for Lotf 5017?
class OpenShop
{
private Client TClient;
private byte[] data;
public OpenShop(byte[] packet, Client client)
{
data = packet;
TClient = client;
// shopid = _shopid;
runshop();
}
public static class SpawnRug
{
unsafe public static byte[] Packet(Character Char, int ID)
{
ushort PacketType = 0x7ee;
byte[] Packet = new byte[21 + Char.MyClient.MyChar.Name.Length];
fixed (byte* Ptr = Packet)
{
*((ushort*)(Ptr)) = (ushort)Packet.Length;
*((ushort*)(Ptr + 2)) = (ushort)PacketType;
*((uint*)(Ptr + 4)) = (uint)ID;
*((ushort*)(Ptr + 8)) = (ushort)(Char.LocX + 1);
*((ushort*)(Ptr + 10)) = (ushort)Char.LocY;
*((ushort*)(Ptr + 12)) = (ushort)406;
*((ushort*)(Ptr + 14)) = (ushort)0;
*((byte*)(Ptr + 16)) = (byte)1;
*((byte*)(Ptr + 17)) = (byte)Char.MyClient.MyChar.Name.Length;
for (int i = 0; i < Char.MyClient.MyChar.Name.Length; i++)
*((byte*)(Ptr + 18 + i)) = Convert.ToByte(Char.MyClient.MyChar.Name[i]);
}
return Packet;
}
}
public static class MarketStall
{
unsafe public static byte[] Packet(int ID, Character Character)
{
ushort PacketType = 0x3f2;
byte[] Packet = new byte[24];
fixed (byte* Ptr = Packet)
{
*((ushort*)(Ptr)) = (ushort)Packet.Length;
*((ushort*)(Ptr + 2)) = (ushort)PacketType;
*((uint*)(Ptr + 4)) = (uint)758292;
*((uint*)(Ptr + 8)) = (uint)Character.UID;
*((uint*)(Ptr + 12)) = (uint)ID;
*((ushort*)(Ptr + 16)) = (ushort)272;
*((ushort*)(Ptr + 18)) = (ushort)198;
*((ushort*)(Ptr + 20)) = (ushort)6;
*((ushort*)(Ptr + 22)) = (ushort)110;
}
return Packet;
}
}
/*public static class AddItemToShop
{
unsafe public static byte[] Packet(MarketShopItem TheItem)
{
ushort PacketType = 0x454;
byte[] Packet = new byte[40];
fixed (byte* Ptr = Packet)
{
*((ulong*)(Ptr)) = (ulong)Packet.Length;
*((ulong*)(Ptr + 2)) = (ulong)PacketType;
*((uint*)(Ptr + 4)) = (uint)TheItem.ShopItem.ItemUID;
*((uint*)(Ptr + 8)) = (uint)TheItem.ShopID;
*((uint*)(Ptr + 12)) = (uint)TheItem.Gold;
*((uint*)(Ptr + 16)) = (uint)TheItem.ShopItem.ItemID;
*((ushort*)(Ptr + 20)) = (ushort)TheItem.ShopItem.HealthAndDura;
*((ushort*)(Ptr + 22)) = (ushort)TheItem.ShopItem.HealthAndDura;
*((byte*)(Ptr + 24)) = (byte)TheItem.GoldType;
}
return Packet;
}
}*/
DUDE U ARE THE BEST BRO TYTYQuote:
Here's part of it
Now all you do is code runshop() lmao.Code:class OpenShop { private Client TClient; private byte[] data; public OpenShop(byte[] packet, Client client) { data = packet; TClient = client; // shopid = _shopid; runshop(); }
Edit: (Packets)
Code:public static class SpawnRug { unsafe public static byte[] Packet(Character Char, int ID) { ushort PacketType = 0x7ee; byte[] Packet = new byte[21 + Char.MyClient.MyChar.Name.Length]; fixed (byte* Ptr = Packet) { *((ushort*)(Ptr)) = (ushort)Packet.Length; *((ushort*)(Ptr + 2)) = (ushort)PacketType; *((uint*)(Ptr + 4)) = (uint)ID; *((ushort*)(Ptr + 8)) = (ushort)(Char.LocX + 1); *((ushort*)(Ptr + 10)) = (ushort)Char.LocY; *((ushort*)(Ptr + 12)) = (ushort)406; *((ushort*)(Ptr + 14)) = (ushort)0; *((byte*)(Ptr + 16)) = (byte)1; *((byte*)(Ptr + 17)) = (byte)Char.MyClient.MyChar.Name.Length; for (int i = 0; i < Char.MyClient.MyChar.Name.Length; i++) *((byte*)(Ptr + 18 + i)) = Convert.ToByte(Char.MyClient.MyChar.Name[i]); } return Packet; } } public static class MarketStall { unsafe public static byte[] Packet(int ID, Character Character) { ushort PacketType = 0x3f2; byte[] Packet = new byte[24]; fixed (byte* Ptr = Packet) { *((ushort*)(Ptr)) = (ushort)Packet.Length; *((ushort*)(Ptr + 2)) = (ushort)PacketType; *((uint*)(Ptr + 4)) = (uint)758292; *((uint*)(Ptr + 8)) = (uint)Character.UID; *((uint*)(Ptr + 12)) = (uint)ID; *((ushort*)(Ptr + 16)) = (ushort)272; *((ushort*)(Ptr + 18)) = (ushort)198; *((ushort*)(Ptr + 20)) = (ushort)6; *((ushort*)(Ptr + 22)) = (ushort)110; } return Packet; } } /*public static class AddItemToShop { unsafe public static byte[] Packet(MarketShopItem TheItem) { ushort PacketType = 0x454; byte[] Packet = new byte[40]; fixed (byte* Ptr = Packet) { *((ulong*)(Ptr)) = (ulong)Packet.Length; *((ulong*)(Ptr + 2)) = (ulong)PacketType; *((uint*)(Ptr + 4)) = (uint)TheItem.ShopItem.ItemUID; *((uint*)(Ptr + 8)) = (uint)TheItem.ShopID; *((uint*)(Ptr + 12)) = (uint)TheItem.Gold; *((uint*)(Ptr + 16)) = (uint)TheItem.ShopItem.ItemID; *((ushort*)(Ptr + 20)) = (ushort)TheItem.ShopItem.HealthAndDura; *((ushort*)(Ptr + 22)) = (ushort)TheItem.ShopItem.HealthAndDura; *((byte*)(Ptr + 24)) = (byte)TheItem.GoldType; } return Packet; } }*/