Last active
December 27, 2015 00:38
-
-
Save Thaodan/7238697 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local frame = CreateFrame("FRAME"); | |
frame.RegisterEvent("ADDON_LOADED"); | |
frame.SetScript("OnEvent", __main); | |
local function __main() | |
local afk_MaxFPS = 5; | |
local nafk_MaxFPS = 30; | |
if ADDON_LOADED then | |
while 1 do | |
if IsChatAFK() then | |
nafk_MaxFPS = GetCvar("MaxFPS"); | |
SetCvar("MaxFPS", afk_MaxFPS); | |
else | |
SetCvar("MaxFPS", nafk_MaxFPS); | |
end | |
end | |
end | |
end | |
--[[ | |
Local Variables: | |
mode: lua | |
tab-width: 3 | |
End: | |
]]-- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment