Open Gostinia opened 1 day ago
https://github.com/DoctorMcKay/node-globaloffensive/pull/90/files
Thank you ! now how do I connect my script with cs2 like https://www.youtube.com/watch?v=vWVbrV1dG2A he did here? how does he have steam/cs2 open and the script running it doesnt let me login if steam/cs2 is open.
Here is my current code, it runs through and says "Sticker ID 32188920185 applied to item 40584216802 at slot 2." because of console log However my inventory does not change.
I have a few questions
`const SteamUser = require('steam-user'); const GlobalOffensive = require('globaloffensive'); const protobuf = require('protobufjs');
// Load Protobuf schema const schema = require('./econ_gcmessages'); // Ensure this path is correct
// Steam credentials const STEAM_USERNAME = 'steamuser'; const STEAM_PASSWORD = 'steampass';
// Create instances let user = new SteamUser(); let csgo = new GlobalOffensive(user);
// Extend GlobalOffensive to include applySticker method GlobalOffensive.prototype.applySticker = function (weaponItemId, stickers) { stickers.forEach((sticker) => { // Construct the payload for the sticker application const payload = { request: schema.EGCItemCustomizationNotification.k_EGCItemCustomizationNotification_ApplySticker, // ApplySticker request type sticker_item_id: sticker.sticker_id, // Sticker ID item_item_id: weaponItemId, // Weapon item ID sticker_slot: sticker.slot, // Slot number (0–5) baseitem_defidx: 0, sticker_wear: sticker.wear || null, sticker_rotation: sticker.rotation || null, sticker_scale: sticker.scale || null, sticker_offset_x: sticker.offset_x || null, sticker_offset_y: sticker.offset_y || null, sticker_offset_z: 0 || null, sticker_wear_target: 0 };
};
// Log into Steam user.logOn({ accountName: STEAM_USERNAME, password: STEAM_PASSWORD, });
// When logged in, launch CS:GO user.on('loggedOn', () => { console.log('Logged into Steam!'); user.gamesPlayed([730]); // Launch CS:GO });
// Wait for GC connection csgo.on('connectedToGC', () => { console.log('Connected to GC!');
});
// Debugging: Monitor connection status csgo.on('connectionStatus', (status) => { console.log('GC Connection Status:', status); });
// Debugging: Capture GC-specific events (customize if needed) csgo.on('message', (header, body) => { console.log('GC Message Received:', header, body); });
// Handle GC disconnection csgo.on('disconnectedFromGC', () => { console.log('Disconnected from GC.'); });
// Error handling for Steam and GC user.on('error', (err) => { console.error('Steam User Error:', err); });
csgo.on('error', (err) => { console.error('CS:GO GC Error:', err); }); `