include "aiHunterCore.xs"; //============================================================================== // beginVillageAttacks // // Call this from RM after setting all the desired coordinates. //============================================================================== void beginAttacks(int index=-1) { aiEcho("beginAttacks: enabling attack rule"); gCurrentIndex = index; gPlanUnitType = cUnitTypeLogicalTypeLandMilitary; gIgnoreArmySize = true; gCheckForUnits = false; if(gMyUnitQuery == -1) { gMyUnitQuery = kbUnitQueryCreate("My Units Query"); kbUnitQuerySetPlayerID(gMyUnitQuery, cMyID); kbUnitQuerySetUnitType(gMyUnitQuery, cUnitTypeLogicalTypeLandMilitary); kbUnitQuerySetState(gMyUnitQuery, cUnitStateAlive); } xsEnableRule("checkForAttackPlans"); } void main() { kbLookAtAllUnitsOnMap(); }