content giver

 

 

Scripts name content giver   
Purpose Gives content of prim to a person clicking on it.  
script lanugages used lsl  
important settings for region ./.  
test on standalone - trunk  6.3 SVN8786, XEngine  
source Michelle Argus @ osgrid  

 

// Gives content of prim to a person clicking on it.
//

string FLOAT_TEXT="";
vector FLOAT_COLOR=<1.0, 1.0, 1.0>;
float FLOAT_ALPHA=1.0;

default
{
state_entry()
{
llWhisper(0, "Ready!");
llSetText(FLOAT_TEXT, FLOAT_COLOR, FLOAT_ALPHA);
}

touch_start(integer total_number)
{
// Find out who clicked, and give them a note card
key giver;
giver = llDetectedKey(0);
string name = llDetectedName(0);

if (giver != NULL_KEY) {
integer InvNum;
string NoteName;
integer NumCards = llGetInventoryNumber(INVENTORY_ALL);
for ( InvNum = 0; InvNum < NumCards; InvNum++) {
NoteName = llGetInventoryName(INVENTORY_ALL, InvNum);
llGiveInventory(giver, NoteName);
}
}
}
}