LlGetAnimationList
De DigiWiki.
This example is a bit involved but there aren't many applications for this function.
// Simple Animation Override for Walk key old_anim = "6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0"; string new_anim="yoga_float"; integer status; list check; key owner; default { state_entry() { owner = llGetOwner(); llRequestPermissions(owner, PERMISSION_TRIGGER_ANIMATION); check = [old_anim]; } run_time_permissions(integer p) { if(p & PERMISSION_TRIGGER_ANIMATION) { llSetTimerEvent(0.2); } } timer() { if(llGetAgentInfo(owner) & AGENT_WALKING) { list anims = llGetAnimationList(owner); if(~llListFindList(anims, check)) { status = 1; llStartAnimation(new_anim); llStopAnimation(old_anim); } } else if(status) { llStopAnimation(new_anim); status = 0; } } on_rez(integer p) { llResetScript(); } }