Jump to content

Help: Dropbox that IMs and/or Give Item(s) to avatar that drops a notecard (without touching box)


Wrenaria Antiesse
 Share

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

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

Recommended Posts

I'm a total scripting newb, but I am trying to learn, so please bear with me.

I would like to have two separate dropbox scripts that do similar things....

- a dropbox script that will IM the avatar when they drop a notecard into the box. (I am not sure how to get the script to identify the avatar for the IM without the avatar actually touching the box. I don't want to use say or whisper because I don't want other avatars spammed with the message during the activity that it is for.)

- a dropbox script that gives the avatar an object when they drop a notecard into the box (also without having to touch the box).

This is what I've come up with so far. Scripting makes me feel stupid(er). Hopefully what I've started with is not completely incompetent. I am truly sorry if it is.

 

default
{
    state_entry()
    { 
    llAllowInventoryDrop(TRUE);
    }
    changed(integer mask)
    {
    if(mask & (CHANGED_ALLOWED_DROP | CHANGED_INVENTORY))

        llInstantMessage(llDetectedKey(0), "Thank you for submitting your notecard. Blah, blah, blah. These are words.");
    }
touch_start(integer total_number) {

        llInstantMessage(llDetectedKey(0),"Please drop your completed notecard here...");
}
    }

 

Link to comment
Share on other sites

There's no reliable way to do either. Once an item is dropped into another avatar's "dropbox" object, it immediately becomes owned by the owner of the dropbox. The best you can do is "llGetInventoryCreator()", but it can be difficult even to know which inventory item was most recently added... and the creator isn't always the person doing the dropping.

Link to comment
Share on other sites

"with prior interaction you can identify the dropper, mostly by only enabling the ability for a limited time by request"

I'm unclear what you mean here. I am assuming "prior interaction" would be touching the object. It's the rest of it that has me scratching my head...

A personal dropbox that speaks to the main could work. I hadn't thought of that. Not exactly ideal, but a decent alternate plan if I can't work out a more eloquent fix.

Thanks for the advice, Void.

Link to comment
Share on other sites

With most dropbox solutions, a problem will occur if more than one avatar tries to drop at the same time. The script can't control who is allowed to drop, so it will be possible for one avatar to initiate the process, while another drops an item into the box. You also need to clean the box to keep the contents from filling to a limit.

Since you're requesting notecards, I assume the notecard can be named by the user. When an avatar interacts, either by touch, scan, chat, or collision, send the avatar an IM with a random code and brief instructions. The user renames the notecard by copy/pasting the code. At that point, you have a list of users in your script with associated codes. When an item is dropped, you can call for it by name and process with minimal effort. Clear the name and code from the list. You can also crosscheck the list in case an avatar is detected or touches multiple times before dropping a notecard.

Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...