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
Texture Remote_Texture_Loader  

Remote_Texture_Loader

Remote Texture Loader Description
//...

Category: Texture
By : Bobbyb30 Swashbuckler
Created: 2010-12-27 Edited: 2010-12-27
Worlds: Second Life

the Zip file

Download all files for Remote_Texture_Loader
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Remote_Texture_Loader_1.lsl
Get file # 2. Remote_Texture_Loader_2.lsl
Get file # 3. Remote_Texture_Loader_3.lsl
Get file # 4. Remote_Texture_Loader_4.lsl
Get file # 5. Remote_Texture_Loader_5.lsl
1 //***********************************************************************************************************
2 // *
3 // --Remote Loader-- *
4 // *
5 //***********************************************************************************************************
6 // www.lsleditor.org by Alphons van der Heijden (SL: Alphons Jano)
7 //Creator: Bobbyb30 Swashbuckler
8 //Attribution: None required, but it is appreciated.
9 //Created: November 28, 2009
10 //Last Modified: November 28, 2009
11 //Released: Saturday, November 28, 2009
12 //License: Public Domain
13
14 //Status: Fully Working/Production Ready
15 //Version: 1.0.1
16
17 //Name: Remote Loader.lsl
18 //Purpose: To remotely load the 'Remote Load Texture Display(input list).lsl' script.
19 //Technical Overview: This script remotely loads Remote Load Texture Display(input list).lsl into the proper objects.
20 //Directions: Add object UUID's to targets list. Correct the pin to the one you set.
21
22 //Compatible: Mono & LSL compatible
23 //Other items required: Requires the 'Remote Load Texture Display(input list).lsl' & 'Main Display.lsl' scripts.
24 //Notes: Commented for easier following. This script will shut off after use. Do not rename script. There is a
25 // 3 second delay between remote loads.
26 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
27 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
28
29 ///////////////////////////////////////////
30 //user variables...you may change these...
31 integer pin = 606;//pin
32
33 //takes 3 seconds per each target
34 list targets =[//put object UUIDS here
35 "ad367823-4e38-fcee-fdeb-f41fdb045149",
36 "dac99b54-d23a-e890-2cb9-d57b1f80c6d6"
37 ];
38
39 ///////////////
40 //global variables...do not change
41 integer targetslistlength;//length of targets list
42
43 default
44 {
46 {
47 llOwnerSay("'Remote Loader.lsl' (Public Domain 2009)");
48 targetslistlength = llGetListLength(targets);//speed hack here
49 llSetScriptState(llGetScriptName(),FALSE);//turn off until needed
50 }
51 link_message(integer sender, integer ch, string msg, key id)
52 {
53 if(ch == -1)//begin remote loading
54 {
55 //msg is texture number to load, its bumped up one so that 0 is 1...
56 integer counter;
57 do
58 {
59 integer param = ((integer)msg) + 1;
60 llRemoteLoadScriptPin(llList2String(targets,counter),"Remote Load Texture Display(input list).lsl",pin, TRUE,param);
61 }while(++counter < targetslistlength);
62 llSetScriptState(llGetScriptName(),FALSE);//turn off until next time...
63 }
64 }
65 }

Remote_Texture_Loader

Remote Load Texture Display(input list).lsl

Category: Texture
By : Bobbyb30 Swashbuckler
Created: 2010-12-27 Edited: 2010-12-27
Worlds: Second Life

1 //***********************************************************************************************************
2 // *
3 // --Remote Load Texture Display(input list)-- *
4 // *
5 //***********************************************************************************************************
6 // www.lsleditor.org by Alphons van der Heijden (SL: Alphons Jano)
7 //Creator: Bobbyb30 Swashbuckler
8 //Attribution: None required, but it is appreciated.
9 //Created: November 28, 2009
10 //Last Modified: November 28, 2009
11 //Released: Saturday, November 28, 2009
12 //License: Public Domain
13
14 //Status: Fully Working/Production Ready
15 //Version: 1.0.1
16
17 //Name: Remote Load Texture Display(input list).lsl
18 //Purpose: To be remotely loaded onto a prim and then display the appropriate texture.
19 //Technical Overview: When this script is remotely loaded to an object, it changes that objects texture and then
20 // deletes itself.
21 //Directions: Add the appropriate textures to the list. Place the script in the server.
22
23 //Compatible: Mono & LSL compatible
24 //Other items required: Requires the 'Remote Loader.lsl' & 'Main Display.lsl' scripts.
25 //Notes: Commented for easier following. This script will delete itself after use. Do not rename script.
26 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
27 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
28
29 //Adjustable global variables...you may change these
30 //texture list...this list should have 2 or more textures
31 list textures = [//put your texture UUIDs/keys in here
32 "f150313b-1f38-8978-b2ed-e0b2ffb62d5c",// black
33 "16e92b19-7407-44c6-1f7a-03d75ef3e4a6",// unabletoconnect
34 "1c482bda-802d-2991-5a03-4bb128792326"// white
35 ];//end of list
36
37 integer side = ALL_SIDES;//which side(face) to change
38 // put # of side, or put ALL_SIDES for all sides,-1 equals all sides
39
40 default
41 {
43 {
45 if(param != 0)
46 {
47 --param;//param - 1
48 llSetTexture(llList2String(textures,param),side);//set the texture
49 llRemoveInventory(llGetScriptName());//remove script from inventory
50 llSleep(1.0);
51 llRemoveInventory(llGetScriptName());//remove script from inventory
52 //if that fails we'll get here
53 llInstantMessage(llGetOwner(),"The script '" + (string)llGetScriptName() + "' in object " + llGetObjectName()
54 + "at Region " + (string)llGetRegionName() + " loc: " + (string)llGetPos() + " failed to delete.");
55 llSetScriptState(llGetScriptName(),FALSE);//shut off script
56 }
57 else
58 {
59 llOwnerSay("Bobbyb's 'Remote Load Texture Display(input list).lsl' running (Public Domain 2009)");
60 llOwnerSay("This script should be deleted if it is in a remote object...");
62 }
63 }
64 }

Remote_Texture_Loader

Main Display.lsl

Category: Texture
By : Bobbyb30 Swashbuckler
Created: 2010-12-27 Edited: 2010-12-27
Worlds: Second Life

1 //***********************************************************************************************************
2 // *
3 // --Main Display -- *
4 // *
5 //***********************************************************************************************************
6 // www.lsleditor.org by Alphons van der Heijden (SL: Alphons Jano)
7 //Creator: Bobbyb30 Swashbuckler
8 //Attribution: None required, but it is appreciated.
9 //Created: November 28, 2009
10 //Last Modified: November 28, 2009
11 //Released: Saturday, November 28, 2009
12 //License: Public Domain
13
14 //Status: Fully Working/Production Ready
15 //Version: 1.0.1
16
17 //Name: Main Display.lsl
18 //Purpose: This is the heart of the server. It tells remote loader when to load and changes the pictures on the server.
19 //Technical Overview: Tell remote loader when to load using a timer. Also displays texture on server.
20 //Description: The main display serves as the core of the server telling remote loader when to load and changin the
21 // texture on the server.
22 //Directions: Create a prim. Place the script in prim inventory. Modify the script parameters to suit your needs and
23 // save. Copy the textures from here to the 'Remote Load Texture Display(input list).lsl' script.
24
25 //Compatible: Mono & LSL compatible
26 //Other items required: Requires the 'Remote Loader.lsl' & 'Remote Load Texture Display(input list).lsl' scripts.
27 //Notes: Uses a timer event. Should be low lag. Commented for easier following.
28 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
29 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
30
31 //Adjustable global variables...you may change these
32 //texture list...this list should have 2 or more textures
33 list textures = [//put your texture UUIDs/keys in here
34 "f150313b-1f38-8978-b2ed-e0b2ffb62d5c",// black
35 "16e92b19-7407-44c6-1f7a-03d75ef3e4a6",// unabletoconnect
36 "1c482bda-802d-2991-5a03-4bb128792326"// white
37 ];//end of list
38
39 //Please note there is a .2 second delay between prims.
40 integer side = ALL_SIDES;//which side to change , put #, or put ALL_SIDES for all sides,-1 equals all sides
41 float frequency = 100.0;//how often to change the texture in seconds. Shouldn't be below 20.0
42 //This script is meant for longer periods of time such as 1 or 2 minutes for savings to be viable
43
44 //please note that the last and first texture will be shown less frequently than those in between
45 integer random = TRUE;//whether to show the textures randomly, or in order
46 integer duplicatecheck = TRUE;//if random is true, this will check to make sure the random selection is a new texture
47
48
49 /////////////////////////////////////////////////////////////
50 //global variables...do not change
51 integer numberoftextures;//number of textures in inventory
52 integer currenttexture;//inventory number of current texture
53
54 changetexture()//user fucntion to change texture
55 {
56 llSetScriptState("Remote Loader.lsl",TRUE);//turn on remote loader
57 llMessageLinked(LINK_THIS,-1,(string)currenttexture,"");//tell remote loader which texture to load
58 llSetTexture(llList2String(textures,currenttexture),side);//set texture using key
59 }
60
61 default
62 {
63 on_rez(integer start_param)//on rez reset...probably not needed.
64 {
66 }
68 {
69 llOwnerSay("Bobbyb's 'Main Display.lsl' (Public Domain 2009)");
70 llOwnerSay("Because knowledge should be free.");
71 numberoftextures = llGetListLength(textures);//speed hack here
72 //assume correct
73 llOwnerSay("There are " + (string)numberoftextures + " pictures which I will change every "
74 + (string)frequency + " seconds on side: " + (string)side);
75 llOwnerSay("My current free memory is : " + (string)llGetFreeMemory()
76 + " bytes. If it is below 2500 bytes, I may not work properly.");
77 llSetTimerEvent(frequency);
78 }
79 timer()
80 {
81 if(random)//show pics randomly
82 {
83 integer randomtexture;
84 if(duplicatecheck)//whether to make sure random doesn't repeat itself
85 {
86 do
87 {
88 randomtexture= llRound(llFrand(numberoftextures - 1));
89 //llOwnerSay("r" + (string)randomtexture);//debug
90 }while(randomtexture == currenttexture);//make sure the random one isn't the same as the current one
91 }
92 else//no duplicate check
93 randomtexture = llRound(llFrand(numberoftextures - 1));//generate random texture number
94 currenttexture = randomtexture;//set the current one to the random one selected
95 changetexture();//change the texture
96 //llOwnerSay("c" + (string)currenttexture);//debug
97 }
98 else//not random, go in order
99 {
100 ++currenttexture;
101 if(currenttexture == numberoftextures)//if current texture = number of textures, reset counter
102 currenttexture = 0;
103 changetexture();//change the texture
104 //llOwnerSay("c" + (string)currenttexture);//debug
105 }
106 }
107 }

Remote_Texture_Loader

Get key & set pin.lsl

Category: Texture
By : Bobbyb30 Swashbuckler
Created: 2010-12-27 Edited: 2010-12-27
Worlds: Second Life

1 //***********************************************************************************************************
2 // *
3 // -- Get key & set pin -- *
4 // *
5 //***********************************************************************************************************
6 // www.lsleditor.org by Alphons van der Heijden (SL: Alphons Jano)
7 //Creator: Bobbyb30 Swashbuckler
8 //Attribution: None required, but it is appreciated.
9 //Created: November 28, 2009
10 //Last Modified: November 28, 2009
11 //Released: Saturday, November 28, 2009
12 //License: Public Domain
13
14 //Status: Fully Working/Production Ready
15 //Version: 1.0.1
16
17 //Name: Get key & set pin.lsl
18 //Purpose: To set the pin and print out the UUID of the object.
19 //Description: Gets the key of the object and sets the object remote load pin.
20 //Directions: Modify pin to match the one used in remote loader and then drop into prim.
21
22 //Compatible: Mono & LSL compatible
23 //Other items required: For use with 'Remote Loader.lsl'
24 //Notes: Commented for easier following. Removes itself after use.
25 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
26 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
27
28
29 integer pin = 606;//change the pin to match what you put in remote loader.lsl
30 default
31 {
33 {
35 llOwnerSay("Pin has been set. My key is:" + (string)llGetKey());
36 llRemoveInventory(llGetScriptName());//remove script from inventory
37 llSleep(.5);
38 //if that fails we'll get here
39 llInstantMessage(llGetOwner(),"The script '" + (string)llGetScriptName() + "' in object " + llGetObjectName()
40 + "at Region " + (string)llGetRegionName() + " loc: " + (string)llGetPos() + " failed to delete.");
41 llSetScriptState(llGetScriptName(),FALSE);//shut off script
42 }
43 }

Remote_Texture_Loader

Print inventory texture keys.lsl

Category: Texture
By : Bobbyb30 Swashbuckler
Created: 2010-12-27 Edited: 2010-12-27
Worlds: Second Life

1 //***********************************************************************************************************
2 // *
3 // -- Print inventory texture keys-- *
4 // *
5 //***********************************************************************************************************
6 // www.lsleditor.org by Alphons van der Heijden (SL: Alphons Jano)
7 //Creator: Bobbyb30 Swashbuckler
8 //Attribution: None required, but it is appreciated.
9 //Created: November 28, 2009
10 //Last Modified: November 28, 2009
11 //Released: Saturday, November 28, 2009
12 //License: Public Domain
13
14 //Status: Fully Working/Production Ready
15 //Version: 1.0.1
16
17 //Name: Print inventory texture keys.lsl
18 //Purpose: Prints out the UUID of inventory textures on chat for use in Main Display and Remote
19 // Load texture display.
20 //Description: Prints out the keys of inventory textures on touch.
21 //Directions: Create a prim. Add desired texture. Add this script. Touch.
22
23 //Compatible: Mono & LSL compatible
24 //Other items required: None
25 //Notes: Commented for easier following.
26 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
27 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
28
29 default
30 {
32 {
33 llOwnerSay("Bobbyb's 'Print inventory texture keys.lsl' (Public Domain 2009)");
34 llOwnerSay("Touch to readout inventory texture keys.");
35 }
36 touch_start(integer total_number)
37 {
39 {
41 integer counter;
42 llOwnerSay("Found " + (string)inventorynumber + " textures...");
44 do
45 {
46 string inventoryname = llGetInventoryName(INVENTORY_TEXTURE,counter);
47 llOwnerSay("/me " + "\"" + (string)llGetInventoryKey(inventoryname) + "\""
48 + ", // " + inventoryname);
49 }while(++counter < inventorynumber);
50 llSetObjectName("Print out");
51 llOwnerSay("Please remove the comma from the last one.");
52 }
53 }
54 }

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