@LabelIndex 402683
@StringIndex 60306
class 0 emperor_shumeimman : citizen {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Seven Signs, Seal of the Emperor (in progress)");
			}
			if( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 4 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Seven Signs, Seal of the Emperor (in progress)");
			}
			if( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 4 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Seven Signs, Seal of the Emperor (in progress)");
			}
			if( _choiceN > 1 ) {
				myself::ShowChoicePage(talker,1);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 ) {
			switch(_code) {
				case 0: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 3 ) ) {
						myself::SetCurrentQuestID(196);
						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,"emperor_shumeimman_q0196_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 4 ) ) {
						myself::SetCurrentQuestID(196);
						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( gg::OwnItemCount(talker,13808) >= 1 && gg::OwnItemCount(talker,13826) >= 1 ) {
							myself::ShowPage(talker,"emperor_shumeimman_q0196_07.htm");
						} else {
							myself::ShowPage(talker,"emperor_shumeimman_q0196_08.htm");
							if( gg::OwnItemCount(talker,13808) == 0 ) {
								myself::GiveItem1(talker,13808,1);
							}
							if( gg::OwnItemCount(talker,13826) == 0 ) {
								myself::GiveItem1(talker,13826,1);
							}
						}
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 4 ) ) {
						myself::SetCurrentQuestID(196);
						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( gg::OwnItemCount(talker,13808) >= 1 && gg::OwnItemCount(talker,13826) >= 1 && gg::OwnItemCount(talker,13809) >= 1 && gg::OwnItemCount(talker,13846) >= 4 ) {
							myself::ShowPage(talker,"emperor_shumeimman_q0196_09.htm");
						}
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 196 ) {
			myself::SetCurrentQuestID(196);
			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 == 196 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 3 ) {
					myself::ShowPage(talker,"emperor_shumeimman_q0196_02.htm");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 3 ) {
					myself::ShowPage(talker,"emperor_shumeimman_q0196_03.htm");
				}
			}
			if( reply == 3 ) {
				if( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 3 ) {
					myself::ShowPage(talker,"emperor_shumeimman_q0196_04.htm");
				}
			}
			if( reply == 4 ) {
				if( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 3 ) {
					myself::ShowPage(talker,"emperor_shumeimman_q0196_05.htm");
				}
			}
			if( reply == 5 ) {
				if( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 3 ) {
					myself::GiveItem1(talker,13826,1);
					myself::GiveItem1(talker,13808,1);
					myself::SetMemoState(talker,196,4);
					myself::ShowPage(talker,"emperor_shumeimman_q0196_06.htm");
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 6 ) {
				if( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 4 ) {
					if( gg::OwnItemCount(talker,13808) >= 1 && gg::OwnItemCount(talker,13826) >= 1 && gg::OwnItemCount(talker,13809) >= 1 && gg::OwnItemCount(talker,13846) >= 4 ) {
						myself::ShowPage(talker,"emperor_shumeimman_q0196_10.htm");
					}
				}
			}
			if( reply == 7 ) {
				if( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 4 ) {
					if( gg::OwnItemCount(talker,13808) >= 1 && gg::OwnItemCount(talker,13826) >= 1 && gg::OwnItemCount(talker,13809) >= 1 && gg::OwnItemCount(talker,13846) >= 4 ) {
						myself::ShowPage(talker,"emperor_shumeimman_q0196_11.htm");
					}
				}
			}
			if( reply == 8 ) {
				if( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 4 ) {
					if( gg::OwnItemCount(talker,13808) >= 1 && gg::OwnItemCount(talker,13826) >= 1 && gg::OwnItemCount(talker,13809) >= 1 && gg::OwnItemCount(talker,13846) >= 4 ) {
						myself::ShowPage(talker,"emperor_shumeimman_q0196_12.htm");
					}
				}
			}
			if( reply == 9 ) {
				if( gg::HaveMemo(talker,196) == 1 && gg::GetMemoState(talker,196) == 4 ) {
					if( gg::OwnItemCount(talker,13808) >= 1 && gg::OwnItemCount(talker,13826) >= 1 && gg::OwnItemCount(talker,13809) >= 1 && gg::OwnItemCount(talker,13846) >= 4 ) {
						myself::DeleteItem1(talker,13826,gg::OwnItemCount(talker,13826));
						myself::DeleteItem1(talker,13808,gg::OwnItemCount(talker,13808));
						myself::DeleteItem1(talker,13809,gg::OwnItemCount(talker,13809));
						myself::DeleteItem1(talker,13846,gg::OwnItemCount(talker,13846));
						myself::SetMemoState(talker,196,5);
						myself::ShowPage(talker,"emperor_shumeimman_q0196_13.htm");
						myself::SoundEffect(talker,"ItemSound.quest_middle");
					}
				}
			}
		}
		super;
	}

}
