示例#1
0
        /// <summary>
        /// Use the item on yourself
        /// </summary>
        /// <returns></returns>
        public bool UseOnSelf()
        {
            uint playerId = client.Player.Id;

            byte stack = 0;

            if (id == Constants.Items.Bottle.Vial.Id)
            {
                stack = count;
            }

            return(Packets.Outgoing.ItemUseBattlelistPacket.Send(client, ItemLocation.FromHotkey().ToLocation(), (ushort)id, stack, playerId));
        }
示例#2
0
 /// <summary>
 /// Use an item on a creature of the given id
 /// </summary>
 /// <param name="id"></param>
 /// <param name="creatureId"></param>
 /// <returns></returns>
 public bool UseItemOnCreature(uint id, byte stack, int creatureId)
 {
     return(Packets.Outgoing.ItemUseBattlelistPacket.Send(client, ItemLocation.FromHotkey().ToLocation(), (ushort)id, stack, (uint)creatureId));
 }
示例#3
0
 /// <summary>
 /// Use an item on a tile (eg. fishing)
 /// </summary>
 /// <param name="id"></param>
 /// <param name="onTile"></param>
 /// <returns></returns>
 public bool UseItemOnTile(uint id, Tile onTile)
 {
     return(Packets.Outgoing.ItemUseOnPacket.Send(client, ItemLocation.FromHotkey().ToLocation(), (ushort)id, 0, onTile.Location, (ushort)onTile.Ground.Id, 0));
 }
示例#4
0
 /// <summary>
 /// If you just want to use an item, like eat a food, or check gp etc
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public bool UseItem(uint id)
 {
     return(Packets.Outgoing.ItemUsePacket.Send(client, ItemLocation.FromHotkey().ToLocation(), (ushort)id, 0, 0x0F));
 }