class 1 guide_orc_tanai : 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};{"Elven Village"; 46890; 51531; -2976; 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,"Orc'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(205);
					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_orc_tanai001.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,205) == 1 )
					{
						myself::RemoveMemo(talker,205);
					}
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker)
	{
		if( ask == 205 )
		{
			myself::SetCurrentQuestID(205);
			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_orc_tanai_q0255_04.htm");
			}
			else if( reply == 11 )
			{
				myself::ShowPage(talker,"guide_orc_tanai_q0255_04a.htm");
			}
			else if( reply == 12 )
			{
				myself::ShowPage(talker,"guide_orc_tanai_q0255_04b.htm");
			}
			else if( reply == 13 )
			{
				myself::ShowPage(talker,"guide_orc_tanai_q0255_04c.htm");
			}
			else if( reply == 14 )
			{
				myself::ShowPage(talker,"guide_orc_tanai_q0255_04d.htm");
			}
			else if( reply == 15 )
			{
				myself::ShowPage(talker,"guide_orc_tanai_q0255_04e.htm");
			}
			else if( reply == 16 )
			{
				myself::ShowPage(talker,"guide_orc_tanai_q0255_04f.htm");
			}
			else if( reply == 17 )
			{
				myself::ShowPage(talker,"guide_orc_tanai_q0255_04g.htm");
			}
			else if( reply == 18 )
			{
				myself::ShowPage(talker,"guide_orc_tanai_q0255_04h.htm");
			}
			else if( reply == 19 )
			{
				myself::ShowPage(talker,"guide_orc_tanai_q0255_04i.htm");
			}
			else if( reply == 31 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-45264,-112512,-235,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 32 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-46576,-117311,-242,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 33 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-47360,-113791,-237,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 34 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-47360,-113424,-235,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 35 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-45744,-117165,-236,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 36 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-46528,-109968,-250,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 37 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-45808,-110055,-255,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 38 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-45731,-113844,-237,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 39 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-45728,-113360,-237,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 40 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-45952,-114784,-199,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 41 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-45952,-114496,-199,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 42 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-45863,-112621,-200,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 43 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-45864,-112540,-199,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 44 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-43264,-112532,-220,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 45 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-43910,-115518,-194,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 46 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-43950,-115457,-194,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 47 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-44416,-111486,-222,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 48 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-43926,-111794,-222,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 49 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-43109,-113770,-221,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 50 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-43114,-113404,-221,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 51 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-46768,-113610,-3,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 52 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-46802,-114011,-112,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 53 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-46247,-113866,-21,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 54 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-46808,-113184,-112,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 55 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-45328,-114736,-237,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
			else if( reply == 56 )
			{
				myself::DeleteAllRadar(talker,2);
				myself::ShowRadar(talker,-44624,-111873,-238,2);
				myself::ShowPage(talker,"guide_orc_tanai_q0255_05.htm");
			}
		}
		super;
	}

}
