Jump to content
McKay Development

Eradicate

Member
  • Posts

    25
  • Joined

  • Last visited

Eradicate's Achievements

  1. Aren't you the creator of the module? tbh I need it pretty soon and I don't want to have another request using POST when I've done all the previous coding use the module.
  2. TypeError: opskins.TransferToTradeSite is not a function var transferItems = function(itemIds){ opskins.TransferToTradeSite(itemIds.toString(), (err, items) => { if(err){ console.log(err); return; } //items new output of transfered items to trade site console.log(items); }); } It doesn't seem to be implemented, nor work. (and I am authenticated with an API key) https://docs.opskins.com/public/en.html#IInventory_TransferToTradeSite_v1
  3. Well, it'd be intresting to see how that would work but I do know an API that supports images by name; have a look at this API and then the v1/items, you can loop over the objects check if the market_hash_name's match, if so return the image (icon_url). I don't think they allow infinite requests so you would have to cache/store the json somewhere. http://csgo.steamlytics.xyz/api
  4. I was wondering how many requests can I make with bots etc. to deposit items? I don't think it is infinite is it? I was wondering as I wanted to make a bot that automatically sells his items on opskins, and I'm wondering if I should have a listener that listens over the bots his inventory or should just immediately list the incoming items on opskins (for example the bot receives an offer with a few items, these few items get sent trough to opskins their bots and automatically sold). Thanks.
  5. Hi Echo, I don't think it's possible to extract a image by the market name (without scraping the market), I do know you used to be able to get it using the classid of an item; I'm not sure if it still is a valid way of doing this but I remember I used to be using, https://steamcommunity-a.akamaihd.net/economy/image/class/730/<classid>/150fx125f
  6. He did have 5 awaiting confirmations, I'll check after declining those.
  7. I'm having multiple bots which I store in a public array named `publicManager`. I have set my manager options as the following for each bot; const manager = new TradeOfferManager({ steam: client, community: community, language: 'en', "cancelTime": 60 * 3 * 1000 }); manager.id = data.id; manager.identity_secret = data.identity_secret; When the bot his client receives the webSession call I push the object into the publicManager array, now whenever I try send a trade with it I will get the bot by finding his BotId. Now I'm having issues trying to confirm the offer, everything goes well until it gets to the confirmation part; offer.send((err, status) => { if (err) { console.log(err); } else { selectedManager.acceptConfirmationForObject(selectedManager.identity_secret, offer.id, function(err){ if(err){ console.log(err); return; } console.log('Succesfully confirmed the offer.'); }); } }); for some odd reason it throws the error OfferLimitExceeded (e15), altough there are no trades open, did I misuse acceptConfirmationForObject? Cause' I'm a bit lost at this point. Thanks in advance.
  8. I don't think anoyone is going to sit there and spit trough your code, but yes. It is possible to send an item from one bot to another. Just send a trade from a bots manager, load his inventory, add his items to the trade, and send out the trade to the other bots his tradelink (if the bots are not friended).
  9. Hi, I'm trying to get the assetid after the sentOfferChanged notices an accepted error, the code that I'm currently using logs the old assetid (at least thats what I think) instead of the new one. What seems to be the issue? Should offer.itemsToReceive be changed to something else, as this basically says ToReceive as in still have to get as in these assetids will not be updated? Code: manager.on('sentOfferChanged', function(offer) { var state = offer.state; //check for deposit or witrhdrawl, if withdrawl refund to their inventory. if(state === 3){ console.log('[SteamBot] A sent offer was accepted.'); var items = offer.itemsToReceive, user = offer.partner.getSteamID64(), socket = server.getSocket(user); items.forEach(function(item){ database.query('INSERT INTO `inventories` SET `assetid` = ' + database.pool.escape(item.assetid) + ', `market_hash_name` = ' + database.pool.escape(item.market_hash_name) + ', `user` = ' + database.pool.escape(user) + ', `image` = ' + database.pool.escape(item.icon_url) + ', `status` = 1, `bot` = ' + database.pool.escape(data.id), function(error, call) { if(error){ return; } }); }); server.showAlert(socket, 'success', 'Transaction was successfully completed.'); } }); Thanks in advance.
  10. Whenever you get an offer you need to confirm it, or the bot does. You can do this by setting up a interval that confirms the confirmations every X seconds, but this method is deprecated I believe, you should now be using; community.acceptConfirmationForObject(data.identity_secret, offer.id, function(err){ if(err){ console.log(err); return; } console.log('Succesfully confirmed the offer.'); }) Replace with your bots identity secret and the offerid of the sent out offer. Edit: might of misread it.
  11. People going on my site should have got their inventory loaded, therefore I want to get the contents from his inventory, send it to the client, and load his inventory on there. I believe getUserInventoryContents requires a manager to be used, and I'm using multiple bots, it would seem to me like a bad sport just to use a random bots his manager to load someones inventory.
  12. Heyo, I've been looking to load someones inventory, I'd like to get the contents and send them over to the server, would the following way be a good way to load someones inventory? Would I be needing to cache their inventories? var request = require('request'); request('https://steamcommunity.com/inventory/x/578080/2', function(error, response, body) { if(error){ console.log(error); return; } var inventory = JSON.parse(body); inventory.descriptions.forEach(function(data){ console.log(data.market_name); }); });Also, would I not just be able to load someones inventory using manager.getUserInventoryContents to load their inventories without having to cache anything?
  13. Edit: sorry for posting in the wrong section! Alright, so I've switched bot and switched VPS and it will login to the bot just fine, then it will spam 'Checking confirmations' in the console of the server, whenever I then try to get an update from `newOffers` it will not receive any whenever I sent a tradeoffer. Am I missing something or, what happened? Code (basically from the tutorial provided): const SteamUser = require('steam-user'); const SteamTotp = require('steam-totp'); const SteamCommunity = require('steamcommunity'); const TradeOfferManager = require('steam-tradeoffer-manager'); const client = new SteamUser(); const community = new SteamCommunity(); const manager = new TradeOfferManager({ steam: client, community: community, language: 'en', "cancelTime": 90000 }); community.on('debug', console.log); const logOnOptions = { accountName: 'x', password: 'x', twoFactorCode: SteamTotp.generateAuthCode('x+x/x+I=') }; client.logOn(logOnOptions); client.on('loggedOn', () => { console.log('Logged into Steam'); client.setPersona(SteamUser.Steam.EPersonaState.Online); }); client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); community.startConfirmationChecker(15000, 'x='); }); manager.on('newOffer', offer => { if (offer.partner.getSteamID64() === 'x') { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`Accepted offer. Status: ${status}.`); } }); } else { offer.decline(err => { if (err) { console.log(err); } else { console.log('Canceled offer from scammer.'); } }); } });
×
×
  • Create New...