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 2016 - License: GNU GPLv3 // 2 // Copyright (C) Wizardry and Steamworks 2016 - License: CC BY 2.0 //
3 /////////////////////////////////////////////////////////////////////////// 3 ///////////////////////////////////////////////////////////////////////////
4 // 4 //
5 // This is an automatic animation responder for the Corrade Second Life / 5 // This is an automatic animation responder for the Corrade Second Life /
6 // OpenSim bot that will accept to trigger animations - such as hugs sent 6 // OpenSim bot that will accept to trigger animations - such as hugs sent
7 // by various HUDs in SecondLife. You can find more details about the bot 7 // by various HUDs in SecondLife. You can find more details about the bot
8 // by following the URL: http://was.fm/secondlife/scripted_agents/corrade 8 // by following the URL: http://was.fm/secondlife/scripted_agents/corrade
9 // 9 //
10 // The script works together with a "configuration" notecard and an that 10 // The script works together with a "configuration" notecard and an that
11 // must be placed in the same primitive as this script. The purpose of 11 // must be placed in the same primitive as this script. The purpose of
12 // this script is to demonstrate accepting animations with Corrade and 12 // this script is to demonstrate accepting animations with Corrade and
13 // you are free to use, change, and commercialize it under the GNU/GPLv3 13 // you are free to use, change, and commercialize it under the CC BY 2.0
14 // license at: http://www.gnu.org/licenses/gpl.html 14 // license at: https://creativecommons.org/licenses/by/2.0
15 // 15 //
16 /////////////////////////////////////////////////////////////////////////// 16 ///////////////////////////////////////////////////////////////////////////
Line 17... Line 17...
17   17  
18 /////////////////////////////////////////////////////////////////////////// 18 ///////////////////////////////////////////////////////////////////////////
19 // Copyright (C) 2014 Wizardry and Steamworks - License: GNU GPLv3 // 19 // Copyright (C) 2014 Wizardry and Steamworks - License: CC BY 2.0 //
20 /////////////////////////////////////////////////////////////////////////// 20 ///////////////////////////////////////////////////////////////////////////
21 string wasKeyValueGet(string k, string data) { 21 string wasKeyValueGet(string k, string data) {
22 if(llStringLength(data) == 0) return ""; 22 if(llStringLength(data) == 0) return "";
23 if(llStringLength(k) == 0) return ""; 23 if(llStringLength(k) == 0) return "";
Line 26... Line 26...
26 if(i != -1) return llList2String(a, i+1); 26 if(i != -1) return llList2String(a, i+1);
27 return ""; 27 return "";
28 } 28 }
Line 29... Line 29...
29 29
30 /////////////////////////////////////////////////////////////////////////// 30 ///////////////////////////////////////////////////////////////////////////
31 // Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3 // 31 // Copyright (C) 2013 Wizardry and Steamworks - License: CC BY 2.0 //
32 /////////////////////////////////////////////////////////////////////////// 32 ///////////////////////////////////////////////////////////////////////////
33 string wasKeyValueEncode(list data) { 33 string wasKeyValueEncode(list data) {
34 list k = llList2ListStrided(data, 0, -1, 2); 34 list k = llList2ListStrided(data, 0, -1, 2);
35 list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2); 35 list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2);
Line 41... Line 41...
41 } while(llGetListLength(k) != 0); 41 } while(llGetListLength(k) != 0);
42 return llDumpList2String(data, "&"); 42 return llDumpList2String(data, "&");
43 } 43 }
Line 44... Line 44...
44   44  
45 /////////////////////////////////////////////////////////////////////////// 45 ///////////////////////////////////////////////////////////////////////////
46 // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // 46 // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 //
47 /////////////////////////////////////////////////////////////////////////// 47 ///////////////////////////////////////////////////////////////////////////
48 // escapes a string in conformance with RFC1738 48 // escapes a string in conformance with RFC1738
49 string wasURLEscape(string i) { 49 string wasURLEscape(string i) {
50 string o = ""; 50 string o = "";