@LabelIndex 110473
@StringIndex 0
class 0 ai_tower_of_kerthang : default_npc {
parameter:

handler:
	EventHandler CREATED() {
		myself.i_ai0 = myself.sm.param1;
		myself.i_ai1 = myself.sm.param2;
		myself::RegisterResurrectionTower(myself.i_ai0,myself.i_ai1);
	}

	EventHandler ATTACKED(attacker,damage,party0,i0) {
		party0 = gg::GetParty(attacker);
		if( myself::IsNullParty(party0) == 1 ) {
			i0 = gg::Rand(4);
			if( i0 == 0 ) {
				gg::InstantTeleportEx(attacker,-81472,-49190,-10352,0);
			} else if( i0 == 1 ) {
				gg::InstantTeleportEx(attacker,-81887,-49586,-10352,0);
			} else if( i0 == 2 ) {
				gg::InstantTeleportEx(attacker,-82314,-49167,-10352,0);
			} else if( i0 == 3 ) {
				gg::InstantTeleportEx(attacker,-81903,-48773,-10352,0);
			}
		}
	}

	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2,i0,c0) {
		if( script_event_arg1 == 13102 ) {
			myself::Despawn();
		}
	}

	EventHandler TIMER_FIRED_EX(timer_id,party0,party1) {
		if( timer_id == 1001 ) {
			myself::Despawn();
		}
	}

}
