class 1 temp_wyvern_keeper : wyvern_keeper
{
parameter:
	string	fnMyLord = "wkeeper001_temp.htm";
	string	fnSSQDusk = "wkeeper001_dusk.htm";
	string	fnNotMyLord = "wkeeper002.htm";
	string	fnStriderHelp = "wkeeper003_temp.htm";
	string	fnAfterRide = "wkeeper004.htm";
	string	fnStriderNotReady = "wkeeper005.htm";
	string	fnNotEnoughFee = "wkeeper006.htm";

handler:
	EventHandler TALKED(talker,fhtml0,c0)
	{
		myself::FHTML_SetFileName(fhtml0,fnMyLord);
		myself::FHTML_SetInt(fhtml0,"ride_wyvern_level",ride_wyvern_level);
		myself::FHTML_SetInt(fhtml0,"ride_wyvern_fee",ride_wyvern_fee);
		myself::ShowFHTML(talker,fhtml0);
	}

	EventHandler MENU_SELECTED(talker,ask,reply,fhtml0)
	{
		if( ask == 0 )
		{
			myself::FHTML_SetFileName(fhtml0,fnMyLord);
			myself::FHTML_SetStr(fhtml0,"feud_name",myself::MakeFString(( 1001000 + myself.sm.residence_id ),"","","","",""));
			myself::FHTML_SetInt(fhtml0,"ride_wyvern_level",ride_wyvern_level);
			myself::FHTML_SetInt(fhtml0,"ride_wyvern_fee",ride_wyvern_fee);
			myself::ShowFHTML(talker,fhtml0);
		}
		if( ask == -17 )
		{
			if( reply == 1 )
			{
				myself::FHTML_SetFileName(fhtml0,fnStriderHelp);
				myself::FHTML_SetInt(fhtml0,"ride_wyvern_level",ride_wyvern_level);
				myself::FHTML_SetInt(fhtml0,"ride_wyvern_fee",ride_wyvern_fee);
			}
			else if( reply == 2 )
			{
				if( talker.yongma_type == 1 && talker.strider_level >= ride_wyvern_level )
				{
					if( myself::OwnItemCount(talker,1460) >= ride_wyvern_fee )
					{
						myself::DeleteItem1(talker,1460,ride_wyvern_fee);
						myself::RideWyvern(talker,1012621);
						myself::FHTML_SetFileName(fhtml0,fnAfterRide);
					}
					else
					{
						myself::FHTML_SetFileName(fhtml0,fnNotEnoughFee);
						myself::FHTML_SetInt(fhtml0,"ride_wyvern_fee",ride_wyvern_fee);
					}
				}
				else
				{
					myself::FHTML_SetFileName(fhtml0,fnStriderNotReady);
					myself::FHTML_SetInt(fhtml0,"ride_wyvern_level",ride_wyvern_level);
					myself::FHTML_SetInt(fhtml0,"ride_wyvern_fee",ride_wyvern_fee);
				}
			}
			myself::ShowFHTML(talker,fhtml0);
		}
	}

}
