fenclanner Posted March 6, 2015 Share Posted March 6, 2015 This code here works. Entity bank = objects.closest(new String[] { "Bank booth" }); if (bank != null) { bank.interact("Bank"); } But this doesnt why? Entity bank = objects.closest(new String[] { "Banker" }); if (bank != null) { bank.interact("Bank"); } Link to comment Share on other sites More sharing options...
Novak Posted March 6, 2015 Share Posted March 6, 2015 the banker is an npc not an object Link to comment Share on other sites More sharing options...
Botre Posted March 6, 2015 Share Posted March 6, 2015 Explain HOW it doesn't work. Try getNpcs().closest() Link to comment Share on other sites More sharing options...
fenclanner Posted March 6, 2015 Author Share Posted March 6, 2015 the banker is an npc not an object How would one go about doing it on a npc? i only just started. Link to comment Share on other sites More sharing options...
Novak Posted March 6, 2015 Share Posted March 6, 2015 Explain HOW it doesn't work. Try getNpcs().closest() 1 Link to comment Share on other sites More sharing options...
fenclanner Posted March 6, 2015 Author Share Posted March 6, 2015 Explain HOW it doesn't work. Try getNpcs().closest() Lel w/e ill keep trying. Link to comment Share on other sites More sharing options...
Reid Posted March 6, 2015 Share Posted March 6, 2015 (edited) NPC bank = npcs.closest(new String[] { "Banker" }); if (bank != null) {bank.interact("Bank");} add me on Skype if you need help with anything: reidcool Edited March 6, 2015 by Reid Link to comment Share on other sites More sharing options...
BotRS123 Posted March 6, 2015 Share Posted March 6, 2015 How would one go about doing it on a npc? i only just started. It is essentially the same. Here is a hint: http://osbot.org/api/org/osbot/rs07/api/NPCS.html Link to comment Share on other sites More sharing options...
fenclanner Posted March 6, 2015 Author Share Posted March 6, 2015 Explain HOW it doesn't work. Try getNpcs().closest() That works, thanks man. Link to comment Share on other sites More sharing options...