Jump to content
McKay Development

Recommended Posts

Posted
manager.on('newOffer', function (offer) {

    console.log('New offer from ' + offer.partner.getSteamID64());
	tradelog.info('Incoming offer from ' + offer.partner.getSteamID64())

    if (offer.partner.getSteamID64() === '76561198259000054' || offer.itemsToGive.length === 0) {
		offer.accept(function (err) {
		if (err) {
			console.log('Can not accept offer #'+ offer.id + err.message);
		} else {
		console.log('Trade offer #' + offer.id + ' from ' + offer.partner.getSteamID64() + ' accepted');
		}
	});
		
	} else {
		offer.decline();
		console.log('Offer #' + offer.id + 'sent by ' + offer.partner.getSteamID64() + ' declined, is not a gift/owner offer')
	}
});

This the script i currently have. When i send an gift offer, it gets accepted and logged correctly. But when I send an offer from my main account (I'm sure the steamid64 is right) it logs in the console it got accepted, doesn't give an error. But if i look at Steam the offer isn't aaccepted.

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