📄 fstbook.lua
字号:
GLIMCONFIGFRAME_PAGESIZE = 14;GLIMCONFIGFRAME_MAXPRIORITYSIZE = 10;GLIMBUTTONLIST = {};GLIMCONFIGFRAME_MAXRIGHTCOUNT = 4;gLimConfigCurPage = 1;gLimUIConfig = {};gLimUI_ShowQuestLevel = 1;gLimUI_ShowQuestSpeed = 60000;function O0O000O00OO() this:RegisterEvent("VARIABLES_LOADED");end function lll1111l1l1l1l1l1l11l() if( event == "VARIABLES_LOADED" ) then l1l1ll1l1l1l1l1ll11l();end end function l1l1ll1l1l1l1l1ll11l() if gLimUIConfig == nil then gLimUIConfig = {};end;if gLimUIConfig.ShowQuestUI == nil then gLimUIConfig.ShowQuestUI = 1;end;gLimUI_ShowQuestLevel = gLimUIConfig.ShowQuestUI;if gLimUIConfig.ShowQuestSpeend == nil then gLimUIConfig.ShowQuestSpeend = 60000;end;gLimUI_ShowQuestSpeed = gLimUIConfig.ShowQuestSpeend;setglobal('QUEST_DESCRIPTION_GRADIENT_CPS', gLimUI_ShowQuestSpeed);if (gLimUIConfig.ShowPetHealth == nil)then gLimUIConfig.ShowPetHealth = 1;end;gLimUI_ShowPetHealth = gLimUIConfig.ShowPetHealth;if (gLimUIConfig.ShowPetMana == nil)then gLimUIConfig.ShowPetMana = 1;end;gLimUI_ShowPetMana = gLimUIConfig.ShowPetMana;if (gLimUIConfig.ShowPartyMana == nil) then gLimUIConfig.ShowPartyMana = 1;end;gLimUI_ShowPartyMana = gLimUIConfig.ShowPartyMana;
if (gLimUIConfig.Type == nil) then
gLimUIConfig.Type = 0;
end
gLimUI_Type = gLimUIConfig.Type;
if (gLimUIConfig.ShowPartyHealth == nil) then
gLimUIConfig.ShowPartyHealth = 1;
end;
gLimUI_ShowPartyHealth = gLimUIConfig.ShowPartyHealth;if (gLimUIConfig.ShowPartyBuff == nil) then gLimUIConfig.ShowPartyBuff = 1;end;gLimUI_ShowPartyBuff = gLimUIConfig.ShowPartyBuff;if (gLimUIConfig.MoveShow == nil) then gLimUIConfig.MoveShow = 1;end;gLimUI_MoveShow = gLimUIConfig.MoveShow;MainRegConfig();end;function shit(id) if id == 99 then GLIMBUTTONLIST = {};GLIMTEMPBUTTONLIST = {};GLIMTEMPBUTTONLIST = gLimButton;TotalButtonNum = table.getn(GLIMTEMPBUTTONLIST);for lvl = 1, GLIMCONFIGFRAME_MAXPRIORITYSIZE, 1 do for i = 1,TotalButtonNum,1 do local localtempbuttonvalue = {};localtempbuttonvalue = GLIMTEMPBUTTONLIST[i];if localtempbuttonvalue[GLIM_PRIORITY] == lvl then tinsert(GLIMBUTTONLIST,localtempbuttonvalue);end;end;end;gLimConfigTitleText:SetText(TEXT(GLIM_CONFIG_TOTALTITLE));else getCurTypeButtonList(id);end if id == 1 then gLimConfigTitleText:SetText(TEXT(GLIM_CONFIG_TITLE1));elseif id == 2 then gLimConfigTitleText:SetText(TEXT(GLIM_CONFIG_TITLE2));elseif id == 3 then gLimConfigTitleText:SetText(TEXT(GLIM_CONFIG_TITLE3));elseif id == 4 then gLimConfigTitleText:SetText(TEXT(GLIM_CONFIG_TITLE4));end;gLimConfigCurPage = 1;end;function getCurTypeButtonList(id) local TotalButtonNum = table.getn(gLimButton);GLIMTEMPBUTTONLIST = {};GLIMBUTTONLIST = {};for i = 1, TotalButtonNum, 1 do local localbuttonvalue = {};localbuttonvalue = gLimButton[i];if localbuttonvalue[GLIM_TYPE] == id then tinsert(GLIMTEMPBUTTONLIST,localbuttonvalue);end;end;TotalButtonNum = table.getn(GLIMTEMPBUTTONLIST);for lvl = 1, GLIMCONFIGFRAME_MAXPRIORITYSIZE, 1 do for i = 1,TotalButtonNum,1 do local localtempbuttonvalue = {};localtempbuttonvalue = GLIMTEMPBUTTONLIST[i];if localtempbuttonvalue[GLIM_PRIORITY] == lvl then tinsert(GLIMBUTTONLIST,localtempbuttonvalue);end;end;end;end;function OO000O0O0O0O00OOO0O00() local gLimConfigFramePageNum = getglobal("gLimConfigFramePageNum");if (gLimConfigFramePageNum ~= nil) then gLimConfigFramePageNum:SetText("");gLimConfigFramePageNum:Hide();end;for i = 1, GLIMCONFIGFRAME_PAGESIZE, 1 do local icon = getglobal("gLimConfigButton"..i);local iconTexture = getglobal("gLimConfigButton"..i.."IconTexture");icon:Hide();iconTexture:Hide();end local Cur_ButtonNum = table.getn(GLIMBUTTONLIST);gLimConfigPageTotal = math.ceil( Cur_ButtonNum / GLIMCONFIGFRAME_PAGESIZE );if (gLimConfigPageTotal == 0) then gLimConfigPageTotal = 1;end gLimConfigCurPageCount = math.mod( Cur_ButtonNum , GLIMCONFIGFRAME_PAGESIZE );if( gLimConfigCurPageCount == 0 and Cur_ButtonNum ~= 0)then gLimConfigCurPageCount = GLIMCONFIGFRAME_PAGESIZE;else gLimConfigCurPageCount = Cur_ButtonNum - ((gLimConfigCurPage-1) * GLIMCONFIGFRAME_PAGESIZE);if (gLimConfigCurPageCount > GLIMCONFIGFRAME_PAGESIZE) then gLimConfigCurPageCount = GLIMCONFIGFRAME_PAGESIZE;end end for i = 1, gLimConfigCurPageCount, 1 do local icon = getglobal("gLimConfigButton"..i);local iconTexture = getglobal("gLimConfigButton"..i.."IconTexture");local id = (gLimConfigCurPage-1)*GLIMCONFIGFRAME_PAGESIZE+i;local value = {};value = GLIMBUTTONLIST[id];icon:Show();icon:Enable();iconTexture:Show();iconTexture:SetTexture(value[GLIM_ICON]);end if (gLimConfigFramePageNum ~= nil) then gLimConfigFramePageNum:SetText("第"..gLimConfigCurPage.."页/共"..gLimConfigPageTotal.."页");gLimConfigFramePageNum:Show();end;gLimConfigFrame_UpdatePageArrows();end;function gLimConfigFrame_UpdatePageArrows() if ((gLimConfigCurPage < gLimConfigPageTotal) and (gLimConfigCurPage>1) ) then gLimConfigFramePrevPageButton:Enable();gLimConfigFrameNextPageButton:Enable();end if ((gLimConfigCurPage < gLimConfigPageTotal) and (gLimConfigCurPage==1) ) then gLimConfigFramePrevPageButton:Disable();gLimConfigFrameNextPageButton:Enable();end if ((gLimConfigCurPage == gLimConfigPageTotal) and (gLimConfigCurPage>1) ) then gLimConfigFramePrevPageButton:Enable();gLimConfigFrameNextPageButton:Disable();end if ((gLimConfigCurPage == gLimConfigPageTotal) and (gLimConfigCurPage==1) ) then gLimConfigFramePrevPageButton:Disable();gLimConfigFrameNextPageButton:Disable();end end function ll1l1l111ll1ll1() gLimConfigCurPage = gLimConfigCurPage - 1;OO000O0O0O0O00OOO0O00();end function ll1l1l1ll1l111l() gLimConfigCurPage = gLimConfigCurPage + 1;OO000O0O0O0O00OOO0O00();end function O0O0O00O0O0OO0000OOO0() local value = GLIMBUTTONLIST[this:GetID()+(gLimConfigCurPage-1)*GLIMCONFIGFRAME_PAGESIZE];if (value) then local f = value[GLIM_CALLBACK];this:SetChecked(0);f();return;end end function O00OOO0O00OOO00O0000O() local value = GLIMBUTTONLIST[this:GetID()+(gLimConfigCurPage-1)*GLIMCONFIGFRAME_PAGESIZE];if (value) then GameTooltip:SetOwner(this, "ANCHOR_RIGHT");GameTooltip:SetText(value[GLIM_LONGDESCRIPTION], 1.0, 1.0, 1.0);return;end end function ll1l1l1l1l1lll11l1ll1() if (gLimConfigFrame:IsVisible()) then if gLimUI_MoveShow == 1 then OO0O0O0O0O0O0OOO0O00(2);else HideUIPanel(gLimConfigFrame);end;else ShowUIPanel(gLimConfigFrame);if gLimUI_MoveShow == 1 then gLimConfigFrame:SetPoint("TopLeft", "UIParent", "BottomLeft", 0, GetScreenHeight()+512);OO0O0O0O0O0O0OOO0O00(1);else gLimConfigFrame:SetPoint("TopLeft", "UIParent", "BottomLeft", 0, GetScreenHeight()/2+300);end;end end function O0O00OOO0O00O0OO0O0OO() UpdateMicroButtons();end function O0O000O00OO0OOO0O0O0O() shit(99);OO000O0O0O0O00OOO0O00();UpdateMicroButtons();PlaySound("igSpellBookOpen");gLimConfigTitleText:SetText(GLIM_CONFIG_TOTALTITLE);OOO00O00OO0O0O0O0OOO(99);end function O0O0O00O0O0OO(id) local id = this:GetID();shit(id);OO000O0O0O0O00OOO0O00();UpdateMicroButtons();OOO00O00OO0O0O0O0OOO(id);end;function OOO00O00OO0O0O0O0OOO(id) local gLimRightButtonID = getglobal("gLimConfigLineTab"..99);gLimRightButtonID:SetChecked(nil);if id == 99 then gLimRightButtonID:SetChecked(1);end for i = 1,GLIMCONFIGFRAME_MAXRIGHTCOUNT,1 do gLimRightButtonID = getglobal("gLimConfigLineTab"..i);gLimRightButtonID:SetChecked(nil);if (i == id)then gLimRightButtonID:SetChecked(1);end end end;function O00OOO0O00OOO(id) GameTooltip:SetOwner(this, "ANCHOR_RIGHT");local id = this:GetID();local TabTooltip;if id == 99 then TabTooltip = GLIM_CONFIG_ToolTip_TOTALTITLE;elseif id == 1 then TabTooltip = GLIM_CONFIG_ToolTip_TITLE1;elseif id == 2 then TabTooltip = GLIM_CONFIG_ToolTip_TITLE2;elseif id == 3 then TabTooltip = GLIM_CONFIG_ToolTip_TITLE3;elseif id == 4 then TabTooltip = GLIM_CONFIG_ToolTip_TITLE4;end;GameTooltip:SetText(TabTooltip);end;function OO0O0O0O0O0O0OOO0O00(Movetype) Chronos.MAX_TIME_PER_STEP = 0.01;moveConfigFrame = 0;setglobal("moveConfigFrame",0);Chronos.performTask( { begin = function() setglobal("moveConfigFrame",0);end;step = function() setglobal("moveConfigFrame",getglobal("moveConfigFrame")+1);if Movetype == 1 then ll1l1l11111l1l1ll1l1(gLimConfigFrame,-40);else ll1l1l11111l1l1ll1l1(gLimConfigFrame,40);end;end;myend = function() if Movetype ~= 1 then HideUIPanel(gLimConfigFrame);end;end;isDone = function() if (getglobal("moveConfigFrame")>16) then if Movetype ~= 1 then HideUIPanel(gLimConfigFrame);end;return true;elseif (getglobal("moveConfigFrame")==16) then if Movetype == 1 then OO0O0O0O0O0O0OOO0O00UP();else HideUIPanel(gLimConfigFrame);end;return true;end;end;} );end;function OO0O0O0O0O0O0OOO0O00UP() Chronos.MAX_TIME_PER_STEP = 0.01;moveConfigFrameUP = 0;setglobal("moveConfigFrameUP",0);Chronos.performTask( { begin = function() setglobal("moveConfigFrameUP",0);end;step = function() setglobal("moveConfigFrameUP",getglobal("moveConfigFrameUP")+1);ll1l1l11111l1l1ll1l1(gLimConfigFrame,7.5);end;myend = function() end;isDone = function() if (getglobal("moveConfigFrameUP")>2) then return true;end;end;} );end;function ll1l1l11111l1l1ll1l1(arg1,arg2) FrameTopPosition = arg1:GetTop() + arg2;arg1:SetPoint("TopLeft", "UIParent", "BottomLeft", 0,FrameTopPosition);end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -