@LabelIndex 101823
@StringIndex 11765
class 0 warrior_outdoor_guard : warrior_basic {
parameter:
	int	CallPCRate = 10000;
	int	MovingAttack = 0;

handler:
	EventHandler CREATED() {
		gg::Castle_GateOpenClose2("iron_tower_out_door",1);
	}

	EventHandler ATTACKED(attacker) {
		if( myself::CanAttack(attacker) == 0 ) {
			if( myself::IsNullCreature(attacker) == 0 ) {
				if( gg::Rand(10000) < CallPCRate ) {
					myself::InstantTeleport(attacker,gg::FloatToInt(myself.sm.x),gg::FloatToInt(myself.sm.y),gg::FloatToInt(myself.sm.z));
				}
			}
		}
		super;
	}

	EventHandler MY_DYING(i0) {
		i0 = gg::GetStep_FieldCycle(1);
		if( i0 == 8 ) {
			myself::CreateOnePrivateEx(1032351,"npc_open_outcastle_door",0,0,gg::FloatToInt(myself.sm.x),gg::FloatToInt(myself.sm.y),gg::FloatToInt(myself.sm.z),0,0,0,0);
		}
		super;
	}

}
