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
Utility Utility__Copy_Script  

Utility__Copy_Script

Utility - Copy Script by Alondria LeFay.lsl

Category: Utility
By : Alondria LeFay
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Utility__Copy_Script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Utility__Copy_Script_by_Alondria_Le_1.lsl
1
2 // UTIL.copyscripts.lsl
3 // By Alondria LeFay
4 // Version 1.0
5
6
7 // Utility - Copy/Paste/Delete Scripts by Alondria LeFay
8 //I create quite a few things with pre-existant modules of scripts. It grew to become a pain to manually drag certain scripts into new objects over and over so I created a set of utility scripts to automate this. Inorder to copy the scripts, drop UTIL.copyscripts into the object you want to copy the scripts from, and UTIL.pastescripts into the object you want them copied into. The utility scripts will transfer all the scripts and then remove themselves. I also include UTIL.deletescripts, which is a quick way to remove all scripts from an object.
9 //Anyways, they are nothing too special, I just found myself using them a lot so I figured I'd pass them on.
10
11
12 integer lhook;
13 integer ch = 7983424;
14 integer pin = 75645;
15
16 alInit(integer argi)
17 {
18 if(lhook)
19 {
20 llListenRemove(lhook);
21 }
22 llListen(ch,"","","");
23 llSay(0,"Drop UTIL.pastescripts into object to copy scripts to.");
24 }
25
26 alParse(integer channel, string name, key id, string message)
27 {
28 list args;
29 args=llParseString2List(message, [" "],[]);
30 string obj=llList2String(args,0);
31 args=llDeleteSubList(args,0,0);
32 if(obj == "paste")
33 {
34 string foo = llList2String(args,0);
35 integer pw = llList2Integer(args,1);
36 llSay(0,"Transfering Scripts...");
38 integer i;
39 list scripts;
40 for (i = 0; i < num; i = i + 1)
41 {
43 if(tmps != llGetScriptName())
44 {
45 llRemoteLoadScriptPin(foo,tmps,pin, llGetScriptState(tmps),0);
46 }
47 }
48 llSay(0,"Done!");
50 }
51 }
52
53 default
54 {
55 on_rez(integer argi)
56 {
57 alInit(argi);
58 }
60 {
61 alInit(0);
62 }
63 listen(integer channel, string name, key id, string message)
64 {
65 alParse(channel, name, id, message);
66 }
67 } // END //

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