aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2021-09-06 21:15:36 +1000
committeronefang2021-09-06 21:15:36 +1000
commit10e2f77d57ecc5e306900b112d70c2600f941ae4 (patch)
treee634b6ac7d20886b9fe256b8c69696a011e4e0b6
parentOops, left this out of the OhSilly sit commit. (diff)
download1ring-10e2f77d57ecc5e306900b112d70c2600f941ae4.zip
1ring-10e2f77d57ecc5e306900b112d70c2600f941ae4.tar.gz
1ring-10e2f77d57ecc5e306900b112d70c2600f941ae4.tar.bz2
1ring-10e2f77d57ecc5e306900b112d70c2600f941ae4.tar.xz
Various common tweaks.
New instant message logger. Check if a prim still exists before sending it a message. New dynamic menu return option. Check menu commands at startup.
-rw-r--r--1AOor2.lsl77
-rw-r--r--1chatter.lsl73
-rw-r--r--1ring.lsl50
3 files changed, 173 insertions, 27 deletions
diff --git a/1AOor2.lsl b/1AOor2.lsl
index 111a3d5..e336ab7 100644
--- a/1AOor2.lsl
+++ b/1AOor2.lsl
@@ -45,6 +45,8 @@ integer lSUBSTITUTE = -7;
45integer lSUBSTITUTE_DONE = -8; 45integer lSUBSTITUTE_DONE = -8;
46integer lNEXT_WORD = -9; 46integer lNEXT_WORD = -9;
47integer lNEXT_WORD_DONE = -10; 47integer lNEXT_WORD_DONE = -10;
48integer lCHECK = -11;
49integer lCHECK_DONE = -12;
48integer lCONTROL = -13; 50integer lCONTROL = -13;
49integer lCONTROL_DONE = -14; 51integer lCONTROL_DONE = -14;
50integer lCMD = -15; 52integer lCMD = -15;
@@ -64,6 +66,7 @@ d(string m) {if (DEBUG) llInstantMessage(Owner, llGetScriptName() + ": " + m);}
64D(string m) {llRegionSay(DEBUG_CHANNEL, llGetScriptName() + ": " + m);} 66D(string m) {llRegionSay(DEBUG_CHANNEL, llGetScriptName() + ": " + m);}
65s(string m) {s(Owner, m);} 67s(string m) {s(Owner, m);}
66s(key id, string m) {if (id == Owner) llOwnerSay(m); else llInstantMessage(id, m);} 68s(key id, string m) {if (id == Owner) llOwnerSay(m); else llInstantMessage(id, m);}
69S(string m) {llInstantMessage(Owner, llGetScriptName() + ": " + m);}
67sendScript(integer cmd, list args) {sendScript(LibraryKey, cmd, ScriptName, args);} 70sendScript(integer cmd, list args) {sendScript(LibraryKey, cmd, ScriptName, args);}
68sendScript(key them, integer cmd, list args) {sendScript(them, cmd, inKey2Name(them), args);} 71sendScript(key them, integer cmd, list args) {sendScript(them, cmd, inKey2Name(them), args);}
69sendScript(integer cmd, string name, list args) {sendScript(LibraryKey, cmd, name, args);} 72sendScript(integer cmd, string name, list args) {sendScript(LibraryKey, cmd, name, args);}
@@ -71,9 +74,16 @@ sendScript(key them, integer cmd, string name, list args)
71{ 74{
72 llMessageLinked(LINK_SET, cmd, llDumpList2String([ScriptKey, name] + args, lSEP), them); 75 llMessageLinked(LINK_SET, cmd, llDumpList2String([ScriptKey, name] + args, lSEP), them);
73} 76}
77integer pingPrim(key k)
78{
79 if (NULL_KEY != k)
80 return (0 != llGetListLength(llGetObjectDetails(k, [OBJECT_DESC])));
81 return FALSE;
82}
74sendPrim(key them, string cmd, list args) 83sendPrim(key them, string cmd, list args)
75{ 84{
76 osMessageObject(them, llDumpList2String([ScriptName, cmd] + args, lSEP)); 85 if (pingPrim(them))
86 osMessageObject(them, llDumpList2String([ScriptName, cmd] + args, lSEP));
77} 87}
78addEvent(float delay, string cmds) 88addEvent(float delay, string cmds)
79{ 89{
@@ -188,7 +198,11 @@ list readCard(string card)
188 198
189dynamicMenu(key id, string menu, string name, string title, string entries, string command) 199dynamicMenu(key id, string menu, string name, string title, string entries, string command)
190{ 200{
191 sendScript(lDYNAMIC, [id, menu, name, title, entries, command]); 201 dynamicMenu(id, menu, name, title, entries, command, 1);
202}
203dynamicMenu(key id, string menu, string name, string title, string entries, string command, integer ret)
204{
205 sendScript(lDYNAMIC, [id, menu, name, title, entries, command, ret]);
192} 206}
193 207
194integer Chosen; 208integer Chosen;
@@ -206,16 +220,27 @@ linky(integer num, string message, key id)
206 key them = llList2Key(input, 0); 220 key them = llList2Key(input, 0);
207 string fr = llList2Key(input, 1); 221 string fr = llList2Key(input, 1);
208//d("linky " + num + " " + message); 222//d("linky " + num + " " + message);
209 if (lCMD == num) 223 if ((lCHECK == num) || (lCMD == num))
210 { 224 {
211//d("link CHAT " + llDumpList2String(input, " ~ "));
212 if ((fr == (ScriptName + ".")) || (fr == "*.")) 225 if ((fr == (ScriptName + ".")) || (fr == "*."))
213 { 226 {
214 key a = llList2Key(input, 3); 227 key a = llList2Key(input, 3);
215 string button = llList2String(input, 4); 228 string button = llList2String(input, 4);
216 integer r = doThing(a, button, fr, 229 integer r;
230 if (lCHECK == num)
231 {
232//d("link CHECK " + llDumpList2String(input, " ~ "));
233 r = checkThing(a, button, fr,
217 llList2String(input, 5), llList2String(input, 6), llList2Integer(input, 2)); 234 llList2String(input, 5), llList2String(input, 6), llList2Integer(input, 2));
218 sendScript(lCMD_DONE, [button, a, r]); 235 sendScript(num - 1, [llList2String(input, 6), a, r]);
236 }
237 else
238 {
239//d("link CHAT " + llDumpList2String(input, " ~ "));
240 r = doThing(a, button, fr,
241 llList2String(input, 5), llList2String(input, 6), llList2Integer(input, 2));
242 sendScript(num - 1, [button, a, r]);
243 }
219 } 244 }
220 } 245 }
221 else if (lRESET_DONE == num) 246 else if (lRESET_DONE == num)
@@ -237,6 +262,44 @@ d("linky RESET_DONE");
237} 262}
238// END boilerplate, mostly. 263// END boilerplate, mostly.
239 264
265integer checkThing(key id, string button, string fr, string cmd, string data, integer source)
266{
267 if ((fr != (ScriptName + ".") && ("*." != fr))) return TRUE;
268 if (("POSE" == cmd) || ("SINGLE_POSE" == cmd))
269 {
270//d("CHECKING " + data);
271 // POSE piggyback,~,piggyback-sit
272 list p = llParseStringKeepNulls(llGetSubString(data, 5, -1), [",", "|"], []);
273 string name = llList2String(p, 0);
274 integer l = llGetListLength(p);
275 integer i;
276
277 p = llListReplaceList(p, [], 0, 0);
278 l--;
279 for (i = 0; i < l; i++)
280 {
281 string a = llList2String(p, i);
282 integer e = FALSE;
283 integer f = FALSE;
284 list ae = splitEmote(a);
285 string an = llList2String(ae, 0);
286
287 // Coz LSL doesn't short circuit, and we don't want to checkAnim("~")
288 if ("~" == an)
289 e = TRUE;
290 else if (!checkAnim(an, TRUE))
291 e = TRUE;
292 if (e)
293 {
294 p = llListReplaceList(p, [], i, i);
295 i--; l--;
296 }
297 }
298 savePose(name, llDumpList2String(p, "|"), "", "");
299 }
300 return TRUE;
301}
302
240integer doThing(key id, string button, string fr, string cmd, string data, integer source) 303integer doThing(key id, string button, string fr, string cmd, string data, integer source)
241{ 304{
242 integer set = -1; 305 integer set = -1;
@@ -375,7 +438,7 @@ integer doThing(key id, string button, string fr, string cmd, string data, integ
375 keys += "|COUPLE_WITH " + llList2String(b, i); 438 keys += "|COUPLE_WITH " + llList2String(b, i);
376 names += "|" + llList2String(b, i + 2); 439 names += "|" + llList2String(b, i + 2);
377 } 440 }
378 dynamicMenu(Owner, "couples", What, " Pick someone to '" + What + "' with -", 441 dynamicMenu(Owner, menu, What, " Pick someone to '" + What + "' with -",
379 llGetSubString(names, 1, -1), llGetSubString(keys, 1, -1)); 442 llGetSubString(names, 1, -1), llGetSubString(keys, 1, -1));
380 PIN = (integer) llFrand(DEBUG_CHANNEL - 2) + 2; 443 PIN = (integer) llFrand(DEBUG_CHANNEL - 2) + 2;
381 vector RefPos = llGetPos(); 444 vector RefPos = llGetPos();
diff --git a/1chatter.lsl b/1chatter.lsl
index 9970462..b41df53 100644
--- a/1chatter.lsl
+++ b/1chatter.lsl
@@ -38,6 +38,8 @@ integer lSUBSTITUTE = -7;
38integer lSUBSTITUTE_DONE = -8; 38integer lSUBSTITUTE_DONE = -8;
39integer lNEXT_WORD = -9; 39integer lNEXT_WORD = -9;
40integer lNEXT_WORD_DONE = -10; 40integer lNEXT_WORD_DONE = -10;
41integer lCHECK = -11;
42integer lCHECK_DONE = -12;
41integer lCONTROL = -13; 43integer lCONTROL = -13;
42integer lCONTROL_DONE = -14; 44integer lCONTROL_DONE = -14;
43integer lCMD = -15; 45integer lCMD = -15;
@@ -52,6 +54,7 @@ d(string m) {if (DEBUG) llInstantMessage(Owner, llGetScriptName() + ": " + m);}
52D(string m) {llRegionSay(DEBUG_CHANNEL, llGetScriptName() + ": " + m);} 54D(string m) {llRegionSay(DEBUG_CHANNEL, llGetScriptName() + ": " + m);}
53s(string m) {s(Owner, m);} 55s(string m) {s(Owner, m);}
54s(key id, string m) {if (id == Owner) llOwnerSay(m); else llInstantMessage(id, m);} 56s(key id, string m) {if (id == Owner) llOwnerSay(m); else llInstantMessage(id, m);}
57S(string m) {llInstantMessage(Owner, llGetScriptName() + ": " + m);}
55sendScript(integer cmd, list args) {sendScript(LibraryKey, cmd, ScriptName, args);} 58sendScript(integer cmd, list args) {sendScript(LibraryKey, cmd, ScriptName, args);}
56sendScript(key them, integer cmd, list args) {sendScript(them, cmd, inKey2Name(them), args);} 59sendScript(key them, integer cmd, list args) {sendScript(them, cmd, inKey2Name(them), args);}
57sendScript(integer cmd, string name, list args) {sendScript(LibraryKey, cmd, name, args);} 60sendScript(integer cmd, string name, list args) {sendScript(LibraryKey, cmd, name, args);}
@@ -59,7 +62,12 @@ sendScript(key them, integer cmd, string name, list args)
59{ 62{
60 llMessageLinked(LINK_SET, cmd, llDumpList2String([ScriptKey, name] + args, lSEP), them); 63 llMessageLinked(LINK_SET, cmd, llDumpList2String([ScriptKey, name] + args, lSEP), them);
61} 64}
62sendPrim(key them, string cmd, list args) {osMessageObject(them, llDumpList2String([ScriptName] + args, lSEP));} 65integer pingPrim(key k)
66{
67 if (NULL_KEY != k) return (0 != llGetListLength(llGetObjectDetails(k, [OBJECT_DESC])));
68 return FALSE;
69}
70sendPrim(key them, string cmd, list args) {if (pingPrim(them)) osMessageObject(them, llDumpList2String([ScriptName] + args, lSEP));}
63 71
64string inKey2Name(key k) 72string inKey2Name(key k)
65{ 73{
@@ -596,16 +604,47 @@ addMenuItem(string fr, string menu, string cmd, list args)
596 e += getToggle(fr, llList2String(args, 0)); 604 e += getToggle(fr, llList2String(args, 0));
597 else 605 else
598 e += llList2String(args, 0); 606 e += llList2String(args, 0);
599 if ("TOMENU" == cmd) e += "…"; 607 if ("TOMENU" == cmd)
608 e += "…";
609 else if ("TOGGLE" == cmd)
610 {
611 string cm = llList2String(args, 0);
612 if (-1 == listFindString(Settings, fr + llToUpper(cm), sSTRIDE))
613 d("ERROR! Not found setting " + fr + cm + "!");
614 }
615 else if ("BUTTON" == cmd)
616 {
617 string cm = llList2String(args, 1);
618
619 if (-1 == listFindString(Commands, fr + llToUpper(cm), cSTRIDE))
620 d("ERROR! Not found command " + fr + " " + cm + "!");
621 else
622 {
623 sendScript(getSetting(fr + "SCRIPTKEY"), lCHECK, fr,
624 [fCARD, LibraryKey, menu, cm,
625 llDumpList2String(llListReplaceList(args, [], 0, 1), "|")]);
626 }
627 }
628 else
629 {
630 if (-1 == listFindString(Commands, fr + llToUpper(cmd), cSTRIDE))
631 d("ERROR! Not found command " + fr + cmd + "!");
632 else
633 {
634 sendScript(getSetting(fr + "SCRIPTKEY"), lCHECK, fr,
635 [fCARD, LibraryKey, menu, cmd,
636 llDumpList2String(llListReplaceList(args, [], 0, 0), "|")]);
637 }
638 }
600 c += llDumpList2String(llListReplaceList(args, [], 0, 0), " "); 639 c += llDumpList2String(llListReplaceList(args, [], 0, 0), " ");
601 saveMenu(menu, llList2String(Menus, f + mTITLE), llList2Integer(Menus, f + mAUTH), e, c, llList2Integer(Menus, f + mDYN)); 640 saveMenu(menu, llList2String(Menus, f + mTITLE), llList2Integer(Menus, f + mAUTH), e, c, llList2Integer(Menus, f + mDYN));
602 } 641 }
603} 642}
604 643
605dynamicMenu(key id, string menu, string name, string title, string entries, string command) 644dynamicMenu(key id, string menu, string name, string title, string entries, string command, integer ret)
606{ 645{
607//d("dynamicMenu " + menu + " -> " + name + "\n" + id + "@" + name); 646//d("dynamicMenu " + menu + " -> " + name + "\n" + id + "@" + name);
608 saveMenu(id + "@" + name, title, aALL, entries, command, TRUE); 647 saveMenu(id + "@" + name, title, aALL, entries, command, ret);
609 saveMuser(id, id + "@" + name, entries, -1, menu); 648 saveMuser(id, id + "@" + name, entries, -1, menu);
610 showMenu(id); 649 showMenu(id);
611} 650}
@@ -785,7 +824,7 @@ showMenu(key id)
785 integer l = llGetListLength(entries); 824 integer l = llGetListLength(entries);
786 integer n; 825 integer n;
787 826
788 if (llList2Integer(Menus, m + mDYN)) 827 if (dM)
789 { 828 {
790 for (; n < l; ++n) 829 for (; n < l; ++n)
791 { 830 {
@@ -912,10 +951,11 @@ integer handleMenu(integer f, key id, string button)
912 list lst; 951 list lst;
913 integer page = llList2Integer(Musers, f + uPAGE); 952 integer page = llList2Integer(Musers, f + uPAGE);
914 integer m = findMenu(menu); // This was already checked before it was stuffed into Musers. 953 integer m = findMenu(menu); // This was already checked before it was stuffed into Musers.
954 integer dm = llList2Integer(Menus, m + mDYN);
915 integer e = 0; 955 integer e = 0;
916 956
917//d("handleMenu(" + llKey2Name(id) + "," + button + ") " + menu + " -> " + cmd); 957//d("handleMenu(" + llKey2Name(id) + "," + button + ") " + menu + " -> " + cmd);
918 if (llList2Integer(Menus, m + mDYN)) 958 if (dm)
919 dM = menu; 959 dM = menu;
920 // Find the corresponding command for this button. 960 // Find the corresponding command for this button.
921 lst = llParseStringKeepNulls(llList2String(Menus, m + mCMDS), ["|"], []); 961 lst = llParseStringKeepNulls(llList2String(Menus, m + mCMDS), ["|"], []);
@@ -1023,7 +1063,7 @@ d("handleMenu(" + llKey2Name(id) + "," + button + ") " + menu + " -> " + fr + cm
1023 f = listFindString(Commands, fr + cmd, cSTRIDE); 1063 f = listFindString(Commands, fr + cmd, cSTRIDE);
1024 if (-1 != f) 1064 if (-1 != f)
1025 i = doThing(id, menu + "->" + button, fr, cmd, data, fMENU); 1065 i = doThing(id, menu + "->" + button, fr, cmd, data, fMENU);
1026 if ("" != dM) 1066 if ((dm != 2) && ("" != dM))
1027 lastMenu(id, dM); 1067 lastMenu(id, dM);
1028 return i; 1068 return i;
1029 } 1069 }
@@ -1031,6 +1071,12 @@ d("handleMenu(" + llKey2Name(id) + "," + button + ") " + menu + " -> " + fr + cm
1031 return TRUE; 1071 return TRUE;
1032} 1072}
1033 1073
1074integer checkThing(key id, string button, string fr, string cmd, string data, integer source)
1075{
1076 if ((fr != (ScriptName + ".") && ("*." != fr))) return FALSE;
1077 return TRUE;
1078}
1079
1034integer doThing(key id, string command, string fr, string cmd, string data, integer source) 1080integer doThing(key id, string command, string fr, string cmd, string data, integer source)
1035{ 1081{
1036 if ("*.." == fr) return TRUE; 1082 if ("*.." == fr) return TRUE;
@@ -1386,6 +1432,12 @@ fr="1AOor2";
1386 } 1432 }
1387 } 1433 }
1388 } 1434 }
1435 else if (lCHECK_DONE == num)
1436 {
1437//d("lCHECK_DONE " + llKey2Name(llList2Key(input, 3)) + " -> " + llList2String(input, 2) + "| returned " + llList2String(input, 4));
1438 if (!llList2Integer(input, 4))
1439 S("ERROR - Invalid command for " + llList2String(input, 2));
1440 }
1389 else if (lCMD == num) 1441 else if (lCMD == num)
1390 { 1442 {
1391 doThing(llList2Key(input, 3), llList2String(input, 4), fr + ".", 1443 doThing(llList2Key(input, 3), llList2String(input, 4), fr + ".",
@@ -1400,10 +1452,11 @@ fr="1AOor2";
1400 else if (lDYNAMIC == num) 1452 else if (lDYNAMIC == num)
1401 { 1453 {
1402 string menu = llList2String(input, 3); 1454 string menu = llList2String(input, 3);
1403 if ("" != menu) 1455 integer f = llSubStringIndex(menu, ".");
1456 if (("" != menu) && (-1 == f))
1404 menu = fr + "." + menu; 1457 menu = fr + "." + menu;
1405 dynamicMenu(llList2Key(input, 2), menu, fr + "." + llList2String(input, 4), 1458 dynamicMenu(llList2Key(input, 2), menu, fr + "." + llList2String(input, 4),
1406 llList2String(input, 5), llList2String(input, 6), llList2String(input, 7)); 1459 llList2String(input, 5), llList2String(input, 6), llList2String(input, 7), llList2Integer(input, 8));
1407 } 1460 }
1408 else if (lMENU == num) 1461 else if (lMENU == num)
1409 { 1462 {
@@ -1527,7 +1580,7 @@ d("listen 1ring.CHANNEL " + message + " -> " + button + " " + cmd + " " + data);
1527 llSensor("", NULL_KEY, llList2Integer(Scanners, nTYPE), 100.0, PI); 1580 llSensor("", NULL_KEY, llList2Integer(Scanners, nTYPE), 100.0, PI);
1528 dynamicMenu(id, menu, menu, 1581 dynamicMenu(id, menu, menu,
1529 llList2String(Scanners, nTITLE), 1582 llList2String(Scanners, nTITLE),
1530 llDumpList2String(items, "|"), llDumpList2String(keys, "|")); 1583 llDumpList2String(items, "|"), llDumpList2String(keys, "|"), 2);
1531 } 1584 }
1532 } 1585 }
1533 1586
diff --git a/1ring.lsl b/1ring.lsl
index 59db460..f8bacdf 100644
--- a/1ring.lsl
+++ b/1ring.lsl
@@ -45,6 +45,8 @@ integer lSUBSTITUTE = -7;
45integer lSUBSTITUTE_DONE = -8; 45integer lSUBSTITUTE_DONE = -8;
46integer lNEXT_WORD = -9; 46integer lNEXT_WORD = -9;
47integer lNEXT_WORD_DONE = -10; 47integer lNEXT_WORD_DONE = -10;
48integer lCHECK = -11;
49integer lCHECK_DONE = -12;
48integer lCONTROL = -13; 50integer lCONTROL = -13;
49integer lCONTROL_DONE = -14; 51integer lCONTROL_DONE = -14;
50integer lCMD = -15; 52integer lCMD = -15;
@@ -62,6 +64,7 @@ d(string m) {if (DEBUG) llInstantMessage(Owner, llGetScriptName() + ": " + m);}
62D(string m) {llRegionSay(DEBUG_CHANNEL, llGetScriptName() + ": " + m);} 64D(string m) {llRegionSay(DEBUG_CHANNEL, llGetScriptName() + ": " + m);}
63s(string m) {s(Owner, m);} 65s(string m) {s(Owner, m);}
64s(key id, string m) {if (id == Owner) llOwnerSay(m); else llInstantMessage(id, m);} 66s(key id, string m) {if (id == Owner) llOwnerSay(m); else llInstantMessage(id, m);}
67S(string m) {llInstantMessage(Owner, llGetScriptName() + ": " + m);}
65sendScript(integer cmd, list args) {sendScript(LibraryKey, cmd, ScriptName, args);} 68sendScript(integer cmd, list args) {sendScript(LibraryKey, cmd, ScriptName, args);}
66sendScript(key them, integer cmd, list args) {sendScript(them, cmd, inKey2Name(them), args);} 69sendScript(key them, integer cmd, list args) {sendScript(them, cmd, inKey2Name(them), args);}
67sendScript(integer cmd, string name, list args) {sendScript(LibraryKey, cmd, name, args);} 70sendScript(integer cmd, string name, list args) {sendScript(LibraryKey, cmd, name, args);}
@@ -69,9 +72,16 @@ sendScript(key them, integer cmd, string name, list args)
69{ 72{
70 llMessageLinked(LINK_SET, cmd, llDumpList2String([ScriptKey, name] + args, lSEP), them); 73 llMessageLinked(LINK_SET, cmd, llDumpList2String([ScriptKey, name] + args, lSEP), them);
71} 74}
75integer pingPrim(key k)
76{
77 if (NULL_KEY != k)
78 return (0 != llGetListLength(llGetObjectDetails(k, [OBJECT_DESC])));
79 return FALSE;
80}
72sendPrim(key them, string cmd, list args) 81sendPrim(key them, string cmd, list args)
73{ 82{
74 osMessageObject(them, llDumpList2String([ScriptName, cmd] + args, lSEP)); 83 if (pingPrim(them))
84 osMessageObject(them, llDumpList2String([ScriptName, cmd] + args, lSEP));
75} 85}
76addEvent(float delay, string cmds) 86addEvent(float delay, string cmds)
77{ 87{
@@ -199,7 +209,11 @@ doSettings(key id, list settings)
199 209
200dynamicMenu(key id, string menu, string name, string title, string entries, string command) 210dynamicMenu(key id, string menu, string name, string title, string entries, string command)
201{ 211{
202 sendScript(lDYNAMIC, [id, menu, name, title, entries, command]); 212 dynamicMenu(id, menu, name, title, entries, command, 1);
213}
214dynamicMenu(key id, string menu, string name, string title, string entries, string command, integer ret)
215{
216 sendScript(lDYNAMIC, [id, menu, name, title, entries, command, ret]);
203} 217}
204 218
205linky(integer num, string message, key id) 219linky(integer num, string message, key id)
@@ -213,16 +227,26 @@ linky(integer num, string message, key id)
213 key them = llList2Key(input, 0); 227 key them = llList2Key(input, 0);
214 string fr = llList2Key(input, 1); 228 string fr = llList2Key(input, 1);
215//d("linky " + num + " " + message); 229//d("linky " + num + " " + message);
216 if (lCMD == num) 230 if ((lCHECK == num) || (lCMD == num))
217 { 231 {
218//d("linky lCMD " + llDumpList2String(input, " ~ "));
219 if ((fr == (ScriptName + ".")) || (fr == "*.")) 232 if ((fr == (ScriptName + ".")) || (fr == "*."))
220 { 233 {
221 key a = llList2Key(input, 3); 234 key a = llList2Key(input, 3);
222 string button = llList2String(input, 4); 235 string button = llList2String(input, 4);
223 integer r = doThing(a, button, fr, 236 integer r;
237 if (lCHECK == num)
238 {
239//d("link CHECK " + llDumpList2String(input, " ~ "));
240 r = checkThing(a, button, fr,
241 llList2String(input, 5), llList2String(input, 6), llList2Integer(input, 2));
242 }
243 else
244 {
245//d("link CHAT " + llDumpList2String(input, " ~ "));
246 r = doThing(a, button, fr,
224 llList2String(input, 5), llList2String(input, 6), llList2Integer(input, 2)); 247 llList2String(input, 5), llList2String(input, 6), llList2Integer(input, 2));
225 sendScript(lCMD_DONE, [button, a, r]); 248 }
249 sendScript(num - 1, [button, a, r]);
226 } 250 }
227 } 251 }
228 else if (lRESET_DONE == num) 252 else if (lRESET_DONE == num)
@@ -404,6 +428,12 @@ integer changeAccess(key id, string cmd, key person, integer source)
404 return FALSE; 428 return FALSE;
405} 429}
406 430
431integer checkThing(key id, string button, string fr, string cmd, string data, integer source)
432{
433 if ((fr != (ScriptName + ".") && ("*." != fr))) return FALSE;
434 return TRUE;
435}
436
407integer doThing(key id, string button, string fr, string cmd, string data, integer source) 437integer doThing(key id, string button, string fr, string cmd, string data, integer source)
408{ 438{
409 integer set = -1; 439 integer set = -1;
@@ -1405,7 +1435,7 @@ d("HEY leashy! " + URL);
1405 } while(++channel < 42); 1435 } while(++channel < 42);
1406 1436
1407 dynamicMenu(someBoss, "clothes", "DETACH", "Please select the attachment to detach", 1437 dynamicMenu(someBoss, "clothes", "DETACH", "Please select the attachment to detach",
1408 llDumpList2String(items, "|"), "DETACH"); 1438 llDumpList2String(items, "|"), "DETACH", 2);
1409 } 1439 }
1410 else if ("getoutfit" == rlv) 1440 else if ("getoutfit" == rlv)
1411 { 1441 {
@@ -1416,7 +1446,7 @@ d("HEY leashy! " + URL);
1416 } while(++channel < 20); 1446 } while(++channel < 20);
1417 1447
1418 dynamicMenu(someBoss, "clothes", "TAKEOFF", "Please select the clothes to take off", 1448 dynamicMenu(someBoss, "clothes", "TAKEOFF", "Please select the clothes to take off",
1419 llDumpList2String(items, "|"), "TAKEOFF"); 1449 llDumpList2String(items, "|"), "TAKEOFF", 2);
1420 } 1450 }
1421 else if ("getinv" == rlv) 1451 else if ("getinv" == rlv)
1422 { 1452 {
@@ -1429,8 +1459,8 @@ d("HEY leashy! " + URL);
1429 string folder = llList2String(folders, i); 1459 string folder = llList2String(folders, i);
1430 items += [folder, "+ " + folder, "- " + folder]; 1460 items += [folder, "+ " + folder, "- " + folder];
1431 } 1461 }
1432 dynamicMenu(someBoss, "clothes", "PUTON", "Please select the outfit to put on", 1462 dynamicMenu(someBoss, "clothes", "PUTON", "Please select the outfit to put on",
1433 llDumpList2String(items, "|"), "PUTON"); 1463 llDumpList2String(items, "|"), "PUTON", 2);
1434 } 1464 }
1435 } 1465 }
1436 1466