import com.runemate.game.api.hybrid.local.hud.interfaces.InterfaceWindows;
import com.runemate.game.api.hybrid.local.hud.interfaces.Inventory;
import com.runemate.game.api.hybrid.local.hud.interfaces.SpriteItem;
import com.runemate.game.api.script.Execution;
import com.runemate.game.api.script.framework.task.Task;
/**
* Created by Gaming on 7/21/2015.
*/
public class Uncut extends Task {
@Override
public boolean validate() {
return Inventory.containsAnyOf(1617,1619,1621,1623,1625,1627,1629,1631);
}
@Override
public void execute() {
if (InterfaceWindows.getInventory().isOpen()) {
for (SpriteItem item : Inventory.getItems(1617,1619,1621,1623,1625,1627,1629,1631)) {
if (item.interact("Drop"))
Execution.delayUntil(() -> !item.isValid(), 700);
}
} else {
InterfaceWindows.getInventory().open();
}
}
}