trainux Posted May 6, 2018 Posted May 6, 2018 According to what I have read, and I understand, it is the following: NPC bank_booth = getNpcs().closest(6943); bank_booth.interact("Bank"); But this hangs the bot and I have to close it forcibly. Attach the image of the error shown in consolta by osbot.org.
GPSwap Posted May 6, 2018 Posted May 6, 2018 Well if your using bank booth that's a object not a npc, I would suggest you don't use ID's and use Strings instead
01053 Posted May 6, 2018 Posted May 6, 2018 final RS2Object bankBooth = script.getObjects().closest(new NameFilter<>("Bank booth")); if (bankBooth != null) bankBooth.interact("Bank"); I'm assuming something like this is what you're after. 1
dreameo Posted May 6, 2018 Posted May 6, 2018 12 hours ago, 01053 said: final RS2Object bankBooth = script.getObjects().closest(new NameFilter<>("Bank booth")); if (bankBooth != null) bankBooth.interact("Bank"); I'm assuming something like this is what you're after. you don't need the filter, just "Bank booth" is fine.
trainux Posted May 9, 2018 Author Posted May 9, 2018 solved, thanks to everyone, I was acting like an idiot.