Jump to content

Beginner Script-er NEED HELP!


RyanJ89

Recommended Posts

OKay I have made a script that when someone clicks on it and their in a certain group they get the items within the box, but if they aren't in the group they can't get anything. My problem is it's only giving the script and not all the notecards and objects in the the box. How do I get the scrpit to give anything I put in the box without giving the script.

 

default
{
on_rez(integer sparam)
{
llResetScript();
}

touch_start(integer total_number)
{
if (llDetectedGroup(0) )
llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_ALL, 0) );
else llSay(0, "Access Denied");
}
}

Link to comment
Share on other sites

That's not what INVENTORY_ALL means. If you want to give more than one item, you have two choices:

1. Create a loop that counts through all of the items in your inventory and gives a different item each time until it has finished, or,

2. Use llGiveInventoryList, which will deliver all items in a folder.

Whichever way you go, you'll need to loop through all invenory items, either to give them one at a time or to build a folder list.  Look at the wiki entry for llGiveInventoryList for an example. Notice that in the example script, you can see how to avoid giving a copy of your script along with everything else.  You will also see how to check that you are giving items that have COPY perms for the next owner. If that's not important for you, ignore it.

  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...