Jump to content
McKay Development

All Activity

This stream auto-updates

  1. Yesterday
  2. Received wallet info update: { has_wallet: true, balance: -2132471336, currency: 15, balance_delayed: 0, balance64: '2162495960', balance64_delayed: '0', realm: 1 } this is a wallet event balance64 is Correct // source code this.emit('wallet', body.has_wallet, body.currency, body.balance / 100); this.wallet = { hasWallet: body.has_wallet, currency: body.currency, balance: body.balance / 100 }; body.balance use body.balance64 is ok doctor can update this?
  3. Last week
  4. Yes, for example classid 4428757074 + instanceid 188530139 + appid 730 gives either steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S%owner_steamid%A%assetid%D17052921834481691997 or steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S%owner_steamid%A%assetid%D5055539348984972055 both are valid and links to same item in cs game coordinator
  5. Hi, could someone provide a list of all possible error id's when creating tradeoffer from bot perspective. Talking about error's like: users inventory is full, user has recently changed steam nickname, private inventory and etc. Tried to search for it online but had no success.
  6. Are you sure? This shouldn't be possible. Steam caches classid+instanceid pairs indefinitely. The description data should never change. Not really, my best guess is that D just stands for "data". It very likely is a hash to prevent scraping. It's been my experience that any [SM], A, D triplet will work forever to fetch item data.
  7. Steam inspect link for CS contains 3 params: S for owner steam id, A for asset id and some unclear param D. I noticed when you request inventory or GetAssetClassInfo this param can change for same instanceid + classid combination every request, even when item is the same. So i have this questions: Any ideas what does D means and how it is used? It is just some hash to prevent data scraping? Can we rely on any value of D received from steam for persist cache of metadata or it can change and we need to update it in cache every time? In node-steam-tradeoffer-manager there is cache mechanism that stores descriptions without TTL, so seems like inspect link for any instanceid + classid combination is actual forever, but this D param confusing me
  8. Probably does, but I wouldn't expect things to go smoothly if you try to use it.
  9. Does "send" method from steam-client still work, or is it outdated?
  10. Earlier
  11. brother in order to send the tradeoffer u need the trade link the assetid of the item u want to send and a message i srsly dont know y u are parsing steam if so many times ifu have the complete trade url just use that if the partner in the trade url is missing and u need it then parse thesteamid 64 to get the id32 assuming u have the trade token already The error is caused due to u are calling the send offer with the wrong data most likely the steamid mistake or wrong format as ur error says or calling it where u are not supposed to or with incomplete data try to console,log what data are u sending when u are calling the send offer method.
  12. I'm getting the error "Invalid input SteamID [object Object]". I'm retrieving data from the database to handle multiple accounts, such as item prices and other information, without any issues. However, I cannot send a trade when I try to do so. The partnerSteamID in the database is in SteamID64 format, and the trade link is correct. Can anyone help? const SteamUser = require('steam-user'); const SteamTotp = require('steam-totp'); const TradeOfferManager = require('steam-tradeoffer-manager'); const SteamID = require('steamid'); const mysql = require('mysql2/promise'); const axios = require('axios'); const tunnel = require('tunnel'); const SteamCommunity = require('steamcommunity'); const community = new SteamCommunity(); const SsAccounts = { host: 'h', user: 'u', password: 'p', database: 'd' }; const SteamAccounts = { host: 'h', user: 'u', password: 'p', database: 'd' }; async function getAccounts() { try { const db1Connection = await mysql.createConnection(SsAccounts); const [rows] = await db1Connection.execute("SELECT username, tradelink, partnerSteamID FROM users WHERE SSMmember = 'FA'"); const users = rows.map(row => ({ username: row.username, tradelink: row.tradelink, partnerSteamID: row.partnerSteamID })); await db1Connection.end(); if (users.length === 0) { console.log('Kriterlere uyan kullanıcı yok.'); return []; } users.forEach(user => { console.log(`Username: ${user.username}, TradeLink: ${user.tradelink}, PartnerSteamID: ${user.partnerSteamID}`); }); const db2Connection = await mysql.createConnection(SteamAccounts); const validAccounts = []; for (let user of users) { try { const [tables] = await db2Connection.execute(`SHOW TABLES LIKE '${user.username}'`); if (tables.length > 0) { const [accounts] = await db2Connection.execute(`SELECT username, password, shared_secret, proxyip, proxyid, identity_secret FROM ${user.username}`); accounts.forEach(account => { if (account.shared_secret && account.shared_secret.trim() !== '') { validAccounts.push({ ...account, tableName: user.username, tradelink: user.tradelink, partnerSteamID: user.partnerSteamID }); } }); } } catch (err) { console.error(`[${user.username}] Kullanıcı için veri alınırken hata oluştu:`, err); } } await db2Connection.end(); validAccounts.sort((a, b) => a.username.localeCompare(b.username)); return validAccounts; } catch (error) { console.error('Hata:', error); return []; } } async function getApiKey(cookies, proxyUrl) { try { const [proxyUser, proxyPass] = proxyUrl.match(/\/\/(.+):(.+)@/).slice(1, 3); const proxyHostPort = proxyUrl.split('@')[1]; const [proxyHost, proxyPort] = proxyHostPort.split(':'); const agent = tunnel.httpsOverHttp({ proxy: { host: proxyHost, port: parseInt(proxyPort), proxyAuth: `${proxyUser}:${proxyPass}` } }); const response = await axios.get('https://steamcommunity.com/dev/apikey', { headers: { Cookie: cookies.join('; ') }, httpsAgent: agent, maxRedirects: 5 }); const apiKeyMatch = response.data.match(/<p>Key: ([A-Z0-9]{32})<\/p>/); if (apiKeyMatch) { return apiKeyMatch[1]; } } catch (error) { if (error.response && error.response.status === 429) { console.log('API anahtarı alınırken 429 hatası: Too Many Requests'); } else { console.error('API anahtarı alınırken hata oluştu:', error); } } return null; } async function getMarketPrice(marketHashName) { try { const response = await axios.get(`https://steamcommunity.com/market/priceoverview/?currency=1&appid=730&market_hash_name=${encodeURIComponent(marketHashName)}`); if (response.data && response.data.success) { return parseFloat(response.data.lowest_price.replace('$', '').replace(',', '')) || 0; } } catch (error) { console.error(`Fiyat bilgisi alınırken hata oluştu: ${marketHashName}`, error); } return 0; } async function updateAccountInfo(tableName, username, itemCount, totalPrice) { try { const db2Connection = await mysql.createConnection(SteamAccounts); await db2Connection.execute(`UPDATE ${tableName} SET stitemcount = ?, stitemprice = ? WHERE username = ?`, [itemCount, totalPrice, username]); await db2Connection.end(); console.log(`[${username}] Envanter bilgileri güncellendi: Item Sayısı = ${itemCount}, Toplam Fiyat = ${totalPrice}`); } catch (error) { console.error(`[${username}] Envanter bilgileri güncellenirken hata oluştu:`, error); } } async function parseTradeLink(tradeLink) { const url = new URL(tradeLink.trim()); const token = url.searchParams.get('token'); const partner = url.searchParams.get('partner'); if (!partner || !token) { throw new Error("Invalid Trade Link"); } return { partnerSteamID: new SteamID(`[U:1:${partner}]`).getSteamID64(), token }; } async function sendTradeOffer(account, items, partnerSteamID, token) { return new Promise((resolve, reject) => { const proxyUrl = `http://${account.proxyid}@${account.proxyip}`; const agent = tunnel.httpsOverHttp({ proxy: { host: account.proxyip.split(':')[0], port: parseInt(account.proxyip.split(':')[1]), proxyAuth: `${account.proxyid}` } }); const manager = new TradeOfferManager({ steam: new SteamUser(), domain: 'example.com', language: 'en', proxy: proxyUrl }); console.log(`[${account.username}] Partner SteamID: ${partnerSteamID}`); let steamID; try { steamID = new SteamID(partnerSteamID); } catch (error) { console.error(`[${account.username}] Invalid SteamID format: ${partnerSteamID}`, error); reject(error); return; } const offer = manager.createOffer({ partner: steamID, accessToken: token }); items.forEach(item => offer.addMyItem(item)); offer.send(async (err, status) => { if (err) { console.error(`[${account.username}] Trade offer gönderilirken hata oluştu:`, err); reject(err); return; } console.log(`[${account.username}] Trade offer gönderildi: ${status}`); resolve(offer.id); }); }); } async function confirmTradeOffer(account, offerId) { return new Promise((resolve, reject) => { const proxyUrl = `http://${account.proxyid}@${account.proxyip}`; const agent = tunnel.httpsOverHttp({ proxy: { host: account.proxyip.split(':')[0], port: parseInt(account.proxyip.split(':')[1]), proxyAuth: `${account.proxyid}` } }); community.getConfirmations(account.identity_secret, (err, confirmations) => { if (err) { console.error(`[${account.username}] Onaylar alınırken hata oluştu:`, err); reject(err); return; } const offerConf = confirmations.find(conf => conf.creator === offerId); if (!offerConf) { console.error(`[${account.username}] İlgili onay bulunamadı: ${offerId}`); reject(new Error('İlgili onay bulunamadı')); return; } community.acceptConfirmationForObject(account.identity_secret, offerConf.id, { proxy: agent }, (err) => { if (err) { console.error(`[${account.username}] Trade offer onaylanırken hata oluştu:`, err); reject(err); return; } console.log(`[${account.username}] Trade offer onaylandı: ${offerId}`); resolve(); }); }); }); } async function loginAndFetchInventory(account) { return new Promise((resolve) => { const client = new SteamUser(); const proxyUrl = `http://${account.proxyid}@${account.proxyip}`; const manager = new TradeOfferManager({ steam: client, domain: 'example.com', language: 'en', httpProxy: proxyUrl }); const guardCode = SteamTotp.generateAuthCode(account.shared_secret); const logOnOptions = { accountName: account.username, password: account.password, twoFactorCode: guardCode, httpProxy: proxyUrl }; client.logOn(logOnOptions); client.on('loggedOn', () => { console.log(`[${account.username}] Başarıyla giriş yapıldı`); client.setPersona(SteamUser.EPersonaState.Online); }); client.on('webSession', async (sessionID, cookies) => { console.log(`[${account.username}] Cookies:`, cookies); const apiKey = await getApiKey(cookies, proxyUrl); console.log(`[${account.username}] API Key: ${apiKey}`); if (apiKey) { const agent = tunnel.httpsOverHttp({ proxy: { host: account.proxyip.split(':')[0], port: parseInt(account.proxyip.split(':')[1]), proxyAuth: `${account.proxyid}` } }); manager.setCookies(cookies, async (err) => { if (err) { console.log(`[${account.username}] TradeOfferManager cookies set error:`, err); resolve(); return; } console.log(`[${account.username}] Cookies set for TradeOfferManager`); manager.apiKey = apiKey; // Set the API key const appId = 730; const contextId = 2; const fetchInventory = async (retryCount = 0) => { if (retryCount >= 3) { console.log(`[${account.username}] Envanter alınamadı, maksimum deneme sayısına ulaşıldı.`); resolve(); return; } manager.getUserInventoryContents(client.steamID, appId, contextId, true, async (err, inventory) => { if (err) { if (err.message.includes('403') || err.message.includes('500')) { console.log(`[${account.username}] Envanter alınırken hata oluştu, ${retryCount + 1}. yeniden deneme:`, err); await new Promise(res => setTimeout(res, 2000)); // 2 saniye bekleme süresi await fetchInventory(retryCount + 1); } else { console.error(`[${account.username}] Envanter alınırken hata oluştu:`, err); resolve(); } return; } const items = inventory.map(item => ({ assetid: item.id, appid: item.appid, contextid: item.contextid, amount: item.amount })); const { partnerSteamID, token } = await parseTradeLink(account.tradelink); try { const offerId = await sendTradeOffer(account, items, partnerSteamID, token); await confirmTradeOffer(account, offerId); } catch (err) { console.error(`[${account.username}] Trade offer gönderilirken veya onaylanırken hata oluştu:`, err); } let itemCount = inventory.length; let totalPrice = 0; for (let item of inventory) { let marketPrice = await getMarketPrice(item.market_hash_name); totalPrice += marketPrice; } await updateAccountInfo(account.tableName, account.username, itemCount, totalPrice.toFixed(2)); resolve(); }); }; await fetchInventory(); }, { proxy: agent }); community.setCookies(cookies, { proxy: agent }); } else { console.log(`[${account.username}] API anahtarı alınamadı.`); resolve(); } }); client.on('error', (err) => { console.error(`[${account.username}] Giriş yapılırken hata oluştu:`, err); resolve(); }); }); } (async () => { const accounts = await getAccounts(); for (let account of accounts) { await loginAndFetchInventory(account); } console.log('Tüm işlemler tamamlandı.'); })();
  13. this happed to me right now. thanks for this question. i helped me a lot ❤️
  14. I tried sending a message with BBcode as described in the documentation, but I'm getting the wrong display. const messageTest = '[img src="https://giphy.com/gifs/test-gw3IWyGkC0rsazTi" thumbnail_src="https://media0.giphy.com/media/gw3IWyGkC0rsazTi/giphy.gif" height="199" width="265" giphy_search="test" title="test GIF"][url=https://media0.giphy.com/media/gw3IWyGkC0rsazTi/giphy.gif]https://media0.giphy.com/media/gw3IWyGkC0rsazTi/giphy.gif[/url][/img]'; console.log(messageTest) const result = await user.chat.sendFriendMessage(steamId, messageTest); console.log(result)
  15. How can I send a picture with sendFriendMessage() method?
  16. country is ID The actual balance is 22,517,929.24 After logging in, a wallet event was triggered, and it's showing an incorrect balance of -20431743.72 Could anyone help me understand what might be going wrong and guide me on how to fix it?
  17. u are saying without login and pass then u are saying by logging in the site how u login ?
  18. Hello, I would like to know if there is a way to do it like the site buff 163 does, where you provide your APIKEY and your TradeLink, and it automatically makes trades between players, but without requiring login and password, only by logging into the site and providing the APIKEY and the TradeLink, please.
  19. Fixed app crash when calling getInviteLinkInfo if user_chat_group_state is null Full Changelog: v5.0.9...v5.0.10 View on GitHub
  20. user.on('loggedOn', async () => { console.log('success login'); const linkInfo = await user.chat.getInviteLinkInfo("https://s.team/chat/jpfCmJfF"); console.log(linkInfo); })
  21. Is there any library to craft all badges with steam trading cards to increase Steam level?
  22. Yep, it's a system befitting Valve. You log in by passing a refresh token in the field named access_token, because of course you do.
  23. steamcommunity.com's DNS records appear to have been wiped, preventing you from loading Steam Community (unless you have a cached DNS entry!). This was temporary and is now fixed
  1. Load more activity
×
×
  • Create New...