class 1 teleporter_for_friend : teleporter
{
parameter:
	string	fnForFriendNormal = "";
	string	fnForFriendSpecial = "";

property:
	TelPosList PositionForFriend = {{"Talking Island"; -84169; 244693; -3729; 100000; 0 }};

handler:
	EventHandler TALKED(talker)
	{
		if( FriendShip1 == 0 )
		{
			myself::ShowPage(talker,fnHi);
		}
		else if( myself::OwnItemCount(talker,FriendShip5) > 0 )
		{
			myself::ShowPage(talker,fnForFriendSpecial);
		}
		else if( myself::OwnItemCount(talker,FriendShip4) > 0 )
		{
			myself::ShowPage(talker,fnForFriendNormal);
		}
		else if( myself::OwnItemCount(talker,FriendShip1) > 0 || myself::OwnItemCount(talker,FriendShip2) > 0 || myself::OwnItemCount(talker,FriendShip3) > 0 )
		{
			myself::ShowPage(talker,fnHi);
		}
		else
		{
			myself::ShowPage(talker,fnNoFriend);
		}
	}

	EventHandler MENU_SELECTED(talker,ask,reply,i0,i1,i2)
	{
		if( ask == -30 )
		{
			if( reply == 1 )
			{
				myself::Teleport(talker,Position,ShopName,"","","",57,myself::MakeFString(1000308,"","","","",""));
			}
			else if( reply == 2 )
			{
				myself::Teleport(talker,PositionForFriend,ShopName,"","","",57,myself::MakeFString(1000308,"","","","",""));
			}
		}
		super;
	}

}
