@LabelIndex 57351
@StringIndex 0
class 0 warrior_ag_band_archer : warrior_aggressive_use_power_shot {
handler:
	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2,script_event_arg3,i0,c0) {
		if( script_event_arg2 == 10033 ) {
			c0 = gg::GetCreatureFromIndex(script_event_arg3);
			if( myself::IsNullCreature(c0) == 0 ) {
				myself::RemoveAllAttackDesire();
				if( c0.is_pc != 0 || myself::IsInCategory(12,c0.class_id) ) {
					myself::AddAttackDesire(c0,1,( 1 * 200 ));
				}
			}
		}
		if( script_event_arg2 == 10043 ) {
			c0 = gg::GetCreatureFromIndex(script_event_arg3);
			if( myself::IsNullCreature(c0) == 0 ) {
				myself::ChangeMoveType(1);
				myself::AddMoveToDesire(gg::FloatToInt(c0.x),gg::FloatToInt(c0.y),gg::FloatToInt(c0.z),10000000);
			}
		}
	}

	EventHandler SEE_CREATURE(creature) {
		myself::RemoveAllDesire();
		if( gg::Rand(100) < 33 ) {
			if( myself::Skill_GetConsumeMP(PhysicalSpecial) < myself.sm.mp && myself::Skill_GetConsumeHP(PhysicalSpecial) < myself.sm.hp && myself::Skill_InReuseDelay(PhysicalSpecial) == 0 ) {
				myself::AddUseSkillDesire(creature,PhysicalSpecial,0,1,1000000);
			}
		}
		if( creature.is_pc == 0 && myself::IsInCategory(12,creature.class_id) == 0 ) {
			return;
		}
		if( SeeCreatureAttackerTime == -1 ) {
			if( SetAggressiveTime == -1 ) {
				if( myself::GetLifeTime() >= ( gg::Rand(5) + 3 ) && myself::InMyTerritory(myself.sm) ) {
					myself::AddAttackDesire(creature,1,200);
				}
			} else if( SetAggressiveTime == 0 ) {
				if( myself::InMyTerritory(myself.sm) ) {
					myself::AddAttackDesire(creature,1,200);
				}
			} else if( myself::GetLifeTime() > ( SetAggressiveTime + gg::Rand(4) ) && myself::InMyTerritory(myself.sm) ) {
				myself::AddAttackDesire(creature,1,200);
			}
		} else if( myself::GetLifeTime() > SeeCreatureAttackerTime && myself::InMyTerritory(myself.sm) ) {
			myself::AddAttackDesire(creature,1,200);
		}
		super;
	}

	EventHandler SEE_SPELL(speller,skill_name_id,target,f0,i0) {
		if( gg::Rand(100) < 20 && speller.is_pc != 0 && myself::IsInCategory(3,speller.occupation) != 0 ) {
			myself::RemoveAllAttackDesire();
			if( speller.is_pc != 0 || myself::IsInCategory(12,speller.class_id) ) {
				myself::AddAttackDesire(speller,1,( 1 * 200000 ));
			}
		}
	}

}
