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
Mailer Give_All_NoteCards_To_Owner  

Give_All_NoteCards_To_Owner

Gives one or more notcards to whoever touches it, by name. Notecards have to be in Legacy name format such as 'Ferd Frederix', or 'Ferd Frederix1', 'Ferd Frederix2'. Not the 'Ferd.Frederix' style.

Category: Mailer
By : Ferd Frederix
Created: 2016-06-01 Edited: 2016-06-01
Worlds: Second Life

the Zip file

Download all files for Give_All_NoteCards_To_Owner
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Give_To_Individuals.lsl
Get file # 2. Give_to_Owner_Only.lsl
Get file # 3. Notecard.txt
Get file # 4. Notecard2.txt

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2 // give notecard by Legacy name
3 // i.e. "John Doe" or if lastname Resident "John Resident"
4
5 integer debug = FALSE;
6
7 default
8 {
10 {
11 integer count = llGetInventoryNumber(INVENTORY_NOTECARD); // 1 or more?
12
13 while(count > 0)
14 {
15 // notecard indexes start at number 0, not 1, so we subtract 1
16 string notecardname = llGetInventoryName(INVENTORY_NOTECARD,count-1);
17
18 // name is the legacy name, i.e. "John Doe" or if lastname Resident "John Resident"
19 string avatarName= llDetectedName(0);
20
21 if(debug)
22 avatarName = "Ferd Resident";
23
24 // Returns an integer that is the index of the first instance of pattern in source.
25 // Function: integer llSubStringIndex( string source, string pattern );
26 // src (or notecard) = Ferd.Fredrix03, pattern = Ferd.Frederix, if it matches == 0
27 if(llSubStringIndex(notecardname, avatarName) == 0)
28 {
29 if(debug) llSay(0,"Giving " + notecardname);
30 llGiveInventory(llDetectedKey(0), notecardname);
31 if(!debug)
32 llRemoveInventory(notecardname);
33 }
34
35
36 count--; // count dowb to zero
37 }
38 }
39 }

Give_All_NoteCards_To_Owner

Gives one or more notcards to the owner when they touch it in a folder with todays date. Anyone can drop a notecard or other object into the prim by holding ctrl and dragging an item onto it.
Added scripts will not run.

Category: Mailer
By : Ferd Frederix
Created: 2016-06-01 Edited: 2016-06-01
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2 list names; // a list of items we wish to give to owner
3
4 default
5 {
6
8 {
10 }
11
13 {
14 // give only to owner
16 {
17 integer count = llGetInventoryNumber(INVENTORY_ALL); // 1 or more?
18
19 while(count > 0)
20 {
21 // notecard indexes start at number 0, not 1, so we subtract 1
22 string notecardname = llGetInventoryName(INVENTORY_ALL,count-1);
23 if(notecardname != llGetScriptName())
24 {
25 names += [notecardname];
26 }
27 count --;
28 }
29
30 string folder = llGetDate();
31 llGiveInventoryList(llDetectedKey(0),folder, names);
32
33 count = llGetInventoryNumber(INVENTORY_ALL); // 1 or more?
34
35 while(count > 0)
36 {
37 // notecard indexes start at number 0, not 1, so we subtract 1
38 string notecardname = llGetInventoryName(INVENTORY_ALL,count-1);
39 if(notecardname != llGetScriptName())
40 {
41 llSay(0,"Del " + notecardname);
42 lRemoveInventory(notecardname);
43 }
44 count--;
45 }
46 }
47 }
48 }

Give_All_NoteCards_To_Owner

Sample Noatecard

Category: Mailer
By : Ferd Frederix
Created: 2016-06-01 Edited: 2016-06-01
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 notecard

Give_All_NoteCards_To_Owner

Sample Notecard

Category: Mailer
By : Ferd Frederix
Created: 2016-06-01 Edited: 2016-06-01
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 notecard

Give_All_NoteCards_To_Owner

Sample Notecard

Category: Mailer
By : Ferd Frederix
Created: 2016-06-01 Edited: 2016-06-01
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 notecard

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