Jump to content

Recommended Posts

sorry for the delay but try and use this. it should work (not TESTED)

using System.Threading;
using wManager.Wow.Helpers;
using wManager.Plugin;
using robotManager.Helpful;
using wManager.Wow.ObjectManager;
using robotManager.FiniteStateMachine;
using robotManager.Events;
using System.ComponentModel;

public class Main : IPlugin
{
    private bool Loading;
   

    public void Initialize()
    {
        Loading = true;
        FiniteStateMachineEvents.OnRunState += Regen;
    }

    public void Regen(Engine engine, State state, CancelEventArgs cancelable)
    {
        if (state.DisplayName == "Regen" && state.NeedToRun && !ObjectManager.Me.InCombat)
        {
            if (ItemsManager.HasItemById(FoodID) <= 1 && ObjectManager.Me.HealthPercent <= %)
            {
                ItemsManager.UseItem("FoodName");
                if (ObjectManager.Me.ManaPercentage <= % && ItemsManager.HasItemById(DrinkID))
                {
                    ItemsManager.UseItem("DrinkName");
                }
                Thread.Sleep(30000);

                while (ObjectManager.Me.HaveBuff("Food") || ObjectManager.Me.HaveBuff("Drink"))
                {
                    Thread.Sleep(5000);
                }    
            }
            
        }
        
    }

    public void Dispose()
    {
        Loading = false;
    }

    public void Settings()
    {
        Logging.Write("Plugin has no Settings.");

    }
}

 

Link to comment
https://wrobot.eu/forums/topic/11477-mage-drinking/#findComment-54896
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...