Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Refresh Savage Roar Before it Expires

Featured Replies

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

I could be wrong and don't have the app in front of me to check, but I was thinking there was a "buff time remaining" or something similar as an option in the fight class creator.

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

  • Author

@Koalemos23 

I had tried this, but the function didn't seem to work properly when I tried, it would still wait for the buff to expire. - Not sure if I was doing something incorrectly though.

  • 2 years later...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.