Jump to content

Unpack all but script(s) (also using unpacker script)


Solaris Neiro
 Share

You are about to reply to a thread that has been inactive for 3281 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello,

 

I am using the {sac} unpacker script. It works very well, but I have two scripts in my box, one is just an animation script and the other is the {sac} unpacker. The {sac} unpacker does NOT get unpacked into inventory but my animation script does.

 

I want to make the animation script also NOT be unpacked into inventory, and I wanted to know how I can do that. The {sac} script is not modifiable, but my animation script is, So i'ld like to add the script there, but I am not sure how to do that. Any help is appreciated!

Link to comment
Share on other sites

I'm not familiar with the (sac) unpacker script, but I can explain the general principle to you.

Assuming the script creates a folder in the purchaser's inventory and then puts all the items into it, automagically, it's using a function called llGiveInventoryList.   This, as the name suggests, gives the items in the list to the avatar.     It only works, by the way, for items that are copyable by the script's owner.   This is easy to miss when testing, because whether or not you're selling your items no copy, they are copyable by you.   The question is, though, whether they are going to be copyable by whoever is buys the item.

Anyway,  you want to build a list of items that aren't scripts.    Since you can't modify the {sac} script, you need to make your own.    Fortunately, the examples in the wiki will need very little alteration to do what you want (if I were writing the script, I'd have the same script handle animation and content-giving, but since you're probably not very experienced with scripting, let's keep it simple).

If you look at the first example script in the wiki article, you will see the line 

   if (itemName != thisScript)

 

This means, in English, "if the name of this item is not the same as the name of this script".    If it isn't, add it to the list.   If it is, ignore it and go on to the next item in the object's inventory.

You need to change that line to read 

if(llGetInventoryType(itemName) != INVENTORY_SCRIPT)

Don't change anything else, and make sure the spelling and capitalisation are the same as I've given you (safest to copy/paste it over the original line).    My line means, in English, "if itemName, whatever it is, isn't a script.....".

So, go to the wiki article, copy-paste the first example script, paste my line over the line reading if (itemName !=thisScript), save it and you should be good to go.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3281 days.

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
 Share

×
×
  • Create New...