Jump to content
McKay Development

Recommended Posts

Posted

Recently i've stumbled upon this forum, because of my issue getting thousands of floats every second using inspect links. I tried many things where I wasn't satisfied. Because of that I found csfloat. I feel like this could help me a lot more to get my desired floats, but I do need help.

My issue is that I can't seem to figure out how to get / bulk request floats. I found out if I run the index.js I have to go to localhost and I get this error:

{"error":"Invalid Inspect Link Structure","code":2,"status":400}

So I looked at the github and found that I had to parse the link. So I did and instead it does nothing, but load the entire time. I hope you can give me some feedback or help or an example, because I have been stuck here for a while... 

 

https://github.com/csfloat/inspect

Posted

It's a lot of work I don't want to do. Instead I am going to use globaloffensive npm. I have gotten it to work with 5 floats, but that's it. I get 0 errors and I am not sure how to fix it. Here's my code 

It works with around 5 links then it stops working. If I put 100x the same inspectlink and then 10 unique ones it will do 104 links. It's weird. I hope you're able to help and maybe tell me if there's a way to bulk request floats

csgo.on('connectedToGC', () => {
    console.log('Connected to CS:GO Game Coordinator');

    fs.readFile('inspect_links.txt', 'utf8', (err, data) => {
        console.log("Reading File")
        if (err) {
            console.error('Error reading inspect_links.txt:', err);
            return;
        }

        const inspectLinks = data.split('\n').map(link => link.trim()).filter(link => link); // Split by newline, trim whitespace, and filter out empty lines
        console.log(inspectLinks)
        const numRequests = inspectLinks.length; // Number of requests to make

        // Measure start time
        const startTime = process.hrtime();
        
        // Perform repeated requests
        try {
            inspectLinks.forEach((inspectLink, i) => {
                console.log("Item")
                csgo.inspectItem(inspectLink, (item) => {
                    console.log("item2")
                    if (item) {
                        const float = item.paintwear; // Assuming paintwear represents the float value
                        console.log(`Float value (${i + 1}):`, float);
                        if (i === numRequests - 1) {
                            // Measure end time when all requests are completed
                            const endTime = process.hrtime(startTime);
                            console.log(`Total time taken: ${endTime[0]} seconds ${endTime[1] / 1000000} milliseconds`);
                        }
                    } else {
                        console.error(`Failed to inspect item (${i + 1})`);
                    }
                });
            });
        } catch (err) {
            console.log(err);
        };
    });
});
M7903329297310948975A37061864046D11863687337479355678
M7284084347070041204A37057504987D11863687337479355678
M7384289439309646801A37065312421D11863687337479355678
M4863399372752009970A37055616057D11863687337479355678
M7384289439309646711A37065089523D11863687337479355678
M7800872405789081739A37059417732D11863687337479355678
M7903329297310948855A37065289802D11863687337479355678
M7800872405789080869A37059428152D11863687337479355678

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...