balthazar / csgo-float Goto Github PK
View Code? Open in Web Editor NEW:gem: Retrieve CS:GO float values in JavaScript
:gem: Retrieve CS:GO float values in JavaScript
So I have an inspect link that I am trying to request the float for and the request hangs.
var auth_config = { /* auth values in here */ };
var client = new FloatClient(auth_config, true);
client.on('error', function(err) {
console.log(err);
});
client.requestFloat('M639885643885286087A6070339447D7379339339370761238').then(function(floatValue) {
// do something with floatValue
}).catch(function(e) {
// do something with error
});
With this code I am successfully logged in and I think that _gc.send is being called because I added a log statement right before that line of code and I see it being executed. However, the returned promise doesn't seem to be resolved and subsequent request reject with a 'Request already in progress.'
A little information about the account I am using. Doesn't actually own a copy of CS GO, but is being family shared a copy of GO. Does the account need a distinct copy of the game?
Using the following to log in and then save the sentry
var auth_config = {};
try {
auth_config.sha_sentryfile = fs.readFileSync('sentry');
console.log(auth_config.sha_sentryfile);
} catch (e) {
auth_config.account_name = 'username';
auth_config.password = 'password';
auth_config.auth_code = '';
}
var client = new FloatClient(auth_config, true);
client.on('sentry', function(data) {
console.log("Recieved sentry.")
console.log(data);
fs.writeFileSync('sentry', data)
});
If no sentry file is present, then the login proceeds and a sentry file is written. On subsequent executions of this code, login fails.
Hi, this module must startup through babel?
The README tells us that "Only one request can be done at a time by each client. You'll have to wait for the first request to be processed before sending another one."
I've implemented a queue that processes the next request only after the previous one has returned its promise. However, requests seem to hang unless an additional 700ms delay is added after the GC returns and the promise is satisfied.
Is there a programmatic way to identify when the GC is ready for a new request? Or is this a bug with this implementation?
Many thanks for any assistance.
At line 79 of src/index.js there is
(!this._gcLoaded) { return this.emit('error', new Error('GC not loaded.')) }
Since _gcLoaded is a function and checking if the function is not empty make no sense, i guess that this is supposed to be
if(!this._gcReady) { return this.emit('error', new Error('GC not loaded.')) }
I am loading csgo-float with a logged instance of node-steam-user and the script crash to this:
Error: Parse error at line 1: unexpected '404'
at Parser.ProtoBuf.DotProto.ParserPrototype.parse (/home/x/node_modules/protobufjs/dist/ProtoBuf.js:777:35)
at Function.ProtoBuf.DotProto.Parser.parse (/home/x/node_modules/protobufjs/dist/ProtoBuf.js:795:39)
at Object.ProtoBuf.loadProto (/home/x/node_modules/protobufjs/dist/ProtoBuf.js:5038:59)
at Object.ProtoBuf.loadProtoFile (/home/x/node_modules/protobufjs/dist/ProtoBuf.js:5084:52)
at Object. (/home/x/node_modules/csgo-float/protos/index.js:7:10)
Hey, I dunno if you still work on this;
I've tried to make your package work, but I cannot retrieve the float value.
On debug mode, I can see i'm connected and logged, but after that, I'm just getting messages (which I don't know what types numbers a related to...).
And nothing happend after. Do you know what's wrong?
[connected]
[message] 1305
[message] 5501
[message] 5501
[message] 5501
[logged]
[message] 751
[message] 768
[message] 5456
[message] 782
[message] 767
[message] 5553
[message] 5587
[message] 780
[message] 798
[message] 5528
[message] 779
[message] 850
[message] 5430
[message] 783
[message] 880
[message] 5480
[message] 880
[message] 1
[message] 5463
[message] 1
[message] 9600
[message] 1
[message] 5501
[message] 1
[message] 5510
[message] 1
[message] 831
[message] 1
Thanks!
Can you show an example?
This is my code (but it does not work):
var Steam = require('steam');
var SteamTotp = require('steam-totp');
var steamClient = new Steam.SteamClient();
var steamUser = new Steam.SteamUser(steamClient);
steamClient.connect();
steamClient.on('connected', function() {
steamUser.logOn({
account_name: 'login',
password: 'pass',
two_factor_code: SteamTotp.generateAuthCode('shared_secret')
});
});
steamClient.on('logOnResponse', function() {
var steamGameCoordinator = new Steam.SteamGameCoordinator(steamClient, 730);
steamGameCoordinator.send({ msg: 9156, proto: {} }, ???);
});
steamClient.on('error', function(data) {
console.log(data);
});
When I'm trying to import csgo-float
, it complains: Cannot find module csgo-float
Most probably because it has no dist
folder, I checked.
It happens only with version 0.0.8, 0.0.7 works fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.