apibot Posted January 28, 2022 Report Posted January 28, 2022 My bot automatically craft/smelt metals according to my bot's stock flow: gamesPlayed(440) if haveGCSession is false > wait for connectedToGC to fire > craft > wait for craftingComplete to fire > gamesPlayed() to exit tf2 > reload inventory. Sometimes it completes the flow but I am stucked with the same number of metals. Sometimes it is stucked waiting for craftingComplete to be emitted. Sometimes it is successful especially when I restart my bot. Yes, I load my inventory via getInventoryContents everytime before crafting to make sure I have the correct item.ids. Quote
Dr. McKay Posted January 28, 2022 Report Posted January 28, 2022 4 hours ago, apibot said: Yes, I load my inventory via getInventoryContents everytime before crafting to make sure I have the correct item.ids. This is not the best way to make sure you have the correct item IDs when crafting items. Just use node-tf2's backpack property, which contains an always-up-to-date copy of your backpack. To find metal, just check the defindexes. If memory serves, 5000 is scrap metal, 5001 is reclaimed, and 5002 is refined. Quote
apibot Posted February 1, 2022 Author Report Posted February 1, 2022 On 1/28/2022 at 3:43 PM, Dr. McKay said: This is not the best way to make sure you have the correct item IDs when crafting items. Just use node-tf2's backpack property, which contains an always-up-to-date copy of your backpack. To find metal, just check the defindexes. If memory serves, 5000 is scrap metal, 5001 is reclaimed, and 5002 is refined. just got back. tried it your way and it is so much better and effective. thanks! Dr. McKay 1 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.