The problem is due to an issue with the web walker not being able to handle certain obstacles in the area, it should not have anything to do with the food you're using. The script uses OSBot's web walking to generate paths, the links for curtains in the area do not work, this means that when a curtain is closed the web walker bugs and cannot generate a path to leave the room, resulting in death. The logger is displayed by selecting the "Show logger" option under the "Settings" tab on the OSBot client. When you have the issue, please post what the logger says, so I can confirm the bug is indeed related to the web walker, and post a picture with the room you are attempting to bot in so that I can add custom support for the room.
Edit: Jugs of wine were indeed not working correctly, I just added support for them which is live in v5.1. That being said, if the bot is not running when being attacked the issue is web walking related, not food related. The bot is setup to first run, then eat once it is out of combat to prevent taking unnecessary damage.