@LabelIndex 399415
@StringIndex 59761
class 0 dwyllios : npc_dwyllios {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,692) == 0 && talker.level >= 75 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"How to Oppose Evil");
			}
			if( gg::HaveMemo(talker,692) == 0 && talker.level < 75 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"How to Oppose Evil");
			}
			if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 1 && gg::OwnItemCount(talker,13857) >= 1 && myself::GetOneTimeQuestFlag(talker,10273) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"How to Oppose Evil (in progress)");
			}
			if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 1 && gg::OwnItemCount(talker,13857) >= 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"How to Oppose Evil (in progress)");
			}
			if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 1 && gg::OwnItemCount(talker,13857) < 1 && myself::GetOneTimeQuestFlag(talker,10273) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"How to Oppose Evil (in progress)");
			}
			if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 2 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"How to Oppose Evil (in progress)");
			}
			if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && gg::OwnItemCount(talker,13863) < 1 && gg::OwnItemCount(talker,13865) < 1 && gg::OwnItemCount(talker,13866) < 1 && gg::OwnItemCount(talker,13867) < 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"How to Oppose Evil (in progress)");
			}
			if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && ( gg::OwnItemCount(talker,13863) >= 1 || gg::OwnItemCount(talker,13865) >= 1 || gg::OwnItemCount(talker,13866) >= 1 || gg::OwnItemCount(talker,13867) >= 1 ) ) {
				_choiceN = ( _choiceN + 1 );
				_code = 7;
				myself::AddChoice(7,"How to Oppose Evil (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,692) == 0 && talker.level >= 75 ) ) {
						myself::SetCurrentQuestID(692);
						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,"dwyllios_q0692_01.htm",692);
						} else {
							myself::ShowPage(talker,"fullquest.htm");
						}
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,692) == 0 && talker.level < 75 ) ) {
						myself::SetCurrentQuestID(692);
						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,"dwyllios_q0692_02.htm",692);
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 1 && gg::OwnItemCount(talker,13857) >= 1 && myself::GetOneTimeQuestFlag(talker,10273) == 0 ) ) {
						myself::SetCurrentQuestID(692);
						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,"dwyllios_q0692_05.htm");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 1 && gg::OwnItemCount(talker,13857) >= 1 ) ) {
						myself::SetCurrentQuestID(692);
						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::DeleteItem1(talker,13857,gg::OwnItemCount(talker,13857));
						myself::SetMemoState(talker,692,2);
						myself::ShowPage(talker,"dwyllios_q0692_06.htm");
						myself::SetFlagJournal(talker,692,2);
						myself::ShowQuestMark(talker,692);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 1 && gg::OwnItemCount(talker,13857) < 1 && myself::GetOneTimeQuestFlag(talker,10273) == 1 ) ) {
						myself::SetCurrentQuestID(692);
						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,692,2);
						myself::ShowPage(talker,"dwyllios_q0692_07.htm");
						myself::SetFlagJournal(talker,692,2);
						myself::ShowQuestMark(talker,692);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
					}
					break;
				}
				case 5: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 2 ) ) {
						myself::SetCurrentQuestID(692);
						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,"dwyllios_q0692_08.htm");
					}
					break;
				}
				case 6: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && gg::OwnItemCount(talker,13863) < 1 && gg::OwnItemCount(talker,13865) < 1 && gg::OwnItemCount(talker,13866) < 1 && gg::OwnItemCount(talker,13867) < 1 ) ) {
						myself::SetCurrentQuestID(692);
						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,"dwyllios_q0692_09.htm");
					}
					break;
				}
				case 7: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && ( gg::OwnItemCount(talker,13863) >= 1 || gg::OwnItemCount(talker,13865) >= 1 || gg::OwnItemCount(talker,13866) >= 1 || gg::OwnItemCount(talker,13867) >= 1 ) ) ) {
						myself::SetCurrentQuestID(692);
						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,"dwyllios_q0692_10.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler QUEST_ACCEPTED(quest_id,talker) {
		if( quest_id == 692 ) {
			myself::SetCurrentQuestID(692);
			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,692) == 0 && talker.level >= 75 ) {
					myself::SetMemo(talker,692);
					myself::SetMemoState(talker,692,1);
					myself::ShowQuestPage(talker,"dwyllios_q0692_04.htm",692);
					myself::SetFlagJournal(talker,692,1);
					myself::ShowQuestMark(talker,692);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					gg::AddLog(1,talker,692);
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,fhtml0,reply,talker) {
		if( ask == 692 ) {
			myself::SetCurrentQuestID(692);
			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 == 692 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,692) == 0 && talker.level >= 75 ) {
					myself::FHTML_SetFileName(fhtml0,"dwyllios_q0692_03.htm");
					myself::FHTML_SetInt(fhtml0,"quest_id",692);
					myself::ShowQuestFHTML(talker,fhtml0,692);
				}
			}
		}
		super;
	}

}
