
public menu_handler_skills(id,key)
{
	if((g_player_skillpoints[id] == 0) && (key < 8))
	{
		client_print(id,print_chat,"%L",id,"L_ENOUGH_SKILLPOINTS",PLUGIN_TAG);
		return PLUGIN_HANDLED;
	}
	
	new skill_name[64],skill_selected;

	if(g_player_class[id] == 1)
	{
		switch(key)
		{
			case 0:
			{
				skill_selected=skill_select_check(id,g_skill[id][P_SKILL_1],BLEACH_SKILL_NORMAL_REQ_LEVEL,BLEACH_SKILL_NORMAL_MAXLEVEL);
				if(skill_selected)
				{
					skill_name="white lightning";
					g_skill[id][P_SKILL_1]+=1;
				}
			}
			case 1:
			{
				skill_selected=skill_select_check(id,g_skill[id][P_SKILL_2],0,BLEACH_SKILL_NOVICE_MAXLEVEL);
				if(skill_selected)
				{
					skill_name="shine brightly";
					g_skill[id][P_SKILL_2]+=1;
				}
			}
			case 2:
			{
				skill_selected=skill_select_check(id,g_skill[id][P_SKILL_3],BLEACH_SKILL_GREATER_REQ_LEVEL,BLEACH_SKILL_GREATER_MAXLEVEL);
				if(skill_selected)
				{
					skill_name="ice ring";
					g_skill[id][P_SKILL_3]+=1;
				}
			}
			case 3:
			{
				skill_selected=skill_select_check(id,g_skill[id][P_SKILL_4],0,BLEACH_SKILL_NOVICE_MAXLEVEL);
				if(skill_selected)
				{
					skill_name="restrain";
					g_skill[id][P_SKILL_4]+=1;
				}
			}
			case 4:
			{
				skill_selected=skill_select_check(id,g_skill[id][P_SKILL_5],BLEACH_SKILL_MASTER_REQ_LEVEL,BLEACH_SKILL_MASTER_MAXLEVEL);
				if(skill_selected)
				{
					skill_name="cherry blossoms";
					g_skill[id][P_SKILL_5]+=1;
				}
			}
			case 5:
			{
				skill_selected=skill_select_check(id,g_skill[id][P_SKILL_6],BLEACH_SKILL_GREATER_REQ_LEVEL,BLEACH_SKILL_GREATER_MAXLEVEL);
				if(skill_selected)
				{
					skill_name="death sting";
					g_skill[id][P_SKILL_6]+=1;
				}
			}
			case 8:
			{
				menu_print_main(id);
			}
			default:
			{
				return PLUGIN_HANDLED;
			}
		}
	}
	else if(g_player_class[id] == 2)
	{
		switch(key)
		{
			case 0:
			{
				skill_selected=skill_select_check(id,g_skill[id][P_SKILL_1],0,BLEACH_SKILL_NOVICE_MAXLEVEL);
				if(skill_selected)
				{	
					skill_name="devour soul";
					g_skill[id][P_SKILL_1]+=1;
				}
			}
			case 1:
			{
				skill_selected=skill_select_check(id,g_skill[id][P_SKILL_2],0,BLEACH_SKILL_NOVICE_MAXLEVEL);
				if(skill_selected)
				{
					skill_name="hollow bullet";
					g_skill[id][P_SKILL_2]+=1;
				}
			}
			case 2:
			{
				skill_selected=skill_select_check(id,g_skill[id][P_SKILL_3],BLEACH_SKILL_NORMAL_REQ_LEVEL,BLEACH_SKILL_NORMAL_MAXLEVEL);
				if(skill_selected)
				{
					skill_name="negation";
					g_skill[id][P_SKILL_3]+=1;
				}
			}
			case 3:
			{
				skill_selected=skill_select_check(id,g_skill[id][P_SKILL_4],BLEACH_SKILL_MASTER_REQ_LEVEL,BLEACH_SKILL_MASTER_MAXLEVEL);
				if(skill_selected)
				{
					skill_name="cero";
					g_skill[id][P_SKILL_4]+=1;
				}
			}
			case 4:
			{
				skill_selected=skill_select_check(id,g_skill[id][P_SKILL_5],BLEACH_SKILL_GREATER_REQ_LEVEL,BLEACH_SKILL_GREATER_MAXLEVEL);
				if(skill_selected)
				{
					skill_name="steel skin";
					g_skill[id][P_SKILL_5]+=1;
				}
			}
			case 5:
			{
				skill_selected=skill_select_check(id,g_skill[id][P_SKILL_6],BLEACH_SKILL_GREATER_REQ_LEVEL,BLEACH_SKILL_GREATER_MAXLEVEL);
				if(skill_selected)
				{
					skill_name="volcanic flame";
					g_skill[id][P_SKILL_6]+=1;
				}
			}
			case 8:
			{
				menu_print_main(id);
			}
			default:
			{
				return PLUGIN_HANDLED;
			}
		}
	}
	
	if(skill_selected)
	{
		client_print(id,print_chat,"%L",id,"L_SKILL_SELECTED",PLUGIN_TAG,skill_name);
		g_player_skillpoints[id] -= 1;
		menu_print_skills(id);
	}
	else if((!skill_selected) && (key < 8))
	{
		menu_print_skills(id);
	}
	
	return PLUGIN_HANDLED;
}
