Tuesday, December 02, 2008
USERLOGIN PASSWORD Remember?
You are here » Learning Center ยป Forums

Openlife Forums

 Openlife Grid Forums
Minimize
 
  Openlife Forums  Scripting  Openlife LSL Ex...  Give Inventory Script....
Previous Previous
 
Next Next
New Post 4/12/2008 11:42 AM
User is offline Butch
4 posts
Openlife Newbie


Give Inventory Script.... 

Does anyone have a working "Give Inventory" script?

Thanks.

 
New Post 4/17/2008 7:49 AM
User is offline Petrol
49 posts
Openlife Newbie


Re: Give Inventory Script.... 

There isn't anything inside a "Give Inventory" script other than the llGiveInventory function, which sadly isn't implemented yet.

 
New Post 7/5/2008 6:46 AM
User is offline Osiris
61 posts
Openlife Apprentice




Re: Give Inventory Script.... 

here is a working Notecard Giver.....

 

// MULTIPLE NOTECARD GIVER
// WITH FLOATING TEXT
// WARNING-- PERMANENT.  CANNOT BE REMOVED ONCE APPLIED!

//   Gives a note card to a person clicking on it. 
// 
 
string FLOAT_TEXT="TOUCH FOR NOTECARD WITH MORE INFORMATION";
vector FLOAT_COLOR=<0.8, 0.9, 0.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_NOTECARD);
            for (   InvNum = 0; InvNum < NumCards; InvNum++) {
                NoteName = llGetInventoryName(INVENTORY_NOTECARD, InvNum);
                llGiveInventory(giver, NoteName);
            }
        }
    }
}

 
Previous Previous
 
Next Next
  Openlife Forums  Scripting  Openlife LSL Ex...  Give Inventory Script....
Privacy Statement | Terms Of UseAll Rights Reserved 2007,2008 3DX - Openlifegrid.com