Jump to content
McKay Development

Valdi

Member
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Valdi's Achievements

  1. Hi If you are using globaloffensive library when you call the _send method, just add the callback (last parameter) and it will add source id automatically _send( CS2Emsgs.k_EMsgGCStorePurchaseFinalize, Protos.CMsgGCStorePurchaseFinalize, { txn_id, }, (appId, msgType) => { if(Language.StorePurchaseFinalizeResponse != msgType) { return; } this.emit("itemsPurchased"); } // fix the issue with source id );
  2. Thank you so much! You are best of the best 😄
  3. Guys, let me know if anyone can figure out what the problem is after the last update. Because I get result == 1 from ClientMicroTxnAuthorizeResponse after that I send PurchaseFinalize but the purchase is not completed I checked the logs from netHook and didn't notice anything strange, everything looks the same as before
  4. function decompressValveLZMA(buffer) { if (buffer.length < 13) { throw new Error("Buffer too short to be Valve LZMA"); } const magic = buffer.readUInt32BE(0); // 'LZMA' magic if (magic !== 0x4C5A4D41) { throw new Error("Not a Valve LZMA container (magic mismatch)"); } const uncompressedLength = buffer.readUInt32LE(4); const compressedLength = buffer.readUInt32LE(8); const expectedTotal = 12 + 5 + compressedLength; if (buffer.length < expectedTotal) { throw new Error(`Buffer too short: expected ${expectedTotal}, have ${buffer.length}`); } const props = buffer.slice(12, 17); // 5 байт props const lzmaData = buffer.slice(17, 17 + compressedLength); return new Promise((resolve, reject) => { const lzma = new LZMA(); // Собираем заголовок LZMA: props (5) + uncompressed size (8 байт LE) const lzmaHeader = Buffer.alloc(13); props.copy(lzmaHeader, 0); lzmaHeader.writeBigUInt64LE(BigInt(uncompressedLength), 5); const fullLzmaStream = Buffer.concat([lzmaHeader, lzmaData]); lzma.decompress(fullLzmaStream, (result, error) => { if (error) { reject(error); } else { resolve(result); } }); }); } var BinaryKVParser = require('binarykvparser'); handlers[Language.StoreGetUserDataResponse] = async (body) => { let proto = decodeProto(Protos.CMsgStoreGetUserDataResponse, body); const result = await decompressValveLZMA(proto.price_sheet); const parsed = BinaryKVParser.parse(result); } I hope it will save time for someone
×
×
  • Create New...