November 13, 20169 yr how would this be done? if bank contains x items trade the items to other player
November 13, 20169 yr if (api.getBank().getAmount(item) > amount) { close bank api.getPlayers().closest(their name).interact("Trade with"); sleep conditional till api.getTrade().isFirstInterfaceOpen(); api.getTrade().offer(itemid, amount); sleep conditional till api.getTrade().getOurOffers().contains(item); api.getTrade().acceptTrade(); sleep condition till api.getTrade().isSecondInterfaceOpen(); api.getTrade().acceptTrade(); sleep conditional till !api.getTrade().isCurrentlyTrading(); } ignore the api method provider Edited November 13, 20169 yr by IHB
November 13, 20169 yr how would this be done? if bank contains x items trade the items to other player Bot with items to trade: if inventory contains x items if bank is open close bank else if not in trade use trade interaction on target player sleep until in trade else if in trade with wrong player close trade else if on first trade screen if not offered x items offer x items else if not accepted accept trade else if on second screen if not accepted trade accept trade else if not bank is open open bank else if bank contains x items withdraw x items else stop Bot receiving items: bool trade On received message: if message is of type trade and message is from target player set trade to true On loop: if trade is true if not in trade do trade interaction with target player sleep until in trade else if not trading target player close trade else if on first window if other player accepted accept trade else if on second window if other player accepted accept trade set trade to false Edited November 13, 20169 yr by Explv
November 13, 20169 yr if (api.getBank().getAmount(item) > amount) { close bank api.getPlayers().closest(their name).interact("Trade with"); sleep conditional till api.getTrade().isFirstInterfaceOpen(); api.getTrade().offer(itemid, amount); sleep conditional till api.getTrade().getOurOffers().contains(item); api.getTrade().acceptTrade(); sleep condition till api.getTrade().isSecondInterfaceOpen(); api.getTrade().acceptTrade(); sleep conditional till !api.getTrade().isCurrentlyTrading(); } ignore the api method provider This will fail if it has to reloop because the bank isn't open and it can't check to see the amount of item in the bank.
November 13, 20169 yr This will fail if it has to reloop because the bank isn't open and it can't check to see the amount of item in the bank. tru, i just use it cos im lazy
November 14, 20169 yr Bot with items to trade: if inventory contains x items if bank is open close bank else if not in trade use trade interaction on target player sleep until in trade else if in trade with wrong player close trade else if on first trade screen if not offered x items offer x items else if not accepted accept trade else if on second screen if not accepted trade accept trade else if not bank is open open bank else if bank contains x items withdraw x items else stop Bot receiving items: bool trade On received message: if message is of type trade and message is from target player set trade to true On loop: if trade is true if not in trade do trade interaction with target player sleep until in trade else if not trading target player close trade else if on first window if other player accepted accept trade else if on second window if other player accepted accept trade set trade to false I cannot stress enough how fucking AMAZING it was to have this written out while i was writing my muling code.. made it so much easier.
November 14, 20169 yr I cannot stress enough how fucking AMAZING it was to have this written out while i was writing my muling code.. made it so much easier. I'm glad you found it useful
Create an account or sign in to comment