@LabelIndex 64516
@StringIndex 10014
class 0 agit_mass_teleporter : citizen {
parameter:
	int	Pos_x1 = 0;
	int	Pos_y1 = 0;
	int	Pos_z1 = 0;
	int	Pos_x2 = 0;
	int	Pos_y2 = 0;
	int	Pos_z2 = 0;
	string	fnhi = "";
	int	AgitID = 0;

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

	EventHandler TALKED(talker) {
		if( myself.i_ai1 == 0 ) {
			myself::TB_CheckMemberRegisterStatus(AgitID,talker);
		} else {
			myself::ShowPage(talker,"agit_mass_teleporter001.htm");
		}
	}

	EventHandler TB_CHECK_MEMBER_REGISTER_STATUS(reply,talker,pledge0) {
		if( reply == 1 ) {
			myself.i_ai1 = ( myself.i_ai1 + 1 );
			if( myself.i_ai1 == 1 ) {
				if( gg::Rand(100) < 50 ) {
					myself::InstantTeleport(talker,Pos_x1,Pos_y1,Pos_z1);
				} else {
					myself::InstantTeleport(talker,Pos_x2,Pos_y2,Pos_z2);
				}
			}
			myself::AddTimerEx(1001,( 60 * 1000 ));
		} else {
			myself::ShowPage(talker,"agit_mass_teleporter002.htm");
		}
	}

	EventHandler TIMER_FIRED_EX(timer_id) {
		if( timer_id == 1001 ) {
			myself.i_ai1 = 0;
		}
		super;
	}

}
