@LabelIndex 377868
@StringIndex 55516
class 0 warehouse_keeper_sonin : warehouse_keeper_for_chaotic {
handler:
	EventHandler TALK_SELECTED(fhtml0,i0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,135) == 1 && gg::GetMemoState(talker,135) < 2 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Temple Executor (In Progress)");
			}
			if( gg::HaveMemo(talker,135) == 1 && ( gg::GetMemoState(talker,135) == 2 || gg::GetMemoState(talker,135) == 3 ) ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Temple Executor (In Progress)");
			}
			if( gg::HaveMemo(talker,135) == 1 && gg::GetMemoState(talker,135) == 4 && gg::OwnItemCount(talker,10328) < 10 && gg::OwnItemCount(talker,10331) < 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Temple Executor (In Progress)");
			}
			if( gg::HaveMemo(talker,135) == 1 && gg::GetMemoState(talker,135) == 5 && gg::OwnItemCount(talker,10328) >= 10 && gg::OwnItemCount(talker,10331) < 1 && ( gg::GetMemoStateEx(talker,135,1) / 10 ) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Temple Executor (In Progress)");
			}
			if( gg::HaveMemo(talker,135) == 1 && gg::GetMemoState(talker,135) >= 5 && ( gg::GetMemoStateEx(talker,135,1) / 10 ) >= 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Temple Executor (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,135) == 1 && gg::GetMemoState(talker,135) < 2 ) ) {
						myself::SetCurrentQuestID(135);
						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,"warehouse_keeper_sonin_q0135_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,135) == 1 && ( gg::GetMemoState(talker,135) == 2 || gg::GetMemoState(talker,135) == 3 ) ) ) {
						myself::SetCurrentQuestID(135);
						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,"warehouse_keeper_sonin_q0135_02.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,135) == 1 && gg::GetMemoState(talker,135) == 4 && gg::OwnItemCount(talker,10328) < 10 && gg::OwnItemCount(talker,10331) < 1 ) ) {
						myself::SetCurrentQuestID(135);
						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,"warehouse_keeper_sonin_q0135_02a.htm");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,135) == 1 && gg::GetMemoState(talker,135) == 5 && gg::OwnItemCount(talker,10328) >= 10 && gg::OwnItemCount(talker,10331) < 1 && ( gg::GetMemoStateEx(talker,135,1) / 10 ) == 0 ) ) {
						myself::SetCurrentQuestID(135);
						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::GiveItem1(talker,10331,1);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
						i0 = gg::GetMemoStateEx(talker,135,1);
						myself::SetMemoStateEx(talker,135,1,( i0 + 10 ));
						myself::DeleteItem1(talker,10328,gg::OwnItemCount(talker,10328));
						myself::ShowPage(talker,"warehouse_keeper_sonin_q0135_03.htm");
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,135) == 1 && gg::GetMemoState(talker,135) >= 5 && ( gg::GetMemoStateEx(talker,135,1) / 10 ) >= 1 ) ) {
						myself::SetCurrentQuestID(135);
						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,10331) == 0 ) {
							myself::GiveItem1(talker,10331,1);
							myself::SoundEffect(talker,"ItemSound.quest_middle");
						}
						myself::ShowPage(talker,"warehouse_keeper_sonin_q0135_04.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 135 ) {
			myself::SetCurrentQuestID(135);
			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 == 135 ) {
		}
		super;
	}

}
