Giter VIP home page Giter VIP logo

csgo-overpay-bot's Introduction

CSGO-Overpay-bot

Setup

If you haven't done so already please install nodejs. Open windows start menu and find cmd.exe (command prompt) and open it. Then follow these steps:

  cd {the dir of the folder} //EX: cd C:/users/arze/desktop/CSGO-Overpay-Bot 
  npm i
  node bot.js

Add your username, password, secrets, and api key to config for the bot to work correctly.

TO GET A API KEY GO TO https://steamapi.io/user AND LOGIN WITH STEAM. THIS IS NOT A STEAMCOMMUNITY API KEY!

Config elements

  • username AND password are the credentials of your steam account you will be using for the bot.
  • botname What you want the bots profile name to be, leave blank to not change
  • identitySecret AND sharedSecret You get theese from Steam Desktop Authenticator and de-crypting the files
  • adminIDs An array of steam64 ids to auto-accept trades from
  • options
    • apiKey An api key from https://steamapi.io/ as mentioned above
    • appid AppID to get prices from. 730 (CS:GO) is default id. Other ID's are not tested to work, but still may.
    • minimumprice Minium value for their items
    • acceptRandomFriendRequests boolean value, accepts any friend requests sent to the provided bot account.
    • priceRefreshInterval Time (in seconds) to renew pricelist
    • confirmationInterval Time (in seconds) to check mobile trade authentication.
    • percentamount Percent to value users items at. ex: 95% would be 0.95 in config
    • minPricePerItem Minimum price for items for them to be valued. ex: if set to 0.10 any item under 10 cents would be worth nothing
    • chatResponse Chat message handling
      • donation Message to send to user when they donate skins
      • junk Message to send when users items are less then minimunprice
      • tradeDeclined Message to send when users items have less value then bots items
      • tradeAccepted Message to send when trade goes through
      • newFriend Message to send to user when they add the bot
      • unknownCommand Message to send to user when they send you a message that is not a command
      • adminTrade Sent to admin when they make a (auto-accepted) trade to the bot NOTE: admins can be configured in adminIDs
      • commands Custom simple commands, JSON object in form of "!command" : "res"

CONTRIBUTING

If you want to contribute you must follow these rules

  • Adding elements to config requires you to update README.md
  • You must comment your code sufficently
  • You have to add enough for it to be merged, EX: i will not merge adding one comment
  • Obviously make sure personal details are out of config when makng a PR
  • Leave placeholder commands and responces in
  • Dont add anything to the bot to scam people

csgo-overpay-bot's People

Contributors

andrewda avatar bnned avatar fedzero avatar kevdah avatar sebmorris avatar stuffa1991 avatar w3bb0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csgo-overpay-bot's Issues

Doctype Incorrect

You aren't using the correct doctype. This can cause Google Ultron users to run out of RAM increasingly quickly. You should do this:

<!HTML doctype>

Temporary fix here.

PS. Remember to update Adobe Flash Player!

Error 401 & wrong API key

Hey Arze!
The Error 401 might be because my bot isnt tradable yet. (New Account so I have to wait 15 days after paying 5€) but the "Got API key:BC9A5A254D8786982BF24FFE01865241" is not my api code/key.
Is that supposed to happen? :)

Windows script error

When i execute the java script file after entering all the needed data into the config file, It displays a error message saying that "Line: 5" / "Char: 1" has encountered a "Syntax error" (Microsoft J Script compilation error). If you have a fix for this issue it would be much appreciated.

Error: Access Denied

Error: Access Denied
at SteamCommunity. (C:\Users\Tis\Desktop\CSGO-Overpay-Bot-master\node_modules\steamcommunity\components\webapi.js:15:20)
at Request._callback (C:\Users\Tis\Desktop\CSGO-Overpay-Bot-master\node_modules\steamcommunity\components\http.js:67:15)
at Request.self.callback (C:\Users\Tis\Desktop\CSGO-Overpay-Bot-master\node_modules\request\request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (C:\Users\Tis\Desktop\CSGO-Overpay-Bot-master\node_modules\request\request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Gunzip. (C:\Users\Tis\Desktop\CSGO-Overpay-Bot-master\node_modules\request\request.js:1091:12)
at Gunzip.g (events.js:292:16)

I NEED HELP

How do we add api key?

How do we add api key?

and and i'm having error null : status code 401

the error is probably due to limited account i think..

Auto-accepting no matter what

While the first bot still has problems with trading, the second bot just auto-accepts every trade that is thrown at it. Any way to fix this?

Add item Filtering

Can you implement item filtering and price controller like a key is worth 2.50$ market price, on the bot is worth 2.60$, and item filtering is like when some one trade some item that you dont want to trade is will deny.

errors in code

When someone sends this bot a offer it will pop up with an error here is the error:
offerValue += offer.reduce((total, item) => total + prices[item.market_hash_name]);
^

TypeError: Reduce of empty array with no initial value
at Array.reduce (native)
at priceItemsInOffer (C:\csgobot1\bot.js:46:23)
at TradeOfferManager. (C:\csgobot1\bot.js:116:13)
at emitOne (events.js:96:13)
at TradeOfferManager.emit (events.js:188:7)
at received.forEach (C:\csgobot1\node_modules\steam-tradeoffer-manager\lib\polling.js:235:10)
at Array.forEach (native)
at getOffers (C:\csgobot1\node_modules\steam-tradeoffer-manager\lib\polling.js:219:12)
at checkNeededDescriptions (C:\csgobot1\node_modules\steam-tradeoffer
manager\lib\classes\TradeOffer.js:117:4)
at Async.map (C:\csgobot1\node_modules\steam-tradeoffer-manager\lib\assets.js:163:3)

Error getting prices

Error: null - Status Code: 401
Getting this error when it should get prices :(

Trading not working?

I am trying to test the bot before actually hosting it 24/7. The chat responses work fine, but the trading part won't work at all. Installed all like in the Readme file.
Also when logging in the following appears:

Logged into Steam as [something :3]
Error: Access Denied
at SteamCommunity. (D:\Steam Bots\CSGO-Overpay-Bot\CSGO-Overpay-B
ot-master\node_modules\steamcommunity\components\webapi.js:15:20)
at Request._callback (D:\Steam Bots\CSGO-Overpay-Bot\CSGO-Overpay-Bot-master
\node_modules\steamcommunity\components\http.js:67:15)
at Request.self.callback (D:\Steam Bots\CSGO-Overpay-Bot\CSGO-Overpay-Bot-ma
ster\node_modules\request\request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:192:7)
at Request. (D:\Steam Bots\CSGO-Overpay-Bot\CSGO-Overpay-Bot-mast
er\node_modules\request\request.js:1081:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:189:7)
at Gunzip. (D:\Steam Bots\CSGO-Overpay-Bot\CSGO-Overpay-Bot-maste
r\node_modules\request\request.js:1001:12)
at Object.onceWrapper (events.js:291:19)

Error 404

Hey, so the bot was working for me, then I started to get ERROR 404 after 1 restart. It was working for around 1 day.

I've googled what ERROR 404 means and it means it cannot log into the account. Everything is right, and it was working before, I'm not sure what's up with it.

It bans your ip

after 2 minutes of it running, you can no longer confirm stuff and you recive "you've made too many requests recently. please wait and try your request again later." until you change your ip. I tried changing the confirmation interval but It didnt help....

A piece of messed up code

function priceItemsInOffer(offer) {
let offerValue = 0;
if (offer) {
const prices = require('./prices.json'); //Requiring price file
//Loop through offer and get total price
offerValue += offer.reduce((total, item) => total + prices[item.market_hash_name]);
}
return offerValue;
}

Add Item Filtering

Can you add item filtering/ban, or like denie offers if there item below x ammount.

Just to prevent people to add cases or 3 cent skins to do the over pay.

like 1$+0.03+0.03+0.04 = 1.1$ (simply denies items below 3 cents [can be configured on config])

Increase refresh interval

I was wondering, why everyone is making requests to prices every 30 seconds, now i see that from your config. Please, increase it to 1 hour.

when the bot decline any offer i get this error

Error: This trade offer is no longer valid.
at SteamCommunity._checkTradeError (C:\Users\Muni\Desktop\CSGO-Overpay-Bot-master\node_modules\steamcommunity\components\http.js:144:13)
at Request._callback (C:\Users\Muni\Desktop\CSGO-Overpay-Bot-master\node_modules\steamcommunity\components\http.js:52:80)
at Request.self.callback (C:\Users\Muni\Desktop\CSGO-Overpay-Bot-master\node_modules\request\request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (C:\Users\Muni\Desktop\CSGO-Overpay-Bot-master\node_modules\request\request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Gunzip. (C:\Users\Muni\Desktop\CSGO-Overpay-Bot-master\node_modules\request\request.js:1091:12)
at Gunzip.g (events.js:291:16)

Bot accepts trades when he is the one overpaying

Hey, so I tested this out with my friend. He traded my bot $1 for a $20 skin and the bot accepted it, he also did $30 for $60 items, and much more. I'm not sure how to fix this my config values the user items at 85%

Error HELP PLZ

offerValue += offer.reduce((total, item) => total + prices[item.market_hash_name],0);
^

TypeError: Cannot read property 'R8 Revolver | Crimson Web (Well-Worn)' of null
at offer.reduce (C:\csgobot1\bot.js:63:61)
at Array.reduce (native)
at priceItemsInOffer (C:\csgobot1\bot.js:63:23)
at TradeOfferManager. (C:\csgobot1\bot.js:133:13)
at emitOne (events.js:96:13)
at TradeOfferManager.emit (events.js:188:7)
at received.forEach (C:\csgobot1\node_modules\steam-tradeoffer-manager\lib\polling.js:235:10)
at Array.forEach (native)
at getOffers (C:\csgobot1\node_modules\steam-tradeoffer-manager\lib\polling.js:219:12)
at checkNeededDescriptions (C:\csgobot1\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:118:4)

Friend Requests

The bot has been running on my pc and asked a few of my friends to test it out. Most of them(friend requests) were accepted by the bot. However 2 of my friends didnt get accepted. I had to manually accept them. Any thoughts? I am quite new to coding, may i add.

key must be a buffer

im probually not the smartest guy so please dont give me an answer i dont understand i just want to code my bot then im done with coding my problem is that when i try to launch my bot this comes up (sorry for bad english)

C:\Users\abc>node C:\Users\abc\Desktop\bot\bot.js
crypto.js:91
this._handle.init(hmac, toBuf(key));
^

TypeError: Key must be a buffer
at TypeError (native)
at new Hmac (crypto.js:91:16)
at Object.Hmac (crypto.js:89:12)
at Object.exports.generateAuthCode.exports.getAuthCode (C:\Users\Liam\node_modules\steam-totp\index.js:41:20)
at Object. (C:\Users\Liam\Desktop\botagain\bot.js:26:27)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

Error in confirmations

Whenever I launch your bots, the codes goes fine without error.
However when I send offers, the confirmations page is always saying "you've made too many requests recently. Please wait and try your request later". When I turn your script back off it turns fine again

when i run the bot i get this error

            if (error || response.statusCode !== 200) return console.log(`Error: ${error} - Status Code: ${response.statusCode}`);
                                                                                                                   ^

TypeError: Cannot read property 'statusCode' of undefined
at Request.request [as _callback] (C:\Users\Muni\Desktop\CSGO-Overpay-Bot-master\bot.js:37:106)
at self.callback (C:\Users\Muni\Desktop\CSGO-Overpay-Bot-master\node_modules\request\request.js:188:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Request.onRequestError (C:\Users\Muni\Desktop\CSGO-Overpay-Bot-master\node_modules\request\request.js:884:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:309:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7

Access Denied and DeprecationWarning

Steam Guard App Code: (node:----) [DEP----] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
Steam Guard App Code: -----
Logged into Steam as [U:1:--------]
Error: Access Denied
at SteamCommunity. (C:\Users...\Desktop\Trade Bott\node_modules\steamcommunity\components\webapi.js:15:20)
at Request._callback (C:\Users...\Desktop\Trade Bott\node_modules\steamcommunity\components\http.js:67:15)
at Request.self.callback (C:\Users...\Desktop\Trade Bott\node_modules\request\request.js:188:22) at emitTwo (events.js:125:13)
at Request.emit (events.js:213:7)
at Request. (C:\Users\P...\Desktop\Trade Bott\node_modules\request\request.js:1171:10)
at emitOne (events.js:115:13)
at Request.emit (events.js:210:7)
at Gunzip. (C:\Users...\Desktop\Trade Bott\node_modules\request\request.js:1091:12)
at Object.onceWrapper (events.js:314:30)
(node:----) [DEP----] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:----) [DEP----] DeprecationWarning: Calling an asynchronous function without callback is deprecated.

That's what happens when I start the bot. Could you possibly help me?

And again.

Bot is broken again.
Minimumprice was set to 1$,but it accepteed 0.60 cents.
FT P250 | Wingshot & FT ST StatTrak™ Nova | Exo for an USP-S Cyrex MW.
It doesn't work and idk why...
Also the overpay function doesn't work, so dat's dat.

DeprecationWarning: Calling an asynchronous function without callback is deprecated.

I did everything correctly i know this becuase it logged into steam. But after that it gives me an error that goes like this. [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated. im new to coding so i am unsure how to fix it. can i get some help??

This is the issue line: return callback(new Error("Access Denied"));
(it is in the modules) The directory is: C:\Users\Warptarium\Desktop\bot\node_modules\steamcommunity\components

Pricing Problem

Hi
i have setup this trading bot it works fine but it have prices problem it accept lowball like example i put ak redline ft in the bot and i send him trade in which from my side 2 keys and from bot side ak redline ft and the bot accept which is a loss.Any help will be appreciated (sorry for bad english :) )

Not really an issue, but a question.

Idk where else to put this, so here. Does this bot pull the item prices from the steam market? If not, is there a way to make it do that? If yes, how often?

How to start the bot

I dont really know how to start the bot. I copy and pasted this into the command prompt on my pc
cd {the dir of the folder} //EX: cd C:/users/arze/desktop/CSGO-Overpay-Bot
npm i
node bot.js
and this happened
C:\Users\name> npm i
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\name\package.json'
npm WARN name No description
npm WARN name No repository field.
npm WARN name No README data
npm WARN name No license field.
Please help me, i would like to start using the bot soon :P

help me please o my god :((

when i try to run the bot i get thi error

module.js:590
throw err;
^

SyntaxError: C:\Users\Muni\Desktop\CSGO-Overpay-Bot-master\config.json: Unexpected number in JSON at position 351
at Object.parse (native)
at Object.Module._extensions..json (module.js:587:27)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\Muni\Desktop\CSGO-Overpay-Bot-master\bot.js:10:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)

JUNK TRADES

Ok so how do i make it so they can not trade junk to the bot

Unexpected Token error

Hello, I have an error whenever I try to start up the bot with with node
steam bot
I have read the other issue reports that relate to this but whatever I do it seems to not fix it. many thanks in advance

Auto-accept work towards fix

The bot just auto-accepts every trade that is thrown at it. I tried modifying the code but I can't seem to figure out why it doesn't work... yet.
This is a part of my version: (from line 112)

if (isInArray(partnerid, config.adminIDs)) {
client.chatMessage(partnerid, config.options.chatResponse.adminTrade);
acceptOffer(offer);

} else if (!offer.itemsToGive.length) {
	console.log(`${partnerid} just donated us items.`);

	client.chatMessage(partnerid, config.options.chatResponse.donation); //Sending message for donations
	acceptOffer(offer);

} else if (priceItemsInOffer(offer.itemsToReceive) < config.options.minimumprice) {
	client.chatMessage(partnerid, config.options.chatResponse.junk); //Sending message for too cheap
	declineOffer(offer);

} else if (priceItemsInOffer(offer.itemsToGive) > priceItemsInOffer(offer.itemsToReceive) * config.options.percentamount) {
	client.chatMessage(partnerid, config.options.chatResponse.tradeDeclined); //Sending message when trade declined
	declineOffer(offer);
	console.log(partnerid + "'s trade offer was declined."); //Notification for declined trade
	
} else if (priceItemsInOffer(offer.itemsToGive) < priceItemsInOffer(offer.itemsToReceive) * config.options.percentamount) {
	client.chatMessage(partnerid, config.options.chatResponse.tradeAccepted); //Sending message for accepting offer
	acceptOffer(offer);
	console.log(partnerid + "'s trade offer was accepted."); //Notification for accepted trade
	
}

});

and you can check the default by yourself, again from line 112.
Perhaps we should try and fix this? 👍

If ya ask me i think it's this part that doesn't "trigger" the rest:
if (priceItemsInOffer(offer.itemsToGive) < priceItemsInOffer(offer.itemsToReceive) * config.options.percentamount)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.