Jump to content


Photo

How to Get Random Trading Cards

node.js node-steam-tradeoffer-manager

  • Please log in to reply
No replies to this topic

#1 orcnaydn

orcnaydn

    Newbie

  • Member
  • Pip
  • 4 posts

Posted 20 December 2018 - 09:33 AM

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[i];
 
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






Also tagged with one or more of these keywords: node.js, node-steam-tradeoffer-manager

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users