corrade-lsl-templates – Diff between revs 5 and 29

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 5 Rev 29
Line 1... Line 1...
1 /////////////////////////////////////////////////////////////////////////// 1 ///////////////////////////////////////////////////////////////////////////
2 // Copyright (C) Wizardry and Steamworks 2014 - License: GNU GPLv3 // 2 // Copyright (C) Wizardry and Steamworks 2014 - License: CC BY 2.0 //
3 /////////////////////////////////////////////////////////////////////////// 3 ///////////////////////////////////////////////////////////////////////////
4 // 4 //
5 // This is a puppeteer script for the Corrade Second Life / OpenSim bot 5 // This is a puppeteer script for the Corrade Second Life / OpenSim bot
6 // that, given a set of local coordinates, will make the bot traverse a 6 // that, given a set of local coordinates, will make the bot traverse a
7 // path while also minding collisions with object. You can find more 7 // path while also minding collisions with object. You can find more
Line 9... Line 9...
9 // by following the URL: http://grimore.org/secondlife/scripted_agents/corrade 9 // by following the URL: http://grimore.org/secondlife/scripted_agents/corrade
10 // 10 //
11 // This script works together with a "configuration" notecard that must 11 // This script works together with a "configuration" notecard that must
12 // be placed in the same primitive as this script. The purpose of this 12 // be placed in the same primitive as this script. The purpose of this
13 // script is to demonstrate how Corrade can be made to walk on a path and 13 // script is to demonstrate how Corrade can be made to walk on a path and
14 // you are free to use, change, and commercialize it under the GNU/GPLv3 14 // you are free to use, change, and commercialize it under the CC BY 2.0
15 // license at: http://www.gnu.org/licenses/gpl.html 15 // license at: https://creativecommons.org/licenses/by/2.0
16 // 16 //
17 /////////////////////////////////////////////////////////////////////////// 17 ///////////////////////////////////////////////////////////////////////////
Line 18... Line 18...
18   18  
19 /////////////////////////////////////////////////////////////////////////// 19 ///////////////////////////////////////////////////////////////////////////
20 // Copyright (C) 2014 Wizardry and Steamworks - License: GNU GPLv3 // 20 // Copyright (C) 2014 Wizardry and Steamworks - License: CC BY 2.0 //
21 /////////////////////////////////////////////////////////////////////////// 21 ///////////////////////////////////////////////////////////////////////////
22 string wasKeyValueGet(string k, string data) { 22 string wasKeyValueGet(string k, string data) {
23 if(llStringLength(data) == 0) return ""; 23 if(llStringLength(data) == 0) return "";
24 if(llStringLength(k) == 0) return ""; 24 if(llStringLength(k) == 0) return "";
Line 27... Line 27...
27 if(i != -1) return llList2String(a, i+1); 27 if(i != -1) return llList2String(a, i+1);
28 return ""; 28 return "";
29 } 29 }
Line 30... Line 30...
30 30
31 /////////////////////////////////////////////////////////////////////////// 31 ///////////////////////////////////////////////////////////////////////////
32 // Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3 // 32 // Copyright (C) 2013 Wizardry and Steamworks - License: CC BY 2.0 //
33 /////////////////////////////////////////////////////////////////////////// 33 ///////////////////////////////////////////////////////////////////////////
34 string wasKeyValueEncode(list data) { 34 string wasKeyValueEncode(list data) {
35 list k = llList2ListStrided(data, 0, -1, 2); 35 list k = llList2ListStrided(data, 0, -1, 2);
36 list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2); 36 list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2);
Line 42... Line 42...
42 } while(llGetListLength(k) != 0); 42 } while(llGetListLength(k) != 0);
43 return llDumpList2String(data, "&"); 43 return llDumpList2String(data, "&");
44 } 44 }
Line 45... Line 45...
45   45  
46 /////////////////////////////////////////////////////////////////////////// 46 ///////////////////////////////////////////////////////////////////////////
47 // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // 47 // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 //
48 /////////////////////////////////////////////////////////////////////////// 48 ///////////////////////////////////////////////////////////////////////////
49 // escapes a string in conformance with RFC1738 49 // escapes a string in conformance with RFC1738
50 string wasURLEscape(string i) { 50 string wasURLEscape(string i) {
51 string o = ""; 51 string o = "";
Line 66... Line 66...
66 } while(i != ""); 66 } while(i != "");
67 return o; 67 return o;
68 } 68 }
Line 69... Line 69...
69   69  
70 /////////////////////////////////////////////////////////////////////////// 70 ///////////////////////////////////////////////////////////////////////////
71 // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // 71 // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 //
72 /////////////////////////////////////////////////////////////////////////// 72 ///////////////////////////////////////////////////////////////////////////
73 // unescapes a string in conformance with RFC1738 73 // unescapes a string in conformance with RFC1738
74 string wasURLUnescape(string i) { 74 string wasURLUnescape(string i) {
75 return llUnescapeURL( 75 return llUnescapeURL(
Line 90... Line 90...
90 ) 90 )
91 ); 91 );
92 } 92 }
Line 93... Line 93...
93   93  
94 /////////////////////////////////////////////////////////////////////////// 94 ///////////////////////////////////////////////////////////////////////////
95 // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // 95 // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 //
96 /////////////////////////////////////////////////////////////////////////// 96 ///////////////////////////////////////////////////////////////////////////
97 list wasCSVToList(string csv) { 97 list wasCSVToList(string csv) {
98 list l = []; 98 list l = [];
99 list s = []; 99 list s = [];