Jump to content
McKay Development

Recommended Posts

Posted

I revisted the whole function you helped me make a while ago, 

GlobalOffensive.prototype.nameItem = function(nameTagID, itemID, customName) {
    let buffer = new ByteBuffer(16 + Buffer.byteLength(customName) + 1);
    buffer.writeUint64(coerceToLong(nameTagID));
    buffer.writeUint64(coerceToLong(itemID));
    buffer.writeUint8(0);
    buffer.writeCString(customName);
    this._send(Language.NameItem, null, buffer);
};

And it no longer seems to work.

 

I'd also like to apologize for not submitting the pull request, I never got notified you responded so I wasn't aware that I submitted it against my own fork. Too late for that now since like I said, it no longer seems to work. 

Posted

I just cloned the forked repository after merging my own pull request to see if it was the module or CSGO itself that broke the function, it still works with version 1.3.2

 

I don't wish to take up your time, but I'm at a complete loss as to why that is.

Posted

I'm confused. When does it work and when doesn't it?

It does not work in the latest version, version 2.0.1

 

It does still work in version 1.3.2, the one from where you originally helped create the function

 

Which leads me to believe that there was a change in module, not the game coordinator, that prevents it from working.

Posted

Slightly unrelated question, is there a way to list all itemIDs, including items that are of base qualities? 

 

Since it's possible to rename base grade items through the client, I'm assuming the itemIDs for those items are already there.

Posted

Base quality ("stock") items do not have IDs. In TF2, there's a separate GC message used to rename a stock item (NameBaseItem). The value exists in CS:GO's GC message enum, but that doesn't necessarily mean anything as it was just copied and pasted from TF2 and the message may not do anything on the backend.

 

I believe the buffer you should send with that message is a 32- or 64-bit (dunno which, exactly) defindex, followed by the C string.

Posted

I see. 

 

So I see there's a 

k_EMsgGCNameBaseItemResponse

Would this help me in any way understand what it expects?

 

So if I for example send 

this._send(Language.NameBaseItem, null, nameTagID+WEAPON_TASER+0+customName);

I'd like to know why it doesn't like that.

 

There's only so many nametags I can get, I don't want to burn through them blindly guessing.

Posted

Yeah I just opted to not include writing all those variables into a buffer for readability

 

I'm getting an error 

Illegal value: "+value+" (not an integer)

However its setup nearly identically to the last function:

GlobalOffensive.prototype.nameBaseItem = function(nameTagID, defIndex, customName) {
	let buffer = new ByteBuffer(12 + Buffer.byteLength(customName) + 1);
	buffer.writeUint64(nameTagID);
	buffer.writeUint32(defIndex);
	buffer.writeUint8(0);
	buffer.writeCString(customName);
	this._send(Language.NameBaseItem, null, buffer);
};

So I'm not sure why it wouldn't accept 

Buffer.byteLength(customName)

Despite being unchanged.

Posted (edited)

It turns out I was confusing myself with all the files open. I was changing values in a config for the forked older version when I thought I was editing v2

 

Long story short, the error is irrelevant and I already fixed it.

 

However with both nameBaseItem and nameItem, the request goes through but nothing happens.

 

Sending GC message NameBaseItem
Got unhandled GC message NameBaseItemResponse

Is there a way to callback NameBaseItemResponse?

Edited by Acorn Eyes
Posted

That's a good point. 

 

 

So it's probably a lost cause to try and decipher that?

 

Regardless, I'm still not entirely sure what is causing both functions (specifically NameItem which I know works in previous versions) to go through but not do anything.

 

Does it have something to do with protobuf v6? 

 

As a sidenote: 

 

I really appreciate all the help you've given. I don't know how much people donate to you, but I doubt it's enough. 

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.

Guest
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.

Loading...
×
×
  • Create New...