class 1 warrior_s_grave : citizen
{
handler:
	EventHandler TALK_SELECTED(fhtml0,talker)
	{
		if( _from_choice == 0 )
		{
			if( myself::HaveMemo(talker,126) == 1 && myself::GetMemoState(talker,126) == 11 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"In the Name of Evil Part 2 - In Progress");
			}
			if( myself::HaveMemo(talker,126) == 1 && myself::GetMemoState(talker,126) == 18 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"In the Name of Evil Part 2 - In Progress");
			}
			if( myself::HaveMemo(talker,126) == 1 && myself::GetMemoState(talker,126) == 12 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"In the Name of Evil Part 2 - In Progress");
			}
			if( myself::HaveMemo(talker,126) == 1 && myself::GetMemoState(talker,126) == 13 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"In the Name of Evil Part 2 - In Progress");
			}
			if( myself::HaveMemo(talker,126) == 1 && myself::GetMemoState(talker,126) == 14 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"In the Name of Evil Part 2 - In Progress");
			}
			if( myself::HaveMemo(talker,126) == 1 && myself::GetMemoState(talker,126) == 15 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"In the Name of Evil Part 2 - In Progress");
			}
			if( myself::HaveMemo(talker,126) == 1 && myself::GetMemoState(talker,126) == 16 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"In the Name of Evil Part 2 - In Progress");
			}
			if( myself::HaveMemo(talker,126) == 1 && myself::GetMemoState(talker,126) == 17 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 7;
				myself::AddChoice(7,"In the Name of Evil Part 2 - In Progress");
			}
			if( myself::HaveMemo(talker,126) == 1 && myself::GetMemoState(talker,126) == 18 )
			{
				_choiceN = ( _choicAeN + 1 );
				_code = 8;
				myself::AddChoice(8,"In the Name of Evil Part 2 - In Progress");
			}
		}
		if( _choiceN > 1 )
		{
			myself::ShowChoicePage(talker,1);
			return;
		}
		if( _from_choice || _choiceN == 1 )
		{
			switch(_code)
			{
				case 0:
				{
					myself::SetCookie(talker,"grave_of_brave_man1",0);
					myself::SetCookie(talker,"grave_of_brave_man2",0);
					myself::SetCookie(talker,"grave_of_brave_man3",0);
					myself::ShowPage(talker,"grave_of_brave_man_q0126_01.htm");
					break;
				}
				case 1:
				{
					myself::ShowPage(talker,"grave_of_brave_man_q0126_24.htm");
					break;
				}
				case 2:
				{
					myself::ShowPage(talker,"grave_of_brave_man_q0126_03.htm");
					break;
				}
				case 3:
				{
					myself::ShowPage(talker,"grave_of_brave_man_q0126_24.htm");
					break;
				}
				case 4:
				{
					myself::ShowPage(talker,"grave_of_brave_man_q0126_42.htm");
					break;
				}
				case 5:
				{
					myself::ShowPage(talker,"grave_of_brave_man_q0126_63.htm");
					break;
				}
				case 6:
				{
					myself::ShowPage(talker,"grave_of_brave_man_q0126_84.htm");
					break;
				}
				case 7:
				{
					myself::ShowPage(talker,"grave_of_brave_man_q0126_86a.htm");
					break;
				}
				case 8:
				{
					myself::ShowPage(talker,"grave_of_brave_man_q0126_91.htm");
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,i0,reply,talker)
	{
		if( ask == 126 )
		{
			myself::SetCurrentQuestID(126);
			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( reply == 1 )
			{
				myself::SetMemoState(talker,126,12);
				myself::SetFlagJournal(talker,126,12);
				myself::ShowPage(talker,"grave_of_brave_man_q0126_03.htm");
				return;
			}
			if( reply == 3 )
			{
				myself::SetMemoState(talker,126,13);
				myself::SetFlagJournal(talker,126,13);
				myself::ShowPage(talker,"grave_of_brave_man_q0126_24.htm");
				return;
			}
			if( reply == 4 )
			{
				myself::ShowPage(talker,"grave_of_brave_man_q0126_28.htm");
				myself::SetCookie(talker,"grave_of_brave_man1",0);
				if( myself::GetCookie(talker,"grave_of_brave_man1") == 0 )
				{
					myself::SetCookie(talker,"grave_of_brave_man1",1);
				}
				return;
			}
			if( reply == 5 )
			{
				myself::ShowPage(talker,"grave_of_brave_man_q0126_32.htm");
				if( myself::GetCookie(talker,"grave_of_brave_man1") == 1 )
				{
					myself::SetCookie(talker,"grave_of_brave_man1",2);
				}
				return;
			}
			if( reply == 6 )
			{
				myself::ShowPage(talker,"grave_of_brave_man_q0126_36.htm");
				if( myself::GetCookie(talker,"grave_of_brave_man1") == 2 )
				{
					myself::SetCookie(talker,"grave_of_brave_man1",3);
				}
				return;
			}
			if( reply == 7 )
			{
				myself::ShowPage(talker,"grave_of_brave_man_q0126_40.htm");
				if( myself::GetCookie(talker,"grave_of_brave_man1") == 3 )
				{
					myself::SetCookie(talker,"grave_of_brave_man1",4);
				}
				return;
			}
			if( reply == 8 )
			{
				if( myself::GetCookie(talker,"grave_of_brave_man1") == 4 )
				{
					myself::SetMemoState(talker,126,14);
					myself::SetFlagJournal(talker,126,14);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					myself::ShowPage(talker,"grave_of_brave_man_q0126_42.htm");
				}
				else
				{
					myself::ShowPage(talker,"grave_of_brave_man_q0126_43.htm");
					myself::SetCookie(talker,"grave_of_brave_man1",0);
				}
				return;
			}
			if( reply == 9 )
			{
				myself::ShowPage(talker,"grave_of_brave_man_q0126_49.htm");
				myself::SetCookie(talker,"grave_of_brave_man2",0);
				if( myself::GetCookie(talker,"grave_of_brave_man2") == 0 )
				{
					myself::SetCookie(talker,"grave_of_brave_man2",1);
				}
				return;
			}
			if( reply == 10 )
			{
				myself::ShowPage(talker,"grave_of_brave_man_q0126_53.htm");
				if( myself::GetCookie(talker,"grave_of_brave_man2") == 1 )
				{
					myself::SetCookie(talker,"grave_of_brave_man2",2);
				}
				return;
			}
			if( reply == 11 )
			{
				myself::ShowPage(talker,"grave_of_brave_man_q0126_57.htm");
				if( myself::GetCookie(talker,"grave_of_brave_man2") == 2 )
				{
					myself::SetCookie(talker,"grave_of_brave_man2",3);
				}
				return;
			}
			if( reply == 12 )
			{
				myself::ShowPage(talker,"grave_of_brave_man_q0126_61.htm");
				if( myself::GetCookie(talker,"grave_of_brave_man2") == 3 )
				{
					myself::SetCookie(talker,"grave_of_brave_man2",4);
				}
				return;
			}
			if( reply == 13 )
			{
				if( myself::GetCookie(talker,"grave_of_brave_man2") == 4 )
				{
					myself::SetMemoState(talker,126,15);
					myself::SetFlagJournal(talker,126,15);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					myself::ShowPage(talker,"grave_of_brave_man_q0126_63.htm");
				}
				else
				{
					myself::ShowPage(talker,"grave_of_brave_man_q0126_64.htm");
					myself::SetCookie(talker,"grave_of_brave_man2",0);
				}
				return;
			}
			if( reply == 14 )
			{
				myself::ShowPage(talker,"grave_of_brave_man_q0126_70.htm");
				myself::SetCookie(talker,"grave_of_brave_man3",0);
				if( myself::GetCookie(talker,"grave_of_brave_man3") == 0 )
				{
					myself::SetCookie(talker,"grave_of_brave_man3",1);
				}
				return;
			}
			if( reply == 15 )
			{
				myself::ShowPage(talker,"grave_of_brave_man_q0126_74.htm");
				if( myself::GetCookie(talker,"grave_of_brave_man3") == 1 )
				{
					myself::SetCookie(talker,"grave_of_brave_man3",2);
				}
				return;
			}
			if( reply == 16 )
			{
				myself::ShowPage(talker,"grave_of_brave_man_q0126_78.htm");
				if( myself::GetCookie(talker,"grave_of_brave_man3") == 2 )
				{
					myself::SetCookie(talker,"grave_of_brave_man3",3);
				}
				return;
			}
			if( reply == 17 )
			{
				myself::ShowPage(talker,"grave_of_brave_man_q0126_82.htm");
				if( myself::GetCookie(talker,"grave_of_brave_man3") == 3 )
				{
					myself::SetCookie(talker,"grave_of_brave_man3",4);
				}
				return;
			}
			if( reply == 18 )
			{
				if( myself::GetCookie(talker,"grave_of_brave_man3") == 4 )
				{
					myself::SetMemoState(talker,126,16);
					myself::SetFlagJournal(talker,126,16);
					myself::GiveItem1(talker,8783,1);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					myself::ShowPage(talker,"grave_of_brave_man_q0126_84.htm");
				}
				else
				{
					myself::ShowPage(talker,"grave_of_brave_man_q0126_85.htm");
					myself::SetCookie(talker,"grave_of_brave_man3",0);
				}
				return;
			}
			if( reply == 19 )
			{
				myself::SetMemoState(talker,126,17);
				myself::SetFlagJournal(talker,126,17);
				myself::ShowPage(talker,"grave_of_brave_man_q0126_86a.htm");
				myself::SoundEffect(talker,"ItemSound.quest_middle");
				return;
			}
			if( reply == 20 )
			{
				myself::SetMemoState(talker,126,18);
				myself::SetFlagJournal(talker,126,18);
				myself::ShowPage(talker,"grave_of_brave_man_q0126_90.htm");
				myself::SoundEffect(talker,"ItemSound.quest_middle");
				myself::ShowQuestMark(talker,126);
				return;
			}
		}
		super;
	}

}
