class 1 guide_elf_roios : newbie_guide
{
property:
	TelPosList NewbieTokenTeleports = {{"Dark Elf Village"; 9716; 15502; -4500; 1; 0};{"Dwarven Village"; 115120; -178112; -880; 1; 0};{"Talking Island Village"; -84141; 244623; -3729; 1; 0};{"Orc Village"; -45186; -112459; -236; 1; 0}};

handler:
	EventHandler TALKED(quest_id,talker)
	{
		if( _from_choice == 0 )
		{
			if( myself::GetMemoStateEx(talker,255,1) < 5 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Elf's Tutorial");
			}
			if( _choiceN > 1 )
			{
				myself::ShowChoicePage(talker,0);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 )
		{
			if( _code == 0 )
			{
				if( _from_choice == 0 || myself::GetMemoStateEx(talker,255,1) < 5 )
				{
					myself::SetCurrentQuestID(203);
					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,"guide_elf_roios001.htm");
					myself::SetMemoStateEx(talker,255,1,5);
					if( myself::OwnItemCount(talker,5789) <= 400 && myself::OwnItemCount(talker,5790) <= 200 )
					{
						if( myself::IsInCategory(0,talker.occupation) == 1 )
						{
							myself::VoiceEffect(talker,"tutorial_voice_026",1000);
							myself::GiveItem1(talker,5789,200);
							myself::GiveItem1(talker,8542,12);
						}
						if( myself::IsInCategory(1,talker.occupation) == 1 )
						{
							myself::VoiceEffect(talker,"tutorial_voice_027",1000);
							myself::GiveItem1(talker,5790,100);
							myself::GiveItem1(talker,8542,12);
						}
					}
					if( myself::HaveMemo(talker,203) == 1 )
					{
						myself::RemoveMemo(talker,203);
					}
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker)
	{
		if( ask == 203 )
		{
			myself::SetCurrentQuestID(203);
			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 == 255 )
		{
			if( reply == 10 )
			{
				myself::ShowPage(talker,"guide_elf_roios_q0255_04.htm");
			}
			else if( reply == 11 )
			{
				myself::ShowPage(talker,"guide_elf_roios_q0255_04a.htm");
			}
			else if( reply == 12 )
			{
				myself::ShowPage(talker,"guide_elf_roios_q0255_04b.htm");
			}
			else if( reply == 13 )
			{
				myself::ShowPage(talker,"guide_elf_roios_q0255_04c.htm");
			}
			else if( reply == 14 )
			{
				myself::ShowPage(talker,"guide_elf_roios_q0255_04d.htm");
			}
			else if( reply == 15 )
			{
				myself::ShowPage(talker,"guide_elf_roios_q0255_04e.htm");
			}
			else if( reply == 16 )
			{
				myself::ShowPage(talker,"guide_elf_roios_q0255_04f.htm");
			}
			else if( reply == 17 )
			{
				myself::ShowPage(talker,"guide_elf_roios_q0255_04g.htm");
			}
			else if( reply == 18 )
			{
				myself::ShowPage(talker,"guide_elf_roios_q0255_04h.htm");
			}
			else if( reply == 31 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,46926,51511,-2977,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 32 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,44995,51706,-2803,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 33 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,45727,51721,-2803,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 34 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,42812,51138,-2996,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 35 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,45487,46511,-2996,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 36 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,47401,51764,-2996,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 37 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,42971,51372,-2996,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 38 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,47595,51569,-2996,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 39 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,45778,46534,-2996,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 40 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,44476,47153,-2984,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 41 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,42700,50057,-2984,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 42 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,42766,50037,-2984,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 43 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,44683,46952,-2981,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 44 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,44667,46896,-2982,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 45 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,45725,52105,-2795,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 46 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,44823,52414,-2795,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 47 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,45000,52101,-2795,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 48 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,45919,52414,-2795,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 49 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,44692,52261,-2795,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 50 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,47780,49568,-2983,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 51 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,47912,50170,-2983,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 52 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,47868,50167,-2983,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 53 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,28928,74248,-3773,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 54 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,43673,49683,-3046,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 55 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,45610,49008,-3059,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 56 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,50592,54986,-3376,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 57 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,42978,49115,-2994,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 58 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,46475,50495,-3058,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 59 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,45859,50827,-3058,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 60 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,51210,82474,-3283,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
			else if( reply == 61 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,49262,53607,-3216,2);
				myself::ShowPage(talker,"guide_elf_roios_q0255_05.htm");
			}
		}
		super;
	}

}
