Jump to content
McKay Development

Recommended Posts

I need that when the trade was confirmed on the computer, it was canceled and a new one was created, with the same skins

 

    My code:

manager.on('TradeOfferManager.ETradeOfferState[9]', function(offer, oldState) {
            let offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner=149081977&token=Cb2UfEHh");
            offer.addMyItems(inventory);
            offer.send(function(err, status)
            {
                if (err) {
                    console.log(err);
                    return;
                }

                if (status == 'pending') {
                    // We need to confirm it 
                    
                    
                    console.log("Items " + manager.getOffer);
                    console.log(`Offer #${offer.id} sent, but requires confirmation`);
                    community.acceptConfirmationForObject("identitySecret", offer.id, function(err) {
                        if (err) {
                            console.log(err);
                        } else {
                            console.log("Offer confirmed");
                        }
                    });
                } else {
                    console.log(`Offer #${offer.id} sent successfully`);
                }
            });
}); 

When I confirm the exchange on the computer, nothing happens   :(. ETradeOfferState[3] - confirmed trade

And another question, how to get things from the trade, then to create a trade with the same things?

 

If ETradeOfferState[offer.state] = ETradeOfferState[9], trade must cancel, I do not know how to make a check offer.state when I get a newOffer or sentOfferChanged

 

 

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