Jump to content
McKay Development

mjavad_mllw

Member
  • Posts

    13
  • Joined

  • Last visited

Everything posted by mjavad_mllw

  1. i got the code working by waiting for accountUpdate event and get the old data thanks anyway
  2. Hi, i wrote a script to use backpack expander to not run game anymore this script is simple 1. log in to steam 2. run the tf2 3. get backpack data and slots amount 4. find the backpack expander 5. use backpack 6. check for more backpack and do process 5 again my main question is that how can i check if i used item cuase the "useItem" method dont throw any thing and i tried that and also i have found two events "itemRemoved" and "accountUpdate" which one should i check ? i know i should try it my self but it take time and also cost me some backpacks to find out the answer here is my code that i wrote about useItem method: function checkForExpanders() { if (!tf2.backpack || tf2.backpack.length === 0) { console.log("⏳ Backpack not loaded yet..."); setTimeout(() => checkForExpanders(), 5000); return; } const expanders = tf2.backpack.filter((item) => { const defindex = item.def_index || item.defIndex || item.defindex; const schemaItem = tf2.itemSchema?.itemsByDefindex?.[defindex]; const name = schemaItem?.item_name?.toLowerCase() || ""; return defindex === 5050 || name.includes("backpack expander"); }); if (expanders.length === 0) { console.log("❌ No Backpack Expander found in your inventory."); askToCheckAgain(); return; } console.log(`🧳 Found ${expanders.length} Backpack Expander(s).`); const expander = expanders[0]; rl.question( "❓ Do you want to use a Backpack Expander? (y/n): ", (answer) => { if (answer.toLowerCase() === "y") { console.log(`🔧 Trying to use Backpack Expander... (item_id: ${expander.id})`); tf2.useItem(expander.id, (err) => { if (err) { console.error("❌ Failed to use item:", err); } else { console.log("✅ Used Backpack Expander successfully."); } setTimeout(() => { console.log("🔄 Refreshing backpack info..."); showBackpackInfo(); setTimeout(() => checkForExpanders(), 5000); }, 5000); }); } else { console.log("❎ Operation cancelled by user."); askToCheckAgain(); } } ); }
  3. Hi im using this logit to check if trade partner has any prohibition or escrow or not const offer = manager.createOffer({tradeLink}); offer.getUserDetails((err, me, them) => { if (err) { return res.status(200).send({ status: 1, tradeBan: true, error: err.message, }); } if (them.escrowDays) { logger(`user has trade escrow days: ${them.escrowDays}`); return res.status(200).send({ status: 1, tradeBan: true, error: 'trade has escrow', }); } but for some reason i got this error: "HTTP error 429" and its for rate limit / too many requests i want to know : 1. is there any other way to check prohibition or escrow in trade execpt the getUserDetails() method? 2. how the taradeoffermanager works and get prohibition data from ?
  4. Hi, its a little simple but can i login 2 or 3 account using steam-user in a single script sth liek this const logOnOptions1 = { accountName: config.STEAM_USER_1, password: config.STEAM_PASS_1, }; const logOnOptions2 = { accountName: config.STEAM_USER_2, password: config.STEAM_PASS_2, }; client1.logOn(logOnOptions1 ); client2.logOn(logOnOptions2 );
  5. thanks sir But I have a problem with my bot. Whenever the bot logs out for any reason, it doesn't log back in because when I send a trade request or check my inventory etc., steamID is empty. any idea on this ?
  6. what is the best way to check if my client is still logged in ? and if the client logged out how to relogin again ? btw i have sth like this but it does not work: // this should relogin again but wont work client.on("disconnected", (eresult, msg) => { console.log(`Disconnected from Steam: ${msg} (${eresult})`); setTimeout(() => { if (client.steamID === null) { try { client.logOn(logOnOptions); } catch (error) { console.error(error); } } }, 5000); }); // the way i check if client is logged in or not function isLoggedIn() { return client.steamID; }
  7. Hi guys, whats the steam endpoint to get user items? i mean i know this https://steamcommunity.com/inventory/765xxxxxxxxx/440/2 but this wont send all details in one array description and items are seperate im looking for an endpoint to get all details of an item in one single array ex: something like getInventoryContents method in steamcommunitycomminuty module
  8. Hi Guys i was looking for an endpoint to get steam currency rates is there an endpoint? steam or third party api anything that i can use is good
  9. thanks for reply you mean i should login again or get a new refreshToken with renewRefreshToken?
  10. Hey i just trying to find out how many times can i use a refreshToken made by steam_session to login via steam_user into steam? and what should we do to login again into steam_user if my refreshToken got expired or not valid anymore?
  11. hi i have some code that send me log after each trade has been accepted i tested my code and it only send me message only after i accepted a trade that has TF2 items in it i tried with steam and cs2 items but it wont work and i dont know why can you help me? manager.on('sentOfferChanged', (offer, oldState) => { if (offer.state === 3) { // do sth .... } }); manager.on('receivedOfferChanged', (offer, oldState) => { if (offer.state === 3) { // do sth .... } });
×
×
  • Create New...