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
  • Try asking for help in the chatbox
  • Full Trade Help


    Banker
     Share

    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(); 
    Edited by slasso
    Link to comment
    Share on other sites

    That isnt an option?

     

    fc81cc0a51654602b84fceae125168dc.png

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

     

    Use getTrade().acceptTrade(int tradeScreen)

    Edited by slasso
    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

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • 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.