class 1 pet_manager_martin : merchant
{
property:
	BuySellList SellList0 = {{"iron_canine";20};{"shining_canine";20};{"ghost_canine";20};{"mithril_canine";20};{"sylvan_canine";20};{"orikarukon_canine";20};{"fang_of_saltydog";20};{"wolve_s_leather_mail";20};{"wolves_hide_armor";20};{"wolves_hard_leather_mail";20};{"wolves_wooden_armor";20};{"wolves_ring_mail";20};{"wolves_bone_armor";20};{"wolves_scale_mail";20};{"food_for_wolves";20};{"viperbite";20};{"shadow_fang";20};{"alya_fang";20};{"torturer";20};{"serpentine_grinder";20};{"fang_of_dahak";20};{"hatchlings_scale_mail";20};{"hatchlings_brigandine";20};{"hatchlings_bronze_coat";20};{"hatchlings_steel_coat";20};{"hatchlings_gorgon_coat";20};{"hatchlings_ophidian_plate";20};{"food_for_hatchling";20};{"serpentine_spike";20};{"drake_horn";20};{"assault_alicorn";20};{"mithril_panzer_coat";20};{"brigandine_panzer_coat";20};{"draconic_panzer_coat";20};{"food_for_strider";20};{"beast_soul_shot";20};{"beast_spirit_shot";20};{"blessed_beast_spirit_shot";20};{"pet_food_baby_spice";20};{"little_harness";20};{"enchanted_wolf_fang";20};{"enchanted_coyote_fang";20};{"enchanted_saltydog_fang";20};{"great_wolf_scale_armor";20};{"great_wolf_bronze_armor";20};{"great_wolf_plate_armor";20};{"great_wolf_food";20};{"beast_soulshot_compressed_pack";20};{"beast_spiritshot_compressed_pack";20};{"blessed_beast_spiritshot_compressed_pack";20};{"improved_baby_pet_food";20}};

handler:
	EventHandler TALK_SELECTED(fhtml0,talker)
	{
		if( _from_choice == 0 )
		{
			if( myself::HaveMemo(talker,419) == 0 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Get a Pet");
			}
			if( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3418) == 1 && myself::OwnItemCount(talker,3423) < 50 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Get a Pet (Continue)");
			}
			if( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3418) == 1 && myself::OwnItemCount(talker,3423) >= 50 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Get a Pet (Continue)");
			}
			if( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3419) == 1 && myself::OwnItemCount(talker,3424) < 50 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Get a Pet (Continue)");
			}
			if( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3419) == 1 && myself::OwnItemCount(talker,3424) >= 50 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Get a Pet (Continue)");
			}
			if( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3420) == 1 && myself::OwnItemCount(talker,3425) < 50 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Get a Pet (Continue)");
			}
			if( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3420) == 1 && myself::OwnItemCount(talker,3425) >= 50 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"Get a Pet (Continue)");
			}
			if( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3421) == 1 && myself::OwnItemCount(talker,3426) < 50 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 7;
				myself::AddChoice(7,"Get a Pet (Continue)");
			}
			if( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3421) == 1 && myself::OwnItemCount(talker,3426) >= 50 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 8;
				myself::AddChoice(8,"Get a Pet (Continue)");
			}
			if( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3422) == 1 && myself::OwnItemCount(talker,3427) < 50 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 9;
				myself::AddChoice(9,"Get a Pet (Continue)");
			}
			if( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3422) == 1 && myself::OwnItemCount(talker,3427) >= 50 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 10;
				myself::AddChoice(10,"Get a Pet (Continue)");
			}
			if( myself::GetMemoState(talker,419) && 1879048192 != 1879048192 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 11;
				myself::AddChoice(11,"Get a Pet (Continue)");
			}
			if( 14 == 14 && ( myself::GetMemoState(talker,419) || 1879048192 == 1879048192 ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 12;
				myself::AddChoice(12,"Get a Pet (Continue)");
			}
			if( _choiceN > 1 )
			{
				myself::ShowChoicePage(talker,1);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 )
		{
			switch(_code)
			{
				case 0:
				{
					if( _from_choice == 0 || myself::HaveMemo(talker,419) == 0 )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						if( myself::GetMemoCount(talker) < 26 )
						{
							if( talker.level < 15 )
							{
								myself::ShowPage(talker,"pet_manager_martin_q0419_01.htm");
							}
							else
							{
								myself::ShowPage(talker,"pet_manager_martin_q0419_02.htm");
							}
						}
						else
						{
							myself::ShowPage(talker,"fullquest.htm");
						}
					}
					break;
				}
				case 1:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3418) == 1 && myself::OwnItemCount(talker,3423) < 50 ) )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						if( myself::OwnItemCount(talker,3423) == 0 )
						{
							myself::ShowPage(talker,"pet_manager_martin_q0419_09.htm");
						}
						else
						{
							myself::ShowPage(talker,"pet_manager_martin_q0419_10.htm");
						}
					}
					break;
				}
				case 2:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3418) == 1 && myself::OwnItemCount(talker,3423) >= 50 ) )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						myself::ShowPage(talker,"pet_manager_martin_q0419_11.htm");
					}
					break;
				}
				case 3:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3419) == 1 && myself::OwnItemCount(talker,3424) < 50 ) )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						if( myself::OwnItemCount(talker,3424) == 0 )
						{
							myself::ShowPage(talker,"pet_manager_martin_q0419_09.htm");
						}
						else
						{
							myself::ShowPage(talker,"pet_manager_martin_q0419_10.htm");
						}
					}
					break;
				}
				case 4:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3419) == 1 && myself::OwnItemCount(talker,3424) >= 50 ) )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						myself::ShowPage(talker,"pet_manager_martin_q0419_11.htm");
					}
					break;
				}
				case 5:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3420) == 1 && myself::OwnItemCount(talker,3425) < 50 ) )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						if( myself::OwnItemCount(talker,3425) == 0 )
						{
							myself::ShowPage(talker,"pet_manager_martin_q0419_09.htm");
						}
						else
						{
							myself::ShowPage(talker,"pet_manager_martin_q0419_10.htm");
						}
					}
					break;
				}
				case 6:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3420) == 1 && myself::OwnItemCount(talker,3425) >= 50 ) )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						myself::ShowPage(talker,"pet_manager_martin_q0419_11.htm");
					}
					break;
				}
				case 7:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3421) == 1 && myself::OwnItemCount(talker,3426) < 50 ) )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						if( myself::OwnItemCount(talker,3426) == 0 )
						{
							myself::ShowPage(talker,"pet_manager_martin_q0419_09.htm");
						}
						else
						{
							myself::ShowPage(talker,"pet_manager_martin_q0419_10.htm");
						}
					}
					break;
				}
				case 8:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3421) == 1 && myself::OwnItemCount(talker,3426) >= 50 ) )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						myself::ShowPage(talker,"pet_manager_martin_q0419_11.htm");
					}
					break;
				}
				case 9:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3422) == 1 && myself::OwnItemCount(talker,3427) < 50 ) )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						if( myself::OwnItemCount(talker,3427) == 0 )
						{
							myself::ShowPage(talker,"pet_manager_martin_q0419_09.htm");
						}
						else
						{
							myself::ShowPage(talker,"pet_manager_martin_q0419_10.htm");
						}
					}
					break;
				}
				case 10:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3422) == 1 && myself::OwnItemCount(talker,3427) >= 50 ) )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						myself::ShowPage(talker,"pet_manager_martin_q0419_11.htm");
					}
					break;
				}
				case 11:
				{
					if( ( myself::GetMemoState(talker,419) && 14 != 14 ) || ( myself::GetMemoState(talker,419) && 1879048192 != 1879048192 ) )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						myself::ShowPage(talker,"pet_manager_martin_q0419_16.htm");
					}
					break;
				}
				case 12:
				{
					if( myself::GetMemoState(talker,419) || ( 14 == 14 && ( myself::GetMemoState(talker,419) || 1879048192 == 1879048192 ) ) )
					{
						myself::SetCurrentQuestID(419);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
						{
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						myself::SetMemoState(talker,419,1879048192);
						myself::ShowPage(talker,"pet_manager_martin_q0419_13.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler QUEST_ACCEPTED(quest_id,talker)
	{
		if( quest_id == 419 )
		{
			myself::SetCurrentQuestID(419);
			if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
			{
				myself::ShowSystemMessage(talker,1118);
				return;
			}
			if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
			{
				talker.quest_last_reward_time = myself::GetCurrentTick();
				myself::SetMemo(talker,419);
				myself::AddLog(1,talker,419);
				myself::SoundEffect(talker,"ItemSound.quest_accept");
				if( talker.race == 0 )
				{
					myself::ShowPage(talker,"pet_manager_martin_q0419_04.htm");
					myself::GiveItem1(talker,3418,1);
				}
				else if( talker.race == 1 )
				{
					myself::ShowPage(talker,"pet_manager_martin_q0419_05.htm");
					myself::GiveItem1(talker,3419,1);
				}
				else if( talker.race == 2 )
				{
					myself::ShowPage(talker,"pet_manager_martin_q0419_06.htm");
					myself::GiveItem1(talker,3420,1);
				}
				else if( talker.race == 3 )
				{
					myself::ShowPage(talker,"pet_manager_martin_q0419_07.htm");
					myself::GiveItem1(talker,3421,1);
				}
				else if( talker.race == 4 )
				{
					myself::ShowPage(talker,"pet_manager_martin_q0419_08.htm");
					myself::GiveItem1(talker,3422,1);
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,fhtml0,i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,quest_id,reply,talker)
	{
		if( ask == 419 )
		{
			myself::SetCurrentQuestID(419);
			if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
			{
				myself::ShowSystemMessage(talker,1118);
				return;
			}
		}
		if( ask == 419 )
		{
			if( reply == 11 )
			{
				myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_03.htm");
				myself::FHTML_SetInt(fhtml0,"quest_id",419);
				myself::ShowFHTML(talker,fhtml0);
			}
		}
		if( ask == 419 )
		{
			myself::SetCurrentQuestID(419);
			if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
			{
				myself::ShowSystemMessage(talker,1118);
				return;
			}
		}
		if( ask == 419 && reply == 10 )
		{
			if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
			{
				talker.quest_last_reward_time = myself::GetCurrentTick();
				if( talker.race == 0 && myself::OwnItemCount(talker,3418) == 1 && myself::OwnItemCount(talker,3423) >= 50 )
				{
					myself::DeleteItem1(talker,3418,myself::OwnItemCount(talker,3418));
					myself::DeleteItem1(talker,3423,myself::OwnItemCount(talker,3423));
					myself::GiveItem1(talker,3417,1);
				}
				else if( talker.race == 1 && myself::OwnItemCount(talker,3419) == 1 && myself::OwnItemCount(talker,3424) >= 50 )
				{
					myself::DeleteItem1(talker,3419,myself::OwnItemCount(talker,3419));
					myself::DeleteItem1(talker,3424,myself::OwnItemCount(talker,3424));
					myself::GiveItem1(talker,3417,1);
				}
				else if( talker.race == 2 && myself::OwnItemCount(talker,3420) == 1 && myself::OwnItemCount(talker,3425) >= 50 )
				{
					myself::DeleteItem1(talker,3420,myself::OwnItemCount(talker,3420));
					myself::DeleteItem1(talker,3425,myself::OwnItemCount(talker,3425));
					myself::GiveItem1(talker,3417,1);
				}
				else if( talker.race == 3 && myself::OwnItemCount(talker,3421) == 1 && myself::OwnItemCount(talker,3426) >= 50 )
				{
					myself::DeleteItem1(talker,3421,myself::OwnItemCount(talker,3421));
					myself::DeleteItem1(talker,3426,myself::OwnItemCount(talker,3426));
					myself::GiveItem1(talker,3417,1);
				}
				else if( talker.race == 4 && myself::OwnItemCount(talker,3422) == 1 && myself::OwnItemCount(talker,3427) >= 50 )
				{
					myself::DeleteItem1(talker,3422,myself::OwnItemCount(talker,3422));
					myself::DeleteItem1(talker,3427,myself::OwnItemCount(talker,3427));
					myself::GiveItem1(talker,3417,1);
				}
				myself::SetMemoState(talker,419,0);
				myself::ShowPage(talker,"pet_manager_martin_q0419_12.htm");
			}
		}
		if( ask == 419 )
		{
			myself::SetCurrentQuestID(419);
			if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) )
			{
				myself::ShowSystemMessage(talker,1118);
				return;
			}
		}
		if( myself::GetMemoState(talker,419) && 15 == 10 && myself::HaveMemo(talker,419) && myself::OwnItemCount(talker,3417) == 1 && ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
		{
			talker.quest_last_reward_time = myself::GetCurrentTick();
			myself::DeleteItem1(talker,3417,myself::OwnItemCount(talker,3417));
			myself::SetMemoState(talker,419,0);
			myself::RemoveMemo(talker,419);
			myself::AddLog(2,talker,419);
			myself::SoundEffect(talker,"ItemSound.quest_finish");
			myself::CreatePet(talker,2375,1012077,15);
			myself::ShowPage(talker,"pet_manager_martin_q0419_15.htm");
		}
		else if( ask == 419 && reply == 1 )
		{
			i8 = myself::GetMemoState(talker,419);
			i8 = ( i8 + 1 );
			i9 = 0;
			while( i9 == 0 )
			{
				i6 = ( gg::Rand(14) + 4 );
				i7 = 1;
				for(i5 = 1; i5 <= i6; i5 = ( i5 + 1 ))
				{
					i7 = ( i7 * 2 );
				}
				if( myself::GetMemoState(talker,419) == 0 && i6 < 18 )
				{
					if( i6 == 4 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_20.htm");
						i0 = 1110000;
					}
					else if( i6 == 5 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_21.htm");
						i0 = 1110005;
					}
					else if( i6 == 6 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_22.htm");
						i0 = 1110010;
					}
					else if( i6 == 7 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_23.htm");
						i0 = 1110015;
					}
					else if( i6 == 8 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_24.htm");
						i0 = 1110020;
					}
					else if( i6 == 9 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_25.htm");
						i0 = 1110025;
					}
					else if( i6 == 10 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_26.htm");
						i0 = 1110030;
					}
					else if( i6 == 11 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_27.htm");
						i0 = 1110035;
					}
					else if( i6 == 12 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_28.htm");
						i0 = 1110040;
					}
					else if( i6 == 13 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_29.htm");
						i0 = 1110045;
					}
					else if( i6 == 14 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_30.htm");
						i0 = 1110050;
					}
					else if( i6 == 15 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_31.htm");
						i0 = 1110055;
					}
					else if( i6 == 16 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_32.htm");
						i0 = 1110060;
					}
					else if( i6 == 17 )
					{
						myself::FHTML_SetFileName(fhtml0,"pet_manager_martin_q0419_33.htm");
						i0 = 1110065;
					}
					i9 = 1;
					i8 = i7;
				}
			}
			myself::SetMemoState(talker,419,i8);
			i9 = 1;
			i8 = 0;
			while( i9 < 5 )
			{
				i6 = ( gg::Rand(4) + 1 );
				i7 = 1;
				for(i5 = 1; i5 <= i6; i5 = ( i5 + 1 ))
				{
					i7 = ( i7 * 2 );
				}
				if( i8 == 0 && i6 < 5 )
				{
					if( i9 == 1 )
					{
						i1 = i6;
					}
					else if( i9 == 2 )
					{
						i2 = i6;
					}
					else if( i9 == 3 )
					{
						i3 = i6;
					}
					else if( i9 == 4 )
					{
						i4 = i6;
					}
					i9 = ( i9 + 1 );
					i8 = i7;
				}
			}
			myself::FHTML_SetStr(fhtml0,"reply1",myself::MakeFString(( i0 + i1 ),"","","","",""));
			myself::FHTML_SetStr(fhtml0,"reply2",myself::MakeFString(( i0 + i2 ),"","","","",""));
			myself::FHTML_SetStr(fhtml0,"reply3",myself::MakeFString(( i0 + i3 ),"","","","",""));
			myself::FHTML_SetStr(fhtml0,"reply4",myself::MakeFString(( i0 + i4 ),"","","","",""));
			myself::FHTML_SetStr(fhtml0,"reply5",myself::MakeFString(( i0 + 5 ),"","","","",""));
			myself::ShowFHTML(talker,fhtml0);
		}
		else if( ask == 419 && reply == 0 )
		{
			myself::SetMemoState(talker,419,0);
			myself::ShowPage(talker,"pet_manager_martin_q0419_14.htm");
		}
		super;
	}

}
