@LabelIndex 386389
@StringIndex 57078
class 0 mushika : citizen {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,124) == 1 && gg::GetMemoState(talker,124) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Meeting the Elroki (In Progress)");
			}
			if( gg::HaveMemo(talker,124) == 1 && gg::GetMemoState(talker,124) < 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Meeting the Elroki (In Progress)");
			}
			if( gg::HaveMemo(talker,124) == 1 && gg::GetMemoState(talker,124) >= 2 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Meeting the Elroki (In Progress)");
			}
			if( gg::HaveMemo(talker,125) == 0 && talker.level >= 76 && myself::GetOneTimeQuestFlag(talker,124) != 0 && myself::GetOneTimeQuestFlag(talker,125) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"The Name of Evil 1");
			}
			if( gg::HaveMemo(talker,125) == 0 && talker.level < 76 && myself::GetOneTimeQuestFlag(talker,124) != 0 && myself::GetOneTimeQuestFlag(talker,125) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"The Name of Evil 1");
			}
			if( gg::HaveMemo(talker,125) == 0 && myself::GetOneTimeQuestFlag(talker,125) != 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"The Name of Evil 1 (Done)");
			}
			if( gg::HaveMemo(talker,125) == 0 && myself::GetOneTimeQuestFlag(talker,124) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"The Name of Evil 1");
			}
			if( gg::HaveMemo(talker,125) == 1 && gg::GetMemoState(talker,125) < 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 7;
				myself::AddChoice(7,"The Name of Evil 1 (In Progress)");
			}
			if( gg::HaveMemo(talker,125) == 1 && gg::GetMemoState(talker,125) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 8;
				myself::AddChoice(8,"The Name of Evil 1 (In Progress)");
			}
			if( gg::HaveMemo(talker,125) == 1 && gg::GetMemoState(talker,125) == 2 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 9;
				myself::AddChoice(9,"The Name of Evil 1 (In Progress)");
			}
			if( gg::HaveMemo(talker,125) == 1 && gg::GetMemoState(talker,125) >= 3 && gg::GetMemoState(talker,125) <= 13 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 10;
				myself::AddChoice(10,"The Name of Evil 1 (In Progress)");
			}
			if( gg::HaveMemo(talker,125) == 1 && gg::GetMemoState(talker,125) == 14 && gg::OwnItemCount(talker,8781) >= 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 11;
				myself::AddChoice(11,"The Name of Evil 1 (In Progress)");
			}
			if( gg::HaveMemo(talker,126) == 1 && gg::GetMemoState(talker,126) == 409 && myself::GetOneTimeQuestFlag(talker,126) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 12;
				myself::AddChoice(12,"The Name of Evil 2 (In Progress)");
			}
			if( gg::HaveMemo(talker,126) == 1 && gg::GetMemoState(talker,126) < 409 && myself::GetOneTimeQuestFlag(talker,126) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 13;
				myself::AddChoice(13,"The Name of Evil 2 (In Progress)");
			}
			if( gg::HaveMemo(talker,126) == 1 && gg::GetMemoState(talker,126) == 410 && myself::GetOneTimeQuestFlag(talker,126) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 14;
				myself::AddChoice(14,"The Name of Evil 2 (In Progress)");
			}
			if( gg::HaveMemo(talker,111) == 1 && gg::GetMemoState(talker,111) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 15;
				myself::AddChoice(15,"Elrokian Hunter's Proof (In Progress)");
			}
			if( gg::HaveMemo(talker,111) == 1 && gg::GetMemoState(talker,111) > 1 && gg::GetMemoState(talker,111) < 10 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 16;
				myself::AddChoice(16,"Elrokian Hunter's Proof (In Progress)");
			}
			if( gg::HaveMemo(talker,111) == 1 && gg::GetMemoState(talker,111) >= 10 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 17;
				myself::AddChoice(17,"Elrokian Hunter's Proof (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,124) == 1 && gg::GetMemoState(talker,124) == 1 ) ) {
						myself::SetCurrentQuestID(124);
						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,"mushika_q0124_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,124) == 1 && gg::GetMemoState(talker,124) < 1 ) ) {
						myself::SetCurrentQuestID(124);
						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,"mushika_q0124_02.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,124) == 1 && gg::GetMemoState(talker,124) >= 2 ) ) {
						myself::SetCurrentQuestID(124);
						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,"mushika_q0124_04.htm");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,125) == 0 && talker.level >= 76 && myself::GetOneTimeQuestFlag(talker,124) != 0 && myself::GetOneTimeQuestFlag(talker,125) == 0 ) ) {
						myself::SetCurrentQuestID(125);
						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::ShowQuestPage(talker,"mushika_q0125_01.htm",125);
						} else {
							myself::ShowPage(talker,"fullquest.htm");
						}
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,125) == 0 && talker.level < 76 && myself::GetOneTimeQuestFlag(talker,124) != 0 && myself::GetOneTimeQuestFlag(talker,125) == 0 ) ) {
						myself::SetCurrentQuestID(125);
						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,"mushika_q0125_02.htm",125);
					}
					break;
				}
				case 5: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,125) == 0 && myself::GetOneTimeQuestFlag(talker,125) != 0 ) ) {
						myself::SetCurrentQuestID(125);
						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 6: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,125) == 0 && myself::GetOneTimeQuestFlag(talker,124) == 0 ) ) {
						myself::SetCurrentQuestID(125);
						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,"mushika_q0125_04.htm",125);
					}
					break;
				}
				case 7: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,125) == 1 && gg::GetMemoState(talker,125) < 1 ) ) {
						myself::SetCurrentQuestID(125);
						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,"mushika_q0125_09.htm");
					}
					break;
				}
				case 8: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,125) == 1 && gg::GetMemoState(talker,125) == 1 ) ) {
						myself::SetCurrentQuestID(125);
						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,"mushika_q0125_11a.htm");
					}
					break;
				}
				case 9: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,125) == 1 && gg::GetMemoState(talker,125) == 2 ) ) {
						myself::SetCurrentQuestID(125);
						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,"mushika_q0125_13.htm");
					}
					break;
				}
				case 10: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,125) == 1 && gg::GetMemoState(talker,125) >= 3 && gg::GetMemoState(talker,125) <= 13 ) ) {
						myself::SetCurrentQuestID(125);
						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,"mushika_q0125_14.htm");
					}
					break;
				}
				case 11: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,125) == 1 && gg::GetMemoState(talker,125) == 14 && gg::OwnItemCount(talker,8781) >= 1 ) ) {
						myself::SetCurrentQuestID(125);
						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::IncrementParam(talker,0,859195);
						myself::IncrementParam(talker,1,86603);
						myself::DeleteItem1(talker,8781,gg::OwnItemCount(talker,8781));
						myself::RemoveMemo(talker,125);
						myself::SoundEffect(talker,"ItemSound.quest_finish");
						myself::ShowPage(talker,"mushika_q0125_15.htm");
						myself::SetOneTimeQuestFlag(talker,125,1);
						gg::AddLog(2,talker,125);
					}
					break;
				}
				case 12: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,126) == 1 && gg::GetMemoState(talker,126) == 409 && myself::GetOneTimeQuestFlag(talker,126) == 0 ) ) {
						myself::SetCurrentQuestID(126);
						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,"mushika_q0126_01.htm");
					}
					break;
				}
				case 13: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,126) == 1 && gg::GetMemoState(talker,126) < 409 && myself::GetOneTimeQuestFlag(talker,126) == 0 ) ) {
						myself::SetCurrentQuestID(126);
						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,"mushika_q0126_02.htm");
					}
					break;
				}
				case 14: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,126) == 1 && gg::GetMemoState(talker,126) == 410 && myself::GetOneTimeQuestFlag(talker,126) == 0 ) ) {
						myself::SetCurrentQuestID(126);
						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,"mushika_q0126_03a.htm");
					}
					break;
				}
				case 15: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,111) == 1 && gg::GetMemoState(talker,111) == 1 ) ) {
						myself::SetCurrentQuestID(111);
						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::SetFlagJournal(talker,111,2);
						myself::ShowQuestMark(talker,111);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
						myself::SetMemoState(talker,111,2);
						myself::ShowPage(talker,"mushika_q0111_01.htm");
					}
					break;
				}
				case 16: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,111) == 1 && gg::GetMemoState(talker,111) > 1 && gg::GetMemoState(talker,111) < 10 ) ) {
						myself::SetCurrentQuestID(111);
						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,"mushika_q0111_02 .htm");
					}
					break;
				}
				case 17: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,111) == 1 && gg::GetMemoState(talker,111) >= 10 ) ) {
						myself::SetCurrentQuestID(111);
						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,"mushika_q0111_03.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler QUEST_ACCEPTED(quest_id,talker) {
		if( quest_id == 125 ) {
			myself::SetCurrentQuestID(125);
			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,125) == 0 && talker.level >= 76 && myself::GetOneTimeQuestFlag(talker,124) != 0 && myself::GetOneTimeQuestFlag(talker,125) == 0 ) {
				if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
					talker.quest_last_reward_time = myself::GetCurrentTick();
					myself::SetMemo(talker,125);
					myself::ShowQuestMark(talker,125);
					myself::SoundEffect(talker,"ItemSound.quest_accept");
					myself::ShowQuestPage(talker,"mushika_q0125_08.htm",125);
					gg::AddLog(1,talker,125);
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,fhtml0,reply,talker) {
		if( ask == 124 ) {
			myself::SetCurrentQuestID(124);
			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 == 124 ) {
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,124) == 1 && gg::GetMemoState(talker,124) == 1 ) {
					myself::SetMemoState(talker,124,2);
					myself::ShowPage(talker,"mushika_q0124_03.htm");
					myself::SetFlagJournal(talker,124,3);
					myself::ShowQuestMark(talker,124);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
		}
		if( ask == 125 ) {
			myself::SetCurrentQuestID(125);
			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 == 125 ) {
			if( reply == 1 && gg::HaveMemo(talker,125) == 0 && talker.level >= 76 && myself::GetOneTimeQuestFlag(talker,124) != 0 && myself::GetOneTimeQuestFlag(talker,125) == 0 ) {
				myself::ShowQuestPage(talker,"mushika_q0125_05.htm",125);
			}
			if( reply == 2 ) {
				myself::ShowQuestPage(talker,"mushika_q0125_06.htm",125);
			}
			if( reply == 3 ) {
				myself::FHTML_SetFileName(fhtml0,"mushika_q0125_07.htm");
				myself::FHTML_SetInt(fhtml0,"quest_id",125);
				myself::ShowQuestFHTML(talker,fhtml0,125);
			}
			if( reply == 4 && gg::HaveMemo(talker,125) == 1 ) {
				myself::ShowPage(talker,"mushika_q0125_10.htm");
			}
			if( reply == 5 && gg::HaveMemo(talker,125) == 1 ) {
				myself::SetMemoState(talker,125,1);
				myself::ShowPage(talker,"mushika_q0125_11.htm");
			}
			if( reply == 6 && gg::HaveMemo(talker,125) == 1 && gg::GetMemoState(talker,125) == 1 ) {
				myself::GiveItem1(talker,8782,1);
				myself::SetMemoState(talker,125,2);
				myself::ShowPage(talker,"mushika_q0125_12.htm");
				myself::SetFlagJournal(talker,125,2);
				myself::ShowQuestMark(talker,125);
				myself::SoundEffect(talker,"ItemSound.quest_middle");
			}
		}
		if( ask == 126 ) {
			myself::SetCurrentQuestID(126);
			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 == 126 ) {
			if( ( reply == 1 && gg::HaveMemo(talker,126) == 1 && ( gg::GetMemoState(talker,126) == 409 || gg::GetMemoState(talker,126) == 410 ) ) && myself::GetOneTimeQuestFlag(talker,126) == 0 ) {
				myself::ShowPage(talker,"mushika_q0126_03.htm");
				if( gg::GetMemoState(talker,126) == 409 ) {
					myself::SetFlagJournal(talker,126,23);
					myself::ShowQuestMark(talker,126);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					myself::SetMemoState(talker,126,410);
				}
			}
			if( reply == 2 && gg::HaveMemo(talker,126) == 1 && gg::GetMemoState(talker,126) == 410 ) {
				myself::ShowPage(talker,"mushika_q0126_08.htm");
			}
			if( reply == 3 && gg::HaveMemo(talker,126) == 1 && gg::GetMemoState(talker,126) == 410 ) {
				if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
					talker.quest_last_reward_time = myself::GetCurrentTick();
					myself::GiveItem1(talker,57,460483);
					myself::IncrementParam(talker,0,1015973);
					myself::IncrementParam(talker,1,102802);
					myself::GiveItem1(talker,729,1);
					myself::ShowPage(talker,"mushika_q0126_09.htm");
					myself::RemoveMemo(talker,126);
					myself::SoundEffect(talker,"ItemSound.quest_finish");
					myself::SetOneTimeQuestFlag(talker,126,1);
					gg::AddLog(2,talker,126);
				}
			}
		}
		super;
	}

}
