@LabelIndex 379113
@StringIndex 55684
class 0 head_blacksmith_newyear : master_lv3_black {
handler:
	EventHandler TALK_SELECTED(c0,fhtml0,i0,talker) {
		if( _from_choice == 0 ) {
			if( talker.level >= 46 && gg::HaveMemo(talker,121) == 0 && myself::GetOneTimeQuestFlag(talker,121) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Pavel the Giant");
			}
			if( talker.level < 46 && gg::HaveMemo(talker,121) == 0 && myself::GetOneTimeQuestFlag(talker,121) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Pavel the Giant");
			}
			if( gg::HaveMemo(talker,121) == 0 && myself::GetOneTimeQuestFlag(talker,121) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Pavel the Giant (Done)");
			}
			if( gg::HaveMemo(talker,121) == 1 && myself::GetOneTimeQuestFlag(talker,121) == 0 && gg::GetMemoState(talker,121) == ( ( 1 * 10 ) + 1 ) ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Pavel the Giant (In Progress)");
			}
			if( gg::HaveMemo(talker,118) == 0 && gg::HaveMemo(talker,123) == 0 && talker.level >= 19 && myself::IsAcademyMember(talker) == 1 && myself::HasAcademyMaster(talker) == 1 && myself::GetOneTimeQuestFlag(talker,123) == 0 && myself::GetOneTimeQuestFlag(talker,118) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"The Leader and the Follower");
			}
			if( ( ( gg::HaveMemo(talker,118) == 0 && gg::HaveMemo(talker,123) == 0 && ( talker.level < 19 || myself::IsAcademyMember(talker) == 0 || myself::HasAcademyMaster(talker) == 0 ) ) && myself::GetOneTimeQuestFlag(talker,123) == 0 ) && myself::GetOneTimeQuestFlag(talker,118) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"The Leader and the Follower");
			}
			if( gg::HaveMemo(talker,118) == 1 && myself::GetOneTimeQuestFlag(talker,118) == 0 && myself::GetOneTimeQuestFlag(talker,123) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"The Leader and the Follower");
			}
			if( gg::HaveMemo(talker,118) == 0 && gg::HaveMemo(talker,123) == 0 && myself::GetOneTimeQuestFlag(talker,123) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 7;
				myself::AddChoice(7,"The Leader and the Follower (Done)");
			}
			if( gg::HaveMemo(talker,118) == 0 && gg::HaveMemo(talker,123) == 0 && myself::GetOneTimeQuestFlag(talker,118) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 8;
				myself::AddChoice(8,"The Leader and the Follower");
			}
			if( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 1 && gg::OwnItemCount(talker,8549) < 10 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 9;
				myself::AddChoice(9,"The Leader and the Follower (In Progress)");
			}
			if( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 1 && gg::OwnItemCount(talker,8549) >= 10 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 10;
				myself::AddChoice(10,"The Leader and the Follower (In Progress)");
			}
			if( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 2 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 11;
				myself::AddChoice(11,"The Leader and the Follower (In Progress)");
			}
			if( myself::HasAcademyMember(talker) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 12;
				myself::AddChoice(12,"The Leader and the Follower (Sponsor)");
			}
			if( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 13;
				myself::AddChoice(13,"The Leader and the Follower (In Progress)");
			}
			if( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 4 && gg::OwnItemCount(talker,8550) < 8 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 14;
				myself::AddChoice(14,"The Leader and the Follower (In Progress)");
			}
			if( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 4 && gg::OwnItemCount(talker,8550) >= 8 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 15;
				myself::AddChoice(15,"The Leader and the Follower (In Progress)");
			}
			if( gg::HaveMemo(talker,114) == 1 && gg::GetMemoState(talker,114) == 11 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 16;
				myself::AddChoice(16,"Resurrection of an Old Manager (In Progress)");
			}
			if( gg::HaveMemo(talker,114) == 1 && gg::GetMemoState(talker,114) == 12 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 17;
				myself::AddChoice(17,"Resurrection of an Old Manager (In Progress)");
			}
			if( gg::HaveMemo(talker,714) == 1 && gg::GetMemoState(talker,714) >= 3 && gg::GetMemoState(talker,714) <= 4 && myself::GetOneTimeQuestFlag(talker,120) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 18;
				myself::AddChoice(18,"Path to Becoming a Lord - Schuttgart (in progress)");
			}
			if( gg::HaveMemo(talker,714) == 1 && gg::GetMemoState(talker,714) == 3 && myself::GetOneTimeQuestFlag(talker,120) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 19;
				myself::AddChoice(19,"Path to Becoming a Lord - Schuttgart (in progress)");
			}
			if( gg::HaveMemo(talker,714) == 1 && gg::GetMemoState(talker,714) == 4 && myself::GetOneTimeQuestFlag(talker,120) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 20;
				myself::AddChoice(20,"Path to Becoming a Lord - Schuttgart (in progress)");
			}
			if( _choiceN > 1 ) {
				myself::ShowChoicePage(talker,1);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 ) {
			switch(_code) {
				case 0: {
					if( _from_choice == 0 || ( talker.level >= 46 && gg::HaveMemo(talker,121) == 0 && myself::GetOneTimeQuestFlag(talker,121) == 0 ) ) {
						myself::SetCurrentQuestID(121);
						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 ) {
							myself::FHTML_SetFileName(fhtml0,"head_blacksmith_newyear_q0121_0101.htm");
							myself::FHTML_SetInt(fhtml0,"quest_id",121);
							myself::ShowQuestFHTML(talker,fhtml0,121);
						} else {
							myself::ShowPage(talker,"fullquest.htm");
						}
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( talker.level < 46 && gg::HaveMemo(talker,121) == 0 && myself::GetOneTimeQuestFlag(talker,121) == 0 ) ) {
						myself::SetCurrentQuestID(121);
						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,"head_blacksmith_newyear_q0121_0103.htm",121);
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,121) == 0 && myself::GetOneTimeQuestFlag(talker,121) == 1 ) ) {
						myself::SetCurrentQuestID(121);
						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 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,121) == 1 && myself::GetOneTimeQuestFlag(talker,121) == 0 && gg::GetMemoState(talker,121) == ( ( 1 * 10 ) + 1 ) ) ) {
						myself::SetCurrentQuestID(121);
						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,"head_blacksmith_newyear_q0121_0105.htm");
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,118) == 0 && gg::HaveMemo(talker,123) == 0 && talker.level >= 19 && myself::IsAcademyMember(talker) == 1 && myself::HasAcademyMaster(talker) == 1 && myself::GetOneTimeQuestFlag(talker,123) == 0 && myself::GetOneTimeQuestFlag(talker,118) == 0 ) ) {
						myself::SetCurrentQuestID(123);
						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 ) {
							myself::FHTML_SetFileName(fhtml0,"head_blacksmith_newyear_q0123_01.htm");
							myself::FHTML_SetInt(fhtml0,"quest_id",123);
							myself::ShowQuestFHTML(talker,fhtml0,123);
						} else {
							myself::ShowPage(talker,"fullquest.htm");
						}
					}
					break;
				}
				case 5: {
					if( _from_choice == 0 || ( ( ( gg::HaveMemo(talker,118) == 0 && gg::HaveMemo(talker,123) == 0 && ( talker.level < 19 || myself::IsAcademyMember(talker) == 0 || myself::HasAcademyMaster(talker) == 0 ) ) && myself::GetOneTimeQuestFlag(talker,123) == 0 ) && myself::GetOneTimeQuestFlag(talker,118) == 0 ) ) {
						myself::SetCurrentQuestID(123);
						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,"head_blacksmith_newyear_q0123_02.htm",123);
					}
					break;
				}
				case 6: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,118) == 1 && myself::GetOneTimeQuestFlag(talker,118) == 0 && myself::GetOneTimeQuestFlag(talker,123) == 0 ) ) {
						myself::SetCurrentQuestID(123);
						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,"head_blacksmith_newyear_q0123_02b.htm",123);
					}
					break;
				}
				case 7: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,118) == 0 && gg::HaveMemo(talker,123) == 0 && myself::GetOneTimeQuestFlag(talker,123) == 1 ) ) {
						myself::SetCurrentQuestID(123);
						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 8: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,118) == 0 && gg::HaveMemo(talker,123) == 0 && myself::GetOneTimeQuestFlag(talker,118) == 1 ) ) {
						myself::SetCurrentQuestID(123);
						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,"head_blacksmith_newyear_q0123_02a.htm");
					}
					break;
				}
				case 9: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 1 && gg::OwnItemCount(talker,8549) < 10 ) ) {
						myself::SetCurrentQuestID(123);
						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,"head_blacksmith_newyear_q0123_04.htm");
					}
					break;
				}
				case 10: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 1 && gg::OwnItemCount(talker,8549) >= 10 ) ) {
						myself::SetCurrentQuestID(123);
						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,"head_blacksmith_newyear_q0123_05.htm");
					}
					break;
				}
				case 11: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 2 ) ) {
						myself::SetCurrentQuestID(123);
						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::HasAcademyMaster(talker) == 0 ) {
							if( gg::GetMemoStateEx(talker,123,1) == 1 ) {
								myself::ShowPage(talker,"head_blacksmith_newyear_q0123_06a.htm");
							} else if( gg::GetMemoStateEx(talker,123,1) == 2 ) {
								myself::ShowPage(talker,"head_blacksmith_newyear_q0123_06b.htm");
							} else if( gg::GetMemoStateEx(talker,123,1) == 3 ) {
								myself::ShowPage(talker,"head_blacksmith_newyear_q0123_06c.htm");
							}
						} else {
							c0 = myself::GetAcademyMaster(talker);
							if( myself::IsNullCreature(c0) == 1 || myself::DistFromMe(c0) > 1500 ) {
								if( gg::GetMemoStateEx(talker,123,1) == 1 ) {
									myself::ShowPage(talker,"head_blacksmith_newyear_q0123_06.htm");
								} else if( gg::GetMemoStateEx(talker,123,1) == 2 ) {
									myself::ShowPage(talker,"head_blacksmith_newyear_q0123_06d.htm");
								} else if( gg::GetMemoStateEx(talker,123,1) == 3 ) {
									myself::ShowPage(talker,"head_blacksmith_newyear_q0123_06e.htm");
								}
							} else if( myself::IsNullCreature(c0) == 0 && myself::DistFromMe(c0) <= 1500 ) {
								myself::ShowPage(talker,"head_blacksmith_newyear_q0123_07.htm");
							}
						}
					}
					break;
				}
				case 12: {
					if( _from_choice == 0 || myself::HasAcademyMember(talker) == 1 ) {
						myself::SetCurrentQuestID(123);
						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;
						}
						c0 = myself::GetAcademyMember(talker);
						if( myself::IsNullCreature(c0) == 1 || myself::DistFromMe(c0) > 1500 ) {
							myself::ShowPage(talker,"head_blacksmith_newyear_q0123_09.htm");
						} else if( myself::IsNullCreature(c0) == 0 && myself::DistFromMe(c0) <= 1500 ) {
							if( gg::HaveMemo(c0,123) == 1 && gg::GetMemoState(c0,123) == 2 ) {
								myself::ShowPage(talker,"head_blacksmith_newyear_q0123_08.htm");
							} else if( gg::HaveMemo(c0,123) == 1 && gg::GetMemoState(c0,123) == 3 ) {
								myself::ShowPage(talker,"head_blacksmith_newyear_q0123_12.htm");
							} else {
								myself::ShowPage(talker,"head_blacksmith_newyear_q0123_14.htm");
							}
						}
					}
					break;
				}
				case 13: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 3 ) ) {
						myself::SetCurrentQuestID(123);
						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::SetMemoState(talker,123,4);
						myself::SetFlagJournal(talker,123,7);
						myself::ShowQuestMark(talker,123);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
						myself::ShowPage(talker,"head_blacksmith_newyear_q0123_15.htm");
					}
					break;
				}
				case 14: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 4 && gg::OwnItemCount(talker,8550) < 8 ) ) {
						myself::SetCurrentQuestID(123);
						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,"head_blacksmith_newyear_q0123_16.htm");
					}
					break;
				}
				case 15: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 4 && gg::OwnItemCount(talker,8550) >= 8 ) ) {
						myself::SetCurrentQuestID(123);
						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::GetMemoStateEx(talker,123,1) == 1 ) {
							if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
								talker.quest_last_reward_time = myself::GetCurrentTick();
								myself::GiveItem1(talker,7850,1);
								myself::GiveItem1(talker,7851,1);
								myself::GiveItem1(talker,7852,1);
								myself::GiveItem1(talker,7853,1);
								myself::DeleteItem1(talker,8550,gg::OwnItemCount(talker,8550));
								myself::RemoveMemo(talker,123);
								gg::AddLog(2,talker,123);
								myself::SetOneTimeQuestFlag(talker,123,1);
								myself::SoundEffect(talker,"ItemSound.quest_finish");
							}
						} else if( gg::GetMemoStateEx(talker,123,1) == 2 ) {
							if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
								talker.quest_last_reward_time = myself::GetCurrentTick();
								myself::GiveItem1(talker,7850,1);
								myself::GiveItem1(talker,7854,1);
								myself::GiveItem1(talker,7855,1);
								myself::GiveItem1(talker,7856,1);
								myself::DeleteItem1(talker,8550,gg::OwnItemCount(talker,8550));
								myself::RemoveMemo(talker,123);
								myself::SetOneTimeQuestFlag(talker,123,1);
								myself::SoundEffect(talker,"ItemSound.quest_finish");
							}
						} else if( gg::GetMemoStateEx(talker,123,1) == 3 ) {
							if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
								talker.quest_last_reward_time = myself::GetCurrentTick();
								myself::GiveItem1(talker,7850,1);
								myself::GiveItem1(talker,7857,1);
								myself::GiveItem1(talker,7858,1);
								myself::GiveItem1(talker,7859,1);
								myself::DeleteItem1(talker,8550,gg::OwnItemCount(talker,8550));
								myself::RemoveMemo(talker,123);
								myself::SetOneTimeQuestFlag(talker,123,1);
								myself::SoundEffect(talker,"ItemSound.quest_finish");
							}
						}
						myself::ShowPage(talker,"head_blacksmith_newyear_q0123_17.htm");
					}
					break;
				}
				case 16: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,114) == 1 && gg::GetMemoState(talker,114) == 11 ) ) {
						myself::SetCurrentQuestID(114);
						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,"head_blacksmith_newyear_q0114_01.htm");
					}
					break;
				}
				case 17: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,114) == 1 && gg::GetMemoState(talker,114) == 12 ) ) {
						myself::SetCurrentQuestID(114);
						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,"head_blacksmith_newyear_q0114_03.htm");
					}
					break;
				}
				case 18: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,714) == 1 && gg::GetMemoState(talker,714) >= 3 && gg::GetMemoState(talker,714) <= 4 && myself::GetOneTimeQuestFlag(talker,120) == 1 ) ) {
						myself::SetCurrentQuestID(714);
						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::SetMemoState(talker,714,5);
						myself::ShowPage(talker,"head_blacksmith_newyear_q0714_01.htm");
						myself::SetFlagJournal(talker,714,4);
						myself::ShowQuestMark(talker,714);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
					}
					break;
				}
				case 19: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,714) == 1 && gg::GetMemoState(talker,714) == 3 && myself::GetOneTimeQuestFlag(talker,120) == 0 ) ) {
						myself::SetCurrentQuestID(714);
						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,"head_blacksmith_newyear_q0714_02.htm");
					}
					break;
				}
				case 20: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,714) == 1 && gg::GetMemoState(talker,714) == 4 && myself::GetOneTimeQuestFlag(talker,120) == 0 ) ) {
						myself::SetCurrentQuestID(714);
						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::GetOneTimeQuestFlag(talker,121) == 0 ) {
							myself::ShowPage(talker,"head_blacksmith_newyear_q0714_07.htm");
						} else if( myself::GetOneTimeQuestFlag(talker,114) == 0 ) {
							myself::ShowPage(talker,"head_blacksmith_newyear_q0714_08.htm");
						} else if( myself::GetOneTimeQuestFlag(talker,120) == 0 ) {
							myself::ShowPage(talker,"head_blacksmith_newyear_q0714_09.htm");
						}
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler QUEST_ACCEPTED(quest_id,talker) {
		if( quest_id == 121 ) {
			myself::SetCurrentQuestID(121);
			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.level >= 46 && myself::GetOneTimeQuestFlag(talker,121) == 0 ) {
				talker.quest_last_reward_time = myself::GetCurrentTick();
				myself::SetMemo(talker,121);
				myself::SetMemoState(talker,121,( ( 1 * 10 ) + 1 ));
				gg::AddLog(1,talker,121);
				myself::SetFlagJournal(talker,121,1);
				myself::SoundEffect(talker,"ItemSound.quest_accept");
				myself::ShowQuestPage(talker,"head_blacksmith_newyear_q0121_0104.htm",121);
				myself::ShowQuestMark(talker,121);
			}
			return;
		}
		if( quest_id == 123 ) {
			myself::SetCurrentQuestID(123);
			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::HaveMemo(talker,118) == 0 && gg::HaveMemo(talker,123) == 0 && talker.level >= 19 && myself::IsAcademyMember(talker) == 1 && myself::HasAcademyMaster(talker) == 1 && myself::GetOneTimeQuestFlag(talker,123) == 0 && myself::GetOneTimeQuestFlag(talker,118) == 0 ) {
					myself::SetMemo(talker,quest_id);
					myself::SetMemoState(talker,123,1);
					myself::SetFlagJournal(talker,123,1);
					myself::ShowQuestMark(talker,123);
					myself::SoundEffect(talker,"ItemSound.quest_accept");
					myself::ShowQuestPage(talker,"head_blacksmith_newyear_q0123_03.htm",123);
					gg::AddLog(1,talker,quest_id);
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,c0,reply,talker) {
		if( ask == 123 ) {
			myself::SetCurrentQuestID(123);
			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 == 123 ) {
			if( reply == 1 ) {
				if( myself::HasAcademyMember(talker) == 1 ) {
					c0 = myself::GetAcademyMember(talker);
					if( myself::IsNullCreature(c0) == 0 && myself::DistFromMe(c0) <= 1500 ) {
						if( gg::HaveMemo(c0,123) == 1 && gg::GetMemoState(c0,123) == 2 && gg::GetMemoStateEx(c0,123,1) == 1 && gg::OwnItemCount(talker,1458) >= 922 ) {
							myself::DeleteItem1(talker,1458,922);
							myself::SetMemoState(c0,123,3);
							myself::SetFlagJournal(c0,123,6);
							myself::ShowQuestMark(c0,123);
							myself::SoundEffect(c0,"ItemSound.quest_middle");
							myself::ShowPage(talker,"head_blacksmith_newyear_q0123_10.htm");
						} else if( gg::HaveMemo(c0,123) == 1 && gg::GetMemoState(c0,123) == 2 && gg::GetMemoStateEx(c0,123,1) == 2 && gg::OwnItemCount(talker,1458) >= 771 ) {
							myself::DeleteItem1(talker,1458,771);
							myself::SetMemoState(c0,123,3);
							myself::SetFlagJournal(c0,123,6);
							myself::ShowQuestMark(c0,123);
							myself::SoundEffect(c0,"ItemSound.quest_middle");
							myself::ShowPage(talker,"head_blacksmith_newyear_q0123_10.htm");
						} else if( gg::HaveMemo(c0,123) == 1 && gg::GetMemoState(c0,123) == 2 && gg::GetMemoStateEx(c0,123,1) == 3 && gg::OwnItemCount(talker,1458) >= 771 ) {
							myself::DeleteItem1(talker,1458,771);
							myself::SetMemoState(c0,123,3);
							myself::SetFlagJournal(c0,123,6);
							myself::ShowQuestMark(c0,123);
							myself::SoundEffect(c0,"ItemSound.quest_middle");
							myself::ShowPage(talker,"head_blacksmith_newyear_q0123_10.htm");
						} else if( gg::HaveMemo(c0,123) == 1 && gg::GetMemoState(c0,123) == 2 && gg::GetMemoStateEx(c0,123,1) == 1 && gg::OwnItemCount(talker,1458) < 922 ) {
							myself::ShowPage(talker,"head_blacksmith_newyear_q0123_11.htm");
						} else if( gg::HaveMemo(c0,123) == 1 && gg::GetMemoState(c0,123) == 2 && gg::GetMemoStateEx(c0,123,1) == 2 && gg::OwnItemCount(talker,1458) < 771 ) {
							myself::ShowPage(talker,"head_blacksmith_newyear_q0123_11a.htm");
						} else if( gg::HaveMemo(c0,123) == 1 && gg::GetMemoState(c0,123) == 2 && gg::GetMemoStateEx(c0,123,1) == 3 && gg::OwnItemCount(talker,1458) < 771 ) {
							myself::ShowPage(talker,"head_blacksmith_newyear_q0123_11a.htm");
						}
					}
				}
			}
			if( reply == 21 ) {
				myself::ShowPage(talker,"head_blacksmith_newyear_q0123_05a.htm");
			}
			if( reply == 22 ) {
				myself::ShowPage(talker,"head_blacksmith_newyear_q0123_05b.htm");
			}
			if( reply == 23 ) {
				myself::ShowPage(talker,"head_blacksmith_newyear_q0123_05c.htm");
			}
			if( reply == 24 ) {
				if( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 1 && gg::OwnItemCount(talker,8549) >= 10 ) {
					myself::DeleteItem1(talker,8549,gg::OwnItemCount(talker,8549));
					myself::SetMemoState(talker,123,2);
					myself::SetMemoStateEx(talker,123,1,1);
					myself::SetFlagJournal(talker,123,3);
					myself::ShowQuestMark(talker,123);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					myself::ShowPage(talker,"head_blacksmith_newyear_q0123_05d.htm");
				}
			}
			if( reply == 25 ) {
				if( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 1 && gg::OwnItemCount(talker,8549) >= 10 ) {
					myself::DeleteItem1(talker,8549,gg::OwnItemCount(talker,8549));
					myself::SetMemoState(talker,123,2);
					myself::SetMemoStateEx(talker,123,1,2);
					myself::SetFlagJournal(talker,123,4);
					myself::ShowQuestMark(talker,123);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					myself::ShowPage(talker,"head_blacksmith_newyear_q0123_05e.htm");
				}
			}
			if( reply == 26 ) {
				if( gg::HaveMemo(talker,123) == 1 && gg::GetMemoState(talker,123) == 1 && gg::OwnItemCount(talker,8549) >= 10 ) {
					myself::DeleteItem1(talker,8549,gg::OwnItemCount(talker,8549));
					myself::SetMemoState(talker,123,2);
					myself::SetMemoStateEx(talker,123,1,3);
					myself::SetFlagJournal(talker,123,5);
					myself::ShowQuestMark(talker,123);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					myself::ShowPage(talker,"head_blacksmith_newyear_q0123_05f.htm");
				}
			}
			if( reply == 27 ) {
				myself::ShowPage(talker,"head_blacksmith_newyear_q0123_05g.htm");
			}
		}
		if( ask == 114 ) {
			myself::SetCurrentQuestID(114);
			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 == 114 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,114) == 1 && gg::GetMemoState(talker,114) == 11 ) {
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::GiveItem1(talker,8289,1);
						myself::DeleteItem1(talker,8288,gg::OwnItemCount(talker,8288));
						myself::SetMemoState(talker,114,12);
						myself::SetFlagJournal(talker,114,22);
						myself::ShowQuestMark(talker,114);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
						myself::ShowPage(talker,"head_blacksmith_newyear_q0114_02.htm");
					}
				}
			}
		}
		if( ask == 714 ) {
			myself::SetCurrentQuestID(714);
			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 == 714 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,714) == 1 && gg::GetMemoState(talker,714) == 3 && myself::GetOneTimeQuestFlag(talker,120) == 0 ) {
					myself::ShowPage(talker,"head_blacksmith_newyear_q0714_03.htm");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,714) == 1 && gg::GetMemoState(talker,714) == 3 && myself::IsMyLord(talker) == 1 ) {
					if( myself::GetOneTimeQuestFlag(talker,121) == 0 ) {
						myself::ShowPage(talker,"head_blacksmith_newyear_q0714_04.htm");
					} else if( myself::GetOneTimeQuestFlag(talker,114) == 0 ) {
						myself::ShowPage(talker,"head_blacksmith_newyear_q0714_05.htm");
					} else if( myself::GetOneTimeQuestFlag(talker,120) == 0 ) {
						myself::ShowPage(talker,"head_blacksmith_newyear_q0714_06.htm");
					}
					myself::SetMemoState(talker,714,4);
					myself::SetFlagJournal(talker,714,3);
					myself::ShowQuestMark(talker,714);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
		}
		super;
	}

}
