Jump to content

Giving a gift to unlimited persons


valerie Inshan
 Share

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

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

Recommended Posts

Okies, here comes the noob about scripting! :D 

I created a caviar box I'd like to offer as a gift to my customers/visitors at my (modest) gacha resale store. What script should I put in it so anyone can pick it up? (any ready to use script would more than welcome! lol!) Any good soul here to guide me through darkness? :)

 

Link to comment
Share on other sites

Hi Val,

Why not just set the caviar (how can you eat that stuff?!) box for sale for L$0 and put a sign above it telling people to right-click and "Buy" it.

Here's a very basic object giver script...

default {    touch_start(integer total_number) {        llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_OBJECT, 0));    }}

 The "INVENTORY_OBJECT" constant must be changed if you want to give away something else, like a notecard.

Here's the list of allowable types...

• INVENTORY_ANIMATION
• INVENTORY_BODYPART
• INVENTORY_CLOTHING
• INVENTORY_GESTURE
• INVENTORY_LANDMARK
• INVENTORY_NOTECARD
• INVENTORY_OBJECT
• INVENTORY_SCRIPT
• INVENTORY_TEXTURE

INVENTORY_OBJECT is correct for giving a caviar box. You'd create a sign that says "Touch me for a free gift" (or something more classy), and drop that script and the caviar box inside the sign's "Contents" folder. Anyone touching the sign will be offered the box.

But, seeing all the type of things you can apparently give, wouldn't you be tempted to give people free body parts?

  • Like 1
Link to comment
Share on other sites


valerie Inshan wrote:

Lol, Maddy, now the caviar box appears to be YOURS and I cannot modify it or take it! GIMMY MY CAVIAR BACK!!!!
:D
:D
:D

No, seriously, thanks for all your explainations and for the script. I'll create a new box and see if all this works! ((hugs))

The "give all" script must have changed ownership somehow. I took the thing off your floor, so there's now room for you to try again!

;-).

Link to comment
Share on other sites


valerie Inshan wrote:

UPDATE: Yay!!! it works!!! Thank you so much Maddy! You're the best! 

And thank Muletta if you read this, you've been an awesome help too!
:)

Yes, I have read this, and you are welcome. Glad I could help a bit...and thank you for the caviar :matte-motes-smile: I will now buy a bottle of champagne, and have a cozy evening with my feet on the table relaxing, eating and drinking.

I still think though, that you should put a LM and the LM-giver inside your caviar box too, using the script I sent you... :matte-motes-grin:

 

  • Like 1
Link to comment
Share on other sites


Muletta wrote:

I still think though, that you should put a LM and the LM-giver inside your caviar box too, using the script I sent you... :matte-motes-grin:


That's a good idea, Muletta. And I'll assume that's what your script tried to do. Without seeing it, I can't say what went wrong, but the name of the script was "Give all..", and that matches the behavior I saw.

Val, if you want your box to give out a LM, add this line to the existing script...

llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_LANDMARK, 0));

That will give out the first LM the script finds in the contents folder. If you place only one LM in there, that's the one that will be given.

Similarly, if you wish to give out a notecard (which could contain a LM) you'd use this line instead...

llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_NOTECARD, 0));

If you add both lines, the recipient will be given three things, a copy of the box, a copy of the LM and a copy of the notecard.

Link to comment
Share on other sites


Madelaine McMasters wrote:


Muletta wrote:

I still think though, that you should put a LM and the LM-giver inside your caviar box too, using the script I sent you... :matte-motes-grin:


That's a good idea, Muletta. And I'll assume that's what your script tried to do. Without seeing it, I can't say what went wrong, but the name of the script was "Give all..", and that matches the behavior I saw.

 

I gave Valerie the "give all..." script, yes, but I also sent her a "Give LM and IM owner" script...But whether they conflict with the scripts from you, I don't know. I have used these scripts I sent her, in my own business, and they work fine, but I shouldn't say, if other ways to do it, would be better - I am not very familiar with scripts at all :matte-motes-smile:

Link to comment
Share on other sites


Muletta wrote:


Madelaine McMasters wrote:


Muletta wrote:

I still think though, that you should put a LM and the LM-giver inside your caviar box too, using the script I sent you... :matte-motes-grin:


That's a good idea, Muletta. And I'll assume that's what your script tried to do. Without seeing it, I can't say what went wrong, but the name of the script was "Give all..", and that matches the behavior I saw.

 

I gave Valerie the "give all..." script, yes, but I also sent her a "Give LM and IM owner" script...But whether they conflict with the scripts from you, I don't know. I have used these scripts I sent her, in my own business, and they work fine, but I shouldn't say, if other ways to do it, would be better - I am not very familiar with scripts at all :matte-motes-smile:

Ah, I'm sure your "Give LM" script works fine, but it wasn't used in Val's box. And multiple giver scripts that give the same things won't confuse each other, but they'll certainly confuse the recipient!

;-).

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3287 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...