欢迎来到虫虫下载站 | 资源下载 资源专辑 关于我们
虫虫下载站

glimapple.lua

时间太紧了
LUA
字号:
Earth = {};
MFC = {};
MFC.IO = 
{
	-- Default chat frame set to ChatFrame1
	DEFAULT_PRINT_FRAME = DEFAULT_CHAT_FRAME;

	-- Default error frame set to ChatFrame1
	DEFAULT_ERROR_FRAME = DEFAULT_CHAT_FRAME;

	-- Default banner frame
	DEFAULT_BANNER_FRAME = UIErrorsFrame;

	-- Default color scheme
	DEFAULT_ERROR_COLOR = RED_FONT_COLOR;
	DEFAULT_PRINT_COLOR = NORMAL_FONT_COLOR;
	
	-- Default color Title
	DEFAULT_TITLE_COLOR = ITEM_QUALITY6_TOOLTIP_COLOR;

	--[[ Standard Prints ]]--
	-- 设置TITLE内容
	-- SetTitle ( Title ,... )
	-- a message On title
	-- Arguments
	-- 	() arg
	-- 	arg - the values to be set to be a title
	--
	-- Returns
	-- 	(nil)
	--
	settitle = function(UserTitle,...) 
		MFC.IO.SetTitleC(UserTitle,nil,unpack(arg));
	end;
	
	--
	-- SetTitleC (Title UserTitle, ColorTable[r,g,b] color, ... )
	--
	-- 	set a title 
	--
	-- Arguments
	-- 	UserTitle - the Title
	-- 	color - a table with .r .g and .b values
	-- 	arg - the message objects
	--
	SetTitleC = function (UserTitle, color, ... ) 
		if ( UserTitle == nil ) then 
			frame = MFC.IO.print("Error of Set TitleC none have title");
		end
		if ( color == nil ) then 
			color = MFC.IO.DEFAULT_TITLE_COLOR;
		end
		UserTitle:SetText(arg[1]);
		UserTitle:SetTextColor(color.r, color.g, color.b);	
		--frame:AddMessage(arg[1],color.r, color.g, color.b);
	end;
	
	--
	-- print ( ... )
	--
	-- Arguments
	-- 	() arg
	-- 	arg - the values to be printed
	--
	-- Returns
	-- 	(nil)
	--
	print = function(...) 
		MFC.IO.printf(nil, unpack(arg));
	end;
	
	--
	-- printf (MessageFrame frame, ...)
	--	
	--	prints a message in a message frame
	--
	-- Arguments:
	-- 	(MessageFrame frame) arg
	--
	-- 	frame - the object with AddMessage(self, string)
	-- 	arg - the string to be composed
	--
	-- Returns
	-- 	(nil)
	--
	
	printf = function (frame, ... )
		MFC.IO.printfc(frame, nil, unpack(arg));
	end;
	
		
	--
	-- printfc (MessageFrame frame, ColorTable[r,g,b] color, ... )
	--
	-- 	prints a message in a frame with a specified color
	--
	-- Arguments
	-- 	frame - the frame
	-- 	color - a table with .r .g and .b values
	-- 	arg - the message objects
	--
	printfc = function (frame, color, ... ) 
		if ( frame == nil ) then 
			frame = MFC.IO.DEFAULT_PRINT_FRAME;
		end
		if ( color == nil ) then 
			color = MFC.IO.DEFAULT_PRINT_COLOR;
		end
		frame:AddMessage(arg[1],color.r, color.g, color.b);
	end;
	-- 调试信息时调用
	-- dprint (string debugkey, ...)
	--
	-- 	prints a message when getglobal(debugkey) is true
	--
	-- Arguments:
	-- 	(string debugkey) arg
	--
	dprint = function ( debugKey, ... )
		MFC.IO.dprintf(debugKey, MFC.IO.DEFAULT_CHAT_FRAME, unpack(arg));
	end;
	
	-- 用户指定的FRAME来输出调试信息
	-- dprintf (string debugkey, MessageFrame frame, ...)
	--
	-- 	prints a message when getglobal(debugkey) is true
	-- 	also decodes | and characters
	--
	-- Arguments:
	-- 	(string debugkey, MessageFrame frame) arg
	-- 	debugkey - string debug key
	-- 	frame - debug target frame
	--
	dprintf = function ( debugKey, frame, ... )
		MFC.IO.dprintfc(debugKey, frame, nil, unpack(arg));
	end;	
	

	-- 指定的颜色输出调试信息
	--
	-- dprintfc (string debugkey, MessageFrame frame, Table[r,g,b] color, ...)
	--
	-- 	prints a message when getglobal(debugkey) is true
	-- 	also decodes | and characters, using the specified color
	-- 	
	-- Arguments:
	-- 	(string debugkey, MessageFrame frame) arg
	-- 	debugkey - string debug key
	-- 	frame - debug target frame
	-- 	color - table of colors
	--
	dprintfc = function ( debugKey, frame, color, ... )
		if ( type(debugKey) ~= string ) then
			if ( type(debugKey) == nil ) then 
				--debugKey = MFC.UI.debugKey;
				MFC.IO.print("Invalid debug key must have a DebugKey");
			else
				--MFC.IO.error("Invalid debug key. Type: ", type(debugKey));
			end
		end
		msg = arg[1];
		msg = string.gsub(msg,"|","<pipe>");
		--msg = string.gsub(msg,"([^%w%s%a%p])",Sea.string.byte);
		--检测调试信息
		if ( getglobal(debugKey) == true ) then 
			MFC.IO.printfc(frame, color, unpack(arg));
		end
	end;
	--
	SendPartyMessage = function (Message,... )
		SendChatMessage(Message, "PARTY", GetDefaultLanguage());
	end;

	GetPartyNumber = function()
		return QuestLink_GetChannelNumber("小队");
	end;
};

⌨️ 快捷键说明

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