Tattooshop Posted February 26, 2020 Share Posted February 26, 2020 Hello there! how to make the unpacker not give animations from content? default { touch_start(integer total_number) { integer x; for(x = 0; x < total_number; x++) { if(llDetectedKey(x) == llGetOwner()) { string InvenName; integer InvenNumber = llGetInventoryNumber(INVENTORY_ALL); list InvenList = []; integer y; for(y = 0; y < InvenNumber; y++) { InvenName = llGetInventoryName(INVENTORY_ALL, y); if(InvenName != llGetScriptName()) InvenList += [InvenName]; } llGiveInventoryList(llGetOwner(), llGetObjectName(), InvenList); } } } } Link to comment Share on other sites More sharing options...
Ruthven Ravenhurst Posted February 26, 2020 Share Posted February 26, 2020 (edited) default { touch_start(integer total_number) { integer x; for(x = 0; x < total_number; x++) { if(llDetectedKey(x) == llGetOwner()) { string InvenName; integer InvenNumber = llGetInventoryNumber(INVENTORY_ALL); list InvenList = []; integer y; string ScriptName = llGetScriptName(); for(y = 0; y < InvenNumber; y++) { InvenName = llGetInventoryName(INVENTORY_ALL, y); if(InvenName != ScriptName) { if(llGetInventoryType(InvenName) != INVENTORY_ANIMATION) InvenList += [InvenName]; } } llGiveInventoryList(llGetOwner(), llGetObjectName(), InvenList); } } } } You'll need to get the inventory type with llGetInventoryType for each item, and compare it against INVENTORY_ANIMATION I've edited it above. I also made it so it only uses llGetScriptName before the loop and saves it to a string instead of running the function on every iteration of the loop Edited February 26, 2020 by Ruthven Willenov 2 1 Link to comment Share on other sites More sharing options...
Tattooshop Posted February 26, 2020 Author Share Posted February 26, 2020 4 hours ago, Ruthven Willenov said: You'll need to get the inventory type with llGetInventoryType for each item, and compare it against INVENTORY_ANIMATION I've edited it above. I also made it so it only uses llGetScriptName before the loop and saves it to a string instead of running the function on every iteration of the loop Thanks a lot! Your script is perfect! 😎👍 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now