//::///////////////////////////////////////////////
//:: Custom User Defined Event
//:: FileName
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*

*/
//:://////////////////////////////////////////////
//:: Created By:
//:: Created On:
//:://////////////////////////////////////////////

void main()
{
    int nUser = GetUserDefinedEventNumber();

    if(nUser == 1001) //HEARTBEAT
    {

    }
    else if(nUser == 1002) // PERCEIVE
    {
        //if ( GetLocalInt(GetFirstPC(), "nSawHeroOnce") == 0 )
        //{
        //    if (GetLastPerceived() == GetFirstPC())
        //    {
        //        SetLocalInt(GetFirstPC(), "nSawHeroOnce", 1);
        //        //Haspaar appears
        //        CreateObject(OBJECT_TYPE_CREATURE, "Haspaar001", GetLocation(GetFirstPC()));
        //
        //    }
        //}
    }
    else if(nUser == 1003) // END OF COMBAT
    {

    }
    else if(nUser == 1004) // ON DIALOGUE
    {

    }
    else if(nUser == 1005) // ATTACKED
    {


    }
    else if(nUser == 1006) // DAMAGED
    {
        if ( GetLocalInt(GetModule(), "nHeroBeenAttacked") == 0 )
        {
            if (GetIsPC(GetLastDamager())) {
                SetLocalInt(GetModule(), "nHeroBeenAttacked", 1);
                //Haspaar appears
                CreateObject(OBJECT_TYPE_CREATURE, "Haspaar001", GetLocation(GetFirstPC()));
                AssignCommand(GetObjectByTag("Haspaar"), ActionSpeakString("Need some help, little one?", TALKVOLUME_SHOUT));
                SignalEvent(GetObjectByTag("Triel"), EventUserDefined(100));
            }
        }
    }
    else if(nUser == 1007) // DEATH
    {


    }
    else if(nUser == 1008) // DISTURBED
    {

    }

}
