Apps Home
|
My Uploads
|
Create an App
love c
Author:
philwhelp
Description
Source Code
Launch App
Current Users
Created by:
Philwhelp
App Images
//--patches cbjs.arrayContains = (haystack, needle) => Array.prototype.includes.call(haystack, needle); if (!Object.entries) Object.entries = function( obj ){ var ownProps = Object.keys( obj ), i = ownProps.length, resArray = new Array(i); // preallocate the Array while (i--) resArray[i] = [ownProps[i], obj[ownProps[i]]]; return resArray; }; function isBlank(str) { return (!str || /^\s*$/.test(str)); } room_slug = cb.room_slug; Pbacking = cb.settings.Pbacking; cust_profiles = [] cust_profiles.philwhelp = {set: "set1" , mode: "advanced", data: {back : "6b643ced-9737-46dc-ae78-0c9fed674a5e",colors:["#6600ff","#cc00ff"], side:[28,28,28]}} //cust_profiles['philwhelp'] = {mode: "advanced", data: {back : "583d9390-a551-4199-b3e4-7f16e17c0892",colors:["#dd0000","#000000"], side:[0,0,0]}} //cust_profiles.philwhelp = {mode: "advanced", data: {back : "3e73b5f0-d0f0-4725-a39e-80960ee93a6a",colors:["#dd0000","#000000"], side:[-80,0,0]}} //3e73b5f0-d0f0-4725-a39e-80960ee93a6a //--- panel themes // mode = basic or advanced p_images = [] p_images['pink hearts'] = {set: "bacic", mode: "basic", data: {back : "df39a1f7-b0a8-4ef2-971d-92ab799a40b5",colors:["#ff00ff","#dd00dd","#ff00ff"], side:[10,10,10], wid:[250,250,250], poss : "center"}} p_images['cb clasic'] = {set: "basic", mode: "basic", data: {back : "9593d71d-935c-4262-8e8d-26cd8a31dab3",colors:["#ffffff","#ffffff","#ffffff"], side:[15,15,15], wid:[245,245,245], poss : "left"}} p_images.lovense_custom = {set: "set1" , mode: "advanced", data: {back : "6b643ced-9737-46dc-ae78-0c9fed674a5e",colors:["#6600ff","#cc00ff"], side:[28,28,28]}} panel_text = []; panel_text.set1= {newL : "Newest", bestL : "Best", mvpL : "My MVP", icon : [" \u2764 ", " \u2605 "]} panel_text.basic= {newL : "Newest - ", bestL : "Best - ", mvpL : "MVP - ", icon : [" \u2764 ", " \u2605 "]} var tm = "off"; toyTimer = []; function randNo(min, max) { minNo = parseInt(min); maxNo = parseInt(max); return Math.floor(Math.random() * (maxNo - minNo + 1)) + minNo; } function showList() { activeBk = cb.settings.activeback ? (cb.settings.activeBk == "[Use Lovense theme]" ? messBcolor : cb.settings.activeBk) : ""; activetxt = cb.settings.activetxt ? (cb.settings.activetxt == "[Use Lovense theme]" ? messColor : cb.settings.activetxt) : "#000000"; var name = toyTimer[0]; if ((typeof(name) != "undefined") && (tm == "off")) {tm = "on"; cb.chatNotice('***** ' + toyTimer[0].note, "", activeBk,activetxt, 'bold'); toyTimer.shift(); setTimeout(function(){ tm = "off"; showList();}, 1000 * name.timer); } } function listAdd(s, n, x) { if (x == 1) {toyTimer.unshift({timer: s, note: n});} else if (x == 2) {toyTimer =[{timer: s, note: n}]; tm = "off" } else {toyTimer.push({timer: s, note: n}); } showList() } function addName(obj, n) { if (obj) {var obj = obj.replace( /\{user\}/gi, n );} return obj; } function LvNo(s, v) { var number = 0; if (s && v == 0) {number = s;} if (!s && v == 1) {number = 9999999;} return number; } function divide(s,v) { s = s ? (s = s.replace(/[, -]/g,' '),s = s.replace(/ +/g, ' ')) : ""; if (s) { res = s.split(/,| |-/) [v] ? s.split(/,| |-/) [v] : ""; return res;} else {return;} } function getTime(t) { var time = t; time_format = cb.settings.time_format; s = time_format == "sec" ? t + " Sec" : time_format == "seconds" ? t + " second" + (time > 1 ? "s" : "") : ""; if (s) {return s} var minutes = Math.floor(time / 60); var seconds = time - minutes * 60; Tmin = minutes > 0 ? minutes + (minutes > 1 ? " minutes" : " minute") : ""; Tsec = seconds > 0 ? seconds + (seconds > 1 ? " seconds" : " second") : ""; Fultime = (minutes && seconds) ? Tmin + " & " + Tsec : minutes ? Tmin : Tsec; if (Fultime) return Fultime; } function on_Tlist() { is_onlist = false; for (i = 0; i < toy_name.length; i++) { if (toy_list[''+toy_name[i]+''] && toy_list[''+toy_name[i]+''][2]) { is_onlist = true; } } return is_onlist;} function getstring(s, x){ var string = ""; var toys = ""; // levels // cb.settings.levAmax lev = ["lev","levrand", "Qpause", "Qclear", "waveLV", "pulseLV", "quakeLV", "fireworksLV"] frm = x == 1 ? (cb.settings[lev[s]+"A"] ? cb.settings[lev[s]+"A"] : 0 ): cb.settings[lev[0]+"A"+s] ? cb.settings[lev[0]+"A"+s] : 0; to = cb.settings[lev[0]+"A"+(s+1)] ? cb.settings[lev[0]+"A"+(s+1)]-1 : cb.settings.levAmax != 0 ? cb.settings.levAmax : ''; levT = x == 1 ? (cb.settings[lev[s]+"T"] ? cb.settings[lev[s]+"T"] : 0 ) : cb.settings[lev[0]+"T"+s] ? cb.settings[lev[0]+"T"+s] : 0; lev_vib = cb.settings[lev[0] + "_vib"+s] ? cb.settings[lev[0] + "_vib"+s] : 'Low'; lev_PR = cb.settings[lev[0]+"_PR"+s] ? cb.settings[lev[0]+"_PR"+s] : ''; //-- for (i = 0; i < toy_name.length; i++) { toyx = toy_list[''+toy_name[i]+''] ? toy_list[''+toy_name[i]+''][1] : ''; toys += toyx ? toyx + " " : ''; } toys = toys ? toys : "= " var dis_text = []; dis_text["[from - to tokens]"] = [" ["+ frm +" tokens] ", "[" + frm + (!to ? "+ " : " to " ) + to + " tokens] "]; dis_text["tip - from-to"] = ["Tip - "+ frm +" ", "Tip - " + frm + (!to ? "+" : "-" + to ) + " "]; var dv = []; dv.short = ["Ultra High vibs","High vibs","Mid vibs","Low vibs"]; dv.normal = ["Ultra High vibrations","High vibrations","Midium vibrations","Low vibrations"]; dv.basic = ["Ultra High","High","Midium","Low"]; vib_format = on_Tlist() == true? ( dv[cb.settings.vib_format] ? dv[cb.settings.vib_format] : dv.normal) : dv.basic; get_dis_text = dis_text[cb.settings.use_tok] ? dis_text[cb.settings.use_tok] : dis_text.simple; lev_intent = lev_vib == "Ultra High" ? "hi " : lev_vib == "High" ? "hi " : lev_vib == "Medium" ? "me " : "lo "; lev_intent_text = lev_vib == "Ultra High" ? vib_format[0] : lev_vib == "High" ? vib_format[1] : lev_vib == "Medium" ? vib_format[2] : vib_format[3]; rot_pump = toy_name.includes("nora") ? lev_PR == "High" ? " with high rotations" : lev_PR == "Medium" ? " with medium rotations" : lev_PR == "Low" ? " with low rotations" : " with no rotations" : toy_name.includes("max") ? lev_PR == "High" ? " with high pump action" : lev_PR == "Medium" ? " with medium pump action" : lev_PR == "Low" ? " with low pump action" : " with no pump action": ""; if (x == 1) {spes_T = get_dis_text[0] + toys; if (!((s == 1) || (s == 3))) {if (levT == 0) {return " ERROR: Time Needed";}} if (!s) {return;} if (s == 1) { string += spes_T+"random level "; return string;} else if (s == 2) {string += spes_T + 'pause queue for ' + getTime(levT) ; return string;} else if (s == 3) {string += spes_T + 'Clear the queue' ; return string;} else if (s == 4) {string += spes_T + ' ' + getTime(levT) + ' Wave pattern' ; return string;} else if (s == 5) {string += spes_T + ' ' + getTime(levT) + ' Pulse pattern' ; return string;} else if (s == 6) {string += spes_T + ' ' + getTime(levT) + ' Earthquake pattern' ; return string;} else if (s == 7) {string += spes_T + ' ' + getTime(levT) + ' Fireworks pattern' ; return string;} } else { if (levT == 0) {return "X ERROR: Time Needed";} // check for errors... else {string = (use_icon == "dream" ? lev_intent : "") + get_dis_text[1] + toys + getTime(levT) + " "+lev_intent_text+ rot_pump; return string; } } } function init() { cb.settings.goalMode && cb.settings.levelMode && cb.settings.loveColor && (goalMode = goalModeList[cb.settings.goalMode].m, levelMode = levelModeList[cb.settings.levelMode].level, loveColor = colorList[cb.settings.loveColor].c,messColor = cb.settings.messColor != "[Use Lovense theme]" && colorList[cb.settings.messColor] ? colorList[cb.settings.messColor].c : colorList[cb.settings.loveColor].c), cb.settings.tags && (tags = cb.settings.tags.trim() ? cb.settings.tags : ""), (!tags || tags.toLowerCase().indexOf("Lovense") < 0) && (tags += ""); var e = mySplit(tags); tags = ""; for (var t = 0; t < e.length; t++) tags += "#" == e[t].substring(0, 1) ? e[t] : "#" + e[t]; //-- ar_levTit = {"{line}" : skp, "{toy}" : ((toy_name.length == 1) ?(toy_list[""+toy_name[0]+""] ? toy_list[""+toy_name[0]+""][0] : toy_name[0] ) : "Lovense toys") } //-- initNotice(), levelTitle = cb.settings.levelTitle ? cb.settings.levelTitle.replace(/\{line\}|\{toy\}/g, function(matched){return ar_levTit[matched] ? ar_levTit[matched] : "";}) : "My "+ ((toy_name.length == 1) ?(toy_list[""+toy_name[0]+""] ? toy_list[""+toy_name[0]+""][0] : toy_name[0] ) + " is" : "Toys are") + " set to react to your tips, there are "+ dis_max_lv +" levels of intensity " + (spes == "yes" && on_Tlist() == true && cb.settings.levrandA ? lev_range : ""), levelMode && initLevel(), noteNb || cbjs.arrayRemove(nextArray, "NOTE"), levelMode || cbjs.arrayRemove(nextArray, "LEVEL"), nextArray.length && (next = nextArray[nextIndex], Timer = cb.setTimeout(roomDisplay, 1e4)), runGoal(owner) } function doCommand(e, t) { var n = mySplit(t.toLowerCase()), o = n[0]; return "goal" == o ? cmdGoal(e, n, t) : "sum" == o ? cmdSum(e) : "token" == o ? cmdToken(e, n) : "toy" == o ? changeToy(e, t) : "spam" == o ? checkSpam(e) : void 0 } function checkSpam(e) { sendTitle(e, "The current messages are blocker are: " + spam_count, "#ffff00", "#000000"); } function changeToy(e, t){ new_toy = trimEmot(t.substring(4)); toy_name = new_toy? new_toy.toLowerCase().split(",") : ["Toy"]; levelNotice =""; ar_levTit["{toy}"] = ((toy_name.length == 1) ?(toy_list[""+toy_name[0]+""] ? toy_list[""+toy_name[0]+""][0] : toy_name[0] ) : "Lovense toys"); levelTitle = cb.settings.levelTitle ? cb.settings.levelTitle.replace(/\{line\}|\{toy\}/g, function(matched){return ar_levTit[matched] ? ar_levTit[matched] : "";}) : "My "+ ((toy_name.length == 1) ?(toy_list[""+toy_name[0]+""] ? toy_list[""+toy_name[0]+""][0] : toy_name[0] ) + " is" : "Lovense toys are") +" set to react to your tips, there are "+ dis_max_lv +" levels of intensity " + (cb.settings.spes == "yes" && on_Tlist() == true && cb.settings.levrandA ? lev_range : ""), levelMode && initLevel(), sendTitle(e, "you have now changed the toy to: " + toy_name); "LINE" == levelMode ? sendTitle(all, levelTitle + " : " + levelNotice,loveBcolor, loveColor) : sendTitle(all, levelTitle + " : " + levelNotice, loveBcolor, loveColor); } function onTip(e, t) { actionIndic += 1; tipNb += 1; tipSum += t; var n = manageTotalList(e, t); lastTipper = e; lastTip = t; var o = manageUserList(e, t); o > mvpSum && (mvpSum = o, mvpName = e), t > higherTip && (higherTip = t, higherTipName = e); if (n > maxSum && (maxSum = n, maxSumUsr = e), t > maxTip && (maxTip = t, maxTipUsr = e), goalOn) { goalSum += t; "COUNTER" != goalMode && ("SINGLE" != goalMode || goalReached ? ("REPEAT" == goalMode && watchRepeatGoal(e, t) || "MULTI" == goalMode && watchMultiGoal(e, t) ) : watchSingleGoal(t), "SINGLE" == goalMode && (remaining > 0)), ""; } !goalReached && "SINGLE" == goalMode ? (cb.settings.useRem == "yes") ? changeSubject() : "" : "", changePanel() } function initNotice() { for (var e = 1; maxNotice >= e; e++) { var t = cb.settings["notice" + e] ? cb.settings["notice" + e].trim() : ""; t && (noteList[++noteNb] = { note: t }) } } function initLevel() { icon = icon_list[use_icon] ? icon_list[use_icon] : icon_list.basic; for (var e = 1; maxLevel >= e; e++) { var ra1 = isNaN(divide(cb.settings.randLvRange,1)); if (ra1 == false) {startRange = divide(cb.settings.randLvRange,0); endRange = divide(cb.settings.randLvRange,1); } frm = cb.settings['levA'+e] ? cb.settings['levA'+e] : ''; var t = frm ? getstring(e).trim() : ""; levelNotice += t ? ("LIST" == levelMode ? skp : " ") + icon[0] + e + (use_icon == "dream" ? "" : " ") + t : ""; if (cb.settings['levA'+e] == 0) {break;} } if (spes == "yes" && on_Tlist() == true && (cb.settings.levrandA || cb.settings.QpauseA || cb.settings.QclearA || cb.settings.waveLVA || cb.settings.pulseLVA || cb.settings.quakeLVA)) { (levelNotice += ("LIST" == levelMode ? skp : " ") + str +str + str + " Special Commands " + str + str + str) var rt = cb.settings.levrandA ? getstring(1,1).trim() : ""; levelNotice += rt ? ("LIST" == levelMode ? skp : " ") + icon[1] + " " + rt + ' (' + startRange + '-' + endRange + ')' : ""; // Qpause = pause level tokens / time var qp = cb.settings.QpauseA ? getstring(2,1).trim() : ""; levelNotice += qp ? ("LIST" == levelMode ? skp : " ") + icon[2] + " " + qp : ""; //Qclear = clear all tips in queue var qc = cb.settings.QclearA ? getstring(3,1).trim() : ""; levelNotice += qc ? ("LIST" == levelMode ? skp : " ") + icon[3] + " " + qc : ""; // waveLV = wave level tokens / time var sp1 = cb.settings.waveLVA ? getstring(4,1).trim() : ""; levelNotice += sp1 ? ("LIST" == levelMode ? skp : " ") + icon[4] + " " + sp1 : ""; //pulseLV = pulse level tokens / time var pls = cb.settings.pulseLVA ? getstring(5,1).trim() : ""; levelNotice += pls ? ("LIST" == levelMode ? skp : " ") + icon[5] + " " + pls : ""; //quakeLV = earthquake level tokens/ time var quk = cb.settings.pulseLVA ? getstring(6,1).trim() : ""; levelNotice += quk ? ("LIST" == levelMode ? skp : " ") + icon[6] + " " + quk : ""; //fireworksLV = fireworks level tokens / time var fw = cb.settings.fireworksLVA ? getstring(7,1).trim() : ""; levelNotice += fw ? ("LIST" == levelMode ? skp : " ") + icon[7] + " " + fw : ""; } } function runGoal(e) { goalOn = !0, goalReached = !1, remaining = setRemaining, ("MULTI" == goalMode && goalNb > 0 ? (goalNb = (goalNb > 0 ? goalNb : 0), goalSum = (goalSum > 0 ? goalSum : 0), goalUsrNb = (goalUsrNb > 0 ? goalUsrNb : 0), lastTipper = (lastTipper.length > 0 ? lastTipper : ""), lastTip = (lastTip > 0 ? lastTip : 0), mvpName = (mvpName.length > 0 ? mvpName : ""), mvpSum = (mvpSum > 0 ? mvpSum : 0), userList = (userList.length > 0 ? userList : {}), higherTipName = (higherTipName.length > 0 ? higherTipName : ""), higherTip = ( higherTip > 0 ? higherTip : 0), rem_goals = !0) : (goalNb = 0, goalSum = 0, goalUsrNb = 0, lastTipper = "", lastTip = 0, mvpName = "", mvpSum = 0, userList = {}, higherTipName = "", higherTip = 0)) , runNb++ && showGoalInfo(e), "SINGLE" == goalMode , changeSubject() , changePanel() } function manageTotalList(e, t) { return e in totalList ? totalList[e].sum += t : totalList[e] = { sum: t, num: ++usrNb }, totalList[e].sum } function manageUserList(e, t) { return e in userList ? userList[e].sum += t : userList[e] = { sum: t, num: ++goalUsrNb }, userList[e].sum } function watchSingleGoal(t) { reachedSubject ? reachedSubject : ""; remaining -= t if (remaining <= 0) { remaining = 0; var mapObj = { "{goal}" : goalSubject, "{tags}" : tags, }; rs = reachedSubject.replace(/\{goal\}|\{tags\}|\{remaining\}|\{.*}/g, function(matched){return mapObj[matched] ?mapObj[matched] : "";}); rs += check_obj(reachedSubject, "{tags}") ? "" : " " + tags; goalReached = !0, goalOn = !1, cb.changeRoomSubject(rs); var t = xLine(6); sendTitle(all, t + skp + "Goal Reached : Thanks you so much." + skp + t, '', cbColor), sendTitle(owner, skp + lck + owner + " : " + skp + sqr + "Use " + qt("/sum") + " for a Total Summary Board." + skp,'', cbColor) } } function watchRepeatGoal(e, t) { remaining -= t; var n = Math.floor(t / setRemaining); if (n += 0 >= remaining + n * setRemaining ? 1 : 0, goalNb += n, remaining += n * setRemaining, n) { var o = 1 == n ? " Goal " + goalNb : " Goals " + (goalNb - n + 1) + (2 == n ? " and " : " to ") + goalNb; sendTitle(all, sqr + sqr + sqr + qt(e) + " reached " + o + sqr + sqr + sqr, '', cbColor) } if (cb.settings.useRem == "yes"){ changeSubject();} } function watchMultiGoal(e, t) { reachedSubject ? reachedSubject : ""; if (rem_goals) { remaining -= t; var Gn = 0; var rew = sqr +" Reward :"; while ((remaining) <= 0) { Gn++ rem_goals = cb.settings.repeat_last == "yes" ? !0 : cb.settings["setRemaining"+(goalNb+Gn+1)] && cb.settings["setRemaining"+(goalNb+Gn+1)] > 0 ? !0 : !1; setRemaining = cb.settings["setRemaining"+(goalNb+Gn+1)] ? cb.settings["setRemaining"+(goalNb+Gn+1)] : setRemaining; remaining += setRemaining; } goalNb = goalNb + Gn; var o = 1 == Gn ? " Goal " + goalNb : " Goals " + (goalNb - Gn + 1) + (2 == Gn ? " and " : " to ") + goalNb; if (Gn > 0) { var rew = sqr +" Reward :"; var o = 1 == Gn ? " Goal " + goalNb : " Goals " + (goalNb - Gn + 1) + (2 == Gn ? " and " : " to ") + goalNb; for (i = (goalNb-Gn+1); i < goalNb+1; i++) { rew += (i > goalNb-Gn+1 ? " & " : "") + (cb.settings["goalSubject"+(i)] ? cb.settings["goalSubject"+(i)] : goalSubject) goalSubject = cb.settings["goalSubject"+(i+1)] && cb.settings["setRemaining"+(i+1)] > 0 ? cb.settings["goalSubject"+(i+1)] : goalSubject } sendTitle(all, sqr + sqr + sqr + qt(e) + " reached " + o + sqr + sqr + sqr + skp + rew + "rem_goals =" + rem_goals, '', cbColor) if (!rem_goals) { remaining = 0; var mapObj = { "{goal}" : goalSubject, "{tags}" : tags, }; rs = reachedSubject.replace(/\{goal\}|\{tags\}|\{remaining\}|\{.*}/g, function(matched){return mapObj[matched] ?mapObj[matched] : "";}); rs += check_obj(reachedSubject, "{tags}") ? "" : " " + tags; goalReached = !0, goalOn = !1, cb.changeRoomSubject(rs); var t = xLine(6); sendTitle(all, t + skp + "All Goals Reached : Thanks you so much." + skp + t, '', cbColor), sendTitle(owner, skp + lck + owner + " : " + skp + sqr + "Use " + qt("/sum") + " for a Total Summary Board." + skp,'', cbColor) } } if (cb.settings.useRem == "yes" && rem_goals) { changeSubject();} } } function check_obj(e, x) { return e.includes(x); } function changeSubject() { rformat = remainformat ? remainformat : "remaining"; var mapObj = { "{goal}" : goalSubject, "{tags}" : tags, "{remaining}" : "[" +remaining +" "+ rformat +"]", }; var e = roomSubject ? roomSubject : "{goal}"; "COUNTER" != goalMode ? (cb.settings.useRem == "yes" ? (check_obj(e, "{remaining}") ? (!check_obj(e, "{goal}") ? e = e.replace(/\{remaining\}/g, function(matched){return ("SINGLE" == goalMode ? " - Goal is : " : " - Multi-Goal : ") + goalSubject + mapObj[matched] }) : e = e.replace(/\{remaining\}/g, function(matched){return mapObj[matched] }), e = e.replace(/\{goal\}/g, function(matched){return mapObj[matched] })) : (check_obj(e, "{goal}") ? e = e.replace(/\{goal\}/g, function(matched){return mapObj[matched] }) + mapObj["{remaining}"] : e += ("SINGLE" == goalMode ? " - Goal is : " : " - Multi-Goal : ") + goalSubject +(mapObj["{remaining}"]))) : (e = e.replace(/\{remaining\}/g, "" ), (!check_obj(e, "{goal}") ? e += ("SINGLE" == goalMode ? " - Goal is : " : " - Multi-Goal : ") + goalSubject :e = e.replace(/\{goal\}/g, function(matched){return mapObj[matched] })))) : e = e.replace(/{goal\}|{remaining\}/gi, ""), new_rs = (check_obj(e, "{tags}") ? e.replace(/\{tags\}/g, function(matched){return mapObj[matched];}) : e+tags), cb.changeRoomSubject(new_rs); } // sub112 function gBar(x) { Gbar =''; pro = (setRemaining - remaining)/setRemaining*100; pro = pro.toFixed(0); pro_C = Math.floor((pro)/5)*5; pro_full = Math.floor(pro_C/10); pro_half = Math.ceil(pro_C/10)-pro_full; pro_empty =10-pro_full-pro_half; for (i = 0; i < pro_full; i++) {Gbar += '\u2605\u2004';} for (i = 0; i < pro_half; i++) {Gbar += '\u272F\u2004';} for (i = 0; i < pro_empty; i++) {Gbar += '\u2730\u2004';} if (x == 1) return Gbar; else if (x == 2) return (pro +"%"); else return; } function changePanel() { theme_set = Pbacking == 'custom(model request)' && cust_profiles[room_slug] ? cust_profiles[room_slug] : p_images[Pbacking] && p_images[Pbacking].mode ? p_images[Pbacking] : false ; background = theme_set && theme_set.data.back ? theme_set.data.back : false; pan_set = theme_set && panel_text[theme_set.set] ? panel_text[theme_set.set] : panel_text.basic; colors = theme_set && theme_set.data.colors ? theme_set.data.colors : false; wids = theme_set && theme_set.data.wid ? theme_set.data.wid : false; sides = theme_set && theme_set.data.side ? theme_set.data.side : false; poss = theme_set && theme_set.data.poss ? theme_set.data.poss : "center"; color1 = colors[0] ? colors[0] : "#000000"; color2 = colors[1] ? colors[1] : "#000000"; color3 = colors[2] ? colors[2] : "#000000"; //-- side1 = sides[0] ? sides[0] : 10; side2 = sides[1] ? sides[1] : 10; side3 = sides[2] ? sides[2] : 10; //-- wid1 = wids[0] ? wids[0] : 250; wid2 = wids[1] ? wids[1] : 250; wid3 = wids[2] ? wids[2] : 250; return goalReached ? (row1 = x(goalNb, "Goal$ Reached") + "- Thanks all.", row2 = "", row3 = pan_set.newL + pan_set.icon[1] + cut(lastTipper) + pan_set.icon[1] + "("+lastTip+")", sp1a = pan_set.mvpL, sp1b = cut(mvpName), sp1c = mvpSum +"tk", sp2a = x(goalNb, "Goal$"), sp2b = "Reached - Thank you all", cb.settings.Prossesbar != "yes" ? (sp3a = pan_set.newL, sp3b = cut(lastTipper), sp3c = lastTip) : (sp3a = "Progress", sp3b = gBar(1), sp3c = gBar(2)), cb.drawPanel()) : goalOn ? "COUNTER" == goalMode ? (goalSum ? (row1 = x(usrNb, "Pleaser$") + (tokenOn ? " - " + x(goalSum, "Token$ Received") : ""), row2 = pan_set.mvpL + pan_set.icon[0] + cut(mvpName) + pan_set.icon[0] + mvpSum, row3 = pan_set.newL + pan_set.icon[1] + cut(lastTipper) + pan_set.icon[1] + lastTip, sp1a = pan_set.mvpL, sp1b = cut(mvpName), sp1c = mvpSum +"tk", sp2a = x(usrNb, "Pleaser$"), sp2b = x(goalSum, "Token$ Received"), sp3a = pan_set.newL , sp3b = cut(lastTipper), sp3c = lastTip +"tk") : (row1 = "My Lovense - Vibrator that react to your Tips", row2 = "Start Playing", row3 = "", sp1a = pan_set.mvpL, sp1b = "------", sp1c = "--", sp2a = "Lovense", sp2b = "Tip activated toys", sp3a = "", sp3b = "Start Playing", sp3c = ""), cb.drawPanel()) : "REPEAT" == goalMode || "MULTI" == goalMode ? (row1 = "Goal #" + (goalNb + 1) + " : " + (setRemaining - remaining) + " / " + setRemaining + " [ " + remaining + " Remaining ]" + (tokenOn && goalNb >= 1 ? " (" + goalSum + ")" : ""), goalSum ? (row2 = pan_set.mvpL + pan_set.icon[0] + cut(mvpName) + pan_set.icon[0] + mvpSum, row3 = cb.settings.Prossesbar != "yes" ? pan_set.newL + pan_set.icon[1] +cut(lastTipper) + pan_set.icon[1] + lastTip : "Progress - " + gBar(1) + gBar(2), sp1a = pan_set.mvpL, sp1b = cut(mvpName), sp1c = mvpSum +"tk", sp2a = "Goal #" + (goalNb + 1), sp2b = (setRemaining - remaining) + " / " + setRemaining + " [ " + remaining + " Remaining ]", cb.settings.Prossesbar != "yes" ? (sp3a = pan_set.newL, sp3b = cut(lastTipper), sp3c = lastTip) : (sp3a = "Progress", sp3b = gBar(1), sp3c = gBar(2) ) ) : (row2 = "My Lovense - Vibrator that react to your Tips", row3 = "Start Playing", sp1a = pan_set.bestL, sp1b = "------", sp1c = "--", sp2a = "Goal #" + (goalNb + 1), sp2b = goalSubject + "[" + setRemaining + " Remaining ]", sp3a = "", sp3b = "Tip to Start Playing", sp3c = ""), cb.drawPanel()) : "SINGLE" == goalMode ? (row1 = tokenOn ? "Goal - " + goalSum + " / " + setRemaining + " [ " + remaining + " Remaining ]" : "Goal [ " + remaining + " Remaining ]", goalSum ? (row2 = pan_set.mvpL + pan_set.icon[0] + cut(mvpName) + pan_set.icon[0] + mvpSum , row3 = cb.settings.Prossesbar != "yes" ? pan_set.newL + pan_set.icon[1] +cut(lastTipper) + pan_set.icon[1] + lastTip : "Progress - " + gBar(1) + gBar(2), sp1a = pan_set.bestL, sp1b = cut(mvpName), sp1c = mvpSum +"tk", sp2a = "Goal", sp2b = tokenOn ? goalSum + " / " + setRemaining + " [ " + remaining + " Remaining ]" : "[ " + remaining + " Remaining ]", cb.settings.Prossesbar != "yes" ? (sp3a = pan_set.newL, sp3b = cut(lastTipper), sp3c = lastTip) : (sp3a = "Progress", sp3b = gBar(1), sp3c = gBar(2) ) ) : (row2 = "My Lovense - Vibrator that react to your Tips", row3 = "Start Playing", sp1a = pan_set.bestL, sp1b = "------", sp1c = "--", sp2a = "Goal", sp2b = goalSubject + "[" + setRemaining + " Remaining ]", sp3a = "", sp3b = "Tip to Start", sp3c = ""), cb.drawPanel()) : void(0) : cb.drawPanel() } function cmdGoal(e, t, n) { if (1 == t.length) return showGoalInfo(e); var o = t[1]; var gn = trimEmot(n.substring(o.length+6)); if (goalOn && 2 <= t.length && (!isNaN(parseInt(o)) || ["counter","single", "repeat", "multi", "init"].indexOf(o) >= 0)) return void sendTitle(e, lck + skp + sqr + "Non updatable parameter when Goal is running. " + skp + "(Only Description is updatable)." + skp + sqr + "Use " + qt("/goal off") + " to stop running the Goal."); if ("off" == o && 2 == t.length) return sendTitle(e, skp + lck + "Goal Feature is confirmed OFF."), goalOn = !1, goalReached = !1, row1 = "", row2 = "", row3 = "", sp1a = "", sp1b = "", sp1c = "", sp2a = "", sp2b = "", sp3a = "", sp3b = "", sp3c = "", cb.drawPanel(), cb.changeRoomSubject(""), showGoalInfo(e); if ("on" == o && 2 == t.length) return goalOn ? void sendTitle(e, skp + lck + "Goal is already ON (Running)." + skp) : runGoal(e); if ("init" == o && 2 == t.length) return setRemaining = cb.settings.setRemaining1, goalNb = 0, goalMode = goalModeList[cb.settings.goalMode].m, goalSubject = cb.settings.goalSubject1, sendTitle(e, skp + lck + "Initial Goal Parameters have been settled back."), showGoalInfo(e); var a = parseInt(o); return 2 != t.length || isNaN(a) ? 2 == t.length && "counter" == o ? (goalMode = "COUNTER", sendTitle(e, skp + lck + 'Goal-Mode has been settled at "COUNTER".' + skp + sqr + "(Tips Counter : Goal-Amount will not be used.)"), showGoalInfo(e, [2])) : 2 == t.length && "single" == o ? (goalMode = "SINGLE", sendTitle(e, skp + lck + 'Goal-Mode has been settled at "SINGLE".'), showGoalInfo(e, [2])) : 2 == t.length && "multi" == o ? (goalMode = "MULTI", sendTitle(e, skp + lck + 'Goal-Mode has been settled at "MULTI".'), showGoalInfo(e, [2])) : 2 == t.length && "repeat" == o ? (goalMode = "REPEAT", sendTitle(e, skp + lck + 'Goal-Mode has been settled at "REPEAT".'), showGoalInfo(e, [2])) : ["on", "off", "single", "multi", "repeat", "counter", "init"].indexOf(o) >= 0 ? "Goal description can't begin by :" + skp + " on / off / single / repeat / multi / counter / init " : (a >= 0 && gn.length > 1 ? (goalSubject = trimEmot(n.substring(o.length+5)), setRemaining = a , sendTitle(e, skp + lck + "New Goal-Amount & Goal-Description has been settled."), goalOn && !goalReached && changeSubject(), void showGoalInfo(e, [1,3])) : (goalSubject = trimEmot(n.substring(5)), sendTitle(e, skp + lck + "New Goal-Description has been settled."), goalOn && !goalReached && changeSubject(), void showGoalInfo(e, [3]))) : 0 >= a ? "Goal amount must be >0." + skp + ' (It will not be used in mode "COUNTER").' : (setRemaining = a, sendTitle(e, skp + lck + "New Goal-Amount has been settled."), showGoalInfo(e, [1])) } function showGoalInfo(e, t) { t = t ? t : []; var n = ""; (setRemaining != cb.settings.setRemaining1 || goalMode != goalModeList[cb.settings.goalMode].mode || goalSubject != cb.settings.goalSubject1) && (n = sqr + qt("/goal init") + " if you want to restaure initial settings." + skp); var o = xLine(7), a = skp + o + skp + lck + "Goal Parameters :" + skp, i = sy(1, t) + "Amount : " + qt("/goal <X>") + " : " + setRemaining + skp + sy(2, t) + "Mode : " + qt("/goal [ single / repeat / multi / counter ]") + " : " + goalMode + skp + sy(3, t) + "Goal is : " + qt("/goal <description>") + " : " + goalSubject + skp + sqr + "Run goal : " + qt("/goal [ on / off ]") + " : " + (goalOn ? "ON" : "OFF") + (goalReached ? " - (Goal Reached) " : "") + skp, l = (goalOn ? (lck + "Goal is ON (Running)." + skp + sqr + "Description (only) is updatable." + skp + sqr + qt("/goal off") + " to stop running the goal." + skp) : lck + "Goal is OFF " + (goalReached ? "(Goal Reached). " : ".") + skp + (goalReached ? sqr + "(" + qt("/goal off") + " if you want to clear the screen.)" + skp : "") + sqr + "All parameters are updatable." + skp + n + sqr + qt("/goal on") + " to run the Goal." + skp) + o + skp; sendTitle(e, a), sendTitle(e, i), sendTitle(e, l) } function sy(e, t) { t = t ? t : []; return t.includes(e) ? trg : sqr } function cmdSum(e) { if (0 == tipNb) return sendTitle(e, lck + "SUMMARY : No Tipper yet."); var t = xLine(5), n = elapsTime(startTime, "[hms]"), o = skp + t + skp + lck + appName + skp + t + skp + sqr + "RunningTime : " + n + skp + sqr + " SUMMARY (since the App Started) :", a = "" + dot + x(usrNb, "Tipper$ / ") + x(Math.round(tipSum / usrNb), "token$ by Tipper.") + skp + dot + "Highest Tipper : " + qt(maxSumUsr) + " : " + x(maxSum, "Token$.") + skp + dot + "Highest Tip : " + qt(maxTipUsr) + " : " + x(maxTip, "Token$."), i = "" + t + skp + sqr + "Total received : " + x(tipSum, "Token$.") + skp + t + skp + sqr + qt("/sum") + " to display a Summary again."; sendTitle(e, o), sendTitle(e, a), sendTitle(e, i) } function cmdToken(e, t) { return 1 == t.length ? sendTitle(e, skp + lck + "Token Received Setting is : " + (tokenOn ? "ON" : "OFF") + skp + dot + qt("/token on") + " : Display the Total Tokens received in Panel." + skp + dot + qt("/token off") + " : Stop display the Total Tokens received." + skp) : "on" == t[1] ? tokenOn ? sendTitle(e, lck + "Token Received Display already ON") : (tokenOn = !0, sendTitle(e, lck + "Token Received Display settled ON."), void(goalOn && changePanel())) : "off" == t[1] ? tokenOn ? (tokenOn = !1, goalOn && changePanel(), void sendTitle(e, lck + "Token Received Display settled OFF.")) : sendTitle(e, lck + "Token Received Display already OFF") : "Format : " + qt("/token <on/off>") } function roomDisplay() { var e = 1; actionIndic >= minAction && (nextDisplay(), actionIndic = 0, e = noteNb && "LEVEL" == next ? 1 : minuteNb), cb.setTimeout(roomDisplay, 1e4 * e) } function nextDisplay() { "LEVEL" == next ? levelDisplay(all) : "NOTE" == next && noteDisplay(), nextIndex = nextIndex >= nextArray.length - 1 ? 0 : nextIndex + 1, next = nextArray[nextIndex] } function noteDisplay() { cycleNum = cycleNum >= noteNb ? 1 : cycleNum + 1, sendTitle(all, noteList[cycleNum].note,messBcolor, messColor) } function levelDisplay(e) { sendTitle(e, levelTitle + " : " + levelNotice, loveBcolor, loveColor); } function cut(e) { return qt(e.substring(0, 25)) } function watchCommand(e) { for (var t in cmdList) { var n = e.toLowerCase().indexOf(t); if (n >= 0) { var o = mySplit(e.substring(n)); return e.substring(n).replace(o[0], cmdList[t].cmd) } } } function errorCmd(e, t, n) { sendTitle(e, skp + lck + " Error command : /" + n + skp + sqr + t + skp,'',"#DD0000") } function onTest(e) { var t = e.indexOf("tip"); if (-1 != t) { var n = mySplit(e.substring(t)); if (3 == n.length) { var o = n[1], a = parseInt(n[2]); isNaN(a) || 0 >= a || onTip(o, a) } } } function isOwner(e) { return e == cb.room_slug } capt = cb.settings.capt; use_capt = cb.settings.use_capt; spam_count = 0; //-- app setting start function isOwner(e) { return e == cb.room_slug } function sendTitle(e, t, bn, n) { var bo = bn ? bn : ""; var o = n ? n : "#000000"; cb.sendNotice(t, e, bo, o, "bolder") } function trimEmot(e) { e = e.replace(/\[/g, ""); e = e.replace(/\]/g, ""); for (var t = mySplit(e), n = 0; n < t.length; n++) ":" == t[n][0] && t[n].length > 1 && (e = e.replace(t[n], "")); return e } function mySplit(e) { return e.trim().replace(/\s+/g, " ").split(" ") } function elapsTime(e, t) { var n = (new Date()).getTime(); return toHms(n, e, t) } function toHms(e, t, n) { var o = (e - t) / 1e3, a = o / 86400; a = a >= 1 ? a - a % 1 : 0; var i = (o - 3600 * a * 24) / 3600; i -= i % 1; var l = o % 3600 / 60; l -= l % 1; var s = o % 3600 - 60 * l; s -= s % 1; var r = a > 0 ? x(a, "Day$ ") : "", c = 10 > i ? "0" + i : i, m = 10 > l ? "0" + l : l, u = 10 > s ? "0" + s : s, p = r + c + ":" + m + ":" + u, g = n; return g = g.replace("day", r), g = g.replace("hour", "00" == c ? "" : x(i, "hour$ ")), g = g.replace("minute", "00" == m ? "" : x(l, "minute$ ")), g = g.replace("seconde", "00" == u ? "" : s + " sec"), g = g.replace("hms", p), g.replace(/ /g, "") ? g : "00" } function xLine(e) { var t = ""; for (e *= 5; e--;) t += lne; return t } function qt(e) { return e; } function x(e, t) { return e + " " + t.replace("$", e > 1 ? "s" : "") } function y(e, t) { return t.replace("$", e > 1 ? "s" : "") } var appName = " [ Geni Lovense ] ", owner = cb.room_slug, startTime = (new Date()).getTime(), yr = 16436, mth = 5; loveBcolor = cb.settings.loveBcolor ? cb.settings.loveBcolor : ""; messBcolor = cb.settings.messBcolor ? cb.settings.messBcolor == "[Use Lovense theme]" ? loveBcolor : cb.settings.messBcolor : "", cbColor = "#DC5500", all = "", skp = "\n", dot = " \u2981 ", hrt = " \u2665 ", sqr = " \u25A0 ", str = " \u2605", trg = " \u25B6 ", lne = " \u2500", lck = " :w__lck ", wht = " :w__wht ", spa = " - "; cb.settings_choices = [ { name: "info_1", label: "Please read for room subject functions...", type: "choice", choice1 : 'Please read !!!', choice2: 'insert {goal} to change the place of the goal', choice3: 'insert {tags} to change the place of tags(#)', choice4: 'insert {remaining} to change the place of remaining', choice5: '{remaining} can only be used when', choice6: 'you set show remaining to yes', defaultValue: 'Please read !!!' },{ name: "roomSubject", label: "1. ROOM SETTINGS ........ Room Subject", type: "str", minLength: 1, maxLength: 150, required: !0, defaultValue: "Lovense Toys : Device that vibrates longer at your tips and gives me pleasures" },{ name: "tags", label: "Tags (#) ", type: "str", minLength: 1, maxLength: 120, required: !1, defaultValue: "Lovense" },{ name: "goalMode", label: "2. GOAL SETTINGS - Will you use a Goal", type: "choice", choice1: "NO (next info will not be used)", choice2: "Single Goal", choice3: "Goal 1 (Repeated)", choice4: "Multi Goals", defaultValue: "NO (next info will not be used)" },{ name: "repeat_last", label: "repeat last goal (multi goal) only", type: "choice", choice1: "yes", choice2: "no", defaultValue: "NO" },{ name: "reachedSubject", label: "reached subject (single goal only)", type: "str", minLength: 1, maxLength: 150, required: !0, defaultValue: "GOAL REACHED its time for: {goal} // {tags}" },{ name: "setRemaining1", label: "Goal 1. - Amount", type: "int", minValue: 0, maxValue: 9999999, defaultValue: 2e3 },{ name: "goalSubject1", label: "Goal 1. is ....", type: "str", minLength: 1, maxLength: 200, required: !0, defaultValue: "A surprise" },{ name: "setRemaining2", label: "Goal 2. - Amount", type: "int", minValue: 0, maxValue: 9999999, defaultValue: 2e3 },{ name: "goalSubject2", label: "Goal 2. is ....", type: "str", minLength: 1, maxLength: 200, required: !0, defaultValue: "A 2ed surprise" },{ name: "setRemaining3", label: "Goal 3. - Amount", type: "int", minValue: 0, maxValue: 9999999, defaultValue: 2e3 },{ name: "goalSubject3", label: "Goal 3. is ....", type: "str", minLength: 1, maxLength: 200, required: !0, defaultValue: "A 2ed surprise" },{ name:'useRem', label: "Use remaining", type:'choice', choice1:'yes', choice2:'no (remaining will not be used)', defaultValue: 'yes' },{ name: "remainformat", label: "{remaining} text ", type: "str", minLength: 1, maxLength: 30, required: !1, defaultValue: "remaining" },{ name: "Pbacking", label: "3. PANEL SETTINGS - Panel Theme", type: "choice", choice1: "no (Theme will not be used)", choice2: "custom(model request)", choice3: "pink hearts", choice4: "cb clasic", choice5: "lovense_custom", defaultValue: "no (Theme will not be used)" },{ name: "tokenOn", label: "Tokens", type: "choice", choice1: 'Display "Total Received" in Panel', choice2: "Not displayed", defaultValue: 'Display "Total Received" in Panel' },{ name: "Prossesbar", label: "Display prosses bar (When goal is in use)", type: "choice", choice1: 'yes', choice2: "no - show last tip", defaultValue: 'Display "Total Received" in Panel' },{ name: "levelMode", label: "4. Notification of Lovense-Levels", type: "choice", choice1: "NO (next info will not be used)", choice2: "YES - Mode List", choice3: "YES - Single Line", defaultValue: "YES - Mode List" },{ name: "loveColor", label: "- Lovense Display Text Colour", type: "choice", choice1: "Orange", choice2: "Purple", choice3: "Blue", choice4: "Pink", choice5: "Dark_Red", choice6: "Black", defaultValue: "Purple" },{ name: "loveBcolor", label: "- Lovense Display Background Colour (html code)", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "" },{ name: "toys_to_use", label: "Toys that can be used below", type: "choice", choice1: "Toys that use special commands", choice2: "Lush,Nora,Domi,Max,Osci,Hush", choice3: "Other Toys (no special commands)", choice4: "Ohmibod,Fuck machine,ect...", defaultValue: "YES - Mode List" },{ name: "ToyName", label: "Lovense toy name(s) seperate with a (,)", type: "str", minLength: 0, maxLength: 10240, required: !0, defaultValue: 'Lush' },{ name: "levelTitle", label: "Custom Level Title", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "" },{ name: "use_icon", label: "lovense icon style", type: "choice", choice1: "dream", choice2: "numbers", choice3: "basic", defaultValue: "dream" },{ name: "use_tok", label: "lovense tip (from to) style", type: "choice", choice1: "tip - from-to", choice2: "[from - to tokens]", defaultValue: "dream" },{ name: "time_format", label: "lovense time format:", type: "choice", choice1: "minutes & seconds", choice2: "seconds", choice3: "sec", defaultValue: "minutes & seconds" },{ name: "vib_format", label: "lovense vibration format", type: "choice", choice1: "short", choice2: "normal", defaultValue: "normal" },{ name: "levA1", label: "Level 1 ----------- starting amount", type: "int", minValue: 1, maxValue: 99999, defaultValue: 1 },{ name: "levT1", label: "----------- Time in seconds", type: "int", minValue: 1, maxValue: 999, defaultValue: 3 },{ name: "lev_vib1", label: "------- vibration intencity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "Low" },{ name: "lev_PR1", label: "rotate/pump(nora/max)", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "None", defaultValue: "none" },{ name: "levA2", label: "Level 2 ----------- starting amount", type: "int", minValue: 1, maxValue: 99999, defaultValue: 15 },{ name: "levT2", label: "----------- Time in seconds", type: "int", minValue: 1, maxValue: 999, defaultValue: 6 },{ name: "lev_vib2", label: "------- vibration intencity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "medium" },{ name: "lev_PR2", label: "rotate/pump(nora/max)", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "None", defaultValue: "Low" },{ name: "levA3", label: "Level 3 -- starting amount", type: "int", minValue: 1, maxValue: 99999, defaultValue: 100 },{ name: "levT3", label: "----------- Time in seconds", type: "int", minValue: 1, maxValue: 999, defaultValue: 10 },{ name: "lev_vib3", label: "------- vibration intencity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "Medium" },{ name: "lev_PR3", label: "rotate/pump(nora/max)", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "None", defaultValue: "Medium" },{ name: "levA4", label: "Level 4 -- starting amount (0 = disabled)", type: "int", minValue: 0, maxValue: 99999, defaultValue: 500 },{ name: "levT4", label: "----------- Time in seconds", type: "int", minValue: 1, maxValue: 999, defaultValue: 60 },{ name: "lev_vib4", label: "------- vibration intencity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "High" },{ name: "lev_PR4", label: "rotate/pump(nora/max)", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "None", defaultValue: "High" },{ name: "levA5", label: "Level 5 -- starting amount (0 = disabled)", type: "int", minValue: 0, maxValue: 99999, defaultValue: 1000 },{ name: "levT5", label: "----------- Time in seconds", type: "int", minValue: 1, maxValue: 999, defaultValue: 180 },{ name: "lev_vib5", label: "------- vibration intencity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "Ultra High" },{ name: "lev_PR5", label: "rotate/pump(nora/max)", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "None", defaultValue: "High" },{ name: "levA6", label: "Level 6 -- starting amount (0 = disabled)", type: "int", minValue: 0, maxValue: 99999, defaultValue: 0 },{ name: "levT6", label: "----------- Time in seconds", type: "int", minValue: 1, maxValue: 999, defaultValue: 180 },{ name: "lev_vib6", label: "------- vibration intencity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "Ultra High" },{ name: "lev_PR6", label: "rotate/pump(nora/max)", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "None", defaultValue: "High" },{ name: "levA7", label: "Level 7 -- starting amount (0 = disabled)", type: "int", minValue: 0, maxValue: 99999, defaultValue: 0 },{ name: "levT7", label: "----------- Time in seconds", type: "int", minValue: 1, maxValue: 999, defaultValue: 180 },{ name: "lev_vib7", label: "------- vibration intencity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: '' },{ name: "lev_PR7", label: "rotate/pump(nora/max)", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "None", defaultValue: "None" },{ name: "levAmax", label: "last level maximum amount -- (0 = unlimited)", type: "int", minValue: 0, maxValue: 99999, defaultValue: 0 },{ name: "spes", type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Use special levels." },{ name: "levrandA", label: "Random Level Tip Amount (0 = disabled)", type: "int", required: !1, minValue: 0, maxValue: 9999, defaultValue: 0 },{ name: "randLvRange", label: "Random Level Range (defalt = '1-5')", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "1-5" },{ name: "QpauseA", label: "Special- Pause the queue Tip Amount (0 = disabled)", type: "int", required: !1, minValue: 0, maxValue: 9999, defaultValue: '' },{ name: "QpauseT", label: "------ (Time in seconds)", type: "int", required: !1, minValue: 1, maxValue: 9999, defaultValue: '' },{ name: "QclearA", label: "Special- Clear the queue Tip Amount - (0 = disabled)", type: "int", required: !1, minValue: 0, maxValue: 9999, defaultValue: '' },{ name: "waveLVA", label: "Special- Wave pattern Tip Amount - (0 = disabled)", type: "int", required: !1, minValue: 0, maxValue: 9999, defaultValue: '' },{ name: "waveLVT", label: "------ (Time in seconds)", type: "int", required: !1, minValue: 1, maxValue: 9999, defaultValue: '' },{ name: "pulseLVA", label: "Special- pulse pattern Tip Amount - (0 = disabled)", type: "int", required: !1, minValue: 0, maxValue: 9999, defaultValue: '' },{ name: "pulseLVT", label: "------ (Time in seconds)", type: "int", required: !1, minValue: 1, maxValue: 9999, defaultValue: '' },{ name: "quakeLVA", label: "Special- earthquake pattern Tip Amount - (0 = disabled)", type: "int", required: !1, minValue: 0, maxValue: 9999, defaultValue: '' },{ name: "quakeLVT", label: "------ (Time in seconds)", type: "int", required: !1, minValue: 1, maxValue: 9999, defaultValue: '' },{ name: "fireworksLVA", label: "Special- fireworks pattern Tip Amount - (0 = disabled)", type: "int", required: !1, minValue: 0, maxValue: 9999, defaultValue: '' },{ name: "fireworksLVT", label: "------ (Time in seconds)", type: "int", required: !1, minValue: 1, maxValue: 9999, defaultValue: '' },{ name: 'active1', type: 'choice', choice1: 'yes', choice2: 'no (activator will not be used)', defaultValue: 'yes', label: "Show Toy activator" },{ name: "activeBk", label: "Activator background color", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "[Use Lovense theme]" },{ name: "activetxt", label: "Activator text color", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "[Use Lovense theme]" },{ name: 'Auto1', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'no', label: "Use alto thank you? (notices have different colors): <use {user} to add name>" },{ name: "ThanksLv1", label: "Thank you for level 1 ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: '' }, { name: "ThanksLv2", label: "Thank you for level 2 ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "I love it, thank you!" },{ name: "ThanksLv3", label: "Thank you for level 3 ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "You know how to make me happy! Thank you!!" },{ name: "ThanksLv4", label: "Thank you for level 4 ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "Thank you so much for giving me this pleasure!!" },{ name: "ThanksLv5", label: "Thank you for level 5 ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "OMG!!! I love it!! THANK YOU SO MUCH!! " },{ name: "ThanksLv6", label: "Thank you for level 6 ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: '' }, { name: "ThanksLv7", label: "Thank you for level 7 ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "" },{ name: "Thanksrand", label: "Thank you special command tip ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "Thank you for the random lvl suprise!! " },{ name: "Thankspes", label: "Thank you random tip ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "Thank you for your Special suprise!! " },{ name: "messColor", label: "6. ADDITIONAL NOTICES SETTINGS ... - Display Color", type: "choice", choice1: "Orange", choice2: "Purple", choice3: "Blue", choice4: "Pink", choice5: "Dark_Red", choice6: "Black", choice7: "[Use Lovense theme]", defaultValue: "[Use Lovense theme]" }, { name: "messBcolor", label: "-Display Background Color (html code)", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "[Use Lovense theme]" },{ name: "notice1", label: "Notice 1 ", type: "str", minLength: 0, maxLength: 10240, defaultValue: "Lovense Lush : Device that vibrates longer on your Tips!" },{ name: "notice2", label: "Notice 2 ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue:" :Lovense Lush Give me pleasure with your tips!" },{ name: "notice3", label: "Notice 3 ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: " :Lovense info \n Give me pleasure with your tips!!!" },{ name: "notice4", label: "Notice 4 ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "" },{name:'use_capt', label: "7. Use Captcha", type:'choice', choice1:'yes', choice2:'no', defaultValue: 'yes'}, {name:'capt', label: "Capcha type", type:'choice', choice1:'Question', choice2:'Number', defaultValue: 'Number'} ]; var minuteNb = parseInt(cb.settings.minuteNb), minAction = 5, actionIndic = minAction, cycleNum = 0, nextArray = ["LEVEL", "NOTE"], nextIndex = 0, next = "", roomSubject = cb.settings.roomSubject, use_icon = cb.settings.use_icon; remainformat = cb.settings.remainformat; reachedSubject = cb.settings.reachedSubject; dis_max_lv = cb.settings.levA7 ? dis_max_lv = 7 : cb.settings.levA6 ? 6 : 5; maxLevel = 7, cb.settings.randLvRange = !cb.settings.randLvRange || divide(cb.settings.randLvRange,0) > dis_max_lv ? "1 " + dis_max_lv : divide(cb.settings.randLvRange,1) > dis_max_lv ? divide(cb.settings.randLvRange,1) +" "+ dis_max_lv : cb.settings.randLvRange; lev_range = "or randomly choose a level from " + divide(cb.settings.randLvRange,0) + "-" + divide(cb.settings.randLvRange,1); toy_name = cb.settings.ToyName? cb.settings.ToyName.toLowerCase().split(",") : "Toy"; startRange = 1; endRange = dis_max_lv; levelMode = ""; levelNotice = ""; levelModeList = {}; levelModeList["NO (next info will not be used)"] = { level: "" }; levelModeList["YES - Mode List"] = { level: "LIST" }; levelModeList["YES - Single Line"] = { level: "LINE" }; var allowed_users =[cb.room_slug]; var user_list = {}; spacer = " \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605 \u2605"; function get_Rand() { quest = capt == "Question" ? Math.floor((Math.random() * 90) + 11) +" plus "+ Math.floor((Math.random() * 90) + 11): Math.floor((Math.random() * 9000) + 1001); return quest; } function getResult(e) { return (e.toString().indexOf("plus") != -1) ? Function(`'use strict'; return (${e.replace("plus", "+")})`)() : e; } function addUSR(e) { user_list[e] = get_Rand(); } // check functions function chk_allow(e) { n = e.m ? e.m : ""; n = n && n.charCodeAt(0)==58 ? n.substr(n.indexOf(" ") + 1) : n; pass = user_list[e.user] ? user_list[e.user] : get_Rand(); if (e.has_tokens == true){ if (allowed_users.indexOf(e.user) != -1) { allowed_users.push(e.user) } return "pass1"} else if (allowed_users.indexOf(e.user) != -1){return "pass1"} else if (n == getResult(pass)){allowed_users.push(e.user); return "pass2"} else { addUSR(e.user); return "fault";} } toy_list = []; toy_list.lush = ["Lovense Lush", ":lushsm ", "yes"]; toy_list.nora = ["Lovense Nora", ":norasm ", "yes"]; toy_list.max = ["Lovense Max", ":ldmax22 ", "yes"]; toy_list.hush = ["Lovense Hush", ":hushsm ", "yes"]; toy_list.domi = ["Lovense Domi", ":domismall3 ", "yes"]; toy_list.osci = ["Lovense Osci", ":ldesca ", "yes"]; icon_list = []; icon_list.numbers = [":p67_lvl", ":p67_random", ":p67_pause", ":p67_cancel", ":p67_lo_wave ", ":p67_lo_pulse",":p67_lo_quake", ":p67_lo_fire"]; icon_list.dream = [":ldreamlev", ":ldreamrandom", ":ldreampause", ":ldreamclear", ":ldreamwave ", ":ldreampulse",":ldreamearth", ":ldreamfireworks"]; icon_list.basic = [dot + " level ",dot + " Random LV",dot + " Pause", dot + " Clear",dot + " Wave",dot + " Pulse", dot + " Earthquake", dot + " Fireworks"]; var maxNotice = 4, noteList = {}, noteNb = 0, tipSum = 0, tipNb = 0, lastTipper = "", lastTip = 0, mvpName = "", mvpSum = 0, userList = {}, higherTip = 0, higherTipName = "", totalList = {}, usrNb = 0, maxSum = 0, maxSumUsr = "", maxTip = 0, maxTipUsr = "", goalMode = "", goalSubject = cb.settings.goalSubject1, spes = cb.settings.spes, setRemaining = parseInt(cb.settings.setRemaining1), goalOn = !0, goalReached = !1, goalNb = 0, rem_goals = !0, remaining = setRemaining, goalSum = 0, goalUsrNb = 0, runNb = 0, tags = "", row1 = "", row2 = "", row3 = "",sp1a = "", sp1b = "", sp1c = "", sp2a = "", sp2b = "", sp3a = "", sp3b = "", sp3c = ""; tokenOn = "Not displayed" == cb.settings.tokenOn ? !1 : !0; Auto1 = cb.settings.Auto1; Thanksrand = cb.settings.Thanksrand; Thankspes = cb.settings.Thankspes; Obj = cb.settings.ToyName; ThanksLvColor = ['#ff3333','#ff3377','#0033cc','#e69900','#cc5200','#3d0099','#cc8800']; goalModeList = {}, goalModeList["NO (next info will not be used)"] = { m: "COUNTER" }, goalModeList["Single Goal"] = { m: "SINGLE" }, goalModeList["Goal 1 (Repeated)"] = { m: "REPEAT" }, goalModeList["Multi Goals"] = { m: "MULTI" }; var colorList = {}; colorList["General Display Color"] = { c: "" }; colorList.Orange = { c: "#DC5500" }; colorList.Blue = { c: "#323F75" }; colorList.Purple = { c: "#a900b2" }; colorList.Pink = { c: "#FA5858" }; colorList.Dark_Red = { c: "#9F000F" }; colorList.Black = { c: "#000000" } var cmdList = {}; cmdList["/goa"] = { cmd: "goal" }, cmdList["!goa"] = { cmd: "goal" }, cmdList["/sum"] = { cmd: "sum" }, cmdList["!sum"] = { cmd: "sum" }, cmdList["/tok"] = { cmd: "token" }, cmdList["!tok"] = { cmd: "token" }, cmdList["!toy"] = { cmd: "toy" }, cmdList["/toy"] = { cmd: "toy" }, cmdList["!spamcount"] = { cmd: "spam" },cmdList["/spamcount"] = { cmd: "spam" }; cb.onEnter(function(e) { var t = e.user; isOwner(t) || levelMode && levelDisplay(t); if (use_capt == "yes"){ var chk = chk_allow(e); if (chk == "fault"){ note = capt == "Number" ? "\n please type the following number to chat \n" : "\n please answer the following question below \n"; note += capt == "Number" ? user_list[e.user].toString().split("").join(" ") : user_list[e.user].toString() ; sendTitle(e.user, spacer + "\n Welcome " + e.user + "! CaptchaBot is active! " + note + "\n" + spacer, "#ffff00", "#000000") } }}); cb.onMessage(function(e) { var t = e.user, n = e.m, o = e.is_mod; if (e.hasOwnProperty("X-Spam") && e["X-Spam"]) return e; if (isOwner("philwhelp") && onTest(e.m), isOwner) { n = n.charCodeAt(0)==58 ? n.substr(n.indexOf(" ") + 1) : n; var a = watchCommand(n); if (a) { var i = doCommand(t, a, o); if (i && errorCmd(t, i, a)) { e.m = ""; e["X-Spam"] = !0} else {e.m = "Command: "+ n + " is Accepted"; e["X-Spam"] = !0} } } actionIndic += 1; //-- if (use_capt == "yes"){ var on_list = user_list[e.user] ? "yes" : "no"; if (on_list == "no") {return e} var chk = chk_allow(e); if (chk == "pass1") {return e} if (chk == "pass2") { e['X-Spam'] = true; e.m="Thank you. you can now chat"; return e; } else { e['X-Spam'] = true; note = capt == "Number" ? "\n please type the following number to chat \n" : "\n please answer the following question below \n"; note += capt == "Number" ? user_list[e.user].toString().split("").join(" ") : user_list[e.user].toString() ; setTimeout(function(){sendTitle(e.user,spacer +"\n "+ note + "\n" + spacer, "#ffff00", "#000000")}, 500); e.m="Message not sent! please answer the question below."; (spam_count = on_list == "yes" ? spam_count+1 : spam_count) } } //-- return e; }); cb.onTip(function(e) { { t = parseInt(e.amount); n = e.from_user; onTip(n, t); } var toy_N = ((toy_name.length == 1) ?(toy_list[""+toy_name[0]+""] ? toy_list[""+toy_name[0]+""][0] : toy_name[0] ) : "Toys"); it_they = (toy_name.length == 1) ? "it" : "they"; is_are = (toy_name.length == 1) ? "is" : "are"; if (e.amount ==LvNo(cb.settings.levrandA, 0) && spes == "yes" && on_Tlist() == true) { randomNo = randNo(startRange, endRange); if (cb.settings.active1 == 'yes') {listAdd(cb.settings['levT' + randomNo], n +' Has Randomly activated level ' +randomNo+ '. ' + cb.room_slug + '\'s '+toy_N+' will stop in ' + getTime(cb.settings['levT' + randomNo])); } if ((cb.settings.Auto1 == 'yes') && Thanksrand){ cb.chatNotice(addName(Thanksrand, n), "", '#FFFFFF', ThanksLvColor[0], 'bold'); } } else if (e.amount == LvNo(cb.settings.QpauseA, 0) && spes == "yes" && cb.settings.QpauseT != 0) { if (cb.settings.active1 == 'yes') {listAdd(cb.settings.QpauseT,cb.room_slug + '\'s '+toy_N+' has been paused by ' + n + '\'s tip.'+it_they+' will resume in ' + getTime(cb.settings.QpauseT)); } if (cb.settings.Auto1 == 'yes'){ cb.chatNotice(addName(Thankspes, n), "", '#FFFFFF', ThanksLvColor[1], 'bold'); } } else if (e.amount == LvNo(cb.settings.QclearA, 0) && spes == "yes" && on_Tlist() == true) { if (cb.settings.active1 == 'yes') {listAdd(cb.settings.QclearT, n +' cleared the queue of ' + cb.room_slug + '\'s ' + toy_N); } if (cb.settings.Auto1 == 'yes'){ cb.chatNotice(addName(Thankspes, n), "", '#FFFFFF', ThanksLvColor[2], 'bold'); } } else if (e.amount ==LvNo(cb.settings.waveLVA, 0) && spes == "yes" && on_Tlist() == true && cb.settings.waveLVT != 0) { if (cb.settings.active1 == 'yes') {listAdd(cb.settings.waveLVT,n +' has activated wave pattern on '+ cb.room_slug + '\'s ' + toy_N +'. '+it_they+' will stop in '+ getTime(cb.settings.waveLVT)); } if (cb.settings.Auto1 == 'yes'){ cb.chatNotice(addName(Thankspes, n), "", '#FFFFFF', ThanksLvColor[3], 'bold'); } } else if (e.amount ==LvNo(cb.settings.pulseLVA, 0) && spes == "yes" && on_Tlist() == true && cb.settings.pulseLVT != 0) { if (cb.settings.active1 == 'yes') {listAdd(cb.settings.pulseLVT,n +' has activated Pulse pattern on '+ cb.room_slug + '\'s '+ toy_N +'. '+it_they+' will stop in '+ getTime(cb.settings.pulseLVT)); } if (cb.settings.Auto1 == 'yes'){ cb.chatNotice(addName(Thankspes, n), "", '#FFFFFF', ThanksLvColor[4], 'bold'); } } else if (e.amount ==LvNo(cb.settings.quakeLVA, 0) && spes == "yes" && on_Tlist() == true && cb.settings.quakeLVT != 0) { if (cb.settings.active1 == 'yes') {listAdd(cb.settings.quakeLVT,n +' has activated Earthquake pattern on '+ cb.room_slug + '\'s '+ toy_N +'. '+it_they+' will stop in '+ getTime(cb.settingsquakeLVT)); } if (cb.settings.Auto1 == 'yes'){ cb.chatNotice(addName(Thankspes, n), "", '#FFFFFF', ThanksLvColor[5], 'bold'); } } else if (e.amount ==LvNo(cb.settings.fireworksLVA, 0) && spes == "yes" && on_Tlist() == true && cb.settings.fireworksLVT != 0) { if (cb.settings.active1 == 'yes') {listAdd(cb.settings.fireworksLVT,n +' has activated Fireworks pattern on '+ cb.room_slug + '\'s '+ toy_N +'. '+it_they+' will stop in '+ getTime(cb.settings.fireworksLVT)); } if (cb.settings.Auto1 == 'yes'){ cb.chatNotice(addName(Thankspes, n), "", '#FFFFFF', ThanksLvColor[6], 'bold'); } } else { for (var x = 1; x <= maxLevel; x++) { //cb.settings.levAmax strAm = cb.settings['levA' + x] ? cb.settings['levA' + x] : 1 ; finAm = cb.settings['levA' + (x+1)] ? cb.settings['levA' + (x+1)]-1 : cb.settings.levAmax != 0 ? cb.settings.levAmax : 999999 ; tmr = cb.settings['levT' + x] ? cb.settings['levT' + x] : 0 ; if (e.amount >=LvNo(strAm, 0) && e.amount<=LvNo(finAm, 0) && tmr != 0) { if (cb.settings.active1 == 'yes') {listAdd(tmr, cb.room_slug + '\'s '+ toy_N +' '+is_are+' now reacting to '+ n + '\'s tip. '+it_they+' will stop in ' + getTime(tmr)); } if ((cb.settings.Auto1 == 'yes') && (cb.settings['ThanksLv' + x])) {cb.chatNotice(addName(cb.settings['ThanksLv' + x], n), "", '#FFFFFF', ThanksLvColor[x-1], 'bold'); } break; }} } }); cb.onDrawPanel(function() { if (theme_set.mode == "basic") return { "template": "image_template", "layers": [ {'type': 'image', 'fileID': background}, { 'type': 'text', 'text': row1, 'top': 5, 'left': side1, 'width' : wid1, 'text-align' : poss, 'font-size': 11, 'font-weight' : 'Bold', 'color': color1, },{ 'type': 'text', 'text': row2, 'top': 29, 'left': side2, 'width' : wid2, 'text-align' : poss, 'font-size': 11, 'font-weight' : 'Bold', 'color': color2, },{ 'type': 'text', 'text': row3, 'top': 51, 'left': side3, 'width' : wid3, 'text-align' : poss, 'font-size': 11, 'font-weight' : 'Bold', 'color': color3, }], } else if (theme_set.mode == "advanced") return { "template": "image_template", "layers": [ {'type': 'image', 'fileID': background}, { 'type': 'text', 'text': sp1a, 'top': 3, 'left': (side1 + 86), 'width' : 130, 'text-align': 'center', 'font-size': 11, 'font-weight' : 'bold', 'color': color1, }, { 'type': 'text', 'text': sp1b, 'top': 19, 'left': (side1 + 86), 'width' : 100, 'text-align': 'left', 'font-size': 11, 'font-weight' : 'bold', 'color': color2, }, { 'type': 'text', 'text': sp1c, 'top': 19, 'left': (side1 + 170), 'width' : 46, 'text-align': 'right', 'font-size': 11, 'font-weight' : 'bold', 'color': color1, }, { 'type': 'text', 'text': sp2a, 'top': 37, 'left': (side2), 'width' : 80 , 'text-align': 'left', 'font-size': 11, 'font-family': 'Arial', 'font-weight' : 'bold', 'color': color2, }, { 'type': 'text', 'text': sp2b, 'top': 37, 'left': (side2 + 48), 'width' : 174 , 'text-align': 'center', 'font-size': 11, 'font-family': 'Arial', 'font-weight' : 'bold', 'color': color1, }, { 'type': 'text', 'text': sp3a, 'top': 54, 'left': (side3), 'width' : 60 , 'text-align': 'left', 'font-size': 11, 'font-family': 'Arial', 'font-weight' : 'bold', 'color': color1, }, { 'type': 'text', 'text':sp3b, 'top': 53, 'left': (side3 + 46), 'width' : 138 , 'text-align': 'center', 'font-size': 11, 'font-family': 'Arial', 'font-weight' : 'bold', 'color': color2, }, { 'type': 'text', 'text': sp3c, 'top': 54, 'left': (side3 + 176), 'width' : 40 , 'text-align': 'right', 'font-size': 11, 'font-family': 'Arial', 'font-weight' : 'bold', 'color': color1, } ], } else return { template: "3_rows_11_21_31", row1_value: row1, row2_value: row2, row3_value: row3 } }) init();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.