byteframe Posted December 23, 2017 Report Posted December 23, 2017 Hello Mr, McKay (and suboordinates). Can you please point me in the direction of the correct protobuf/method/recipe to apply name/descript tags to stock items? i found this in the language defintion: NameItem: 1006: NameBaseItem: 1019, I assume I need the latter one, but I can't identify the correct protobuf/recipe to use them. Thank you! Quote
Dr. McKay Posted December 23, 2017 Report Posted December 23, 2017 That's old enough there probably isn't a protobuf. You probably just need to send a buffer containing most likely the defindex of the stock item (uint32?) first, followed by your null-terminated new name. Quote
byteframe Posted December 23, 2017 Author Report Posted December 23, 2017 tf2._handlers[TF2Language.NameBaseItemResponse] = function(body) { console.log('responded');};bb = new ByteBuffer().writeUint64(coerceToLong(6470016595)).writeUint32(735).writeString('wut');tf2._send(1019, null, bb); // I figure I also need to supply the item id of the tag...// nothing happens yet, still banging my head against it. does this look bad?// will I get a response only on success?// Sorry I suck with these buffers, still. Quote
byteframe Posted December 24, 2017 Author Report Posted December 24, 2017 // Turns out my handlers werent applying, and I am now able to get a response from the server. tf2._handlers[TF2Language.NameBaseItemResponse] = function(body) { console.log('response:'); console.log(body); }; var bb = new ByteBuffer(8+4+Buffer.byteLength('wut') + 1, ByteBuffer.LITTLE_ENDIAN); bb.writeUint32(735); //Sapper Defindex bb.writeUint64(coerceToLong(6470016595)); // my tag's item id bb.writeCString('wut'); // the message tf2._send(TF2Language.NameBaseItem, null, bb);// outputs response: ByteBuffer { buffer: <Buffer 00 00 05 00 00 00>, offset: 0, markedOffset: -1, limit: 6, littleEndian: true, noAssert: false }// but doesn't perform the desired renaming. ive believe Ive tried all combinations of ordering the variables. I'll keep banging on it., but I'm still a tad out of my depth, notice me senpai. Quote
Recommended Posts
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.