@LabelIndex 397196
@StringIndex 59366
class 0 broken_controller : citizen {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,184) == 1 && myself::GetOneTimeQuestFlag(talker,184) == 0 && gg::GetMemoState(talker,184) == 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Nikola's Cooperation - Contract (In Progress)");
			}
			if( gg::HaveMemo(talker,184) == 1 && myself::GetOneTimeQuestFlag(talker,184) == 0 && gg::GetMemoState(talker,184) == 4 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Nikola's Cooperation - Contract (In Progress)");
			}
			if( gg::HaveMemo(talker,184) == 1 && myself::GetOneTimeQuestFlag(talker,184) == 0 && gg::GetMemoState(talker,184) == 5 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Nikola's Cooperation - Contract (In Progress)");
			}
			if( gg::HaveMemo(talker,185) == 1 && myself::GetOneTimeQuestFlag(talker,185) == 0 && gg::GetMemoState(talker,185) == 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Nikola's Cooperation - Consideration (In Progress)");
			}
			if( gg::HaveMemo(talker,185) == 1 && myself::GetOneTimeQuestFlag(talker,185) == 0 && gg::GetMemoState(talker,185) == 4 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Nikola's Cooperation - Consideration (In Progress)");
			}
			if( gg::HaveMemo(talker,185) == 1 && myself::GetOneTimeQuestFlag(talker,185) == 0 && gg::GetMemoState(talker,185) == 5 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Nikola's Cooperation - Contract (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,184) == 1 && myself::GetOneTimeQuestFlag(talker,184) == 0 && gg::GetMemoState(talker,184) == 3 ) ) {
						myself::SetCurrentQuestID(184);
						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.i_quest0 == 0 ) {
							myself::ShowPage(talker,"broken_controller_q0184_01.htm");
						} else if( myself.i_quest1 == talker.dbid ) {
							myself::ShowPage(talker,"broken_controller_q0184_03.htm");
						} else {
							myself::ShowPage(talker,"broken_controller_q0184_04.htm");
						}
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,184) == 1 && myself::GetOneTimeQuestFlag(talker,184) == 0 && gg::GetMemoState(talker,184) == 4 ) ) {
						myself::SetCurrentQuestID(184);
						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,"broken_controller_q0184_05.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,184) == 1 && myself::GetOneTimeQuestFlag(talker,184) == 0 && gg::GetMemoState(talker,184) == 5 ) ) {
						myself::SetCurrentQuestID(184);
						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,"broken_controller_q0184_07.htm");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,185) == 1 && myself::GetOneTimeQuestFlag(talker,185) == 0 && gg::GetMemoState(talker,185) == 3 ) ) {
						myself::SetCurrentQuestID(185);
						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.i_quest0 == 0 ) {
							myself::ShowPage(talker,"broken_controller_q0185_01.htm");
						} else if( myself.i_quest1 == talker.dbid ) {
							myself::ShowPage(talker,"broken_controller_q0185_03.htm");
						} else {
							myself::ShowPage(talker,"broken_controller_q0185_04.htm");
						}
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,185) == 1 && myself::GetOneTimeQuestFlag(talker,185) == 0 && gg::GetMemoState(talker,185) == 4 ) ) {
						myself::SetCurrentQuestID(185);
						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,"broken_controller_q0185_05.htm");
					}
					break;
				}
				case 5: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,185) == 1 && myself::GetOneTimeQuestFlag(talker,185) == 0 && gg::GetMemoState(talker,185) == 5 ) ) {
						myself::SetCurrentQuestID(185);
						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,"broken_controller_q0185_07.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 184 ) {
			myself::SetCurrentQuestID(184);
			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 == 184 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,184) == 1 && myself::GetOneTimeQuestFlag(talker,184) == 0 && gg::GetMemoState(talker,184) == 3 ) {
					if( myself.i_quest0 == 0 ) {
						myself.i_quest0 = 1;
						myself.i_quest1 = talker.dbid;
						myself::ShowPage(talker,"broken_controller_q0184_03.htm");
						myself::CreateOnePrivateEx(1032367,"alarm_of_giant_q0184",0,0,( gg::FloatToInt(myself.sm.x) + 80 ),( gg::FloatToInt(myself.sm.y) + 65 ),gg::FloatToInt(myself.sm.z),16384,gg::GetIndexFromCreature(talker),talker.dbid,myself.sm.id);
					}
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,184) == 1 && myself::GetOneTimeQuestFlag(talker,184) == 0 && gg::GetMemoState(talker,184) == 4 ) {
					myself::GiveItem1(talker,10359,1);
					myself::SetMemoState(talker,184,6);
					myself::ShowPage(talker,"broken_controller_q0184_06.htm");
					myself::SetFlagJournal(talker,184,4);
					myself::ShowQuestMark(talker,184);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 3 ) {
				if( gg::HaveMemo(talker,184) == 1 && myself::GetOneTimeQuestFlag(talker,184) == 0 && gg::GetMemoState(talker,184) == 5 ) {
					myself::GiveItem1(talker,10360,1);
					myself::SetMemoState(talker,184,6);
					myself::ShowPage(talker,"broken_controller_q0184_08.htm");
					myself::SetFlagJournal(talker,184,5);
					myself::ShowQuestMark(talker,184);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
		}
		if( ask == 185 ) {
			myself::SetCurrentQuestID(185);
			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 == 185 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,185) == 1 && myself::GetOneTimeQuestFlag(talker,185) == 0 && gg::GetMemoState(talker,185) == 3 ) {
					if( myself.i_quest0 == 0 ) {
						myself.i_quest0 = 1;
						myself.i_quest1 = talker.dbid;
						myself::ShowPage(talker,"broken_controller_q0185_03.htm");
						myself::CreateOnePrivateEx(1032367,"alarm_of_giant_q0184",0,0,( gg::FloatToInt(myself.sm.x) + 80 ),( gg::FloatToInt(myself.sm.y) + 65 ),gg::FloatToInt(myself.sm.z),16384,gg::GetIndexFromCreature(talker),talker.dbid,myself.sm.id);
					}
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,185) == 1 && myself::GetOneTimeQuestFlag(talker,185) == 0 && gg::GetMemoState(talker,185) == 4 ) {
					myself::GiveItem1(talker,10363,1);
					myself::SetMemoState(talker,185,6);
					myself::ShowPage(talker,"broken_controller_q0185_06.htm");
					myself::SetFlagJournal(talker,185,4);
					myself::ShowQuestMark(talker,185);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 3 ) {
				if( gg::HaveMemo(talker,185) == 1 && myself::GetOneTimeQuestFlag(talker,185) == 0 && gg::GetMemoState(talker,185) == 5 ) {
					myself::GiveItem1(talker,10364,1);
					myself::SetMemoState(talker,185,6);
					myself::ShowPage(talker,"broken_controller_q0185_08.htm");
					myself::SetFlagJournal(talker,185,5);
					myself::ShowQuestMark(talker,185);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
		}
		super;
	}

}
