TheBeesHoney Starlight Posted December 11, 2019 Share Posted December 11, 2019 is there such a script to put in a prim that gives an object to a 'specified' avatar when they click the item? Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted December 11, 2019 Share Posted December 11, 2019 Sure, if you first compare the value of llDetectedKey(0) with a specific avatar's key, in the touch_start event, you can block anybody else from getting the item. http://wiki.secondlife.com/wiki/LlDetectedKey 1 Link to comment Share on other sites More sharing options...
TheBeesHoney Starlight Posted December 11, 2019 Author Share Posted December 11, 2019 (edited) Wulfie, thank you that is great, I do need to combine this with the llGiveInventory script to give a gift card that is non copy/trans. Firstly, am I using the right scripts to do this? The object in question are gift cards purchased to put in Christmas stockings, so that Staff can click to receive theirs. Thank you again! Edited December 12, 2019 by TheBeesHoney Link to comment Share on other sites More sharing options...
Mollymews Posted December 12, 2019 Share Posted December 12, 2019 seeing as it is nearly xmas. Then something like // list of people to give the gift to list giveTo = [ "Wulfie Reanimator", "Mollymews Resident", "TheBeesHoney Resident" ]; default { touch_start(integer total_number) { key uuid = llDetectedKey(0); integer i = llListFindList(giveTo, [llKey2Name(uuid)]); if (~i) // person is in list { llGiveInventory(uuid, "NameOfTheGift"); // remove the persons name from list when only want to give one gift per person giveTo = llDeleteSubList(giveTo, i, i); } } } Link to comment Share on other sites More sharing options...
TheBeesHoney Starlight Posted December 12, 2019 Author Share Posted December 12, 2019 Thank you very much Mollymews. This looks great!! I very much appreciate your kindness and yours too Wulfies. Have a great Christmas ⛄🍗🥨 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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