@LabelIndex 402932
@StringIndex 60339
class 0 priest_wood : citizen {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,197) == 0 && myself::GetOneTimeQuestFlag(talker,197) == 0 && myself::GetOneTimeQuestFlag(talker,197) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Seven Signs, Sacred Text of the Seal (complete)");
			}
			if( gg::HaveMemo(talker,197) == 1 && gg::GetMemoState(talker,197) >= 1 && gg::GetMemoState(talker,197) < 6 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Seven Signs, Sacred Text of the Seal (in progress)");
			}
			if( gg::HaveMemo(talker,197) == 1 && gg::GetMemoState(talker,197) == 6 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Seven Signs, Sacred Text of the Seal (in progress)");
			}
			if( gg::HaveMemo(talker,198) == 0 && myself::GetOneTimeQuestFlag(talker,198) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Seven Signs, Embryo (complete)");
			}
			if( gg::HaveMemo(talker,198) == 1 && gg::GetMemoState(talker,198) == 1 && gg::GetMemoState(talker,198) < 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Seven Signs, Embryo (in progress)");
			}
			if( gg::HaveMemo(talker,198) == 1 && gg::GetMemoState(talker,198) == 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Seven Signs, Embryo (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,197) == 0 && myself::GetOneTimeQuestFlag(talker,197) == 0 && myself::GetOneTimeQuestFlag(talker,197) == 1 ) ) {
						myself::SetCurrentQuestID(197);
						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,"finishedquest.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,197) == 1 && gg::GetMemoState(talker,197) >= 1 && gg::GetMemoState(talker,197) < 6 ) ) {
						myself::SetCurrentQuestID(197);
						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,"priest_wood_q0197_10.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,197) == 1 && gg::GetMemoState(talker,197) == 6 ) ) {
						myself::SetCurrentQuestID(197);
						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,13829) >= 1 ) {
							if( gg::OwnItemCount(talker,14355) >= 1 || gg::OwnItemCount(talker,14356) >= 1 || gg::OwnItemCount(talker,14357) >= 1 ) {
								myself::ShowPage(talker,"priest_wood_q0197_07.htm");
							}
						}
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,198) == 0 && myself::GetOneTimeQuestFlag(talker,198) == 1 ) ) {
						myself::SetCurrentQuestID(198);
						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,"finishedquest.htm");
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,198) == 1 && gg::GetMemoState(talker,198) == 1 && gg::GetMemoState(talker,198) < 3 ) ) {
						myself::SetCurrentQuestID(198);
						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,"priest_wood_q0198_05.htm");
					}
					break;
				}
				case 5: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,198) == 1 && gg::GetMemoState(talker,198) == 3 ) ) {
						myself::SetCurrentQuestID(198);
						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,57,10000);
						myself::IncrementParam(talker,0,100);
						myself::IncrementParam(talker,1,300);
						myself::RemoveMemo(talker,198);
						myself::SoundEffect(talker,"ItemSound.quest_finish");
						gg::AddLog(2,talker,198);
						gg::AddLog(3,talker,198);
						myself::ShowPage(talker,"priest_wood_q0198_07.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler QUEST_ACCEPTED(quest_id,talker) {
		if( quest_id == 197 ) {
			myself::SetCurrentQuestID(197);
			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::HaveMemo(talker,197) == 0 && myself::GetOneTimeQuestFlag(talker,197) == 0 && myself::GetOneTimeQuestFlag(talker,196) == 1 && talker.level >= 51 ) {
				myself::SetMemoState(talker,197,1);
				myself::SetMemo(talker,quest_id);
				myself::SoundEffect(talker,"ItemSound.quest_accept");
				myself::ShowQuestPage(talker,"priest_wood_q0197_06.htm",197);
				gg::AddLog(1,talker,quest_id);
			}
			return;
		}
		if( quest_id == 198 ) {
			myself::SetCurrentQuestID(198);
			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::HaveMemo(talker,198) == 0 && myself::GetOneTimeQuestFlag(talker,198) == 0 && myself::GetOneTimeQuestFlag(talker,197) == 1 && talker.level >= 51 ) {
				myself::SetMemoState(talker,198,1);
				myself::SetMemo(talker,quest_id);
				myself::SoundEffect(talker,"ItemSound.quest_accept");
				myself::ShowQuestPage(talker,"priest_wood_q0198_04.htm",198);
				gg::AddLog(1,talker,quest_id);
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,fhtml0,reply,talker) {
		if( ask == 197 ) {
			myself::SetCurrentQuestID(197);
			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 == 197 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,197) == 0 && myself::GetOneTimeQuestFlag(talker,197) == 0 && myself::GetOneTimeQuestFlag(talker,196) == 1 ) {
					if( talker.level >= 51 ) {
						myself::ShowQuestPage(talker,"priest_wood_q0197_04.htm",197);
					}
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,197) == 0 && myself::GetOneTimeQuestFlag(talker,197) == 0 && myself::GetOneTimeQuestFlag(talker,196) == 1 ) {
					if( talker.level >= 51 ) {
						myself::FHTML_SetFileName(fhtml0,"priest_wood_q0197_05.htm");
						myself::FHTML_SetInt(fhtml0,"quest_id",197);
						myself::ShowQuestFHTML(talker,fhtml0,197);
					}
				}
			}
			if( reply == 3 ) {
				if( gg::HaveMemo(talker,197) == 1 && gg::GetMemoState(talker,197) == 6 ) {
					if( gg::OwnItemCount(talker,13829) >= 1 ) {
						if( gg::OwnItemCount(talker,14355) >= 1 || gg::OwnItemCount(talker,14356) >= 1 || gg::OwnItemCount(talker,14357) >= 1 ) {
							myself::ShowPage(talker,"priest_wood_q0197_08.htm");
						}
					}
				}
			}
			if( reply == 4 ) {
				if( gg::HaveMemo(talker,197) == 0 && gg::GetMemoState(talker,197) == 6 ) {
					if( gg::OwnItemCount(talker,13829) >= 1 ) {
						if( gg::OwnItemCount(talker,14355) >= 1 ) {
							if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
								talker.quest_last_reward_time = myself::GetCurrentTick();
								myself::GiveItem1(talker,57,10000);
								myself::IncrementParam(talker,0,100);
								myself::IncrementParam(talker,1,300);
								myself::DeleteItem1(talker,13829,gg::OwnItemCount(talker,13829));
								myself::DeleteItem1(talker,14355,gg::OwnItemCount(talker,14355));
								myself::RemoveMemo(talker,197);
								myself::SoundEffect(talker,"ItemSound.quest_finish");
								gg::AddLog(2,talker,197);
								gg::AddLog(3,talker,197);
								myself::ShowPage(talker,"priest_wood_q0197_09.htm");
							}
						} else if( gg::OwnItemCount(talker,14356) >= 1 ) {
							if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
								talker.quest_last_reward_time = myself::GetCurrentTick();
								myself::GiveItem1(talker,57,10000);
								myself::IncrementParam(talker,0,100);
								myself::IncrementParam(talker,1,300);
								myself::DeleteItem1(talker,13829,gg::OwnItemCount(talker,13829));
								myself::DeleteItem1(talker,14356,gg::OwnItemCount(talker,14356));
								myself::RemoveMemo(talker,197);
								myself::SoundEffect(talker,"ItemSound.quest_finish");
								gg::AddLog(2,talker,197);
								gg::AddLog(3,talker,197);
								myself::ShowPage(talker,"priest_wood_q0197_09.htm");
							}
						} else if( gg::OwnItemCount(talker,14357) >= 1 ) {
							if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
								talker.quest_last_reward_time = myself::GetCurrentTick();
								myself::GiveItem1(talker,57,10000);
								myself::IncrementParam(talker,0,100);
								myself::IncrementParam(talker,1,300);
								myself::DeleteItem1(talker,13829,gg::OwnItemCount(talker,13829));
								myself::DeleteItem1(talker,14357,gg::OwnItemCount(talker,14357));
								myself::RemoveMemo(talker,197);
								myself::SoundEffect(talker,"ItemSound.quest_finish");
								gg::AddLog(2,talker,197);
								gg::AddLog(3,talker,197);
								myself::ShowPage(talker,"priest_wood_q0197_09.htm");
							}
						}
					}
				}
			}
		}
		if( ask == 198 ) {
			myself::SetCurrentQuestID(198);
			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 == 198 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,198) == 1 && gg::GetMemoState(talker,198) == 1 && gg::GetMemoState(talker,198) < 3 ) {
					myself::ShowPage(talker,"priest_wood_q0198_06.htm");
				}
			}
		}
		super;
	}

}
