Standart Type Animation Shutoff

Written by: Headmaster
// Disable the standard typing animation - it should not disable custom typing
// animations unless those are activated by detecting the standard animation.
//
// This script will work in an attachment or a sit target
//
// This script is free to use, copy, or modify, but I do ask that you give credit
// to me and any subsequent authors.
// Created 12 December 2007 by Maxwell Weatherwax
integer gSitting = FALSE;

default
{
    state_entry() {
        // Remove this if you already set the sit target in another script.
        llSitTarget(<0., 0., 0.1>, ZERO_ROTATION);
    }

    changed(integer change)
    {
        if (change & CHANGED_LINK) {
            key id = llAvatarOnSitTarget();
            if (id != NULL_KEY) {
                gSitting = TRUE;
                llRequestPermissions(id, PERMISSION_TRIGGER_ANIMATION);
            } else if (gSitting) {
                gSitting = FALSE;
                llSetTimerEvent(0.0);   // cancel the timer when the av stands up
            }
        }
    }
    
    attach(key id)
    {
        if (id != NULL_KEY)
            llRequestPermissions(id, PERMISSION_TRIGGER_ANIMATION);
        else
            llSetTimerEvent(0.0);   // cancel the timer when detached.
    }
    
    run_time_permissions(integer perm)
    {
        if (perm & PERMISSION_TRIGGER_ANIMATION)
            llSetTimerEvent(0.2);
    }

    timer()
    {
        list anims = llGetAnimationList(llGetOwner());
        if(llListFindList(anims,[(key)("c541c47f-e0c0-058b-ad1a-d6ae3a4584d9")]) != -1)
        {
            llStopAnimation("c541c47f-e0c0-058b-ad1a-d6ae3a4584d9");
        }

    }
}