public void Unequip(int layer) { var item = api.Items.OnLayer((Layer)layer).FirstOrDefault(); if (item != null) { api.DragItem(item.Id); api.DropItem(item, api.Me.BackPack); } }
public void Grab(int amount, int id) { var objId = (ObjectId)id; if (amount <= 0) { amount = api.Items[objId]?.Amount ?? 0; } api.DragItem((uint)id, amount); var targetContainerId = receiveingContainerId ?? api.Me.BackPack.Id; api.DropItem((uint)id, targetContainerId); if (grabDelay.HasValue) { api.Wait(grabDelay.Value); } }