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

📄 alphamap.lua

📁 时间太紧了
💻 LUA
📖 第 1 页 / 共 4 页
字号:
					check=true;
					default={checked=true};
					disabled={checked=false};
				},
				{
					id="AlphaMapLock";
					type=K_TEXT;
					text=ALPHAMAP_LOCK;
					helptext=ALPHAMAP_LOCK_INFO;
					difficulty = 1;
					callback=function(state) AlphaMapConfig.lock = state.checked end;
					feedback=function(state) if (state.checked) then return ALPHAMAP_UILOCKED; else return ALPHAMAP_UIUNLOCKED; end end;
					check=true;
					default={checked=false};
					disabled={checked=false};
				},
				{
					id="AlphaMapAlpha";
					type=K_SLIDER;
					text=ALPHAMAP_ALPHA;
					helptext=ALPHAMAP_ALPHA_INFO;
					difficulty = 1;
					check=true;
					setup = {
						sliderMin = 0;
						sliderMax = 1;
						sliderStep = .05;
						sliderText = ALPHAMAP_ALPHA_SUB;
						sliderDisplayFunc = function(value) return (math.floor(value*100)).."%"; end;
					};
					callback=function(state) if (state.checked) then AlphaMap_Alpha_Set(1,state.slider); else AlphaMap_Alpha_Set(0,state.slider); end end;
					feedback=function(state) if (state.checked) then return nil; else return nil; end end;
					default={checked=false;slider=0.5;};
					disabled={checked=false;slider=0;};
				},
				{
					id="AlphaMapMoveSlider";
					type=K_TEXT;
					text=ALPHAMAP_MOVESLIDER;
					helptext=ALPHAMAP_MOVESLIDER_INFO;
					difficulty = 1;
					callback=function(state) AlphaMapConfig.sliderlock = state.checked end;
					feedback=function(state) return nil; end;
					check=true;
					default={checked=true};
					disabled={checked=true};
				},
				{
					id="AlphaMapScale";
					type=K_SLIDER;
					text=ALPHAMAP_SCALE;
					helptext=ALPHAMAP_SCALE_INFO;
					difficulty = 1;
					setup = {
						sliderMin = 0;
						sliderMax = 1;
						sliderStep = .05;
						sliderText = "";
						sliderDisplayFunc = function(value) return (math.floor(value*100)).."%"; end;
					};
					callback=function(state) AlphaMap_SCale_Set(nil,state.slider); end;
					feedback=function(state) return nil; end;
					default={slider=0.8;};
					disabled={slider=0.8;};
				},
				{
					id="AlphaMapCombat";
					type=K_TEXT;
					text=ALPHAMAP_COMBAT;
					helptext=ALPHAMAP_COMBAT_INFO;
					difficulty = 1;
					check=true;
					callback=function(state) AlphaMapConfig.combat = state.checked end;
					feedback=function(state) return nil; end;
					default={checked=true};
					disabled={checked=true};
				},
				{
					id="AlphaMapRaid";
					type=K_TEXT;
					text=ALPHAMAP_RAID;
					helptext=ALPHAMAP_RAID_INFO;
					difficulty = 1;
					check=true;
					callback=function(state) AlphaMapConfig.raid = state.checked end;
					feedback=function(state) return nil; end;
					default={checked=true};
					disabled={checked=true};
				},
				{
					id="AlphaMapPTips";
					type=K_TEXT;
					text=ALPHAMAP_PTIPS;
					helptext=ALPHAMAP_PTIPS_INFO;
					difficulty = 1;
					check=true;
					callback=function(state) AlphaMapConfig.ptips = state.checked end;
					feedback=function(state) return nil; end;
					default={checked=true};
					disabled={checked=true};
				},
			}
		}
		if (MapNotes_Options) then
			local option={
				id="AlphaMapMapNoteHeader";
				type=K_HEADER;
				text=ALPHAMAP_MAPNOTE_HEADER;
				helptext=ALPHAMAP_MAPNOTE_HEADER_INFO;
				difficulty = 1;
			};
			table.insert(optionSet.options,option);
			local option={
				id="AlphaMapMapNotes";
				type=K_TEXT;
				text=ALPHAMAP_MAPNOTES;
				helptext=ALPHAMAP_MAPNOTES_INFO;
				difficulty = 1;
				check=true;
				callback=function(state) AlphaMapConfig.mapnotes = state.checked end;
				feedback=function(state) return nil; end;
				default={checked=false};
				disabled={checked=false};
			};
			table.insert(optionSet.options,option);
			local option={
				id="AlphaMapMNTips";
				type=K_TEXT;
				text=ALPHAMAP_MNTIPS;
				helptext=ALPHAMAP_MNTIPS_INFO;
				difficulty = 1;
				check=true;
				callback=function(state) AlphaMapConfig.mntips = state.checked end;
				feedback=function(state) return nil; end;
				default={checked=false};
				disabled={checked=false};
			};
			table.insert(optionSet.options,option);
		end
		if (MapNotesGathering_Data) then
			local option={
				id="AlphaMapGatheringHeader";
				type=K_HEADER;
				text=ALPHAMAP_GATHERING_HEADER;
				helptext=ALPHAMAP_GATHERING_HEADER_INFO;
				difficulty = 1;
			};
			table.insert(optionSet.options,option);
			local option={
				id="AlphaMapGathering";
				type=K_TEXT;
				text=ALPHAMAP_GATHERING;
				helptext=ALPHAMAP_GATHERING_INFO;
				difficulty = 1;
				check=true;
				callback=function(state) AlphaMapConfig.gathering = state.checked end;
				feedback=function(state) return nil; end;
				default={checked=false};
				disabled={checked=false};
			};
			table.insert(optionSet.options,option);
			local option={
				id="AlphaMapMNGTips";
				type=K_TEXT;
				text=ALPHAMAP_MNGTIPS;
				helptext=ALPHAMAP_MNGTIPS_INFO;
				difficulty = 1;
				check=true;
				callback=function(state) AlphaMapConfig.mngtips = state.checked end;
				feedback=function(state) return nil; end;
				default={checked=false};
				disabled={checked=false};
			};
			table.insert(optionSet.options,option);
		end
		if (GatherConfig) then
			local option={
				id="AlphaMapGathererHeader";
				type=K_HEADER;
				text=ALPHAMAP_GATHERER_HEADER;
				helptext=ALPHAMAP_GATHERER_HEADER_INFO;
				difficulty = 1;
			};
			table.insert(optionSet.options,option);
			local option={
				id="AlphaMapGatherer";
				type=K_TEXT;
				text=ALPHAMAP_GATHERER;
				helptext=ALPHAMAP_GATHERER_INFO;
				difficulty = 1;
				check=true;
				callback=function(state) AlphaMapConfig.gatherer = state.checked end;
				feedback=function(state) return nil; end;
				default={checked=false};
				disabled={checked=false};
			};
			table.insert(optionSet.options,option);
			local option={
				id="AlphaMapGTips";
				type=K_TEXT;
				text=ALPHAMAP_GTIPS;
				helptext=ALPHAMAP_GTIPS_INFO;
				difficulty = 1;
				check=true;
				callback=function(state) AlphaMapConfig.gtips = state.checked end;
				feedback=function(state) return nil; end;
				default={checked=false};
				disabled={checked=false};
			};
			table.insert(optionSet.options,option);
		end
		Khaos.registerOptionSet( "maps", optionSet );
	elseif ( Cosmos_RegisterConfiguration ) then
		Cosmos_RegisterConfiguration(
			"COS_ALPHAMAP",
			"SECTION",
			ALPHAMAP_CONFIG_HEADER,
			ALPHAMAP_CONFIG_HEADER_INFO
		);
		Cosmos_RegisterConfiguration(
			"COS_ALPHAMAP_HEADER",
			"SEPARATOR",
			ALPHAMAP_CONFIG_HEADER,
			ALPHAMAP_CONFIG_HEADER_INFO
		);
		local defaultstate=0;
		if (AlphaMapConfig.enabled) then
			defaultstate=1;
		end
		Cosmos_RegisterConfiguration(
			"COS_ALPHAMAP_ENABLED",
			"CHECKBOX",
			ALPHAMAP_ENABLED,
			ALPHAMAP_ENABLED_INFO,
			ToggleAlphaMap,
			defaultstate
		);
		Cosmos_RegisterConfiguration(
			"COS_ALPHAMAP_LOCK",
			"CHECKBOX",
			ALPHAMAP_LOCK,
			ALPHAMAP_LOCK_INFO,
			ToggleAlphaMapLock,
			AlphaMapConfig.lock
		);
		local slider = 0;
		if (AlphaMapConfig.slider) then
			slider = 1;
		end
		Cosmos_RegisterConfiguration(
			"COS_ALPHAMAP_ALPHA",
			"BOTH",
			ALPHAMAP_ALPHA,
			ALPHAMAP_ALPHA_INFO,
			AlphaMap_Alpha_Set,
			slider,
			AlphaMapConfig.alpha,
			0.0,
			1.0,
			ALPHAMAP_ALPHA_SUB,
			0.05,
			1,
			"%",
			100
		);
		Cosmos_RegisterConfiguration(
			"COS_ALPHAMAP_SCALE",
			"SLIDER",
			ALPHAMAP_SCALE,
			ALPHAMAP_SCALE_INFO,
			AlphaMap_SCale_Set,
			0,
			AlphaMapConfig.scale,
			0.0,
			1.0,
			"",
			0.05,
			1,
			"%",
			100
		);
		Cosmos_RegisterConfiguration(
			"COS_ALPHAMAP_MOVESLIDER",
			"CHECKBOX",
			ALPHAMAP_MOVESLIDER,
			ALPHAMAP_MOVESLIDER_INFO,
			ToggleAlphaMapMoveslider,
			AlphaMapConfig.sliderlock
		);
		Cosmos_RegisterConfiguration(
			"COS_ALPHAMAP_COMBAT",
			"CHECKBOX",
			ALPHAMAP_COMBAT,
			ALPHAMAP_COMBAT_INFO,
			ToggleAlphaMapCombat,
			AlphaMapConfig.combat
		);
		Cosmos_RegisterConfiguration(
			"COS_ALPHAMAP_RAID",
			"CHECKBOX",
			ALPHAMAP_RAID,
			ALPHAMAP_RAID_INFO,
			ToggleAlphaMapRaid,
			AlphaMapConfig.raid
		);
		Cosmos_RegisterConfiguration(
			"COS_ALPHAMAP_PTIPS",
			"CHECKBOX",
			ALPHAMAP_PTIPS,
			ALPHAMAP_PTIPS_INFO,
			ToggleAlphaMapPtips,
			AlphaMapConfig.ptips
		);
--		Cosmos_RegisterConfiguration(
--			"COS_ALPHAMAP_WMCLOSE",
--			"CHECKBOX",
--			ALPHAMAP_WMCLOSE,
--			ALPHAMAP_WMCLOSE_INFO,
--			ToggleAlphaMapWmclose,
--			AlphaMapConfig.wmclose
--		);
		if (MapNotes_Options) then
			Cosmos_RegisterConfiguration(
				"COS_ALPHAMAP_MAPNOTE_HEADER",
				"SEPARATOR",
				ALPHAMAP_MAPNOTE_HEADER,
				ALPHAMAP_MAPNOTE_HEADER_INFO
			);
			Cosmos_RegisterConfiguration(
				"COS_ALPHAMAP_MAPNOTES",
				"CHECKBOX",
				ALPHAMAP_MAPNOTES,
				ALPHAMAP_MAPNOTES_INFO,
				ToggleAlphaMapMapnotes,
				AlphaMapConfig.mapnotes
			);
			Cosmos_RegisterConfiguration(
				"COS_ALPHAMAP_MNTIPS",
				"CHECKBOX",
				ALPHAMAP_MNTIPS,
				ALPHAMAP_MNTIPS_INFO,
				ToggleAlphaMapMntips,
				AlphaMapConfig.mntips
			);
		end
		if (MapNotesGathering_Data) then
			Cosmos_RegisterConfiguration(
				"COS_ALPHAMAP_GATHERING_HEADER",
				"SEPARATOR",
				ALPHAMAP_GATHERING_HEADER,
				ALPHAMAP_GATHERING_HEADER_INFO
			);
			Cosmos_RegisterConfiguration(
				"COS_ALPHAMAP_GATHERING",
				"CHECKBOX",
				ALPHAMAP_GATHERING,
				ALPHAMAP_GATHERING_INFO,
				ToggleAlphaMapGathering,
				AlphaMapConfig.gathering
			);
			Cosmos_RegisterConfiguration(
				"COS_ALPHAMAP_MNGTIPS",
				"CHECKBOX",
				ALPHAMAP_MNGTIPS,
				ALPHAMAP_MNGTIPS_INFO,
				ToggleAlphaMapMngtips,
				AlphaMapConfig.mngtips
			);
		end
		if (GatherConfig) then
			Cosmos_RegisterConfiguration(
				"COS_ALPHAMAP_GATHERER_HEADER",
				"SEPARATOR",
				ALPHAMAP_GATHERER_HEADER,
				ALPHAMAP_GATHERER_HEADER_INFO
			);
			Cosmos_RegisterConfiguration(
				"COS_ALPHAMAP_GATHERER",
				"CHECKBOX",
				ALPHAMAP_GATHERER,
				ALPHAMAP_GATHERER_INFO,
				ToggleAlphaMapGatherer,
				AlphaMapConfig.gatherer
			);
			Cosmos_RegisterConfiguration(
				"COS_ALPHAMAP_GTIPS",
				"CHECKBOX",
				ALPHAMAP_GTIPS,
				ALPHAMAP_GTIPS_INFO,
				ToggleAlphaMapGtips,
				AlphaMapConfig.gtips
			);
		end
	end
end

-- Called whenever AlphaMap is sent an event notification
function AlphaMapFrame_OnEvent()
	if ( event == "WORLD_MAP_UPDATE" ) then
		AlphaMapFrame_Update();
	
	elseif( event == "ZONE_CHANGED_NEW_AREA" ) then
		SetMapToCurrentZone();
	
	elseif ( event == "PLAYER_REGEN_DISABLED" and AlphaMapConfig.combat == true ) then
		this:Hide();
	
	elseif ( event == "PLAYER_REGEN_ENABLED" and AlphaMapConfig.enabled == true ) then
		this:Show();
	
	elseif( event == "VARIABLES_LOADED") then
	

⌨️ 快捷键说明

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