beginscript; label Wait: if (GetState() != 0 && UnitDead() != 1) { SetNumLives(1); ExcTargetType(0x1); //IncTargetType(0x2); SelectWeapons(0,1,0); EndFrame(); goto Start; } EndFrame(); goto Wait; label Start: SetVar(0,Rnd()); // Attack Player % SetVar(1,75); // Attack Player % SetVar(2,1000); // Group a range check label AttackAI: if (OtherUnitInRange (Spt_G03_01_Scr,GetVar(2)) || OtherUnitInRange (Spt_G03_02_Scr,GetVar(2)) || OtherUnitInRange (Spt_G03_03_Scr,GetVar(2)) || OtherUnitInRange (Spt_G03_04_Scr,GetVar(2)) || OtherUnitInRange (Spt_G03_05_Scr,GetVar(2))) { SetVar(3,1); } else { SetVar(3,0); } if (PlayerInRange(1000)) { if (GetVar(0) >= GetVar(1) && GetVar(3) == 1) { gosub AttackWho; } else { IncludeUTarget(0x6c01); } } else { gosub AttackWho; } if (OtherUnitDead(RadarTrk_Scr) && GetVar(3) != 1) { SetVar(3,1); SelectWeapons(1,0,0); } EndFrame(); goto AttackAI; label End: EndFrame(); goto End; endscript; beginsub AttackWho; if (OtherUnitDead(Spt_G03_05_Scr)) { IncludeUTarget(Spt_G03_04_Scr); return; } if (OtherUnitDead(Spt_G03_04_Scr)) { IncludeUTarget(Spt_G03_03_Scr); return; } if (OtherUnitDead(Spt_G03_03_Scr)) { IncludeUTarget(Spt_G03_02_Scr); return; } if (OtherUnitDead(Spt_G03_02_Scr)) { IncludeUTarget(Spt_G03_01_Scr); return; } endsub; $