beginscript; label Wait: if (GetState() != 0 && UnitDead() != 1) { SetNumLives(1); ExcTargetType(0xffffffff); IncTargetType(0x2); EndFrame(); goto Start; } EndFrame(); goto Wait; label Start: SetVar(0,Rnd()); // Attack Player % label AttackAI: if (PlayerInRange(800)) { if (GetVar(0) >= 125) { IncludeUTarget(0x6c01); } else { IncludeGTarget(2); } } else { IncludeGTarget(2); } EndFrame(); goto AttackAI; label End: EndFrame(); goto End; endscript; $