1Life1Chance Posted November 13, 2017 Report Posted November 13, 2017 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; } Quote
Vanilla Posted November 14, 2017 Report Posted November 14, 2017 Add amount property when adding item https://dev.doctormckay.com/topic/1034-adding-gems-and-gem-sacks-to-trade/?hl=gemshttps://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOffer#addmyitemitem 1Life1Chance 1 Quote
1Life1Chance Posted November 14, 2017 Author Report Posted November 14, 2017 (edited) Thanks dude! Edited November 14, 2017 by 1Life1Chance Quote
Recommended Posts
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.