/* Use this script with an SFposer object that is missing animations assets (the TARGET object), to copy them from another object (the SOURCE object) First, bring the source object (which contains the missing animations) next to the target object, and add the "Copy missing animations SOURCE" script in the source object. Add this "Copy missing animations TARGET " to the target object, then say "help" in public chat for instructions. Quick guide: Add the scripts as above, then say "check". If all seems OK , then say 'transfer' (If there are a lot of animations missing, you might have to say "scan" and then "transfer" multiple times until no more animations are reported to be missing). After finishing, say 'remove' to remove the scripts. */ list neededAnims = []; loadNCs() { neededAnims = []; integer i; for (i=0; i < llGetInventoryNumber(INVENTORY_NOTECARD); i++) { string nc = llGetInventoryName(INVENTORY_NOTECARD, i); if (llGetSubString( nc, 0, 4) == ".menu") { integer n; list lines = llParseStringKeepNulls(osGetNotecard(nc), ["\n"], []); for (n=0; n < llGetListLength(lines); n++) { string ln = llList2String(lines, n); integer idx = llSubStringIndex(ln, "|"); if (idx>0) { list tok = llParseString2List(ln, ["|"], []); integer k; for (k=2; k < llGetListLength(tok); k+=3) { string sn = llList2String(tok, k); if (sn != "" && llGetInventoryType(sn) != INVENTORY_ANIMATION) { neededAnims += sn; } } } } } } llOwnerSay("Missing animations: "+llList2CSV(neededAnims)); } help() { llOwnerSay("Say 'scan' in public chat to re-scan the .menu notecards, say 'check' in public chat to test the transfer. If all is OK, say 'transfer' to copy the animations, then say 'remove' to clear the scripts. Say 'help' for this message"); } default { state_entry() { loadNCs(); llListen(0, "", "", ""); help(); } listen(integer c, string n, key id, string m) { if (m == "transfer") { llOwnerSay("Asking nearby object to give me the missing animations..."); llSay(837192171, "SFGIVEANIMS|"+llDumpList2String(neededAnims,"|") ); } else if (m == "check") { llOwnerSay("Checking for animations in nearby object..."); llSay(837192171, "SFCHECKANIMS|"+llDumpList2String(neededAnims,"|") ); } else if (m == "help") help(); else if (m == "scan") { loadNCs(); } else if (m == "remove") { llOwnerSay("Removing scripts"); llSay(837192171, "SFGIVER_REMOVE"); llRemoveInventory(llGetScriptName()); } } }