benjamsch Posted February 27, 2020 Report Posted February 27, 2020 essentially i extended node-globaloffensive with this: GlobalOffensive.prototype.moveItemToCasket = function (casketId, itemId) { this._send(Language.MsgGCCasketItemAdd, Protos.CMsgCasketItem, { casket_item_id: casketId, item_item_id: itemId }); }; GlobalOffensive.prototype.removeItemFromCasket = function (casketId, itemId) { this._send(Language.MsgGCCasketItemExtract, Protos.CMsgCasketItem, { casket_item_id: casketId, item_item_id: itemId }); }; GlobalOffensive.prototype.loadCasketContents = function (casketId) { this._send(Language.MsgGCCasketItemLoadContents, Protos.CMsgCasketItem, { casket_item_id: casketId, item_item_id: casketId }); }; is it possible to send these protobufs from outside of your project? Quote
Dr. McKay Posted February 27, 2020 Report Posted February 27, 2020 I have no idea if this will work, but you might try: const Language = require('globaloffensive/language.js'); const Protos = require('globaloffensive/protobufs/generated/_load.js'); If that doesn't work, this should (provided you've installed the module in the current directory): const Language = require('./node_modules/globaloffensive/language.js'); const Protos = require('./node_modules/globaloffensive/protobufs/generated/_load.js'); Quote
benjamsch Posted February 27, 2020 Author Report Posted February 27, 2020 thanks for the quick reply, works fine thanks, in the current released version nor these message ids are neither in language.js , should they be added? also the current release doesn't have Protos.CMsgCasketItem but it is in master. Thanks for your help and have a good day Quote
Dr. McKay Posted February 28, 2020 Report Posted February 28, 2020 (edited) I do intend to add (well, accept the pull request for) first-class support for item containers, I just haven't gotten around to it at the moment. Edited February 28, 2020 by Dr. McKay 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.