Suola 0 Posted July 10, 2018 Well I dont know why my bot cant open bank chest when I type normal code getbank.open()? Im talking about zeah bank east of Hosidius house. Do I have to use getgameobject method there?
Nex 2546 Posted July 10, 2018 Yea u do would be something like this: GameObject chest = getGameObjects().closest(c -> c != null && c.getName().contains("Bank chest") && c.hasAction("Bank")); if (!getBank().isOpen() && chest != null) { chest.interact("Bank"); sleepUntil(() -> getBank().isOpen(), 2500); }
Suola 0 Author Posted July 11, 2018 7 hours ago, Nex said: Yea u do would be something like this: GameObject chest = getGameObjects().closest(c -> c != null && c.getName().contains("Bank chest") && c.hasAction("Bank")); if (!getBank().isOpen() && chest != null) { chest.interact("Bank"); sleepUntil(() -> getBank().isOpen(), 2500); } Yeah that works but then the problem is closing bank, idk is it same here normally getbank.close() because now we interact with bank chest?
Milasoft 202 Posted July 11, 2018 41 minutes ago, Suola said: Yeah that works but then the problem is closing bank, idk is it same here normally getbank.close() because now we interact with bank chest? You don't have to interact with the chest to close the bank. So, yes getBank().close() should work normally.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.