class 1 dead_angel : citizen
{
handler:
	EventHandler TALK_SELECTED(fhtml0,i0,i1,talker)
	{
		if( _from_choice == 0 )
		{
			if( talker.subjob_id == 0 && myself::GetMemoState(talker,242) == 4 && myself::GetOneTimeQuestFlag(talker,242) == 0 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Possessor of a Precious Soul - 2 (Continue)");
			}
			if( myself::HaveMemo(talker,242) == 1 && myself::GetMemoState(talker,242) == 4 && talker.subjob_id != 0 && myself::GetOneTimeQuestFlag(talker,242) == 0 && myself::GetMemoStateEx(talker,242,1) < 3 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Possessor of a Precious Soul - 2 (Continue)");
			}
			if( myself::HaveMemo(talker,242) == 1 && talker.subjob_id != 0 && myself::GetMemoState(talker,242) == 4 && myself::GetOneTimeQuestFlag(talker,242) == 0 && myself::GetMemoStateEx(talker,242,1) >= 3 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Possessor of a Precious Soul - 2 (Continue)");
			}
			if( _choiceN > 1 )
			{
				myself::ShowChoicePage(talker,1);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 )
		{
			switch(_code)
			{
				case 0:
				{
					if( _from_choice == 0 || ( talker.subjob_id == 0 && myself::GetMemoState(talker,242) == 4 && myself::GetOneTimeQuestFlag(talker,242) == 0 ) )
					{
						myself::SetCurrentQuestID(242);
						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,"quest_not_subclass001.htm");
					}
					break;
				}
				case 1:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,242) == 1 && myself::GetMemoState(talker,242) == 4 && talker.subjob_id != 0 && myself::GetOneTimeQuestFlag(talker,242) == 0 && myself::GetMemoStateEx(talker,242,1) < 3 ) )
					{
						myself::SetCurrentQuestID(242);
						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;
						}
						i0 = myself::GetMemoStateEx(talker,242,1);
						myself::SetMemoStateEx(talker,242,1,( i0 + 1 ));
						myself::ShowPage(talker,"dead_angel_q0242_01.htm");
						myself::Despawn();
					}
					break;
				}
				case 2:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,242) == 1 && talker.subjob_id != 0 && myself::GetMemoState(talker,242) == 4 && myself::GetOneTimeQuestFlag(talker,242) == 0 && myself::GetMemoStateEx(talker,242,1) >= 3 ) )
					{
						myself::SetCurrentQuestID(242);
						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::SetMemoStateEx(talker,242,1,0);
						myself::SetMemoState(talker,242,5);
						myself::SetFlagJournal(talker,242,5);
						myself::ShowPage(talker,"dead_angel_q0242_02.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

}
