/////////////////////////////////////////////////////////////////////////// // Copyright (C) Wizardry and Steamworks 2014 - License: GNU GPLv3 // // Please see: http://www.gnu.org/licenses/gpl.html for legal details, // // rights of fair usage, the disclaimer and warranty conditions. // /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // /////////////////////////////////////////////////////////////////////////// string wasKeyValueGet(string k, string data) { if(llStringLength(data) == 0) return ""; if(llStringLength(k) == 0) return ""; list a = llParseStringKeepNulls(data, ["&", "="], []); integer i = llListFindList(llList2ListStrided(a, 0, -1, 2), [ k ]); if(i != -1) return llList2String(a, 2*i+1); return ""; } /////////////////////////////////////////////////////////////////////////// // Copyright (C) 2014 Wizardry and Steamworks - License: GNU GPLv3 // /////////////////////////////////////////////////////////////////////////// string wasKeyValueSet(string k, string v, string data) { if(llStringLength(k) == 0) return ""; if(llStringLength(v) == 0) return ""; if(llStringLength(data) == 0) return k + "=" + v; integer i = llListFindList( llList2ListStrided( llParseString2List(data, ["&", "="], []), 0, -1, 2 ), [ k ]); if(i != -1) return llDumpList2String( llListReplaceList( llParseString2List(data, ["&"], []), [ k + "=" + v ], i, i), "&"); return data + "&" + k + "=" + v; } /////////////////////////////////////////////////////////////////////////// // Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3 // /////////////////////////////////////////////////////////////////////////// integer wasMenuIndex = 0; list wasDialogMenu(list input, list actions, string direction) { integer cut = 11-wasListCountExclude(actions, [""]); if(direction == ">" && (wasMenuIndex+1)*cut+wasMenuIndex+1 < llGetListLength(input)) { ++wasMenuIndex; jump slice; } if(direction == "<" && wasMenuIndex-1 >= 0) { --wasMenuIndex; jump slice; } @slice; integer multiple = wasMenuIndex*cut; input = llList2List(input, multiple+wasMenuIndex, multiple+cut+wasMenuIndex); input = wasListMerge(input, actions, ""); return input; } /////////////////////////////////////////////////////////////////////////// // Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3 // /////////////////////////////////////////////////////////////////////////// integer wasListCountExclude(list input, list exclude) { if(llGetListLength(input) == 0) return 0; if(llListFindList(exclude, (list)llList2String(input, 0)) == -1) return 1 + wasListCountExclude(llDeleteSubList(input, 0, 0), exclude); return wasListCountExclude(llDeleteSubList(input, 0, 0), exclude); } /////////////////////////////////////////////////////////////////////////// // Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3 // /////////////////////////////////////////////////////////////////////////// list wasListMerge(list l, list m, string merge) { if(llGetListLength(l) == 0 && llGetListLength(m) == 0) return []; string a = llList2String(m, 0); if(a != merge) return [ a ] + wasListMerge(l, llDeleteSubList(m, 0, 0), merge); return [ llList2String(l, 0) ] + wasListMerge(llDeleteSubList(l, 0, 0), llDeleteSubList(m, 0, 0), merge); } /////////////////////////////////////////////////////////////////////////// // Copyright (C) 2011 Wizardry and Steamworks - License: GNU GPLv3 // /////////////////////////////////////////////////////////////////////////// string wasProgress(integer percent, integer length, list symbols) { percent /= (integer)((float)100.0/(length)); string p = llList2String(symbols,0); integer itra = 0; do { if(itra>percent-1) p += llList2String(symbols,2); else p += llList2String(symbols,1); } while(++itra; } /////////////////////////////////////////////////////////////////////////// // Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3 // /////////////////////////////////////////////////////////////////////////// LID(key id) { if(id != NULL_KEY && llGetAttached() != 0) { llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("login", (string)((integer)wasKeyValueGet("login", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))+1), llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); llResetScript(); } llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("login", "-1", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); } integer i = 0; integer channel = 0; key toucher = NULL_KEY; list monogram = []; string LOCK = ""; string SHOW = ""; default { state_entry() { // LID™ - http://grimore.org/fuss:lsl#log-in_detection_with_attachments // if LID™, then login = 1 // else login = 0 - script running | parameter undefined if((integer)wasKeyValueGet("login", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)) > 0) { llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("login", "0", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); llSetTimerEvent(25); return; } llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("login", "0", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); state check; } timer() { state check; } changed(integer change) { if(change & CHANGED_INVENTORY || change & CHANGED_OWNER) { llResetScript(); } } // LID™ - http://grimore.org/fuss:lsl#log-in_detection_with_attachments attach(key id) { LID(id); } } state check { state_entry() { llSetTimerEvent(5); channel = 10+(integer)llFrand(10); llListen(channel, "", llGetOwner(), ""); llOwnerSay("@version=" + (string)channel); } listen(integer channel, string name, key id, string message) { llSetTimerEvent(0); if(wasKeyValueGet("lock", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)) == "on") { llOwnerSay("@detach=n"); LOCK = "LOCK: ✔"; jump show; } llOwnerSay("@detach=y"); LOCK = "LOCK: ✗"; llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("lock", "off", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); @show; if(wasKeyValueGet("show", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)) == "on") { llSetLinkAlpha(LINK_SET, 1, ALL_SIDES); SHOW = "SHOW: ⚉"; jump done; } llSetLinkAlpha(LINK_SET, .0, ALL_SIDES); SHOW = "SHOW: ⚇"; llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("show", "off", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); @done; state main; } timer() { llSetTimerEvent(0); llOwnerSay("Your viewer is not RLV-enabled. This gizmo requires a RLV-enabled viewer. Cannot proceed."); } changed(integer change) { if(change & CHANGED_INVENTORY || change & CHANGED_OWNER) { llResetScript(); } } // LID™ - http://grimore.org/fuss:lsl#log-in_detection_with_attachments attach(key id) { LID(id); } } state main { state_entry() { if(wasKeyValueGet("auto", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)) == "on") llSetTimerEvent(1); if(toucher == NULL_KEY) return; i = llListen(channel, "", toucher, ""); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0\n\nAuto Hide: " + wasKeyValueGet("auto", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)), ["∢ Options", LOCK, SHOW], channel); } touch_start(integer total_number) { toucher = llDetectedKey(0); if(toucher != llGetOwner()) return; channel = (integer)("0x8" + llGetSubString(toucher, 0, 6)); i = llListen(channel, "", toucher, ""); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0\n\nAuto Show: " + wasKeyValueGet("auto", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)), ["∢ Options", LOCK, SHOW], channel); } listen(integer channel, string name, key toucher, string message) { llListenRemove(i); if(message == "∢ Options") state options; if(message == "LOCK: ✗") { if(wasKeyValueGet("lock", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)) == "on") return; llOwnerSay("@detach=n"); LOCK = "LOCK: ✔"; llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("lock", "on", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); return; } if(message == "LOCK: ✔") { if(wasKeyValueGet("lock", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)) == "off") return; llOwnerSay("@detach=y"); LOCK = "LOCK: ✗"; llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("lock", "off", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); return; } if(message == "SHOW: ⚇") { if(wasKeyValueGet("show", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)) == "on") return; llSetLinkAlpha(LINK_SET, 1, ALL_SIDES); SHOW = "SHOW: ⚉"; llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("show", "on", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); return; } if(message == "SHOW: ⚉") { if(wasKeyValueGet("show", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)) == "off") return; llSetLinkAlpha(LINK_SET, .0, ALL_SIDES); SHOW = "SHOW: ⚇"; llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("show", "off", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); return; } // REGION: AUTO if(llGetSubString(message, 7, 7) == "1" && wasKeyValueGet("show", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)) != "off") { llSetLinkAlpha(LINK_SET, 0, ALL_SIDES); SHOW = "SHOW: ⚇"; llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("show", "off", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); return; } if(llGetSubString(message, 7, 7) == "0" && wasKeyValueGet("show", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)) != "on") { llSetLinkAlpha(LINK_SET, 1, ALL_SIDES); SHOW = "SHOW: ⚉"; llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("show", "on", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); } // REGION: AUTO } timer() { if(wasKeyValueGet("auto", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0)) != "on") { llSetTimerEvent(0); return; } // poll channel = 10+(integer)llFrand(10); i = llListen(channel, "", llGetOwner(), ""); llOwnerSay("@getoutfit=" + (string)channel); } changed(integer change) { if(change & CHANGED_INVENTORY || change & CHANGED_OWNER) { llResetScript(); } } // LID™ - http://grimore.org/fuss:lsl#log-in_detection_with_attachments attach(key id) { LID(id); } } state options { state_entry() { llListen(channel, "", toucher, ""); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0", ["⏏ Exit", "∢ Color", "∢ Size", "∢ Auto Hide", "∢ Stamp"], channel); } touch_start(integer num) { if(llDetectedKey(0) != llGetOwner()) return; llListen(channel, "", toucher, ""); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0", ["⏏ Exit", "∢ Color", "∢ Size", "∢ Auto Hide", "∢ Stamp"], channel); } listen(integer channel, string name, key toucher, string message) { if(message == "⏏ Exit") state main; if(message == "∢ Color") state color; if(message == "∢ Size") state size; if(message == "∢ Auto Hide") state auto; if(message == "∢ Stamp") state read_monogram; } changed(integer change) { if(change & CHANGED_INVENTORY || change & CHANGED_OWNER) { llResetScript(); } } // LID™ - http://grimore.org/fuss:lsl#log-in_detection_with_attachments attach(key id) { LID(id); } } state color { state_entry() { llListen(channel, "", toucher, ""); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0\n\nCurrent: " + (string)llList2Vector(llGetLinkPrimitiveParams(1, [PRIM_COLOR, ALL_SIDES]), 0), ["R ▼", "G ▼", "B ▼", "R ▲", "G ▲", "B ▲", "⏏ Exit"], channel); } touch_start(integer num) { if(llDetectedKey(0) != llGetOwner()) return; llListen(channel, "", toucher, ""); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0\n\nCurrent: " + (string)llList2Vector(llGetLinkPrimitiveParams(1, [PRIM_COLOR, ALL_SIDES]), 0), ["R ▼", "G ▼", "B ▼", "R ▲", "G ▲", "B ▲", "⏏ Exit"], channel); } listen(integer channel, string name, key toucher, string message) { if(message == "⏏ Exit") state options; list params = llGetLinkPrimitiveParams(1, [PRIM_COLOR, ALL_SIDES]); vector color = llList2Vector(params, 0); float alpha = llList2Float(params, 1); if(message == "R ▼") { llSetLinkPrimitiveParamsFast(1, [PRIM_COLOR, ALL_SIDES, color-<.1,0,0>, alpha]); jump menu; } if(message == "R ▲") { llSetLinkPrimitiveParamsFast(1, [PRIM_COLOR, ALL_SIDES, color+<.1,0,0>, alpha]); jump menu; } if(message == "G ▼") { llSetLinkPrimitiveParamsFast(1, [PRIM_COLOR, ALL_SIDES, color-<0,.1,0>, alpha]); jump menu; } if(message == "G ▲") { llSetLinkPrimitiveParamsFast(1, [PRIM_COLOR, ALL_SIDES, color+<0,.1,0>, alpha]); jump menu; } if(message == "B ▼") { llSetLinkPrimitiveParamsFast(1, [PRIM_COLOR, ALL_SIDES, color-<0,0,.1>, alpha]); jump menu; } if(message == "B ▲") { llSetLinkPrimitiveParamsFast(1, [PRIM_COLOR, ALL_SIDES, color+<0,0,.1>, alpha]); jump menu; } @menu; llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0\n\nCurrent: " + (string)llList2Vector(llGetLinkPrimitiveParams(1, [PRIM_COLOR, ALL_SIDES]), 0), ["R ▼", "G ▼", "B ▼", "R ▲", "G ▲", "B ▲", "⏏ Exit"], channel); } changed(integer change) { if(change & CHANGED_INVENTORY || change & CHANGED_OWNER) { llResetScript(); } } // LID™ - http://grimore.org/fuss:lsl#log-in_detection_with_attachments attach(key id) { LID(id); } } state size { state_entry() { llListen(channel, "", toucher, ""); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0", ["-.01", "-.02", "-.05", "+.01", "+.02", "+.05", "⏏ Exit"], channel); } touch_start(integer num) { if(llDetectedKey(0) != llGetOwner()) return; llListen(channel, "", toucher, ""); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0", ["-.01", "-.02", "-.05", "+.01", "+.02", "+.05", "⏏ Exit"], channel); } listen(integer channel, string name, key toucher, string message) { if(message == "⏏ Exit") state options; if((float)message == 0) return; float scale = 1 + (float)message; integer i = llGetNumberOfPrims(); do { vector linkScale = llList2Vector(llGetLinkPrimitiveParams(i, [PRIM_SIZE]), 0); vector linkPos = llList2Vector(llGetLinkPrimitiveParams(i, [PRIM_POS_LOCAL]), 0); llSetLinkPrimitiveParamsFast(i, [PRIM_SIZE, scale * linkScale, PRIM_POSITION, scale * linkPos]); } while(--i>1); llSetScale(scale * llGetScale()); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0", ["-.01", "-.02", "-.05", "+.01", "+.02", "+.05", "⏏ Exit"], channel); } changed(integer change) { if(change & CHANGED_INVENTORY || change & CHANGED_OWNER) { llResetScript(); } } // LID™ - http://grimore.org/fuss:lsl#log-in_detection_with_attachments attach(key id) { LID(id); } } state auto { state_entry() { llListen(channel, "", toucher, ""); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0\n\nTurning this option on will automatically hide the butt plug once the butt plug detects that you are wearing underwear. This is meant to allow you to wear the butt plug at all times but discrete enough to remain hidden if you have underpants on.", ["⏏ Exit", "◉ ON", "◯ OFF" ], channel); } touch_start(integer num) { if(llDetectedKey(0) != llGetOwner()) return; llListen(channel, "", toucher, ""); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0\n\nTurning this option on will automatically hide the butt plug once the butt plug detects that you are wearing underwear. This is meant to allow you to wear the butt plug at all times but discrete enough to remain hidden if you have underpants on.", ["⏏ Exit", "◉ ON", "◯ OFF" ], channel); } listen(integer channel, string name, key toucher, string message) { if(message == "◉ ON") { llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("auto", "on", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); jump options; } if(message == "◯ OFF") llSetLinkPrimitiveParamsFast(2, [PRIM_DESC, wasKeyValueSet("auto", "off", llList2String(llGetLinkPrimitiveParams(2, [PRIM_DESC]), 0))]); @options; state options; } changed(integer change) { if(change & CHANGED_INVENTORY || change & CHANGED_OWNER) { llResetScript(); } } // LID™ - http://grimore.org/fuss:lsl#log-in_detection_with_attachments attach(key id) { LID(id); } } state read_monogram { state_entry() { i = llGetInventoryNumber(INVENTORY_NOTECARD)-1; do { if(llGetInventoryName(INVENTORY_NOTECARD, i) == "Monogram") jump found_notecard; } while(--i>-1); llSay(DEBUG_CHANNEL, "Failed to find Monogram notecard."); return; @found_notecard; i = 0; llGetNotecardLine("Monogram", i); } dataserver(key id, string data) { if(data == EOF) { llSetText("", <0,0,0>, .0); state monogram_menu; } if(data != "") monogram += data; integer percent = 100 * i/26; llSetText("Please wait, loading menu...\n" + wasProgress(percent, 10, ["[", "█", "░", "]"]) + "\n Memory: " + (string)llGetFreeMemory() + "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n", wasPercentToGradient(percent, "rg"), 1); llGetNotecardLine("Monogram", ++i); } changed(integer change) { if(change & CHANGED_INVENTORY || change & CHANGED_OWNER) { llResetScript(); } } // LID™ - http://grimore.org/fuss:lsl#log-in_detection_with_attachments attach(key id) { LID(id); } } state monogram_menu { state_entry() { wasMenuIndex = 0; llListen(channel, "", toucher, ""); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0", wasDialogMenu(["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], ["⏏ Exit", "⟻ Back", "Next ⟼"], ""), channel); } touch_start(integer num) { if(llDetectedKey(0) != llGetOwner()) return; llListen(channel, "", toucher, ""); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0", wasDialogMenu(["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], ["⏏ Exit", "⟻ Back", "Next ⟼"], ""), channel); } listen(integer channel, string name, key toucher, string message) { if(message == "⏏ Exit") { monogram = []; state options; } if(message == "⟻ Back") { llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0", wasDialogMenu(["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], ["⏏ Exit", "⟻ Back", "Next ⟼"], "<"), channel); return; } if(message == "Next ⟼") { llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0", wasDialogMenu(["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], ["⏏ Exit", "⟻ Back", "Next ⟼"], ">"), channel); return; } i = llGetListLength(monogram)-1; do { list m = llParseString2List(llList2String(monogram, i), ["="], []); if(message == llList2String(m, 0)) { llSetLinkPrimitiveParamsFast(6, [PRIM_TYPE, PRIM_TYPE_SCULPT, llList2String(m, 1), PRIM_SCULPT_TYPE_SPHERE]); llDialog(toucher, "\n Welcome to The Bummer.\nCreated in 2014 by Wizardry and Steamworks\n 9 December 2014: Version: 1.0", wasDialogMenu(["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], ["⏏ Exit", "⟻ Back", "Next ⟼"], ""), channel); return; } } while(--i>-1); } changed(integer change) { if(change & CHANGED_INVENTORY || change & CHANGED_OWNER) { llResetScript(); } } // LID™ - http://grimore.org/fuss:lsl#log-in_detection_with_attachments attach(key id) { LID(id); } }