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

RuneCooldownTime

Not quite sure what
Code:
Styx.WoWInternals.WoWObjects.WoWPlayer.RuneRegen
Would return for you, the amount of time it takes to Regen? Not sure if this would give time remaining or just the standard time, nothing in the API docs for it. Or anything you need at all!
 
Looked at that but it's not outputting anything relevant to the runes :s
 
Hmm, maybe there is some Lua command you can run. I can't find anything in HB's API, so I think Lua is your best shot! The page you linked gives you the Lua you need to run. If you want example code let me know, I don't have VS on this PC but I will do at work tomorrow.
 
Resolved my issue:
Code:
        public static float GetAllRuneCooldowns(int runeOne, int runeTwo)
        {
            float runeOneCooldown = GetRuneCooldown(runeOne, runeTwo);
            float runeTwoCooldown = GetRuneCooldown(runeTwo, runeOne);
            Logger.WriteDebug("Rune One: {0} = {1}", runeOne, runeOneCooldown);
            Logger.WriteDebug("Rune Two: {0} = {1}", runeTwo, runeTwoCooldown);
            return runeOneCooldown + runeTwoCooldown;
        }

        public static float GetRuneCooldown(int rune, int pair_rune)
        {
            float finish = Lua.GetReturnVal<float>(string.Format("local start, dur, ready = GetRuneCooldown({0}); local finish = start + dur; return finish", rune), 0);         
            float time_now = Lua.GetReturnVal<float>("return GetTime()", 0);
            float cooldown = finish - time_now;
            if (cooldown < 0)
            {
                cooldown = 0;
            }
            if (cooldown > 8)
            {
                float pair_finish = Lua.GetReturnVal<float>(string.Format("local start, dur, ready = GetRuneCooldown({0}); local finish = start + dur; return finish", pair_rune), 0);
                cooldown -= pair_finish - time_now;
            }
            return cooldown;
        }

Code:
Spell.Cast("Empower Rune Weapon", ret => GetAllRuneCooldowns(1, 2) + GetAllRuneCooldowns(3, 4) + GetAllRuneCooldowns(5, 6) > 8)
 
Back
Top