Advertisement
Guest User

Untitled

a guest
Apr 14th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. import com.runemate.game.api.script.Execution;
  2. import com.runemate.game.api.hybrid.region.Players;
  3. import com.runemate.game.api.hybrid.entities.GameObject;
  4. import com.runemate.game.api.script.framework.LoopingScript;
  5. import com.runemate.game.api.hybrid.region.GameObjects;
  6.  
  7. public final class onionbot extends LoopingScript{
  8. public GameObject obj;
  9.  
  10. @Override
  11. public void onStart(String... args) {
  12.  
  13. }
  14.  
  15. @Override
  16. public void onLoop() {
  17. obj = GameObjects.newQuery().names("Onion").results().nearest();
  18. if(obj != null){
  19. if(obj.interact("Pick", obj.getDefinition().getName()){
  20. Execution.delayUntil(() -> Players.getLocal().getAnimationId() != -1, 5000);
  21.  
  22. }
  23.  
  24. }
  25.  
  26. }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement