Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Inventory Giver NotecardGiver  

NotecardGiver

NotecardGiver

Category: Inventory Giver
By : Encog Dod
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for NotecardGiver
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. NotecardGiver_1.lsl
1 // From the book:
2 //
3 // Scripting Recipes for Second Life
4 // by Jeff Heaton (Encog Dod in SL)
5 // ISBN: 160439000
6 X// Copyright 2007 by Heaton Research, Inc.
7 //
8 // This script may be freely copied and modified so long as this header
9 // remains unmodified.
10 //
11 // For more information about this book visit the following web site:
12 //
13 // http://www.heatonresearch.com/articles/series/22/
14
15 string notecard = "Welcome Notecard";
16 integer freq = 1;
17 integer maxList = 100;
18 list given;
19
20
21 default
22 {
24 {
25 llSensorRepeat("", "",AGENT, 20, PI, freq);
26 llSetText("", <1.0, 1.0, 1.0>, 1.0);
27 }
28
29 sensor(integer num_detected)
30 {
31 integer i;
32 key detected;
33
34 for(i=0;i<num_detected;i++)
35 {
36 detected = llDetectedKey(i);
37
38 if( llListFindList(given, [detected]) < 0 )
39 {
40 given += llDetectedKey(i);
41
42 llGiveInventory(detected, notecard);
43 if(llGetListLength(given) >= maxList)
44 {
45 given = llDeleteSubList(given,0,10);
46 }
47 }
48 }
49 }
50 }

Back to the Best Free Tools in Second Life and OpenSim.