Jump to content
McKay Development

node-tf2: item renames


Recommended Posts

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!



Link to comment
Share on other sites

tf2._handlers[TF2Language.NameBaseItemResponse] = function(body) {



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.
Link to comment
Share on other sites

// Turns out my handlers werent applying, and I am now able to get a response from the server.

tf2._handlers[TF2Language.NameBaseItemResponse] = function(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

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. 
Link to comment
Share on other sites

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.

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.

  • Create New...