Jump to content
Axle Change

[Script] Complete automated bot with autoprice

Recommended Posts

Axle Change    87
Axle Change
14 minutes ago, Enzotoy2 said:

Dear axle,

I have multiple questions :

1 - the bot can have multiple Admin ?

2 - i can disable some listing and renable them after ?

Thx for reply

1) Currently multiple admins is not a feature

2) to disable listings you can delete listings from listings.json before starting the bot, and readd them when you want to enable them.

 

 

9 minutes ago, Neko said:

Your code is lacking comments and full of hardcoded magic numbers.

For example, what does means 34.11 in next part of code (file setup.js):

//callback of community.getUserInventoryContents
for (kl=0;kl<listings.length;kl++){
            for (p=0;p<listings[kl].inventory.length;p++){
                var item_ID=listings[kl].inventory[p];
                listings[kl].bought["_"+item_ID]=Number((listings[kl].buyprice.keys + (listings[kl].buyprice.ref/34.11)).toFixed(5));
            }
        }

 

 

This particular bit was a remanent for something I did when I enabled logging items before it was part of the main script. When I originally put this in this was the key value in ref. This script is only meant to be run once to log your current inventory before starting the main script. The purpose was to prevent the inventory from being populated all at once when starting the script, as this causes the bot to try to update 100s of listings at once, which fucks up the backpack.tf API.

 

In terms of lacking comments, most of the code is fairly self-explanatory besides the massive callback chains which are a pain in the ass because javascript. That and using a bunch of stupid variable names out of laziness.

 

In general, hard coded numbers are IDs (i.e., quality, game ID), timeout times (most of which are arbitrary anyway), retry counts, and error codes. The only ones I can think of besides this is there are a large amount of *9/100, which is done to have proper arithmetic with refined/reclaimed/scrap metal.

Share this post


Link to post
Share on other sites
« SɱokEy »    1
« SɱokEy »
10 hours ago, Axle Change said:

Use npm install before running setup.js

NO reply to my reply ??

Share this post


Link to post
Share on other sites
Neko    0
Neko

So I'm testing this right now and it seems like it doesn't works. I put all data in the config and set up the bot. It works kind of strange. It requests list of classifieds, reads my inventory, sends heartbeat. But it doesn't creates listings and doesn't modifies listings.json. The only thing I changed is I commented out line 792 in daemon_shop.js,

autoprice.updateItem(update);

As I thought, if I remove this line bot wouldn't do automatic price changes.

So is that a bug or that's works as intended?

 

 

Update: So, looks like all things are done in that function. Then, how to disable automatic price overcut/undercut?

 

 

My native language is not english, so I'm sorry for any mistakes I made. If something's not understandable I'l try to explain.

Share this post


Link to post
Share on other sites
fisk    16
fisk

FWIW it's very easy for me to find out if you're running this and I'll make your life a misery by breaking the bot in stupid ways

 

Run this at your own risk

Share this post


Link to post
Share on other sites
Hack_SlashLTU    15
Hack_SlashLTU
14 minutes ago, fisk said:

FWIW it's very easy for me to find out if you're running this and I'll make your life a misery by breaking the bot in stupid ways

 

Run this at your own risk

So this applies just to this node script, or other people using similar modifications are also under radar. What is wrong and what is right to use? Needs clarifications..

Share this post


Link to post
Share on other sites
Axle Change    87
Axle Change
9 minutes ago, fisk said:

FWIW it's very easy for me to find out if you're running this and I'll make your life a misery by breaking the bot in stupid ways

 

Run this at your own risk

I mean the only thing I think you are complaining about is that it scrapes webpages-- everything else is within the scope of the rules. Also as I mentioned earlier, you don't even have to run this with auto-pricing, which is what I am assuming people are complaining about. In terms of scraping webpages, I did this mostly because the API does not return buy order listing IDs (which I have complained about several times). Also, its not even that much work to actually use the API, but that does not seem to be what you are complaining about here.

 

For the record, without autopricing (which is easily disabled) this is exactly the same as bot.tf bots, so I'm not sure why this is a problem but theirs is not. Business is business I guess. Many people very obviously use auto-pricing scripts, and admins including Teeny have confirmed that they are allowed.

Share this post


Link to post
Share on other sites
spyfly    12
spyfly
36 minutes ago, fisk said:

FWIW it's very easy for me to find out if you're running this and I'll make your life a misery by breaking the bot in stupid ways

 

Run this at your own risk

That's the right approach ;)

Share this post


Link to post
Share on other sites
Axle Change    87
Axle Change
1 hour ago, fisk said:

FWIW it's very easy for me to find out if you're running this and I'll make your life a misery by breaking the bot in stupid ways

 

Run this at your own risk

 

1 hour ago, Hack_SlashLTU said:

So this applies just to this node script, or other people using similar modifications are also under radar. What is wrong and what is right to use? Needs clarifications..

 

Until fisk further elaborates

 

https://github.com/AxleChange/tf2-autoprice-bot/commit/b835d19549a344c2b6126f234ea33c6cafb4b195

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×