Closed ArtificialT800 closed 4 months ago
So I've been trying to create a bot that will eat when its low on health but it doesnt seem to work.
Here's what my code so far:
bot.once('spawn', () => { bot.autoEat.options = { priority: 'auto', startAt: 14, bannedFood: [], healthThreshold: 16, checkOnItemPickup: true, equipOldItem: true } }) bot.on('autoeat_started', () => { console.log('Auto Eat started!') }) bot.on('autoeat_stopped', () => { console.log('Auto Eat stopped!') }) bot.on('health', () => { console.log("Health: ", bot.health) console.log("FoodPoints: ", bot.food) if (bot.health !== 20) bot.autoEat.eat() //for some reason .enable() doesn't work AT ALL? else bot.autoEat.disable() })
So I've been trying to create a bot that will eat when its low on health but it doesnt seem to work.
Here's what my code so far: