July 27, 20178 yr .... Learn java first, if you aren't going to heed the advice given to you in your previous thread, what makes you think we would help you in this one. Edited July 27, 20178 yr by Muffins
July 27, 20178 yr Crazy that no-one helped, just a lot of name calling. I've never done this but I'd imagine that instead of interacting with npc "attack" you'd interact with player "trade" and then use widgets. If I had code example I'd share. I stopped scripting when osbot robbed my little bro.
July 27, 20178 yr This is by no means perfect and it isn't even tested. Wrote it in 5 minutes to give you an idea of a simple flow. I don't recommend copy/pasting it as I left some stuff out that makes it pretty susceptible to luring. int trade(String target, String itemExpected, int amountExpected, String toSend, int amountToSend, boolean send) { if(!trade.isCurrentlyTrading()) { // Accepting the trade via chatbox will be in the listener... if(send) { Player player = players.closest(target); if (player != null) { if (player.interact("Trade with")) { sleepWhile(new Condition() { @Override public boolean evaluate() { return !trade.isCurrentlyTrading(); } }, 30000); // Waits for a max of 30 seconds return 100; } } } } else { if(trade.isFirstInterfaceOpen()) { if(!trade.getOurOffers().contains(toSend)) { trade.offer(toSend, amountToSend); } else if(trade.getOurOffers().getItem(toSend).getAmount() != amountToSend) { if(trade.getOurOffers().contains(toSend)) { trade.removeAll(toSend); } else { trade.offer(toSend, amountToSend); } } else if(trade.getTheirOffers().contains(itemExpected) && trade.getTheirOffers().getItem(itemExpected).getAmount() >= amountExpected) { trade.acceptTrade(); } } else if(trade.isSecondInterfaceOpen()) { //Check their stuff just in case if(trade.getTheirOffers().contains(itemExpected) && trade.getTheirOffers().getItem(itemExpected).getAmount() >= amountExpected) { trade.acceptTrade(); } } } return 1000; } //Usage trade("Bot123321", "Coins", 5000000, "Cowhide", 342, true); //Do this for the bot that will SEND the trade trade(null, "Cowhide", 342, "Coins", 5000000, false); // This is prone to people abusing it, but you can figure out why... @Override public void onMessage(Message g) throws InterruptedException { if(g.getType().equals(Message.MessageType.RECEIVE_TRADE)) { mouse.click(0,0,false); //this is for the bot receiving the trade. you COULD probably just have them trade each other if you want to make it easier (Also, figure out the x,y yourself) } }