Jump to content
McKay Development

Need Help


1Life1Chance

Recommended Posts

Hello everyone. I have a this script but script has a some problems. I put 300 Gems in trade offer but this script dont look the amount, its just see like 1 item. (1=300=1000=∞). I need to fix it.  (300 Gems = 300 Gems) Can you help me ? Sorry for my bad English :|

const SteamUser = require('steam-user');
const TradeOfferManager = require('steam-tradeoffer-manager');
const SteamTotp = require('steam-totp');
const SteamCommunity = require('steamcommunity');
const fs = require('fs');
const request = require('request');
const config = require('./config.json');
const prices = require('./prices.json');

const community = new SteamCommunity();
const client = new SteamUser();
const manager = new TradeOfferManager({
	
	steam: client,
	domain: 'example.com',
	language: 'en'
});

/*
	Polling Steam and Logging On
*/
client.logOn({
	accountName: config.username,
	password: config.password,
	twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret)
});

/*
	Getting prices
*/
const priceUrl = prices;

function getPriceList() {
	}

function priceItemsInOffer(offer) {
	let offerValue = 0;
	if (offer) {
		const prices = require('./prices.json'); //Requiring price file
		//Loop through offer and get total price
		for (var x in offer) {
			prices[offer[x].market_hash_name] >= config.options.minPricePerItem ? offerValue += prices[offer[x].market_hash_name] : null;
		}
	}
	return offerValue;
}
Link to comment
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...