Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Full Trade Help


    Banker

    Recommended Posts

    Okay so I'm working on a bot for someone and It needs to automatically accept trades, get the amount of an item in a trade and accept second trade.

     

    My issue is that i can't seem to find how to accept the second trade, in the docs there's acceptSecondTrade(); but i cant seem to find it/use it in my actual code.

     

    Thanks.

    Link to comment
    Share on other sites

    Okay so I'm working on a bot for someone and It needs to automatically accept trades, get the amount of an item in a trade and accept second trade.

     

    My issue is that i can't seem to find how to accept the second trade, in the docs there's acceptSecondTrade(); but i cant seem to find it/use it in my actual code.

     

    Thanks.

    getTrade().acceptSecondTrade(); 
    Link to comment
    Share on other sites

    Hm, yea it's in the docs but isn't showing up.

     

    Yeah, i tried using getTrade().acceptTrade(); twice to see if that would work but it doesnt seem to :/

    Link to comment
    Share on other sites

    Yeah, i tried using getTrade().acceptTrade(); twice to see if that would work but it doesnt seem to :/

    Try with the int arg. getTrade().acceptTrade(2);

    Link to comment
    Share on other sites

    Try with the int arg. getTrade().acceptTrade(2);

     

    Hmm, i cant seem to get it to even accept the first trade screen now, even using getTrade().acceptTrade();

    Link to comment
    Share on other sites

    Hmm, i cant seem to get it to even accept the first trade screen now, even using getTrade().acceptTrade();

    getTrade().acceptTrade(1);

    getTrade().acceptTrade(2);

    Link to comment
    Share on other sites

    getTrade().acceptTrade(1);

    getTrade().acceptTrade(2);

     

    Ive tried that and the following but neither are working :/

    public void onTradeMessage(Message trade) {
    		user = trade.getUsername();
    		
    		getTrade().tradeWithPlayer(user);
    		
    		if(getTrade().isOpen(1)){
    			getTrade().acceptTrade(1);
    		}
    		if(getTrade().isOpen(2)){
    			getTrade().acceptTrade(2);
    		}
    	}
    
    Link to comment
    Share on other sites

     

    Ive tried that and the following but neither are working :/

    public void onTradeMessage(Message trade) {
    		user = trade.getUsername();
    		
    		getTrade().tradeWithPlayer(user);
    		
    		if(getTrade().isOpen(1)){
    			getTrade().acceptTrade(1);
    		}
    		if(getTrade().isOpen(2)){
    			getTrade().acceptTrade(2);
    		}
    	}
    

    don't do actions in onMessage, put every action in onLoop and try to do 1 action a loop

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.