@LabelIndex 71718
@StringIndex 11597
class 0 olympiad_manager : citizen {
parameter:
	int	buff1 = 71172098;
	int	buff2 = 78905346;
	int	buff3 = 69402627;
	int	buff4 = 71106563;
	int	buff5 = 70647814;
	int	buff6 = 69992451;
	int	buff7 = 81264643;
	int	buff8 = 70582275;
	int	buff9 = 81395715;
	int	buff10 = 69599234;

handler:
	EventHandler CREATED() {
		myself.i_ai0 = 0;
		myself.c_ai0 = gg::GetNullCreature();
	}

	EventHandler TALKED(talker) {
		if( myself.i_ai0 < 5 ) {
			myself::ShowPage(talker,"Olympiad_master001.htm");
			myself.c_ai0 = talker;
		}
	}

	EventHandler MENU_SELECTED(talker,ask,reply,i0) {
		if( ask == -301 ) {
			if( reply == 1 ) {
				if( myself.i_ai0 < 5 ) {
					myself.i_ai0 = ( myself.i_ai0 + 1 );
					myself::CastBuffForQuestReward(talker,buff1);
					myself::ShowPage(talker,"Olympiad_master002.htm");
				}
			} else if( reply == 2 ) {
				if( myself.i_ai0 < 5 ) {
					myself.i_ai0 = ( myself.i_ai0 + 1 );
					myself::CastBuffForQuestReward(talker,buff2);
					myself::ShowPage(talker,"Olympiad_master002.htm");
				}
			} else if( reply == 3 ) {
				if( myself.i_ai0 < 5 ) {
					myself.i_ai0 = ( myself.i_ai0 + 1 );
					myself::CastBuffForQuestReward(talker,buff3);
					myself::ShowPage(talker,"Olympiad_master002.htm");
				}
			} else if( reply == 4 ) {
				if( myself.i_ai0 < 5 ) {
					myself.i_ai0 = ( myself.i_ai0 + 1 );
					myself::CastBuffForQuestReward(talker,buff4);
					myself::ShowPage(talker,"Olympiad_master002.htm");
				}
			} else if( reply == 5 ) {
				if( myself.i_ai0 < 5 ) {
					myself.i_ai0 = ( myself.i_ai0 + 1 );
					myself::CastBuffForQuestReward(talker,buff5);
					myself::ShowPage(talker,"Olympiad_master002.htm");
				}
			} else if( reply == 6 ) {
				if( myself.i_ai0 < 5 ) {
					myself.i_ai0 = ( myself.i_ai0 + 1 );
					myself::CastBuffForQuestReward(talker,buff6);
					myself::ShowPage(talker,"Olympiad_master002.htm");
				}
			} else if( reply == 7 ) {
				if( myself.i_ai0 < 5 ) {
					myself.i_ai0 = ( myself.i_ai0 + 1 );
					myself::CastBuffForQuestReward(talker,buff7);
					myself::ShowPage(talker,"Olympiad_master002.htm");
				}
			} else if( reply == 8 ) {
				if( myself.i_ai0 < 5 ) {
					myself.i_ai0 = ( myself.i_ai0 + 1 );
					myself::CastBuffForQuestReward(talker,buff8);
					myself::ShowPage(talker,"Olympiad_master002.htm");
				}
			} else if( reply == 9 ) {
				if( myself.i_ai0 < 5 ) {
					myself.i_ai0 = ( myself.i_ai0 + 1 );
					myself::CastBuffForQuestReward(talker,buff9);
					myself::ShowPage(talker,"Olympiad_master002.htm");
				}
			} else if( reply == 10 ) {
				if( myself.i_ai0 < 5 ) {
					myself.i_ai0 = ( myself.i_ai0 + 1 );
					myself::CastBuffForQuestReward(talker,buff10);
					myself::ShowPage(talker,"Olympiad_master002.htm");
				}
			}
			if( myself.i_ai0 >= 5 ) {
				myself::ShowPage(talker,"Olympiad_master003.htm");
				myself::AddTimerEx(2001,5000);
			}
		}
	}

	EventHandler TIMER_FIRED_EX(timer_id,h0,i0) {
		if( timer_id == 2001 ) {
			myself::Despawn();
		}
	}

}
