Jump to content
McKay Development

node-tf2 backpack not updating


Recommended Posts

After successful smelting/crafting, tf2.backpack is not getting updated. 

let scraps = inventory.filter(item => item.name == "Scrap Metal")
let recs = inventory.filter(item => item.name == "Reclaimed Metal")
//I have to use inventory from getInventoryContents because tf.backpack is not updated

if (scraps.length > 12) {
	let craft = Math.floor((scraps.length - 12) / 3)

	for (let i = craft; i > 0; i--) tf.craft(scraps.slice(0, 3))

also this only craft 1 reclaimed

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