todamach Posted June 20, 2014 Share Posted June 20, 2014 (edited) This used to work: RS2Object bank = closestObjectForName("Bank booth"); if (bank != null) { if (bank.interact("Bank")) { while (!client.getBank().isOpen()) sleep(250); client.getBank().depositAll(); } } AFAIC RS2Object is obsolete in v2. So I change it to Object. But interact is obsolete too. How to fix it? Thanks. Edited June 20, 2014 by todamach Link to comment Share on other sites More sharing options...
Botre Posted June 20, 2014 Share Posted June 20, 2014 RS2Object isn't obsolete at all Oo You could just loop through this -> this.objects.getAll(); Link to comment Share on other sites More sharing options...
Eliot Posted June 20, 2014 Share Posted June 20, 2014 Entity bankBooth = objects.closest("Bank booth"); if (bankBooth != null) bankBooth.interact("Bank"); Link to comment Share on other sites More sharing options...
Joseph Posted June 20, 2014 Share Posted June 20, 2014 This is what is giving you problem RS2Object bank = closestObjectForName("Bank booth"); Osbot 2 doesn't have closestObjectForName() Osbot 2 uses objects.closest("bank booth"); Link to comment Share on other sites More sharing options...
Botre Posted June 20, 2014 Share Posted June 20, 2014 http://osbot.org/osbot2_api/org/osbot/rs07/api/model/InteractableObject.html Link to comment Share on other sites More sharing options...
todamach Posted June 20, 2014 Author Share Posted June 20, 2014 Thanks to everyone Link to comment Share on other sites More sharing options...
Swizzbeat Posted June 20, 2014 Share Posted June 20, 2014 RS2Object is obsolete in v2. So I change it to Object. Entity bankBooth = objects.closest("Bank booth"); if (bankBooth != null) bankBooth.interact("Bank"); That won't work in half the RS banks. Link to comment Share on other sites More sharing options...
Botre Posted June 20, 2014 Share Posted June 20, 2014 That won't work in half the RS banks. Yeah But if you add a model or definition check it will. 1 Link to comment Share on other sites More sharing options...
Joseph Posted June 20, 2014 Share Posted June 20, 2014 (edited) RS2Object objects = objects.closest("bank booth"); if (bankBooth != null) bankBooth.interact("Bank"); Who says this wouldnt work Edited June 20, 2014 by josedpay Link to comment Share on other sites More sharing options...
Dog_ Posted June 20, 2014 Share Posted June 20, 2014 RS2Object objects = objects.closest("bank booth"); if (bankBooth != null) bankBooth.interact("Bank"); Who says this wouldnt work If won't work if it's a closed bank booth. Link to comment Share on other sites More sharing options...
Joseph Posted June 20, 2014 Share Posted June 20, 2014 If won't work if it's a closed bank booth. im not trying to spoon feed them, Im only supplying the basics. Link to comment Share on other sites More sharing options...
Dog_ Posted June 20, 2014 Share Posted June 20, 2014 im not trying to spoon feed them, Im only supplying the basics. If you're trying to supply the basics you should at least mention it wouldn't work in all cases instead of saying Who says this wouldnt work Link to comment Share on other sites More sharing options...
Pug Posted June 20, 2014 Share Posted June 20, 2014 client.getBank().depositAll(); also using : bank.depositAll(); is quicker Link to comment Share on other sites More sharing options...
Eliot Posted June 20, 2014 Share Posted June 20, 2014 (edited) That won't work in half the RS banks. No shit, you think I'm going to write it all for him? I learned through trial and error, worked for me. Edited June 20, 2014 by Eliot Link to comment Share on other sites More sharing options...
todamach Posted June 20, 2014 Author Share Posted June 20, 2014 Guys, calm your tits I suck at java in general, and now it's whole new API, so I'm confused more than usual. Since, I don't like creating new thread for every small question (or should I do that?), I'll ask here: if(East[i].contains(ore) && canReach(ore)){ } I want to check if area contains entity, and if I can reach that entity. Obviously, I don't know how to use canReach. So, how to use canReach? Link to comment Share on other sites More sharing options...