@LabelIndex 398476
@StringIndex 59602
class 0 pa61_enchant_npc : ai_pa61_enchant {
handler:
	EventHandler MENU_SELECTED(ask,c0,reply,talker) {
		if( ask == 129 ) {
			myself::SetCurrentQuestID(129);
			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 == 129 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,129) == 1 && myself::GetOneTimeQuestFlag(talker,129) == 0 ) {
					c0 = myself::GetSummon(talker);
					if( c0 ) {
						myself::ShowPage(talker,"pa61_enchant_npc_q0129_03a.htm");
					} else if( gg::OwnItemCount(talker,13042) >= 1 && gg::OwnItemCount(talker,13046) >= 1 ) {
						myself::DeleteItem1(talker,13042,gg::OwnItemCount(talker,13042));
						myself::DeleteItem1(talker,13046,gg::OwnItemCount(talker,13046));
						myself::GiveItem1(talker,13043,1);
						myself::ShowPage(talker,"pa61_enchant_npc_q0129_02.htm");
					} else if( gg::OwnItemCount(talker,13043) >= 1 && gg::OwnItemCount(talker,13047) >= 1 ) {
						myself::DeleteItem1(talker,13043,gg::OwnItemCount(talker,13043));
						myself::DeleteItem1(talker,13047,gg::OwnItemCount(talker,13047));
						myself::GiveItem1(talker,13044,1);
						myself::ShowPage(talker,"pa61_enchant_npc_q0129_03.htm");
					} else if( gg::OwnItemCount(talker,13043) >= 1 && gg::OwnItemCount(talker,13047) == 0 ) {
						myself::ShowPage(talker,"pa61_enchant_npc_q0129_04.htm");
					} else if( gg::OwnItemCount(talker,13042) >= 1 && gg::OwnItemCount(talker,13046) == 0 ) {
						myself::ShowPage(talker,"pa61_enchant_npc_q0129_05.htm");
					} else if( gg::OwnItemCount(talker,13044) >= 1 ) {
						myself::ShowPage(talker,"pa61_enchant_npc_q0129_06.htm");
					} else if( gg::OwnItemCount(talker,13042) == 0 ) {
						myself::ShowPage(talker,"pa61_enchant_npc_q0129_01a.htm");
					}
				}
			}
		}
		super;
	}

}
