orcnaydn
-
Posts
5 -
Joined
-
Last visited
Posts posted by orcnaydn
-
-
How to add random trading cards in trade
sorry for wrong title
-
community.getUserInventoryContents(partner, 753, 6, true, (error, items) => { if(error) { users.removeReservation(partner, true, removeFunc); return callback(error); } let count = 0; for(let i = 0; i < items.length; i++) { let item = items[i]; if(item.type.toLowerCase() != "Trading Card") continue; count += item.amount; if(count > price) { item.amount -= (count - price); count -= (count - price); } offer.addTheirItem(item); if(count == price) break; } if(count < price) { users.removeReservation(partner, true, removeFunc); return callback("You do not have enough gems to purchase random games."); } if(count > price) { users.removeReservation(partner, true, removeFunc); return callback("An unexpected error occurred, please try again."); } offer.send((error, status) => { if(error) { users.removeReservation(partner, true, removeFunc); return callback(error); } if(status == "pending") { community.acceptConfirmationForObject(files.getConfig().identity, offer.id, error => { if(error) { users.removeReservation(partner, true, removeFunc); return callback(error); } callback(null, "https://steamcommunity.com/tradeoffer/" + offer.id); }); } else if(status == "sent") callback(null, "https://steamcommunity.com/tradeoffer/" + offer.id); }); }); break; default: users.removeReservation(partner, true, (error) => { if(error) return callback(error); return callback("Invalid payment method"); }); } }); }); }
Where is my fault? -
I want take random 5 trading cards how can i do ?
i use this;
community.getUserInventory(partner, 753, 6, true, (error, items) => {if(error) {users.removeReservation(partner, true, removeFunc);return callback(error);}let count = 0;for(let i = 0; i < items.length; i++) {let item = items;if(item.type.toLowerCase() != "Steam Trading Cards")continue;count += item.amount;if(count > price) {item.amount -= (count - price);count -= (count - price);}offer.addTheirItem(item);if(count == price)break;}
But dont working help me please -
How to fix it i try all webLogOn script but dont working ı use this commands;
const async = require('async');const TradeOfferManager = require('steam-tradeoffer-manager');var manager = null;const SteamCommunity = require('steamcommunity');var community = null;const WebAPI = require('@doctormckay/steam-webapi');var api = null;const SteamID = require('steamid');const steam = require('./steam');const users = require('./users');const files = require('./files');var first = true;var ongoing = false;exports.setup = (client, cookies, callback) => {manager = new TradeOfferManager({steam: client,domain: "example.net"});community = new SteamCommunity();manager.setCookies(cookies);community.setCookies(cookies);api = new WebAPI(files.getConfig().apikey);if(first) {callback();first = false;}registerEvents();community.on("sessionExpired",function(err) {client.webLogOn();});
How to limit buy badge per game?
in node-steamcommunity
Posted
I want to someone type my bot !selltf, his sell max 15 sets per game how can i do that?
My Code;