public override void Buy(model.Player player, int buyslot) { if (player.GetFreeSlot() != -1 && player.Gold >= templ[buyslot].BuyPrice) { LKCamelot.script.item.Item tempitem = null; if (buyslot == 0) { tempitem = new script.item.LifeDrug().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 1) { tempitem = new script.item.MagicDrug().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 2) { tempitem = new script.item.FullLifeDrug().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 3) { tempitem = new script.item.FullMagicDrug().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } LKCamelot.model.World.NewItems.TryAdd(tempitem.m_Serial, tempitem); player.Gold -= (uint)templ[buyslot].BuyPrice; } }
public CreateItemGround2(LKCamelot.script.item.Item item, Serial key) : base(0x1D) { m_Stream.Write((int)key); m_Stream.Write((short)1); //facedir m_Stream.Write((short)item.Loc.X); m_Stream.Write((short)item.Loc.Y); m_Stream.Write((byte)2); //10 byte sprite 02 00 00 00 00 00 00 00 00 23 (first 2 last # id m_Stream.Fill(8); m_Stream.Write((short)item.m_ItemID); m_Stream.Write((byte)2); //1byte ukn m_Stream.Write((byte)0); //1byte ukn m_Stream.Write((byte)0); //1byte ukn m_Stream.Write((byte)0); //1byte ukn m_Stream.Write((byte)0x0); //1byte ukn m_Stream.Write((byte)03); //1byte unclickable, transparency m_Stream.Write((byte)0x0); //1byte ukn m_Stream.Write((byte)0x2); //1byte ukn m_Stream.Write((byte)12); m_Stream.Write((byte)12); m_Stream.Write((byte)12); m_Stream.Write((byte)0); m_Stream.Write((byte)01); m_Stream.WriteUTF8Null(item.NPrefix() + " " + item.Name + item.Quantity); }
public EquipItem2(LKCamelot.script.item.Item item) : base(0x15) { m_Stream.Write((byte)item.EquipSlot); m_Stream.WriteAsciiFixed(item.NPrefix() + " " + item.Name, 32); m_Stream.Write((byte)0); m_Stream.Write((short)item.m_ItemID); }
public AddItemToInventory2(LKCamelot.script.item.Item item) : base(0x17) { m_Stream.Write((byte)item.InvSlot); m_Stream.Write((short)item.m_ItemID); m_Stream.Write((byte)02); m_Stream.Write((short)item.ParsedStats.Count()); m_Stream.WriteUTF8Null(item.ParsedStats); }
public AddItemToEntrust(LKCamelot.script.item.Item item) : base(0x31) { var invslot = (item.InvSlot - 40); while (invslot >= 12) { invslot -= 12; } m_Stream.Write((byte)invslot); m_Stream.Write((short)item.m_ItemID); m_Stream.Write((byte)00); m_Stream.Write((short)item.ParsedStats.Count()); m_Stream.WriteAsciiNull(item.ParsedStats); }
public override void Buy(model.Player player, int buyslot) { if (player.GetFreeSlot() != -1 && player.Gold >= templ[buyslot].BuyPrice) { LKCamelot.script.item.Item tempitem = null; if (buyslot == 0) { tempitem = new script.item.Rod().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 1) { tempitem = new script.item.ShortStaff().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 2) { tempitem = new script.item.Crook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 3) { tempitem = new script.item.BambooSpear().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } // if (buyslot == 4) { tempitem = new script.item.ShortSpear().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 5) { tempitem = new script.item.Skewer().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } LKCamelot.model.World.NewItems.TryAdd(tempitem.m_Serial, tempitem); player.Gold -= (uint)templ[buyslot].BuyPrice; } }
public override void Buy(model.Player player, int buyslot) { if (player.GetFreeSlot() != -1 && player.Gold >= templ[buyslot].BuyPrice) { LKCamelot.script.item.Item tempitem = null; if (buyslot == 0) { tempitem = new script.item.HealBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 1) { tempitem = new script.item.PlusHealBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 2) { tempitem = new script.item.ElectronicBallBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 3) { tempitem = new script.item.FireBallBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } // if (buyslot == 4) { tempitem = new script.item.MagicArmorBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 5) { tempitem = new script.item.RainbowArmorBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 6) { tempitem = new script.item.GuardianSwordBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 7) { tempitem = new script.item.FireProtectorBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } // if (buyslot == 8) { tempitem = new script.item.TeagueShieldBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 9) { tempitem = new script.item.MagicShieldBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 10) { tempitem = new script.item.ZigZagBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 11) { tempitem = new script.item.MentalSwordBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 12) { tempitem = new script.item.SidewinderBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 13) { tempitem = new script.item.Dai().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 14) { tempitem = new script.item.Zel().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } LKCamelot.model.World.NewItems.TryAdd(tempitem.m_Serial, tempitem); player.Gold -= (uint)templ[buyslot].BuyPrice; } }
public override void Buy(model.Player player, int buyslot) { if (player.GetFreeSlot() != -1 && player.Gold >= templ[buyslot].BuyPrice) { LKCamelot.script.item.Item tempitem = null; if (buyslot == 0) { tempitem = new script.item.Suit().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 1) { tempitem = new script.item.Surplice().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 2) { tempitem = new script.item.Cape().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 3) { tempitem = new script.item.Robe().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } // if (buyslot == 4) { tempitem = new script.item.BambooKnife().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 5) { tempitem = new script.item.WoodenSword().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 6) { tempitem = new script.item.ShortSword().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 7) { tempitem = new script.item.Saw().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } // if (buyslot == 8) { tempitem = new script.item.SpikedClub().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 9) { tempitem = new script.item.MorningStar().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 10) { tempitem = new script.item.SmallShield().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 11) { tempitem = new script.item.Hood().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } // if (buyslot == 12) { tempitem = new script.item.Crown().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 13) { tempitem = new script.item.Mask().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 14) { tempitem = new script.item.FullDress().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 15) { tempitem = new script.item.Mace().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } LKCamelot.model.World.NewItems.TryAdd(tempitem.m_Serial, tempitem); player.Gold -= (uint)templ[buyslot].BuyPrice; } }
public DeleteEquipItem2(LKCamelot.script.item.Item item) : base(0x16) { m_Stream.Write((byte)item.EquipSlot); }
public override void Buy(model.Player player, int buyslot) { if (player.GetFreeSlot() != -1 && player.Gold >= templ[buyslot].BuyPrice) { LKCamelot.script.item.Item tempitem = null; if (buyslot == 0) { tempitem = new script.item.ThunderCrossBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 1) { tempitem = new script.item.FlameRoundBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 2) { tempitem = new script.item.ButterflyBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 3) { tempitem = new script.item.WakondaBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 4) { tempitem = new script.item.PickUpBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 5) { tempitem = new script.item.ReCallBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 6) { tempitem = new script.item.TransparencyBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 7) { tempitem = new script.item.SharpEyeBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 8) { tempitem = new script.item.StoneCurseBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 9) { tempitem = new script.item.FreezingBook().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 10) { tempitem = new script.item.러스경험치().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } LKCamelot.model.World.NewItems.TryAdd(tempitem.m_Serial, tempitem); player.Gold -= (uint)templ[buyslot].BuyPrice; } }