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

    Posted

    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.

    Posted

    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(); 
    Posted
    getTrade().acceptSecondTrade(); 

     

    That isnt an option?

     

    fc81cc0a51654602b84fceae125168dc.png

    Posted

    That isnt an option?

     

    fc81cc0a51654602b84fceae125168dc.png

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

     

    Use getTrade().acceptTrade(int tradeScreen)

    Posted

    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 :/

    Posted

    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);

    Posted

    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();

    Posted

    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);

    Posted

    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);
    		}
    	}
    
    Posted

     

    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

    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.