Jump to content
Sign in to follow this  
kratox

Question on item retrieval/giving in code to users

Recommended Posts

Is there a way to make it where a script or npc can take a item given to it by a user and give them a item in return?

 

If not do you know of another way? I am not sure what functions I could use to go about doing it. The only other way I can think of doing this now is storing all of the information on a script that always is running for all users that retrieve items. This way the script keeps track of what items each person has.The issue there is then it comes off as a tedious task just to check how many items you have on it unless I code a little item box to control it. I rather not do that though because if the sim ever got shutdown or something like that it makes it where users lose all their items. I could try storing it in a txt file but that is like the worse way possible in terms of efficiency. Another way would be to use a SQL database with http functions to try and track all users information. That way it stay fast and efficient as long as the data is set up right, but not in the mood to go through all of that. I rather just have it stored using SLs inventory system and make it easier on myself.

 

Example:

---------------------------------------------------------

You walk up to a npc or vending machine. You drag a cube onto it. The vending machine takes the item and gives you a hotdog.

or

You drag a item in a certain region. The script on the land takes the item and gives you something back.

 

Other info:

---------------------------------------------------------

Item will be transferable between users

Item will be deleted when retrieved by npc or script.

Edited by kratox

Share this post


Link to post
Share on other sites

there are some suggestions on drop boxes here...

Quote

There is no way to tell who dropped the item in. If you really need to know, consider making the user touch the prim first to turn the llAllowInventoryDrop on, and then grab the user's information from the touch event, and then set it back to FALSE through a timer.

http://wiki.secondlife.com/wiki/LlAllowInventoryDrop

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...