⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 enxcommand.lua

📁 时间太紧了
💻 LUA
📖 第 1 页 / 共 3 页
字号:
--[[	Enchantrix Addon for World of Warcraft(tm).	Version: 3.5.0.0917 (Platypus)	Revision: $Id: EnxCommand.lua 900 2006-06-05 20:54:57Z aradan $	Slash command and GUI functions.	License:		This program is free software; you can redistribute it and/or		modify it under the terms of the GNU General Public License		as published by the Free Software Foundation; either version 2		of the License, or (at your option) any later version.		This program is distributed in the hope that it will be useful,		but WITHOUT ANY WARRANTY; without even the implied warranty of		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the		GNU General Public License for more details.		You should have received a copy of the GNU General Public License		along with this program(see GLP.txt); if not, write to the Free Software		Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.]]-- Global functionslocal addonLoaded				-- Enchantrix.Command.AddonLoaded()local auctioneerLoaded			-- Enchantrix.Command.AuctioneerLoaded()local handleCommand				-- Enchantrix.Command.HandleCommand()local register					-- Enchantrix.Command.Register()local resetKhaos				-- Enchantrix.Command.ResetKhaos()local setKhaosSetKeyValue		-- Enchantrix.Command.SetKhaosSetKeyValue()local setKhaosSetKeyParameter	-- Enchantrix.Command.SetKhaosSetKeyParameter()-- Local functionslocal getKhaosLocaleListlocal getKhaosLoadListlocal registerKhaoslocal registerAuctioneerOptionslocal chatPrintHelplocal onOfflocal clearlocal defaultlocal genVarSetlocal percentLessFilterlocal bidBrokerFilterlocal profitComparisonSortlocal bidBrokerSortlocal doBidBrokerlocal doPercentLesslocal getAuctionItemDisenchants-- GUI Init Variables (Added by MentalPower)Enchantrix.State.GUI_Registered = nilEnchantrix.State.Khaos_Registered = nil-- Local variableslocal optionSetlocal profitMargins-- Local constantslocal MAX_BUYOUT_PRICE = 800000;local MIN_PROFIT_MARGIN = 1000;local MIN_PERCENT_LESS_THAN_HSP = 20; -- 20% defaultlocal MIN_PROFIT_PRICE_PERCENT = 10; -- 10% defaultfunction addonLoaded()	if IsAddOnLoaded("Khaos") then		registerKhaos()	endendfunction getKhaosLocaleList()	local options = { [_ENCH('CmdDefault')] = 'default' };	for locale, data in EnchantrixLocalizations do		options[locale] = locale;	end	return optionsendfunction getKhaosLoadList()	return {		[_ENCH('GuiLoad_Always')] = 'always',		[_ENCH('GuiLoad_Never')] = 'never',	}endfunction registerKhaos()	optionSet = {		id="Enchantrix";		text="Enchantrix";		helptext=function() 			return _ENCH('GuiMainHelp');		end;		difficulty=1;		default={checked=true};		options={			{				id="Header";				text="Enchantrix";				helptext=function() 					return _ENCH('GuiMainHelp')				end;				type=K_HEADER;				difficulty=1;			};			{				id="all";				type=K_TEXT;				text=function() 					return _ENCH('GuiMainEnable')				end;				helptext=function() 					return _ENCH('HelpOnoff')				end;				callback=function(state)					if (state.checked) then						onOff('on');					else						onOff('off');					end				end;				feedback=function(state)					if (state.checked) then						return _ENCH('StatOn');					else						return _ENCH('StatOff');					end				end;				check=true;				default={checked=Enchantrix.Config.GetFilterDefaults('all')};				disabled={checked=false};				difficulty=1;			};			{				id="locale";				type=K_PULLDOWN;				setup = {					options = getKhaosLocaleList;					multiSelect = false;				};				text=function() 					return _ENCH('GuiLocale')				end;				helptext=function() 					return _ENCH('HelpLocale')				end;				callback = function(state)				end;				feedback = function (state)					Enchantrix.Config.SetLocale(state.value);					return string.format(_ENCH('FrmtActSet'), _ENCH('CmdLocale'), state.value);				end;				default = {					value = Enchantrix.Config.GetLocale();				};				disabled = {					value = Enchantrix.Config.GetLocale();				};				dependencies={all={checked=true;}};				difficulty=2;			};			{				id="LoadSettings";				type=K_PULLDOWN;				setup = {					options = getKhaosLoadList;					multiSelect = false;				};				text=function() 					return _ENCH('GuiLoad')				end;				helptext=function() 					return _ENCH('HelpLoad')				end;				callback=function(state) end;				feedback=function(state)					handleCommand("load " .. state.value, "GUI");				end;				default={value = 'always'};				disabled={value = 'never'};				difficulty=1;			};			{				id="embed";				type=K_TEXT;				text=function() 					return _ENCH('GuiEmbed')				end;				helptext=function() 					return _ENCH('HelpEmbed')				end;				callback=function(state)					genVarSet('embed', state.checked);				end;				feedback=function(state)					if (state.checked) then						return (string.format(_ENCH('FrmtActEnable'), _ENCH('ShowEmbed')));					else						return (string.format(_ENCH('FrmtActDisable'), _ENCH('ShowEmbed')));					end				end;				check=true;				default={checked=Enchantrix.Config.GetFilterDefaults('embed')};				disabled={checked=false};				dependencies={all={checked=true;}};				difficulty=1;			};			{				id="terse";				type=K_TEXT;				text=function() 					return _ENCH('GuiTerse')				end;				helptext=function() 					return _ENCH('HelpTerse')				end;				callback=function(state)					genVarSet('terse', state.checked);				end;				feedback=function(state)					if (state.checked) then						return (string.format(_ENCH('FrmtActEnable'), _ENCH('ShowTerse')));					else						return (string.format(_ENCH('FrmtActDisable'), _ENCH('ShowTerse')));					end				end;				check=true;				default={checked=Enchantrix.Config.GetFilterDefaults('terse')};				disabled={checked=false};				dependencies={all={checked=true;}};				difficulty=2;			};			{				id="counts";				type=K_TEXT;				text=function() 					return _ENCH('GuiCount')				end;				helptext=function() 					return _ENCH('HelpCount')				end;				callback=function(state)					genVarSet('counts', state.checked);				end;				feedback=function(state)					if (state.checked) then						return (string.format(_ENCH('FrmtActEnable'), _ENCH('ShowCount')));					else						return (string.format(_ENCH('FrmtActDisable'), _ENCH('ShowCount')));					end				end;				check=true;				default={checked=Enchantrix.Config.GetFilterDefaults('counts')};				disabled={checked=false};				dependencies={all={checked=true;}};				difficulty=3;			};			{				id="EnchantrixValuateHeader";				type=K_HEADER;				text=function() 					return _ENCH('GuiValuateHeader')				end;				helptext=function() 					return _ENCH('HelpValue')				end;				difficulty=2;			};			{				id="valuate";				type=K_TEXT;				text=function() 					return _ENCH('GuiValuateEnable')				end;				helptext=function() 					return _ENCH('HelpValue').."\n".._ENCH('HelpGuessNoauctioneer')				end;				callback=function(state)					genVarSet('valuate', state.checked);				end;				feedback=function(state)					if (state.checked) then						return (string.format(_ENCH('FrmtActEnable'), _ENCH('ShowValue')));					else						return (string.format(_ENCH('FrmtActDisable'), _ENCH('ShowValue')));					end				end;				check=true;				default={checked=Enchantrix.Config.GetFilterDefaults('valuate')};				disabled={checked=false};				dependencies={all={checked=true;}};				difficulty=1;			};			{				id="valuate-baseline";				type=K_TEXT;				text=function() 					return _ENCH('GuiValuateBaseline')				end;				helptext=function() 					return _ENCH('HelpGuessBaseline')				end;				callback=function(state)					genVarSet('valuate-baseline', state.checked);				end;				feedback=function(state)					if (state.checked) then						return (string.format(_ENCH('FrmtActEnable'), _ENCH('ShowGuessBaseline')));					else						return (string.format(_ENCH('FrmtActDisable'), _ENCH('ShowGuessBaseline')));					end				end;				check=true;				default={checked=Enchantrix.Config.GetFilterDefaults('valuate-baseline')};				disabled={checked=false};				dependencies={valuate={checked=true;}, all={checked=true;}};				difficulty=2;			};			{				id="EnchantrixOtherHeader";				type=K_HEADER;				text=function() 					return _ENCH('GuiOtherHeader')				end;				helptext=function() 					return _ENCH('GuiOtherHelp')				end;				difficulty=1;			};			{				id="EnchantrixClearAll";				type=K_BUTTON;				setup={					buttonText = function() 						return _ENCH('GuiClearallButton')					end;				};				text=function() 					return _ENCH('GuiClearall')				end;				helptext=function() 					return _ENCH('GuiClearallHelp')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -