gpt-4-0314· OpenAI
WildChat-4.8M (AI2)
Generate me a 3.3.5 WOTLK Weakaura working lua script that returns true only if a death…
- User
Generate me a 3.3.5 WOTLK Weakaura working lua script that returns true only if a death knight rune has come off cooldown within the last 2.5 seconds
- Assistant
local function runeOffCooldown() -- Get current time local currentTime = GetTime()
code-- Loop through all the runes for runeIndex = 1, 6 do -- Get rune cooldown information local start, duration, runeReady = GetRuneCooldown(runeIndex) -- Check if rune is off cooldown and calculate time since it happened if runeReady or (duration > 0 and (currentTime - (start + duration)) <= 2.5) then return true end end return falseend
-- WeakAura trigger function function(trigger) return runeOffCooldown() end