semanji Posted April 9, 2016 Share Posted April 9, 2016 (edited) Hi brothers, how do you get the display name of other characters? Im get only org.osbot.rs07.api.model.Player@1f2b425 And it dont match with my admin string if (getInventory().contains(7936) && getInventory().getAmount(7936) > 4) { // trade for ess java.util.List<Player> allPlayers = getPlayers().getAll(); if (!hosts.contains(admin)) { hosts.add(admin); } if (allPlayers != null) { for (int i = 0; i < allPlayers.size(); i++) { log(allPlayers.get(i)); log(hosts); if (hosts.contains(allPlayers.get(i))) { playerMatch = allPlayers.get(i); //playerMatch.interact("Follow"); break; } } new ConditionalSleep(2000) { @Override public boolean condition() throws InterruptedException { return trade.isFirstInterfaceOpen(); } }.sleep(); if (trade.isCurrentlyTrading()) { if (trade.isFirstInterfaceOpen()) { trade.offerAll(7936); } if (trade.getTheirOffers().onlyContains(7937, 995) && trade.didOtherAcceptTrade()) { trade.acceptTrade(); } if (trade.isSecondInterfaceOpen() && trade.getTheirOffers().onlyContains(7937, 995) && trade.didOtherAcceptTrade()) { trade.acceptTrade(); } } } } Edited April 9, 2016 by semanji Quote Link to comment Share on other sites More sharing options...
Shudsy Posted April 9, 2016 Share Posted April 9, 2016 getName() 1 Quote Link to comment Share on other sites More sharing options...
FrostBug Posted April 9, 2016 Share Posted April 9, 2016 getName(). Note that rs names contain special space characters, which do not equal to regular spaces 1 Quote Link to comment Share on other sites More sharing options...
Explv Posted April 9, 2016 Share Posted April 9, 2016 (edited) Hi brothers, how do you get the display name of other characters? Im get only org.osbot.rs07.api.model.Player@1f2b425 And it dont match with my admin string if (hosts.contains(allPlayers.get(i))) use getName(), but you will also need to account for non breaking spaces in their name so use: if (hosts.contains(allPlayers.get(i).getName().replace('\u00A0', ' '))) Edited April 9, 2016 by Explv 1 Quote Link to comment Share on other sites More sharing options...
semanji Posted April 9, 2016 Author Share Posted April 9, 2016 getName(). Note that rs names contain special space characters, which do not equal to regular spaces Thankyou =] I already found this space problem earlier =] runescape uses non blocking space right? Quote Link to comment Share on other sites More sharing options...