Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. //Use
  2. RSItem food = edible();
  3. if (food != null) {
  4.      food.doAction("Eat ");
  5. }
  6.  
  7.  
  8. private RSItem edible() {
  9.         RSItem[] is = inventory.getItems();
  10.         for (RSItem i : is) {
  11.             if (i.getComponent().getActions() == null || i.getComponent().getActions()[0] == null) {
  12.                 continue;
  13.             }
  14.             if (i.getComponent().getActions()[0].contains("Eat")) {
  15.                 return i;
  16.             }
  17.         }
  18.         return null;
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement