class 1 xaber : guard_fixed
{
handler:
	EventHandler TALK_SELECTED(fhtml0,talker)
	{
		if( _from_choice == 0 )
		{
			if( myself::HaveMemo(talker,364) == 1 && myself::OwnItemCount(talker,4322) >= 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Jovial Accordion");
			}
			if( myself::HaveMemo(talker,364) == 1 && myself::OwnItemCount(talker,4322) == 0 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Jovial Accordion");
			}
			if( myself::HaveMemo(talker,65) == 1 && myself::GetMemoState(talker,65) == 8 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Certified Soul Breaker (Continue)");
			}
			if( myself::HaveMemo(talker,65) == 1 && myself::GetMemoState(talker,65) == 9 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Certified Soul Breaker (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,364) == 1 && myself::OwnItemCount(talker,4322) >= 1 ) )
					{
						myself::SetCurrentQuestID(364);
						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,"xaber_q0364_01.htm");
						myself::DeleteItem1(talker,4322,1);
						if( myself::GetMemoState(talker,364) == 3 )
						{
							myself::SetMemoState(talker,364,4);
						}
						else if( myself::GetMemoState(talker,364) == 2 )
						{
							myself::SetMemoState(talker,364,3);
						}
					}
					break;
				}
				case 1:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,364) == 1 && myself::OwnItemCount(talker,4322) == 0 ) )
					{
						myself::SetCurrentQuestID(364);
						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,"xaber_q0364_02.htm");
					}
					break;
				}
				case 2:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,65) == 1 && myself::GetMemoState(talker,65) == 8 ) )
					{
						myself::SetCurrentQuestID(65);
						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,"xaber_q065_01.htm");
					}
					break;
				}
				case 3:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,65) == 1 && myself::GetMemoState(talker,65) == 9 ) )
					{
						myself::SetCurrentQuestID(65);
						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,"xaber_q065_02.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

}
