//===== rAthena Script ======================================= 


// ȡǰ ID
//============================================================ 
// - param: ޲
// - return:  ID
function	script	F_PLAYER_ID	{
	set @player_id, getcharid(0);
	return @player_id;
}

// ȡǰ
//============================================================ 
// - param: ޲
// - return: 
function	script	F_PLAYER_NAME	{
	set @player_name$, strcharinfo(0);
	return @player_name$;
}

// ȡǰȨ
//============================================================ 
// - param: ޲
// - return: Ȩֵgroup_id
function	script	F_PLAYER_GMLV	{
	set @player_gmlv, getgmlevel();
	return @player_gmlv;
}

// ȡǰҵĴ
//============================================================ 
// - param: ޲
// - return: zeny
function	script	F_ZENY	{
	return Zeny;
}

// 鿴ɫ
//============================================================ 
// - param: ޲
// - return: ޲
function	script	F_COMMANDS	{
	atcommand("@commands");
	return;
}

// ȫһ
//============================================================ 
// - param: ޲
// - return: ޲
function	script	F_IDENTIFY_ALL	{
	identifyall(true);
	return;
}

// 鿴
//============================================================ 
// - param: ޲
// - return: ޲
function	script	F_ONLINE	{
	atcommand("@who");
	return;
}

// ȡǰڵĵͼ
//============================================================ 
// - param: ޲
// - return: ͼ
function	script	F_MAP_NAME	{
	set @map_name$, strcharinfo(3);
	return @map_name$;
}

// ȡǰڵĵͼ
//============================================================ 
// - param: ޲
// - return: λ
function	script	F_COORDINATE	{
	getmapxy(@map_name$, @x, @y);
	return @x + ", " + @y;
}

// ȡǰڵĵͼƺ
//============================================================ 
// - param: ޲
// - return: 
function	script	F_POSTION	{
	getmapxy(@map_name$, @x, @y);
	return @map_name$ + " (" + @x + ", " + @y + ")";
}

// ѵǰڵĵͼӡ̨
//============================================================ 
// - param: ޲
// - return: 
function	script	F_POSTION_TO_CONSOLE	{
	set .@player_name$, callfunc("F_PLAYER_NAME");
	atcommand("@where " + .@player_name$);
	return;
}

// 鿴
//============================================================ 
// - param: ޲
// - return: ޲
function	script	F_SERVER_RATES	{
	atcommand("@rates");
	return;
}

// /Զʰȡ
//============================================================ 
// - param: ޲
// - return: ޲
function	script	F_AUTOLOOT	{
	.@percent = getarg(0, 100);
	atcommand("@autoloot " + .@percent);
	return;
}

// ROֲ
//============================================================ 
// - param: ޲
// - return: ޲
function	script	F_MANUAL	{
	mes "[RO ֲ]";
	mes "RO ֲ";
	mes "ֲ᱾κ BUFF Ч";
	next;
	mes "[RO ֲ]";
	menu "Զʰȡ[/]",_TO_AUTOLOOT,
		 "ȫ",_TO_IDENTIFY_ALL,
	     "鿴Ȩָ",_TO_CHAR_COMMANDS,
		 "鿴",_TO_GAME_COMMANDS,
		 "鿴Ϣ",_TO_SERVER_RATES,
		 "鿴",_TO_ONLINE,
		 "鿴ɫϢ",_TO_CHARINFO,
		 "鿴ǰ",_TO_WHERE,
		 "ɱ",_TO_KILL_SELF,
		 "û.",_TO_CLOSE;

	_TO_AUTOLOOT:
		menu "[]Զʰȡ100% µʣ",_TO_AUTOLOOT_100,
			 "[]Զʰȡ50% µʣ",_TO_AUTOLOOT_50,
			 "[]Զʰȡ10% µʣ",_TO_AUTOLOOT_10,
			 "[]Զʰȡ1% µʣ",_TO_AUTOLOOT_1,
			 "[]Զʰȡ",_TO_AUTOLOOT_0;
		callsub(_TO_CLOSE);
		return;

	_TO_AUTOLOOT_100:
		callfunc("F_AUTOLOOT", 100);
		callsub(_TO_CLOSE);
		return;

	_TO_AUTOLOOT_50:
		callfunc("F_AUTOLOOT", 50);
		callsub(_TO_CLOSE);
		return;

	_TO_AUTOLOOT_10:
		callfunc("F_AUTOLOOT", 10);
		callsub(_TO_CLOSE);
		return;

	_TO_AUTOLOOT_1:
		callfunc("F_AUTOLOOT", 1);
		callsub(_TO_CLOSE);
		return;

	_TO_AUTOLOOT_0:
		callfunc("F_AUTOLOOT", 0);
		callsub(_TO_CLOSE);
		return;

	_TO_IDENTIFY_ALL:
		mes "ȫ";
		callfunc("F_IDENTIFY_ALL");
		callsub(_TO_CLOSE);
		return;

	_TO_CHAR_COMMANDS:
		callfunc("F_COMMANDS");
		callsub(_TO_CLOSE);
		return;

	_TO_GAME_COMMANDS:
		mes "[Ѷ] /h";
		mes "[] /noctrl";
		mes "[Ч] /effect";
		mes "[] /organize ";
		mes "[] /guild ";
		mes "[Զӵ] /str+ 2 /vit+ 5 ...";
		mes "[վ] /sit";
		mes "[] /chat";
		callsub(_TO_CLOSE);
		return;

	_TO_SERVER_RATES:
		mes "ѴӡѶ...";
		callfunc("F_SERVER_RATES");
		callsub(_TO_CLOSE);
		return;

	_TO_CHARINFO:
		set @player_id$, callfunc("F_PLAYER_ID");
		set @player_name$, callfunc("F_PLAYER_NAME");
		set @player_lv$, callfunc("F_PLAYER_GMLV");
		mes "[ɫID] " + @player_id$;
		mes "[ɫ] " + @player_name$;
		mes "[Ȩ޵ȼ] " + @player_lv$;
		callsub(_TO_CLOSE);
		return;

	_TO_WHERE:
		getmapxy(@map_name$, @x, @y);
		mes "[ڵͼ] " + @map_name$;
		mes "[λ] " + @x + "," + @y;
		callsub(_TO_CLOSE);
		return;

	_TO_ONLINE:
		mes "ѴӡѶ...";
		callfunc("F_ONLINE");
		callsub(_TO_CLOSE);
		return;

	_TO_KILL_SELF:
		//	atcommand "@kill";		// ûЧ
		set @player_name$,strcharinfo(0);
		atcommand("@nuke " + @player_name$);
		mes "Ѿ";
		callsub(_TO_CLOSE);
		return;

	_TO_CLOSE:
		close;
		return;
}

