diff options
Diffstat (limited to '')
-rw-r--r-- | 1ring.lsl | 50 |
1 files changed, 40 insertions, 10 deletions
@@ -45,6 +45,8 @@ integer lSUBSTITUTE = -7; | |||
45 | integer lSUBSTITUTE_DONE = -8; | 45 | integer lSUBSTITUTE_DONE = -8; |
46 | integer lNEXT_WORD = -9; | 46 | integer lNEXT_WORD = -9; |
47 | integer lNEXT_WORD_DONE = -10; | 47 | integer lNEXT_WORD_DONE = -10; |
48 | integer lCHECK = -11; | ||
49 | integer lCHECK_DONE = -12; | ||
48 | integer lCONTROL = -13; | 50 | integer lCONTROL = -13; |
49 | integer lCONTROL_DONE = -14; | 51 | integer lCONTROL_DONE = -14; |
50 | integer lCMD = -15; | 52 | integer lCMD = -15; |
@@ -62,6 +64,7 @@ d(string m) {if (DEBUG) llInstantMessage(Owner, llGetScriptName() + ": " + m);} | |||
62 | D(string m) {llRegionSay(DEBUG_CHANNEL, llGetScriptName() + ": " + m);} | 64 | D(string m) {llRegionSay(DEBUG_CHANNEL, llGetScriptName() + ": " + m);} |
63 | s(string m) {s(Owner, m);} | 65 | s(string m) {s(Owner, m);} |
64 | s(key id, string m) {if (id == Owner) llOwnerSay(m); else llInstantMessage(id, m);} | 66 | s(key id, string m) {if (id == Owner) llOwnerSay(m); else llInstantMessage(id, m);} |
67 | S(string m) {llInstantMessage(Owner, llGetScriptName() + ": " + m);} | ||
65 | sendScript(integer cmd, list args) {sendScript(LibraryKey, cmd, ScriptName, args);} | 68 | sendScript(integer cmd, list args) {sendScript(LibraryKey, cmd, ScriptName, args);} |
66 | sendScript(key them, integer cmd, list args) {sendScript(them, cmd, inKey2Name(them), args);} | 69 | sendScript(key them, integer cmd, list args) {sendScript(them, cmd, inKey2Name(them), args);} |
67 | sendScript(integer cmd, string name, list args) {sendScript(LibraryKey, cmd, name, args);} | 70 | sendScript(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 | } |
75 | integer pingPrim(key k) | ||
76 | { | ||
77 | if (NULL_KEY != k) | ||
78 | return (0 != llGetListLength(llGetObjectDetails(k, [OBJECT_DESC]))); | ||
79 | return FALSE; | ||
80 | } | ||
72 | sendPrim(key them, string cmd, list args) | 81 | sendPrim(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 | } |
76 | addEvent(float delay, string cmds) | 86 | addEvent(float delay, string cmds) |
77 | { | 87 | { |
@@ -199,7 +209,11 @@ doSettings(key id, list settings) | |||
199 | 209 | ||
200 | dynamicMenu(key id, string menu, string name, string title, string entries, string command) | 210 | dynamicMenu(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 | } | ||
214 | dynamicMenu(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 | ||
205 | linky(integer num, string message, key id) | 219 | linky(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 | ||
431 | integer 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 | |||
407 | integer doThing(key id, string button, string fr, string cmd, string data, integer source) | 437 | integer 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 | ||