Dec 192008
// Gives a note to a person clicking on it.
//
default
{
state_entry()
{
}
touch_start(integer total_number)
{
// Find out who clicked, and give them a note
key giver;
giver = llDetectedKey(0);
string name = llDetectedName(0);
if (giver != NULL_KEY) {
integer InvNum;
string NoteName;
integer NumCards = llGetInventoryNumber(INVENTORY_NOTECARD);
for ( InvNum = 0; InvNum < NumCards; InvNum++) {
NoteName = llGetInventoryName(INVENTORY_NOTECARD, InvNum);
llGiveInventory(giver, NoteName);
}
}
}
}