@LabelIndex 380606
@StringIndex 55966
class 0 spring_girl_sooki : citizen {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,653) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Wild Maiden");
			}
			if( gg::HaveMemo(talker,653) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Wild Maiden (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,653) == 0 ) {
						myself::SetCurrentQuestID(653);
						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( myself::GetMemoCount(talker) < 26 ) {
							if( talker.level >= 36 ) {
								myself::FHTML_SetFileName(fhtml0,"spring_girl_sooki_q0653_01.htm");
								myself::FHTML_SetInt(fhtml0,"quest_id",653);
								myself::ShowQuestFHTML(talker,fhtml0,653);
							} else {
								myself::ShowQuestPage(talker,"spring_girl_sooki_q0653_01a.htm",653);
							}
						} else {
							myself::ShowPage(talker,"fullquest.htm");
						}
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || gg::HaveMemo(talker,653) == 1 ) {
						myself::SetCurrentQuestID(653);
						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::ShowQuestPage(talker,"spring_girl_sooki_q0653_02.htm",653);
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler QUEST_ACCEPTED(quest_id,talker) {
		if( quest_id == 653 ) {
			myself::SetCurrentQuestID(653);
			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( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
				talker.quest_last_reward_time = myself::GetCurrentTick();
				if( gg::OwnItemCount(talker,736) >= 1 ) {
					if( myself.av_quest0::CompareExchange(1,0) <= 0 ) {
						myself::DeleteItem1(talker,736,1);
						myself::SetMemo(talker,quest_id);
						myself::ShowQuestMark(talker,quest_id);
						myself::SoundEffect(talker,"ItemSound.quest_accept");
						if( gg::Rand(2) == 0 ) {
							myself::ShowQuestPage(talker,"spring_girl_sooki_q0653_04.htm",653);
						} else {
							myself::ShowQuestPage(talker,"spring_girl_sooki_q0653_04a.htm",653);
						}
						myself::AddTimerEx(65301,( 3 * 1000 ));
						gg::AddLog(1,talker,quest_id);
					} else {
						myself::ShowQuestPage(talker,"spring_girl_sooki_q0653_06.htm",653);
					}
				} else {
					myself::ShowQuestPage(talker,"spring_girl_sooki_q0653_05.htm",653);
				}
			}
			return;
		}
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id) {
		myself::SetCurrentQuestID(653);
		if( timer_id == 65301 ) {
			myself::Despawn();
		}
		super;
	}

}
