Jump to content

Recommended Posts

Hi there,

I'm new to fight class editing, so excuse my level of knowledge.

I'm designing a feral druid combat rotation for 3.3.5, and wondering if there was anyway to refresh Savage Roar "x" amount of seconds before expiring / or if it has fully expired? (I've managed to do the latter, but would obviously need the contingency if the event of it expiring.

Fight Classes Attached.

P.S If there is any code to be used, I would prefer it in C format, however if Lua is the only way to achieve so, either is great.

Many thanks in advance.

Feral DPS.xml

Link to comment
https://wrobot.eu/forums/topic/12785-refresh-savage-roar-before-it-expires/
Share on other sites

I almost exclusively work on TBC but I think this should work in WotLK too:

        // Returns the time left on a buff in seconds, buff name is passed as string
        public static int BuffTimeLeft(string buffName)
        {
            return Lua.LuaDoString<int>
                ($"for i=1,25 do " +
                    "local n, _, _, _, _, duration, _  = UnitBuff('player',i); " +
                    "if n == '" + buffName + "' then " +
                    "return duration " +
                    "end " +
                "end");
        }

 

@Zer0 i dont believe people can use Csharp functions in fighclass editor. but yes, you code will work for wotlk.

This is lua code. (Tested) works good. Change the timer and Combo Points  amount with whatever you choose.

local RS, _, _, _, _, _, timer = UnitBuff("player", "Savage Roar");

if (not RS or RS and timer - GetTime() <= 3) and GetComboPoints("player", "target") >= 2 then
    CastSpellByName("Savage Roar");
end

Update file.

Feral DPS.xml

Edited by TheSmokie
  • 2 years later...

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...