Help With Waypoints script

OK I'm trying to get a neutral Alien Zombie to return to wandering about his way point positions. Right now he does s good job of running away from my FPS player which is good. But what I want should for somereason my player descides NOT to shoot him, that he will return to wandering about his way points. But right now he's NOT, he'll just stop running when out of range and just Idle in one place.

EDIT: Another issue I just discovered is that sometimes when I chase him from off of the top of the hill he ends up, up in the air almost like gravity is not affecting him???

Here is my script I'm using:

var modelAnimation : Animation;
var awareDistance : float = 25.0;
var scaredDistance : float = 20.0;
var target : Transform;
var pickNextWaypointDistance = 2.0;

var runSpeed : float = 15.0;

enum AIStatus {idle = 0, Scared = 1}
private var status = AIStatus.idle;

var controller : CharacterController;

private var moveDirection = Vector3.zero;

function Awake()
{
    controller = GetComponent(CharacterController);
}

function Wander () {
    var curWayPoint = AutoWayPoint.FindClosest(transform.position);
    while (true) {
        var waypointPosition = curWayPoint.transform.position;
        // Are we close to a waypoint? -> pick the next one!
        if (Vector3.Distance(waypointPosition, transform.position) < pickNextWaypointDistance)
        {
            curWayPoint = PickNextWaypoint (curWayPoint);
        }

        yield;
    }
}

function Update()
{
    CheckStatus();

    switch(status)
    {
        case AIStatus.idle:
        idle();
        break;

        case AIStatus.Scared:
        RunAway();
        break;

    }

}

function idle()
{
    modelAnimation.CrossFade ("idle");
}

function RunAway()
{
    transform.eulerAngles.y = target.transform.eulerAngles.y;
    moveDirection = Vector3(0,0,40);    
    moveDirection = transform.TransformDirection(moveDirection);
    moveDirection *= runSpeed;
    controller.SimpleMove(moveDirection * Time.deltaTime);

    modelAnimation.CrossFade ("RunAttack");

}

function CheckStatus()
{

    var dist = (target.position - transform.position).magnitude;

    if(dist < scaredDistance)
    {
        status = AIStatus.Scared;
    }

    else if (dist > awareDistance)
    {
        status = AIStatus.idle;
    }

}

function PickNextWaypoint (currentWaypoint : AutoWayPoint) {
    // We want to find the waypoint where the character has to turn the least

    // The direction in which we are walking
    var forward = transform.TransformDirection(Vector3.forward);

    // The closer two vectors, the larger the dot product will be.
    var best = currentWaypoint;
    var bestDot = -10.0;
    for (var cur : AutoWayPoint in currentWaypoint.connected) {
        var direction = Vector3.Normalize(cur.transform.position - transform.position);
        var dot = Vector3.Dot(direction, forward);
        if (dot > bestDot && cur != currentWaypoint) {
            bestDot = dot;
            best = cur;
        }
    }

    return best;
}

var modelAnimation : Animation;
var awareDistance : float = 25.0;
var scaredDistance : float = 20.0;
var target : Transform;
var pickNextWaypointDistance = 2.0;

var runSpeed : float = 15.0;

enum AIStatus {idle = 0, Scared = 1}
private var status = AIStatus.idle;

var controller : CharacterController;

private var moveDirection = Vector3.zero;

function Awake()
{
    controller = GetComponent(CharacterController);
}

function Wander () {
    var curWayPoint = AutoWayPoint.FindClosest(transform.position);
    while (true) {
        var waypointPosition = curWayPoint.transform.position;
        // Are we close to a waypoint? -> pick the next one!
        if (Vector3.Distance(waypointPosition, transform.position) < pickNextWaypointDistance)
        {
            curWayPoint = PickNextWaypoint (curWayPoint);
        }

        yield;
    }
}

function Update()
{
    CheckStatus();

    switch(status)
    {
        case AIStatus.idle:
        idle();
        break;

        case AIStatus.Scared:
        RunAway();
        break;

    }

}

function idle()
{
    modelAnimation.CrossFade ("idle");
    wander();
}

function RunAway()
{
    transform.eulerAngles.y = target.transform.eulerAngles.y;
    moveDirection = Vector3(0,0,40);    
    moveDirection = transform.TransformDirection(moveDirection);
    moveDirection *= runSpeed;
    controller.SimpleMove(moveDirection * Time.deltaTime);

    modelAnimation.CrossFade ("RunAttack");

}

function CheckStatus()
{

    var dist = (target.position - transform.position).magnitude;

    if(dist < scaredDistance)
    {
        status = AIStatus.Scared;
    }

    else if (dist > awareDistance)
    {
        status = AIStatus.idle;
    }

}

function PickNextWaypoint (currentWaypoint : AutoWayPoint) {
    // We want to find the waypoint where the character has to turn the least

    // The direction in which we are walking
    var forward = transform.TransformDirection(Vector3.forward);

    // The closer two vectors, the larger the dot product will be.
    var best = currentWaypoint;
    var bestDot = -10.0;
    for (var cur : AutoWayPoint in currentWaypoint.connected) {
        var direction = Vector3.Normalize(cur.transform.position - transform.position);
        var dot = Vector3.Dot(direction, forward);
        if (dot > bestDot && cur != currentWaypoint) {
            bestDot = dot;
            best = cur;
        }
    }

    return best;
}

This is what Meltdown meant. Try it see if it works.