@LabelIndex 396351
@StringIndex 59174
class 0 galate : npc_galate {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,133) == 1 && gg::GetMemoState(talker,133) < 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"That's Bloody Hot! (In Progress)");
			}
			if( gg::HaveMemo(talker,133) == 1 && gg::GetMemoState(talker,133) == 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"That's Bloody Hot! (In Progress)");
			}
			if( gg::HaveMemo(talker,133) == 1 && gg::GetMemoState(talker,133) == 4 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"That's Bloody Hot! (In Progress)");
			}
			if( gg::HaveMemo(talker,130) == 1 && gg::GetMemoState(talker,130) == 1 && myself::GetOneTimeQuestFlag(talker,130) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Path to Hellbound (In Progress)");
			}
			if( gg::HaveMemo(talker,130) == 1 && gg::GetMemoState(talker,130) == 2 && myself::GetOneTimeQuestFlag(talker,130) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Path to Hellbound (In Progress)");
			}
			if( gg::HaveMemo(talker,130) == 1 && gg::GetMemoState(talker,130) == 3 && myself::GetOneTimeQuestFlag(talker,130) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Path to Hellbound (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,133) == 1 && gg::GetMemoState(talker,133) < 3 ) ) {
						myself::SetCurrentQuestID(133);
						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,"Galate_q0133_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,133) == 1 && gg::GetMemoState(talker,133) == 3 ) ) {
						myself::SetCurrentQuestID(133);
						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,"Galate_q0133_02.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,133) == 1 && gg::GetMemoState(talker,133) == 4 ) ) {
						myself::SetCurrentQuestID(133);
						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,"Galate_q0133_04.htm");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,130) == 1 && gg::GetMemoState(talker,130) == 1 && myself::GetOneTimeQuestFlag(talker,130) == 0 ) ) {
						myself::SetCurrentQuestID(130);
						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,"galate_q0130_01.htm");
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,130) == 1 && gg::GetMemoState(talker,130) == 2 && myself::GetOneTimeQuestFlag(talker,130) == 0 ) ) {
						myself::SetCurrentQuestID(130);
						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,"galate_q0130_04.htm");
					}
					break;
				}
				case 5: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,130) == 1 && gg::GetMemoState(talker,130) == 3 && myself::GetOneTimeQuestFlag(talker,130) == 0 ) ) {
						myself::SetCurrentQuestID(130);
						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,"galate_q0130_05.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 133 ) {
			myself::SetCurrentQuestID(133);
			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 == 133 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,133) == 1 && gg::GetMemoState(talker,133) == 3 ) {
					myself::ShowPage(talker,"Galate_q0133_03.htm");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,133) == 1 && gg::GetMemoState(talker,133) == 3 ) {
					myself::ShowPage(talker,"Galate_q0133_05.htm");
					myself::DeleteItem1(talker,9785,gg::OwnItemCount(talker,9785));
					myself::SetMemoState(talker,133,4);
				}
			}
			if( reply == 3 ) {
				if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
					talker.quest_last_reward_time = myself::GetCurrentTick();
					if( gg::HaveMemo(talker,133) == 1 && gg::GetMemoState(talker,133) == 4 && gg::GetStep_FieldCycle(1) >= 1 ) {
						myself::RemoveMemo(talker,133);
						myself::SoundEffect(talker,"ItemSound.quest_finish");
						myself::ShowPage(talker,"Galate_q0133_06.htm");
						gg::AddLog(2,talker,133);
						myself::SetOneTimeQuestFlag(talker,133,1);
						myself::GiveItem1(talker,57,254247);
						myself::IncrementParam(talker,0,331457);
						myself::IncrementParam(talker,1,32524);
					}
					if( gg::HaveMemo(talker,133) == 1 && gg::GetMemoState(talker,133) == 4 && gg::GetStep_FieldCycle(1) == 0 ) {
						myself::RemoveMemo(talker,133);
						myself::SoundEffect(talker,"ItemSound.quest_finish");
						myself::ShowPage(talker,"Galate_q0133_07.htm");
						gg::AddLog(2,talker,133);
						myself::SetOneTimeQuestFlag(talker,133,1);
						myself::GiveItem1(talker,57,254247);
						myself::IncrementParam(talker,0,325881);
						myself::IncrementParam(talker,1,32524);
					}
				}
			}
		}
		if( ask == 130 ) {
			myself::SetCurrentQuestID(130);
			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 == 130 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,130) == 1 && gg::GetMemoState(talker,130) == 1 && myself::GetOneTimeQuestFlag(talker,130) == 0 ) {
					myself::ShowPage(talker,"galate_q0130_02.htm");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,130) == 1 && gg::GetMemoState(talker,130) == 1 && myself::GetOneTimeQuestFlag(talker,130) == 0 ) {
					myself::SetMemoState(talker,130,2);
					myself::ShowPage(talker,"galate_q0130_03.htm");
					myself::SetFlagJournal(talker,130,2);
					myself::ShowQuestMark(talker,130);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 3 ) {
				if( gg::HaveMemo(talker,130) == 1 && gg::GetMemoState(talker,130) == 3 && myself::GetOneTimeQuestFlag(talker,130) == 0 ) {
					myself::ShowPage(talker,"galate_q0130_06.htm");
				}
			}
			if( reply == 4 ) {
				if( gg::HaveMemo(talker,130) == 1 && gg::GetMemoState(talker,130) == 3 && myself::GetOneTimeQuestFlag(talker,130) == 0 ) {
					myself::DeleteItem1(talker,12823,gg::OwnItemCount(talker,12823));
					myself::ShowPage(talker,"galate_q0130_07.htm");
					myself::RemoveMemo(talker,130);
					myself::SoundEffect(talker,"ItemSound.quest_finish");
					gg::AddLog(2,talker,130);
					myself::SetOneTimeQuestFlag(talker,130,1);
				}
			}
		}
		super;
	}

}
