 
 /////////////////////
 //  Handles Menus  //
 /////////////////////
 public poke_menu_handler(id, menu, item)
 {
	new cmd[9], iName[64]
	new access, callback, key
	menu_item_getinfo(menu, item, access, cmd,8, iName,63, callback)

	key = str_to_num(cmd)

	if( item == MENU_EXIT || key == POKE_MENU_EXIT)
	{
		debugMessage(id,2,"exited a menu=%d, item=%d, Action=%d",menu,item,Action[id])

		menu_destroy(menu)

		if(Action[id] == AC_PC){
			new parm[2];
			parm[0] = id;
			parm[1] = FIND_POKECENTER;
			set_task(0.1,"PokeMenu", 0, parm, 2);
			return PLUGIN_HANDLED;
		}

		g_isSkilled[id] = -1;
		SetAction( id );
		return PLUGIN_HANDLED;
	}

	debugMessage(id,2,"used a menu=%d, item=%s(%s), Action=%d",menu,iName,cmd,Action[id])

	//switch for different menus
	switch(Action[id])
	{
		case AC_START:{
			if(!PlayersPoke[id][0] && !PlayersPoke[id][MAX_ACTIVE_POKES]){
				if(Safari()){
					set_task(0.1,"SafariMenu",id)
					return PLUGIN_CONTINUE
				}
				Pokemon[id] = key;
				PlayersPoke[id][0] = Pokemon[id];
				PlayersXP[id][0] = 1;
				set_bind(id);
				SetSpeed(id);
				ShowPokeInfo(id, Pokemon[id]);
			}
		}

		case AC_MAIN:{
			switch(key)
			{
				case 0: set_task(0.1,"ShowShopMenu",id)
				case 1: start_heal(id)
				case 2: set_task(0.1,"PCMenu",id)
				case 3: set_task(0.1,"HelpMenu",id)
			}
		}

		case AC_MART:{
			switch(key)
			{
				//opening/closing categories
				case MART_CAT_OFFSET..MART_CAT_OFFSET+MAX_ITYPE+3:{
					new num=key-MART_CAT_OFFSET
					if(Open[id][num]){
						Open[id][num] = false
						set_task(0.1,"ShowShopMenu",id)
					}
					else{
						Open[id][num] = true
						new parm[2];
						parm[0] = id;
						parm[1] = num;
						set_task(0.1, "ShowShopCat", 0, parm, 2);
					}
				}
				//selling items
				case MART_SELL_OFFSET..MART_SELL_OFFSET+MAX_ITEMS:{
					SellItem(id, key-MART_SELL_OFFSET)
					menu_destroy(menu)
					set_task(0.1,"ShowShopMenu",id)
					return PLUGIN_CONTINUE
				}
				//buying items/pokemon
				default:{
					if(BuyCheck(id)){
						if(key >= MART_POKE_OFFSET){
							new parm[2]
							parm[0] = id
							parm[1] = key-MART_POKE_OFFSET
							set_task(0.1, "buy_poke",0, parm, 2)
						}
						else{
							buy_item(id, key)
							set_task(0.1,"ShowShopMenu",id)
						}
					}
				}
			}
		}

		case AC_GO:{
			if(PlayersPoke[id][key] && key<MAX_ACTIVE_POKES){
				SwitchPoke(id, PlayersPoke[id][key], false)
			}
		}

		case AC_RELEASE:{
			ReleasePoke(id, PlayersPoke[id][key])
		}

		case AC_PC_GIVE:{
			switch(AvailableSlot(id,PlayersPoke[id][key],CHECK_PC))
			{
				case AS_OK:{
					new tempslot = Slot(id,0,CHECK_PC)
					PlayersPoke[id][tempslot] = PlayersPoke[id][key]
					PlayersXP[id][tempslot] = PlayersXP[id][key]

					PlayersPoke[id][key] = 0
					PlayersXP[id][key] = 0

					poke_print(id, print_chat, "Wyslales %s do Emp PC.", PokeToName(PlayersPoke[id][tempslot]));

					SaveXP(id)
					menu_destroy(menu)
					set_task(0.1,"ActionMenu",id)
					return PLUGIN_HANDLED
				}
				case AS_NOGOOD:{
					poke_print(id, print_chat, "Wysylanie nie powiodlo sie.")
				}
				case AS_NOROOM:{
					poke_print(id, print_chat, "Masz za duzo pokemonow w Emp PC.")
				}
				case AS_DUPLICATE:{
					poke_print(id, print_chat, "Nie mozesz miec 2 takich samych pokemonow w Emp PC.")
				}
			}
		}
		case AC_PC_TAKE:{
			switch(AvailableSlot(id,PlayersPoke[id][key]))
			{
				case AS_OK:{
					new tempslot = Slot(id)
					PlayersPoke[id][tempslot] = PlayersPoke[id][key]
					PlayersXP[id][tempslot] = PlayersXP[id][key]

					PlayersPoke[id][key] = 0
					PlayersXP[id][key] = 0

					poke_print(id, print_chat, "Zabrales %s z Emp PC.", PokeToName(PlayersPoke[id][tempslot]));

					SaveXP(id)
					menu_destroy(menu)
					set_task(0.1,"ActionMenu",id)
					return PLUGIN_HANDLED
				}
				case AS_NOGOOD:{
					poke_print(id, print_chat, "Zabieranie nie powiodlo sie.")
				}
				case AS_NOROOM:{
					poke_print(id, print_chat, "Masz za duzo pokemonow w druzynie.")
				}
				case AS_DUPLICATE:{
					poke_print(id, print_chat, "Nie mozesz miec 2 takich samych pokemonow.")
				}
			}
		}

		case AC_GIVE_ITEM:{
			if(PlayersPoke[id][key]){
				if(ItemInfo[PlayerGive[id]] & II_LEVEL )
					LevelUpPokemon(id, key, 1, PlayerGive[id])
				else
					Check_Stone_Evolve(id, PlayersPoke[id][key], PlayerGive[id])
			}
		}

		case AC_PC:{
			if(NearOakCheck(id) || !is_user_alive(id)){
				switch(key)
				{
					case 0:{
						menu_destroy(menu)
						SetActionMenu( id, AC_RELEASE )
						return PLUGIN_HANDLED
					}
					case 2:{
						if( SaveXP(id, 0) )
							poke_print(id,print_chat, "Twoje doswiadczenie zostalo zapisane.")
					}
					case 4:{
						if(Safari()){
							menu_destroy(menu)
							set_task(0.1,"SafariMenu",id)
							return PLUGIN_CONTINUE
						}
						menu_destroy(menu)
						SetActionMenu( id, AC_PC_GIVE )
						return PLUGIN_HANDLED
					}
					case 5:{
						menu_destroy(menu)
						SetActionMenu( id, AC_PC_TAKE )
						return PLUGIN_HANDLED
					}
					case 6:{
						PlayersSet[id][SET_HUD_Y]--
						set_task(0.1,"PCMenu",id)
					}
					case 7:{
						PlayersSet[id][SET_HUD_Y]++
						set_task(0.1,"PCMenu",id)
					}
					case 8:{
						if(PlayersSet[id][SET_HUD_PARTY])
							PlayersSet[id][SET_HUD_PARTY]=0
						else
							PlayersSet[id][SET_HUD_PARTY]=1
						set_task(0.1,"PCMenu",id)
					}
				}
			}
			else
				poke_print(id, print_chat, "Musisz byc blisko Prof. Oaka by uzyc Emp PC.")
		}

		case AC_ITEM:{
			menu_destroy(menu)
			if( HasPokeItem( id , key ) )
				UseItem( id , key )
			return PLUGIN_HANDLED
		}

		case AC_SAFARI:{
			Pokemon[id] = key
			ShowPokeInfo(id, key)
		}

		case AC_HELP:{
			SetAction( id )
			if( key < 0 ){
				itemhelp(id, (key*-1)-1, true);
			}
			else{
				switch(key)
				{
					case 0: pokehelp(id)
					default:{
						new num[25]
						formatex(num, 25, "%d", key*10-9 )
						pokedex(id, num, true)
					}
				}
			}
			return PLUGIN_HANDLED
		}

		case AC_SKILL:{
			menu_destroy(menu);
			g_isSkilled[id] = key;
			set_task(0.1, "SkillMenu", id);
			return PLUGIN_HANDLED;
		}
	}

	SetAction( id )
	menu_destroy(menu);

	return PLUGIN_HANDLED;
 }
 pokemenu_create( title[], any:... )
 {
	static output[128];
	vformat(output, 127, title, 2);
	if( !g_coloredMenus ) pokemenu_removecolors( output, 127 );
	return menu_create( output, "poke_menu_handler");
 }
 pokemenu_additem(const menu, const num, const text[], any:...)
 {
	static output[128], numstring[9];
	vformat(output, 127, text, 4);
	num_to_str(num, numstring, 8);
	if( !g_coloredMenus ) pokemenu_removecolors( output, 127 );
	return menu_additem(menu, output, numstring, 0);
 }
 pokemenu_fakeexit(const menu)
 {
	pokemenu_additem(menu, POKE_MENU_EXIT, "Exit");
	pokemenu_noexit(menu);
 }
 pokemenu_exit(const menu)
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
 pokemenu_noexit(const menu)
	menu_setprop(menu, MPROP_EXIT, MEXIT_NEVER);
 pokemenu_removecolors( output[], len )
 {
	replace_all(output,len, "\\r",COLON);
	replace_all(output,len, "\\w",EMPTY);
	replace_all(output,len, "\\y",DASH);
 }

 //////////////////
 //  Start Menu  //
 //////////////////
 public StartMenu(id)
 {
	if( !is_user_connected(id) )
		return
	if( is_user_bot(id) ){
		BotPoke(id)
		return
	}

	if( Safari() ){
		SafariMenu(id)
		return
	}

	if( !g_Connected[id] )
		return
	if( PlayersPoke[id][0] || PlayersPoke[id][MAX_ACTIVE_POKES] )
		return

	new startmenu = pokemenu_create( "\\rChoose a Pokemon to start with:" )

	for( new i=0; i<=PokesCreated; i++ ){
		if( PokeInfo[i] & PI_START )
			pokemenu_additem( startmenu, i, "\\y%-20s\\w%s", POKENAMES[i], SkillToName( PokeSkill[i] ) );
	}
	pokemenu_noexit(startmenu);

	menu_display(id, startmenu, 0)
	debugMessage(id,6,"was shown Start menu");

	SetAction( id, AC_START )
 }

 ///////////////////
 //  Action Menu  //
 ///////////////////
 SetActionMenu(id, action)
 {
	Action[id] = action;
	ActionMenu( id );
	SetAction( id, action );
 }
 public ActionMenu(id)
 {
	if(!is_user_connected(id))
		return

	new menu;

	switch(Action[id])
	{
		case AC_PC_GIVE:{
			if(Safari()){
				set_task(0.1,"SafariMenu",id)
				return
			}
			menu = pokemenu_create( "\rSend to Emp`:" )
		}
		case AC_PC_TAKE:{
			if(Safari()){
				set_task(0.1,"SafariMenu",id)
				return
			}
			else if( !PlayersPoke[id][MAX_ACTIVE_POKES] ){
				poke_print(id, print_chat, "You do not have any pokemon in Emp`s PC.");
				return
			}
			menu = pokemenu_create( "\rZabieranie od Empa`:" )
		}
		case AC_RELEASE:{
			if(Safari()){
				set_task(0.1,"SafariMenu",id)
				return
			}
			menu = pokemenu_create( "\rWypuszczanie na wolnosc:" )
		}
		case AC_GO:{
			if(Safari()){
				set_task(0.1,"SafariMenu",id)
				return
			}
			menu = pokemenu_create( "\rAktywny Pokemon:" )
		}
		case AC_GIVE_ITEM:{
			menu = pokemenu_create( "\rDaj %s do:", ItemToName(PlayerGive[id]) )
		}
	}
	
	RefreshPoke(id)

	new i
	if( Action[id] == AC_PC_TAKE ){
		for(i = MAX_ACTIVE_POKES; i<MAX_POKES; i++){
			if( PlayersPoke[id][i] )
				pokemenu_additem( menu, i, "\\w%-20sLevel %d", PokeToName(PlayersPoke[id][i]), PlayersLevel(id, i))
		}
	}
	else {
		for(i = 0; i<MAX_ACTIVE_POKES; i++){
			if(PlayersPoke[id][i])
				pokemenu_additem( menu, i, "\\w%-20sLevel %d", PokeToName(PlayersPoke[id][i]), PlayersLevel(id, i))
		}
	}
	pokemenu_exit(menu);

	menu_display(id, menu, 0)
	debugMessage(id,6,"was shown an Action menu");
 }

 /////////////////
 //  Main Menu  //
 /////////////////
 public PokeMenu(parm[])
 {
	new id = parm[0]
	new oldcenter = parm[1]

	new center;
	//if oldcenter == FIND_POKECENTER, we need to find a new one
	if( oldcenter == FIND_POKECENTER )
		center = NearOakCheck(id);
	else
		center = oldcenter;

	//stop if not valid pokecenter or if theyre not connected
	if( center < 0 || !is_user_connected(id) )
		return

	new playermenu, playerkeys
	get_user_menu(id, playermenu, playerkeys)
	if(playermenu)
		return

	if(!PlayersPoke[id][0] && !PlayersPoke[id][MAX_ACTIVE_POKES])
		StartMenu(id)
	else{
		if( NearOakCheck(id) >= 0 ){

			new oak_props[MAX_OAKPROP]
			if(pev_valid(center))
				pev(center, pev_globalname, oak_props, MAX_OAKPROP-1)
			else	//lets let them be able to do everything while dead
				copy(oak_props, MAX_OAKPROP-1, "a")

			new menu = pokemenu_create( "\\rPoke Center:" )

			if(get_ppcvar_num(pm_pokemart_open) && containi(oak_props,"a")!=-1)
				pokemenu_additem( menu, 0, "\\wPokeMart" );
			if(containi(oak_props,"b")!=-1)
				pokemenu_additem( menu, 1, "\\wLeczenie" );

			pokemenu_additem( menu, 2, "\\wEmp PC" );
			pokemenu_additem( menu, 3, "\\rPokeHelp" );

			pokemenu_fakeexit(menu);

			menu_display(id, menu, 0)
			debugMessage(id,6,"was shown Main menu");

			SetAction( id, AC_MAIN )
		}
	}
 }

 /////////////////
 //  Shop Menu  //
 /////////////////
 public ShowShopMenu(id) ShopMenu(id, OpenCat(id))
 public ShowShopCat(parm[]) ShopMenu(parm[0], parm[1])
 ShopMenu(id, icat=-1)
 {
	if(!is_user_connected(id))
		return

	if( BuyCheck(id) )
	{
		new cost, bool:showed_cat = false
		new i, pname[NAME_LENGTH]

		new menu = pokemenu_create( "\\rPokeMart:" )

		new cat, catsdisplay;
		if( icat == MAX_ITYPE+1 || icat == MAX_ITYPE+2 ){
			catsdisplay = cat = icat;
		}
		else if( icat < 0 || icat >= ItemCatCreated ){
			cat = 0;
			catsdisplay = ItemCatCreated;
		}
		else{
			cat = icat;
			catsdisplay = cat+1;
		}

		while( cat < catsdisplay )
		{
			pokemenu_additem( menu, MART_CAT_OFFSET+cat, "\\r%-20s(%s)", ItemCatName[cat], Open[id][cat]?"-":"+")

			if(Open[id][cat]){
				showed_cat = true;
				for(i = 0; i < ItemsCreated; i++){
					if( !(ItemInfo[i] & II_SPECIAL)
					&& ItemCat[i] == cat ){
						cost = CostOfItem(i, true)
						if(cost){
							ItemToName(i, pname, NAME_LENGTH)
							if(cost<0){
								if(!is_user_admin(id))
									continue
								pokemenu_additem( menu, i, "\\y%-20s%d", pname, abs(cost) )
							}
							else
								pokemenu_additem( menu, i, "\\w%-20s%d", pname, abs(cost) )
						}
					}
				}
			}
			cat++;
		}
		if( !showed_cat ){
			if( PokeItem(id) && icat != MAX_ITYPE+2 ){
				pokemenu_additem( menu, MART_CAT_OFFSET+MAX_ITYPE+1, "\\y%-20s(%s)", "Sell Your Items", Open[id][MAX_ITYPE+1]?"-":"+")

				if(Open[id][MAX_ITYPE+1]){
					showed_cat = true;
					for(i = 0; i < ItemsCreated; i++){
						if(HasPokeItem(id, i)){
							cost = floatround(CostOfItem(i, true)*SELLFACTOR)
							if(cost){
								ItemToName(i, pname, NAME_LENGTH)
								if(cost<0){
									if(!is_user_admin(id))
										continue
									pokemenu_additem( menu, MART_SELL_OFFSET+i, "\\y%-20s%d",pname, abs(cost))
								}
								else
									pokemenu_additem( menu, MART_SELL_OFFSET+i, "\\w%-20s%d",pname, abs(cost))
							}
						}
					}
				}
			}
		}

		if( !showed_cat ){
			pokemenu_additem( menu, MART_CAT_OFFSET+MAX_ITYPE+2, "\\r%-20s(%s)", "Pokemon", Open[id][MAX_ITYPE+2]?"-":"+")

			if( Open[id][MAX_ITYPE+2] ){
				for(i=1; i <= PokesCreated; i++){
					cost = CostOfPoke(i)
					if(cost){
						PokeToName(i, pname, NAME_LENGTH)
						if(cost<0){
							if(!is_user_admin(id))
								continue
							pokemenu_additem( menu, MART_POKE_OFFSET+i, "\\y%-20s%d", pname, abs(cost))
						}
						else
							pokemenu_additem( menu, MART_POKE_OFFSET+i, "\\w%-20s%d", pname, abs(cost))
					}
				}
			}
		}

		pokemenu_exit(menu);

		menu_display(id, menu, 0)
		debugMessage(id,6,"was shown PokeMart menu");

		SetAction( id, AC_MART )
	}
 }

 //////////////////
 //  PC Menu  //
 //////////////////
 public PCMenu(id)
 {
	if(!is_user_connected(id))
		return

	new menu = pokemenu_create( "\\rEmp PC:" )
	if(!Safari())
		pokemenu_additem( menu, 0, "\\wWypusc Pokemona" )
	if(SaveXPon()){
		pokemenu_additem( menu, 2, "\\wZapisz" )
	}
	if(Safari())
		pokemenu_additem( menu, 4, "\\wZmien Pokemona" )
	else{
		pokemenu_additem( menu, 4, "\\wWyslij Pokemona" )
		pokemenu_additem( menu, 5, "\\wWez Pokemona" )
	}
	pokemenu_additem( menu, 6, "\\wRusz HUD do gory" )
	pokemenu_additem( menu, 7, "\\wRusz HUD na dol" )
	if(!Safari())
		pokemenu_additem( menu, 8, PlayersSet[id][SET_HUD_PARTY] ? "\\wUkryj aktywna druzyne" : "\\wPokaz aktywna druzyne" )

	menu_display(id, menu, 0)
	debugMessage(id,6,"was shown PC menu");

	SetAction( id, AC_PC )
 }

 /////////////////////
 //  Item Use Menu  //
 /////////////////////
 public ItemUseMenu(id)
 {
	if(!is_user_connected(id))
		return

	if(is_user_alive(id))
	{
		if(PokeItem(id))
		{
			new menu = pokemenu_create( "\\rTwoje Przedmioty:" )
			new iname[NAME_LENGTH], num
			new bool:shown = false

			for( num = 0; num < ItemsCreated; num++)
			{
				if(HasPokeItem(id,num)){

					shown = false
					ItemToName(num,iname, NAME_LENGTH)

					if( ItemInfo[num] & II_BIKE ){
						pokemenu_additem( menu, num, "\\w%s (%s)", iname, g_Status[id][STATUS_BIKE]?"Riding":"Walking" )
						shown = true
					}
					if( ItemInfo[num] & II_PDAMAGE ){
						pokemenu_additem( menu, num, "\\w%s (Dodatkowe PokeObrazenia:%d)", iname, PlayersItem[id][num]*ItemPDamage[num])
						shown = true
					}
					if( ItemInfo[num] & II_SPEED ){
						pokemenu_additem( menu, num, "\\w%s (Dodatkowa Szybkosc:%d)", iname, PlayersItem[id][num]*ItemSpeed[num])
						shown = true
					}
					if( ItemInfo[num] & II_MAXHP ){
						pokemenu_additem( menu, num, "\\w%s (Dodatkowe HP:%d)", iname, PlayersItem[id][num]*ItemMaxHP[num])
						shown = true
					}
					if( ItemInfo[num] & II_ARMOR ){
						pokemenu_additem( menu, num, "\\w%s (Dodatkowe Armor:%d)", iname, PlayersItem[id][num]*ItemArmor[num])
						shown = true
					}
					if( ItemInfo[num] & II_DAMAGE ){
						pokemenu_additem( menu, num, "\\w%s (Dodatkowe Obrazenia:%d)", iname, PlayersItem[id][num]*ItemDamage[num])
						shown = true
					}
					if( ItemInfo[num] & II_CATCH ){
						pokemenu_additem( menu, num, "\\w%s (Szansa na zlapanie: %d%%)(%d)", iname, ItemCatch[num], PlayersItem[id][num] )
						shown = true
					}
					if( ItemInfo[num] & II_HEAL && ItemHeal[num] != -1 ){
						pokemenu_additem( menu, num, "\\w%s (Leczy %d)(%d)", iname, ItemHeal[num], PlayersItem[id][num] )
						shown = true
					}
					if( !shown ){
						pokemenu_additem( menu, num, "\\w%s (%d)", iname, PlayersItem[id][num])
					}
				}
			}
			pokemenu_exit(menu);

			menu_display(id, menu, 0)
			debugMessage(id,6,"was shown Item menu");

			SetAction( id, AC_ITEM )
		}
		else
			ShopMenu(id, OpenCat(id))
	}
 }

 /////////////////
 //  Help Menu  //
 /////////////////
 public HelpMenu(id)
 {
	if( !is_user_connected(id) )
		return;

	if( Action[id] == AC_HELP )
		return;

	new helpmenu = pokemenu_create( "\\rPokeHelp:" );
	pokemenu_additem( helpmenu, 0, "\\yPokeMod Basics", "0", 0);

	new i=0;
	while( i<=PokesCreated/10 ){
		if( (10*i)+1 > PokesCreated ) break;
		pokemenu_additem( helpmenu, i+1, "\\wPokedex (%d-%d)", (10*i)+1, min((10*i)+10,PokesCreated));
		i++;
	}
	i=0;
	while( i<=ItemsCreated/10 ){
		if( (10*i)+1 > ItemsCreated ) break;
		pokemenu_additem( helpmenu, (i*-10)-1, "\\wPrzedmioty (%d-%d)", (10*i)+1, min((10*i)+10,ItemsCreated));
		i++;
	}

	pokemenu_exit(helpmenu);

	menu_display(id, helpmenu, 0);
	debugMessage(id,6,"was shown Help menu");

	SetAction( id, AC_HELP );
 }

 //////////////////
 //  Skill Menu  //
 //////////////////
 public SkillMenu(id)
 {
	if( !is_user_connected(id) )
		return;

	new menu = pokemenu_create( "\\rNauczone Skille:" );

	new skills[MAX_SKILLS], skillnames[MAX_SKILLS][NAME_LENGTH], skill_count, tempcheck, bool:skill_found;
	new active_skill = g_isSkilled[id];

	new i, pid = Pokemon[id], tempskill;
	for( i = -1; i<MAX_ACTIVE_POKES; i++ ){
		if( i != -1 ){
			pid = PlayersPoke[id][i];

			//if weve already added the skill in, we don't need to add it again
			if( pid == PlayersActive[id] )
				continue;
		}
		while( pid && skill_count < MAX_SKILLS+1 ){
			if( !PokeDisabled(pid) && (tempskill = PokeSkill[pid]) != -1 ){
				if( SkillInfo[tempskill] & SI_BIND && ( i==-1 || GlobalPoke(pid) ) ){
					skill_found = false;
					for( tempcheck=0; tempcheck < skill_count; tempcheck++ )
						if( skills[tempcheck] == tempskill )
							skill_found = true;

					if( !skill_found ){
						if( tempskill == active_skill )
							formatex( skillnames[skill_count], NAME_LENGTH-1, "\\y%s", SkillToName(tempskill) );
						else
							copy( skillnames[skill_count], NAME_LENGTH-1, SkillToName(tempskill) );

						skills[skill_count] = tempskill;
						skill_count++;
					}
				}
			}

			pid = AnyEvolveTo(pid);
		}
	}

	for( i=0; i < skill_count; i++)
		pokemenu_additem( menu, skills[i], skillnames[i] );

	pokemenu_fakeexit( menu );

	menu_display(id, menu, 0);
	debugMessage(id,6,"was shown Skill menu");

	g_isSkilled[id] = active_skill;
	SetAction( id, AC_SKILL );
 }

 ///////////////////
 //  Safari Menu  //
 ///////////////////
 public SafariMenu(id)
 {
	if( !is_user_connected(id) )
		return;

	if( Action[id] == AC_SAFARI )
		return;

	new menu = pokemenu_create( "\\rPokemon:" )

	new level;
	for(new i=1; i<=PokesCreated; i++){
		if( (level=SafariLevel(i)) )
			pokemenu_additem( menu, i, "\\w%-20sLevel %d", PokeToName(i),level)
	}

	pokemenu_exit(menu);

	menu_display(id, menu, 0);
	debugMessage(id,6,"was shown Safari menu");

	SetAction( id, AC_SAFARI );
 }


 
 
 