@LabelIndex 398512
@StringIndex 59609
class 0 pa73_enchant_npc : ai_pa73_enchant {
handler:
	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 144 ) {
			myself::SetCurrentQuestID(144);
			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 == 144 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,144) == 1 && myself::GetOneTimeQuestFlag(talker,144) == 0 ) {
					if( gg::OwnItemCount(talker,13052) >= 1 && gg::OwnItemCount(talker,13056) >= 1 ) {
						myself::DeleteItem1(talker,13052,gg::OwnItemCount(talker,13052));
						myself::DeleteItem1(talker,13056,gg::OwnItemCount(talker,13056));
						myself::GiveItem1(talker,13053,1);
						myself::ShowPage(talker,"pa73_enchant_npc_q0144_02.htm");
					} else if( gg::OwnItemCount(talker,13053) >= 1 && gg::OwnItemCount(talker,13057) >= 1 ) {
						myself::DeleteItem1(talker,13053,gg::OwnItemCount(talker,13053));
						myself::DeleteItem1(talker,13057,gg::OwnItemCount(talker,13057));
						myself::GiveItem1(talker,13054,1);
						myself::ShowPage(talker,"pa73_enchant_npc_q0144_03.htm");
					} else if( gg::OwnItemCount(talker,13053) >= 1 && gg::OwnItemCount(talker,13057) == 0 ) {
						myself::ShowPage(talker,"pa73_enchant_npc_q0144_04.htm");
					} else if( gg::OwnItemCount(talker,13052) >= 1 && gg::OwnItemCount(talker,13056) == 0 ) {
						myself::ShowPage(talker,"pa73_enchant_npc_q0144_05.htm");
					} else if( gg::OwnItemCount(talker,13054) >= 1 ) {
						myself::ShowPage(talker,"pa73_enchant_npc_q0144_06.htm");
					} else if( gg::OwnItemCount(talker,13052) == 0 ) {
						myself::ShowPage(talker,"pa73_enchant_npc_q0144_01a.htm");
					}
				}
			}
		}
		super;
	}

}
