Jump to content
McKay Development

Recommended Posts

Hey,

 

so I have 2 bots trading items back to back

 

Bot #1 takes 30 seconds to confirm a trade while Bot #2 takes 5 seconds

 

What I want to happen is to minimize the time it takes to accept trades on Bot #1

 

Here's my constructor

let client = new SteamUser(),
    manager = new TradeOfferManager({
		"language": 'en',
        "steam": client,
        "pollInterval": "5000",
        "cancelTime": "1800000" 
    }),
    community = new SteamCommunity();

	// Bot #2
	
let client2 = new SteamUser(),
    manager2 = new TradeOfferManager({
		"language": 'en',
        "steam": client2,
        "pollInterval": "5000",
        "cancelTime": "1800000" 
    }),
    community2 = new SteamCommunity();

Any Ideas why the difference is so high between these 2 bots?

They're pretty much using the same code across the script

 

Also pollInterval is 5s in both..

 

Also for question #2: Is it okay to use this event for confirmations?

community.on("newConfirmation", (CONF) => {
    community.acceptConfirmationForObject(CONFIG.Bot1.IDENTITYSECRET, CONF.id, (ERR) => {
        if (ERR) {
            console.log("## An error occurred while accepting confirmation: " + ERR);
        } 
    });
});
Edited by Kokoman111

Share this post


Link to post
Share on other sites

Confirmation polling (and therefore the newConfirmation event) is deprecated and won't be supported. But also no, you shouldn't use acceptConfirmationForObject with a confirmation ID. That won't work. You're supposed to use the offer ID.

 

What I suspect is happening is that you're trading a bunch of items between bots. When you accept a confirmation for an outgoing offer in which both parties are losing items, it will be pretty quick. When you accept the confirmation for an incoming offer, the confirmation response won't come until all items have been moved. If you're moving a lot of items, this will take a while. There is no way to avoid this.

Share this post


Link to post
Share on other sites

Confirmation polling (and therefore the newConfirmation event) is deprecated and won't be supported. But also no, you shouldn't use acceptConfirmationForObject with a confirmation ID. That won't work. You're supposed to use the offer ID.

 

What I suspect is happening is that you're trading a bunch of items between bots. When you accept a confirmation for an outgoing offer in which both parties are losing items, it will be pretty quick. When you accept the confirmation for an incoming offer, the confirmation response won't come until all items have been moved. If you're moving a lot of items, this will take a while. There is no way to avoid this.

What would you recommend using in place of newConfirmation?

Share this post


Link to post
Share on other sites

Call acceptConfirmationForObject whenever you send a trade offer that needs confirmation.

This somehow flipped the entire situation around -> Now Bot #1 takes ~10s to confirm while Bot #2 takes much longer

 

https://gyazo.com/61811969190c631b9d2898897657731a

 

This is super weird, but I guess there's something I'm still missing

 

I did however made sure that Both Bots confirm outgoing offers

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...