Containers
Last updated
Task CloseWindows();IWindow GetWindow(int id);IWindow GetWindowByTitle(string title);IWindow GetWindowByType (string type);public async void OnTick() {
// Find all slots that have diamonds (id 264) in them.
var diamondSlots = Context.Containers.GetInventory().Find(264);
// Loop through each slot that has a diamond in it.
foreach (var diamondSlot in diamondSlots) {
// Check if the amount of diamonds in the current slot is
// less than 64. If it is less than 64, then we drop the item stack.
if(diamondSlot.Count < 64)
await diamondSlot.DropStack();
}
}public async void OnTick() {
var diamondSlots = Context.Containers.GetInventory().Find(264);
foreach (var diamondSlot in diamondSlots) {
if(diamondSlot.Count < 64)
await diamondSlot.DropStack();
}
}