Need help on Interaction with the player

I have 2 scripts. Script #1 makes the Ai move in a certain path and the second one its the interaction with the player. What i want him to do is when the player walks into the sphere collider of the ai, he stops his movement from the path script, but i dont know hwo to

Path script:

using UnityEngine;
using System.Collections;

public class pathdragon : MonoBehaviour {

    public Transform[] Waypoints;
    public float Speed;
    public int curWayPoint;
    public bool doPatrol= true;
    public Vector3 Target;
    public Vector3 MoveDirection;
    public Vector3 Velocity;
    public Rigidbody pathDragonbody;


    // Use this for initialization
    void Start () {

  
    }
  
    // Update is called once per frame
    void Update () {
        pathDragonbody = GetComponent<Rigidbody> ();
        if (curWayPoint < Waypoints.Length) {
            Target = Waypoints [curWayPoint].position;
            MoveDirection = Target - transform.position;
            Velocity = pathDragonbody.velocity;
            if (MoveDirection.magnitude < 1) {
                curWayPoint++;
            } else {
                Velocity = MoveDirection.normalized * Speed;
            }
        } else {
            if(doPatrol){
                curWayPoint = 0;
            }
        }

        pathDragonbody.velocity = Velocity;
        transform.LookAt (Target);
    }
}

Script #2:

using UnityEngine;
using System.Collections;

public class DragonScript : MonoBehaviour {

    public float fpsTargetDistance;
    public float enemyLookDistance;
    public float attackDistance;
    public float enemyMovementSpeed;
    public float damping;
    public Transform fpsTarget;
    public Rigidbody Dragonbody;
    Renderer myRender;
    public float thrust;

    pathdragon path;




    // Use this for initialization
    void Start () {
        myRender = GetComponent<Renderer> ();
        Dragonbody = GetComponent<Rigidbody> ();
        path = GetComponent<pathdragon> ();

    }

    // Update is called once per frame
    void FixedUpdate () {
        fpsTargetDistance = Vector3.Distance (fpsTarget.position, transform.position);
        if (fpsTargetDistance < enemyLookDistance) {
            path.enabled = false;
            myRender.material.color = Color.yellow;
            lookAtPlayer ();

            //print ("look at player please");
        } else {
            path.enabled = true;
            path.Speed = 10f;
    }
        if (fpsTargetDistance < attackDistance) {
            myRender.material.color = Color.red;
            attackPlease ();
            //print ("ATTACK!");
        } else {
            myRender.material.color = Color.blue;
        }
  
    }

    void lookAtPlayer(){
        Quaternion rotation = Quaternion.LookRotation(fpsTarget.position - transform.position);
        transform.rotation = Quaternion.Slerp(transform.rotation, rotation, Time.deltaTime*damping);

    }


    void attackPlease(){
        Dragonbody.AddForce (transform.forward * enemyMovementSpeed);
    }
}

There are a lot of different approaches here. I would make an AI controller that knew if the NPC has spotted the Player yet. If he hasn’t then his destination is the next waypoint. If he has spotted the player his waypoint is his own position. This controller can be used very effectively to determine what to do. Take Metal Gear Solid for example. The enemies walk a path, stop and talk to each other, when they spot Snake they chase and/or shoot him, they search for a while for him, lastly they return to their path. This is what an AI is, a controller, a decision maker.

To answer the basic question you should check out the Stealth tutorial. It handles very well enemy detection.

can we have code tags when you paste code into the forums, really helps with readability

Thanks edited