Jump to content

Mage drinking??


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
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...