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
Greeter Give_a_notecard_in_their_native_lan  

Give_a_notecard_in_their_native_lan

Put this in a box with as many notecards as you want.

Category: Greeter
By : Ferd Frederix
Created: 2011-10-22 Edited: 2011-10-22
Worlds: Second Life

the Zip file

Download all files for Give_a_notecard_in_their_native_lan
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Give_a_notecard_in_their_native_lan_1.lsl

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 integer found;
3 default
4 {
6 {
7 integer j;
8 string myname = llGetScriptName();
9
11
12 for (j=0; j<inventory_count;j++)
13 {
15
16 // find the stuff after an underscore.
17 list parts = llParseString2List(objectname,["_"],[]);
18 string cardlang = llList2String(parts,1);
20
21
22 agentlang = llToLower(agentlang);
23
24 if(agentlang != "zh-cn" && agentlang != "zh-tw")
25 {
26 agentlang = llGetSubString(agentlang,0,1);
27 }
28
29 if(agentlang == cardlang) // don't give self out so the user doesn't get fifty thousand copies.
30 {
31 llOwnerSay("Giving Notecard " + objectname);
32 llGiveInventory(llGetOwner(),objectname);
33 found++;
34 }
35
36 }
37
38 if(! found)
39 {
40 llGiveInventory(llGetOwner(),"Important Translator Information_en");
41 }
42
43 }
44
45 on_rez(integer start_param)
46 {
48 }
49 }

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