Jump to content

Nic2555

Members
  • Posts

    5
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Nic2555's Achievements

Newbie

Newbie (1/10)

0

Reputation

  1. Hi, i've been facing this problem lately. i'm trying to make my player walk to a certain area, wich is called YEW_AREA, but it shows me a null pointer exception. when i'm using the same code to walk to the BANK_AREA, it works great. here's the code : @Override public int onLoop() throws InterruptedException { if(!getInventory().isFull()) { if(YEW_AREA.contains(myPlayer())) { antiBan(); Entity yew = getObjects().closest("Yew"); if(yew != null) { if(yew.isVisible()) { if(!myPlayer().isAnimating() && !myPlayer().isMoving()) { yew.interact("Chop Down"); sleep(random(700, 800)); } } else { getCamera().toEntity(yew); } } else { if(random(1, 100) == 1) { if(!myPlayer().isAnimating() && !myPlayer().isMoving()) { this.getTabs().open(Tab.EMOTES); doEmote(random(1, 21)); this.getTabs().open(Tab.INVENTORY); } } } } else { this.getLocalWalker().walk(YEW_AREA, true); } } else { if(BANK_AREA.contains(myPlayer())) { Entity banker = getObjects().closest("Bank booth"); if(bank.isOpen()) { bank.depositAll(); } else { if(banker != null) { if(banker.isVisible()) { banker.interact("Bank"); bank.depositAll(); } else { getCamera().toEntity(banker); } } } } else { this.getLocalWalker().walk(BANK_AREA, true); } } return 150; } the problem is on the line 102, where the walker have to walk to the YEW_AREA. Thanks! - Nic
×
×
  • Create New...