What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Making a bot Eat during Rest. Bot is standing there not eating. Code included.

Shinugami

New Member
Joined
Mar 1, 2012
Messages
17
Reaction score
0
Hi,
In my attempt to learn the art of making a good CC, I'm at the stage where I've moved on from combat and am looking into making a bot eat during the rest period.

Code:
public static void Eat()
        {           
            WoWItem food = Styx.Logic.Inventory.Consumable.GetBestFood(false);
            if (food == null) return;          
            LevelbotSettings.Instance.FoodName = food.Name;
            Styx.Logic.Common.Rest.Feed();
            Logging.Write(Color.White, "Eating {0}", food.Name);
        }
This code above sets up the eating bit.
I've made the following code for the NeedRest and Rest parts of the code which triggers the bot to Rest when the bot's health is less than 100 percent:
Code:
 public override bool NeedRest { get { return Me.HealthPercent < 100; } }
 public override void Rest()
        {
            Eat();
        }

So what should happen according to my knowledge is that the Eat() should come into action when HonorBuddy says it's time to rest. Usually after combat. What's happening is that I'm getting the message saying that my bot is eating "Eating 'Any Food Name Here'" but my bot is just sitting there. There is food in the inventory and the food it is quoting has 19 however it's not eating and getting the Aura "Food".

Any help would be greatly appreciated.
 
Back
Top