Skip to content

Instantly share code, notes, and snippets.

@Thaodan
Last active December 27, 2015 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thaodan/7238697 to your computer and use it in GitHub Desktop.
Save Thaodan/7238697 to your computer and use it in GitHub Desktop.
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