Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Use
- RSItem food = edible();
- if (food != null) {
- food.doAction("Eat ");
- }
- private RSItem edible() {
- RSItem[] is = inventory.getItems();
- for (RSItem i : is) {
- if (i.getComponent().getActions() == null || i.getComponent().getActions()[0] == null) {
- continue;
- }
- if (i.getComponent().getActions()[0].contains("Eat")) {
- return i;
- }
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement