@LabelIndex 21933
@StringIndex 0
class 0 ai_boss05_pirates_zombie_b : warrior_aggressive_physicalspecial {
parameter:
	int	PhysicalSpecial = 266534917;
	int	different_level_9_attacked = 295895041;
	int	different_level_9_see_spelled = 276234241;

handler:
	EventHandler CREATED() {
		myself.sm.weight_point = gg::FloatToInt(myself.sm.x);
		myself.sm.respawn_time = gg::FloatToInt(myself.sm.y);
		myself.sm.flag = gg::FloatToInt(myself.sm.z);
	}

	EventHandler SEE_CREATURE(creature) {
		if( creature.level > ( myself.sm.level + 8 ) ) {
			if( gg::GetAbnormalLevel(creature,myself::Skill_GetAbnormalType(different_level_9_attacked)) == -1 ) {
				if( different_level_9_attacked == 295895041 ) {
					myself::CastBuffForQuestReward(creature,different_level_9_attacked);
					myself::RemoveAttackDesire(creature.id);
					return;
				} else {
					myself::CastBuffForQuestReward(creature,different_level_9_attacked);
				}
			}
		}
		if( creature.z > ( myself.sm.z - 100 ) && creature.z < ( myself.sm.z + 100 ) ) {
			if( creature.is_pc == 0 && myself::IsInCategory(12,creature.class_id) == 0 ) {
				return;
			}
			if( myself::GetLifeTime() > SeeCreatureAttackerTime && myself::InMyTerritory(myself.sm) ) {
				myself::AddAttackDesire(creature,1,200);
			}
			myself::MakeAttackEvent(creature,9,1);
		}
	}

	EventHandler ATTACKED(attacker,damage) {
		if( attacker.level > ( myself.sm.level + 8 ) ) {
			if( gg::GetAbnormalLevel(attacker,myself::Skill_GetAbnormalType(different_level_9_attacked)) == -1 ) {
				if( different_level_9_attacked == 295895041 ) {
					myself::CastBuffForQuestReward(attacker,different_level_9_attacked);
					myself::RemoveAttackDesire(attacker.id);
					return;
				} else {
					myself::CastBuffForQuestReward(attacker,different_level_9_attacked);
				}
			}
		}
		if( attacker.level <= ( myself.sm.level + 8 ) ) {
			if( attacker.is_pc != 0 || myself::IsInCategory(12,attacker.class_id) ) {
				if( damage == 0 ) {
					damage = 1;
				}
				myself::AddAttackDesire(attacker,1,( ( ( 1.000000 * damage ) / ( myself.sm.level + 7 ) ) * 20000 ));
			}
		}
	}

	EventHandler SEE_SPELL(speller,skill_name_id) {
		if( speller.level > ( myself.sm.level + 8 ) ) {
			if( gg::GetAbnormalLevel(speller,myself::Skill_GetAbnormalType(different_level_9_see_spelled)) == -1 ) {
				if( different_level_9_see_spelled == 295895041 ) {
					myself::CastBuffForQuestReward(speller,different_level_9_see_spelled);
					myself::RemoveAttackDesire(speller.id);
					return;
				} else {
					myself::CastBuffForQuestReward(speller,different_level_9_see_spelled);
				}
			}
		}
	}

}
