Bots Home
|
Create an App
tes functions
Author:
philwhelp
Description
Source Code
Launch Bot
Current Users
Created by:
Philwhelp
//--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; use_c_colors = cb.settings.use_c_colors; cust_profiles = [] //cust_profiles['philwhelp'] = {mode: "advanced", data: {back : "5af168c1-747a-4d5b-811a-ce9f597a42e9",colors:["#dd0000","#000000"], 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'] = {mode: "basic", data: {back : "5325bb1c-6983-4ed1-91ad-4cff0979ef4f",colors:["#ff00ff","#dd00dd","#ff00ff"], side:[10,10,10], wid:[250,250,250]}} p_images['cb clasic'] = {mode: "basic", data: {back : "e4c86fd8-fdf8-4fc1-be3e-5f663a5fff67",colors:["#ffffff","#ffffff","#ffffff"], side:[15,15,15], wid:[245,245,245]}} 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; colors = theme_set && theme_set.data.colors ? theme_set.data.colors : false; color1 = colors[0] && use_c_colors == "yes" ? colors[0] : cb.settings.Pline1 ? cb.settings.Pline1 : "#000000"; color2 = colors[1] && use_c_colors == "yes" ? colors[1] : cb.settings.Pline2 ? cb.settings.Pline2 : "#000000"; color3 = colors[2] && use_c_colors == "yes" ? colors[2] : cb.settings.Pline3 ? cb.settings.Pline3 : "#000000"; sides = theme_set && theme_set.data.side ? theme_set.data.side : false; side1 = sides[0] ? sides[0] : 10; side2 = sides[1] ? sides[1] : 10; side3 = sides[2] ? sides[2] : 10; wids = theme_set && theme_set.data.wid ? theme_set.data.wid : false; wid1 = wids[0] ? wids[0] : 250; wid2 = wids[1] ? wids[1] : 250; wid3 = wids[2] ? wids[2] : 250; poss = cb.settings.poss; var tm = "off"; toyTimer = []; xtxt_ = ["\uD835\uDDE7\uD835\uDDFC\uD835\uDDF8\uD835\uDDF2\uD835\uDDFB\uD835\uDE00", "\uD835\uDDDF\uD835\uDDF2\uD835\uDE03\uD835\uDDF2\uD835\uDDF9","\uD835\uDDDF\uD835\uDDE9","\uD835\uDE01\uD835\uDDFC","\uD835\uDDFD\uD835\uDDF9\uD835\uDE02\uD835\uDE00","\uD835\uDE00\uD835\uDDF2\uD835\uDDF0\uD835\uDDFC\uD835\uDDFB\uD835\uDDF1","\uD835\uDDFA\uD835\uDDF6\uD835\uDDFB\uD835\uDE02\uD835\uDE01\uD835\uDDF2","\uD835\uDE00","\uD835\uDDDF\uD835\uDDFC\uD835\uDE04","\uD835\uDDE0\uD835\uDDF2\uD835\uDDF1\uD835\uDDF6\uD835\uDE02\uD835\uDDFA","\uD835\uDDDB\uD835\uDDF6\uD835\uDDF4\uD835\uDDF5","\uD835\uDDE8\uD835\uDDF9\uD835\uDE01\uD835\uDDFF\uD835\uDDEE ","\uD835\uDDE9\uD835\uDDF6\uD835\uDDEF\uD835\uDDFF\uD835\uDDEE\uD835\uDE01\uD835\uDDF6\uD835\uDDFC\uD835\uDDFB\uD835\uDE00", "\uD835\uDDE5\uD835\uDDFC\uD835\uDE01\uD835\uDDEE\uD835\uDE01\uD835\uDDF6\uD835\uDDFC\uD835\uDDFB\uD835\uDE00","\uD835\uDDD4\uD835\uDDF6\uD835\uDDFF \uD835\uDDE3\uD835\uDE02\uD835\uDDFA\uD835\uDDFD"]; function randNo(min, max) { minNo = parseInt(min); maxNo = parseInt(max); return Math.floor(Math.random() * (maxNo - minNo + 1)) + minNo; } function showList() { var name = toyTimer[0]; if ((typeof(name) != "undefined") && (tm == "off")) {tm = "on"; cb.chatNotice('***** ' + toyTimer[0].note, "", cb.settings.activeBk,cb.settings.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) { if (divide(s,v) == 'plus') {var number = 9999999;} else {var number = divide(s,v);} return number; }} function divide(s,v) { if (s) { res = s.split(/,| |-/) [v] ? s.split(/,| |-/) [v] : ""; return res;} else {return;} } function getTime(t) { var time = t; var minutes = Math.floor(time / 60); var seconds = time - minutes * 60; if (minutes == 1) {Tmin = minutes + ' '+xtxt_[6];} else if (minutes >= 1) {Tmin = minutes + ' '+xtxt_[6]+xtxt_[7];} else {Tmin = '';} if (seconds == 1) {Tsec = seconds + ' ' + xtxt_[5];} else if (seconds >= 1) {Tsec = seconds + ' '+ xtxt_[5]+xtxt_[7];} else {Tsec = '';} if ((minutes) && (seconds)) { Fultime = Tmin + ' & ' + Tsec + ' ';} else if (minutes) {Fultime = Tmin + ' ';} else if (seconds) {Fultime = Tsec + ' ';} if (Fultime) return Fultime; } function getstring(s, x){ var string = ""; var toys = ""; for (i = 0; i < toy_name.length; i++) { toyx = toy_list[''+toy_name[i]+''] ? toy_list[''+toy_name[i]+''][1] : "="; toys += toyx + " "; } lev_intent = divide(s,3) == "UH" ? "hi " : divide(s,3) == "H" ? "hi " : divide(s,3) == "M" ? "me " : "lo "; lev_intent_text = divide(s,3) == "UH" ? "ultra high Vibrations" : divide(s,3) == "H" ? "high Vibrations" : divide(s,3) == "M" ? "medium Vibrations" : "low Vibrations"; rot_pump = toy_name.includes("nora") ? divide(s,4) == "H" ? " with high rotations" : divide(s,4) == "M" ? " with medium rotations" : divide(s,4) == "L" ? " with low rotations" : " with no rotations" : toy_name.includes("max") ? divide(s,4) == "H" ? " with high pump action" : divide(s,4) == "M" ? " with medium pump action" : divide(s,4) == "L" ? " with low pump action" : " with no pump action": ""; var st0 = (Number(divide(s,0)) && !(isNaN(divide(s,0)))); var st1 = (Number(divide(s,1)) && !(isNaN(divide(s,1)))); var st2 = (Number(divide(s,2)) && !(isNaN(divide(s,2)))); var st3 = (Number(divide(s,3)) && !(isNaN(divide(s,3)))); var st4 = (Number(divide(s,4)) && !(isNaN(divide(s,4)))); if (x > 0) {spes_T = " ["+ divide(s,0) +" "+xtxt_[0]+ "] " + toys; if (!((x == 1) || (x == 3))) {if (!st0 || !st1) {return " error: check special command";}} } if (isNaN(divide(s,0))) {return;} if (x == 1) { string += spes_T+"random level "; return string;} else if (x == 2) {string += spes_T + 'pause queue for ' + getTime(divide(s,1)) ; return string;} else if ((x == 3)) {string += spes_T + 'Clear the queue' ; return string;} else if (x == 4) {string += spes_T + ' ' + getTime(divide(s,1)) + ' Wave pattern' ; return string;} else if (x == 5) {string += spes_T + ' ' + getTime(divide(s,1)) + ' Pulse pattern' ; return string;} else if (x == 6) {string += spes_T + ' ' + getTime(divide(s,1)) + ' Earthquake pattern' ; return string;} else if (x == 7) {string += spes_T + ' ' + getTime(divide(s,1)) + ' Fireworks pattern' ; return string;} else if (!((((divide(s,1) == "plus") && st2) || (st1 && st2)) && st0)) {return " error: check level";} // check for errors... else { string = (use_icon == "dream" ? lev_intent : "") + "[" + divide(s,0) + " " + (divide(s,1) == "plus" ? " " : " to " ) + divide(s,1) + " "+ xtxt_[0]+ "]" + " "+ toys + getTime(divide(s,2)) + " ("+lev_intent_text+ rot_pump +")"; return string; } } function init() { cb.settings.goalMode && cb.settings.levelMode && cb.settings.messColor && (goalMode = goalModeList[cb.settings.goalMode].m, levelMode = levelModeList[cb.settings.levelMode].level, messColor = colorList[cb.settings.messColor].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]; initNotice(), levelTitle = cb.settings.levelTitle ? cb.settings.levelTitle.replace(/{line\}/gi, skp) : "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 " + (cb.settings.spes == "yes" && cb.settings.levrand ? lev_range : ""), levelMode && initLevel(), noteNb || cbjs.arrayRemove(nextArray, "NOTE"), levelMode || cbjs.arrayRemove(nextArray, "LEVEL"), nextArray.length && (next = nextArray[nextIndex], Timer = cb.setTimeout(roomDisplay, 2e4)), 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, n) : void 0 } function changeToy(e, n){ new_toy = trimEmot(n.substring(4)); toy_name = new_toy? new_toy.toLowerCase().split(",") : ["Toy"]; levelNotice =""; levelTitle = cb.settings.levelTitle ? cb.settings.levelTitle.replace(/{line\}/gi, skp) : "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 " + (cb.settings.spes == "yes" && cb.settings.levrand ? lev_range : ""), levelMode && initLevel(), sendTitle(e, "you have now changed the toy to: " + toy_name); "LINE" == levelMode ? sendTitle(all, levelTitle + " : " + levelNotice) : sendTitle(all, levelTitle + " : " + levelNotice); } function onTip(e, t) { var x = cb.settings.roomSubject; 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 ? "MULTI" == goalMode && watchMultiGoal(e, t) : watchSingleGoal(t), "SINGLE" == goalMode && (remaining > 0)), changePanel(); } else {changePanel();} !goalReached && "SINGLE" == goalMode ? (check_obj(roomSubject , "{remaining}") ) ? changeSubject() : "" : ""; } 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 }) } } 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 = ["level ", "Random LV", "Pause", "Clear", "Wave", "Pulse", "Earthquake", "Fireworks"]; function initLevel() { icon = icon_list[use_icon] ? icon_list[use_icon] : icon_list.basic; //(use_icon == "dream" ? "" : " ") 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); } var t =getstring(cb.settings['lev'+e])?getstring(cb.settings['lev'+e]).trim() : ""; levelNotice += t ? ("LIST" == levelMode ? skp : " ") + icon[0] + e + (use_icon == "dream" ? "" : " ") + t : ""; if (divide(cb.settings['lev'+e],1) == "plus") {break;} } if (spes == "yes" && (cb.settings.levrand || cb.settings.Qpause || cb.settings.Qclear || cb.settings.waveLV || cb.settings.pulseLV || cb.settings.quakeLV)) { (levelNotice += ("LIST" == levelMode ? skp : " ") + str +str + str + " Special Commands " + str + str + str) // random level var rt = getstring(cb.settings.levrand) ? getstring(cb.settings.levrand,1).trim() : ""; levelNotice += rt ? ("LIST" == levelMode ? skp : " ") + icon[1] + " " + rt + ' (Levels ranging from ' + startRange + ' - ' + endRange + ')' : ""; //pause var qp = getstring(cb.settings.Qpause) ? getstring(cb.settings.Qpause,2).trim() : ""; levelNotice += qp ? ("LIST" == levelMode ? skp : " ") + icon[2] + " " + qp : ""; //clear var qc = getstring(cb.settings.Qclear) ? getstring(cb.settings.Qclear, 3).trim() : ""; levelNotice += qc ? ("LIST" == levelMode ? skp : " ") + icon[3] + " " + qc : ""; //WAVE var sp1 = getstring(cb.settings.waveLV) ? getstring(cb.settings.waveLV, 4).trim() : ""; levelNotice += sp1 ? ("LIST" == levelMode ? skp : " ") + icon[4] + " " + sp1 : ""; //pulse var pls = getstring(cb.settings.pulseLV) ? getstring(cb.settings.pulseLV, 5).trim() : ""; levelNotice += pls ? ("LIST" == levelMode ? skp : " ") + icon[5] + " " + pls : ""; //quakeLV = earthquake level tokens/ time var quk = getstring(cb.settings.quakeLV) ? getstring(cb.settings.quakeLV, 6).trim() : ""; levelNotice += quk ? ("LIST" == levelMode ? skp : " ") + icon[6] + " " + quk : ""; //fireworksLV = fireworks level tokens / time var fw = getstring(cb.settings.fireworksLV) ? getstring(cb.settings.fireworksLV, 7).trim() : ""; levelNotice += fw ? ("LIST" == levelMode ? skp : " ") + icon[7] + " " + fw : ""; } } function runGoal(e) { goalOn = !0, goalReached = !1, remaining = setRemaining, 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(e) { reachedSubject ? reachedSubject : ""; remaining -= e 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, "{goal}") ? rs : rs + " :"+ goalSubject + ":" 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, "#FFFFFF"), sendTitle(owner, skp + lck + owner + " : " + skp + sqr + "Use " + qt("/sum") + " for a Total Summary Board." + skp, "#000000", "#ffffff") } } function watchMultiGoal(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, "#ffffff") } if (check_obj(roomSubject , "{remaining}") ){ 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 ? (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] }) : e += ("SINGLE" == goalMode ? " - Goal is : " : " - Multi-Goal : ") + goalSubject)) : 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); } 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() { return goalReached ? (row1 = "Goal Reached - Thanks all.", row2 = "", row3 = "Mvp - " + cut(mvpName) + " (" + mvpSum + ")", sp1a = "Best Lover", sp1b = cut(mvpName), sp1c = mvpSum +"tk", sp2a = "Goal", sp2b = "Reached - Thank you all", sp3a = "Progress", sp3b = gBar(1), sp3c = gBar(2), cb.drawPanel()) : goalOn ? "COUNTER" == goalMode ? (goalSum ? (row1 = x(usrNb, "Pleaser$") + (tokenOn ? " - " + x(goalSum, "Token$ Received") : ""), row2 = "Mvp - " + cut(mvpName) + " - " + mvpSum, row3 = "Newest - " + cut(lastTipper) + " - " + lastTip, sp1a = "Best Lover", sp1b = cut(mvpName), sp1c = mvpSum +"tk", sp2a = x(usrNb, "Pleaser$"), sp2b = x(goalSum, "Token$ Received"), sp3a = "Newest" , sp3b = cut(lastTipper), sp3c = lastTip +"tk") : (row1 = "My Lovense - Vibrator that react to your Tips", row2 = "Start Playing", row3 = "", sp1a = "Best Lover", sp1b = "", sp1c = "", sp2a = "Lovense", sp2b = "Tip activated toys", sp3a = "", sp3b = "Start Playing", sp3c = ""), cb.drawPanel()) : "MULTI" == goalMode ? (row1 = "Goal #" + (goalNb + 1) + " : " + (setRemaining - remaining) + " / " + setRemaining + " [ " + remaining + " Remaining ]" + (tokenOn && goalNb >= 1 ? " (" + goalSum + ")" : ""), goalSum ? (row2 = "Mvp - " + cut(mvpName) + " - " + mvpSum, row3 = "Newest - " + cut(lastTipper) + " - " + lastTip, sp1a = "Best Lover", sp1b = cut(mvpName), sp1c = mvpSum +"tk", sp2a = "Goal #" + (goalNb + 1), sp2b = (setRemaining - remaining) + " / " + setRemaining + " [ " + remaining + " Remaining ]" + (tokenOn && goalNb >= 1 ? " (" + goalSum + ")" : ""), sp3a = "Progress", sp3b = gBar(1), sp3c = gBar(2)) : (row2 = "My Lovense - Vibrator that react to your Tips", row3 = "Start Playing", sp1a = "Best Lover", sp1b = "", sp1c = "", sp2a = "Goal #" + (goalNb + 1), sp2b = setRemaining + " for " + goalSubject, sp3a = "", sp3b = "Tip to Start Playing", sp3c = ""), cb.drawPanel()) : "SINGLE" == goalMode ? (row1 = tokenOn ? "Goal - " + goalSum + " / " + setRemaining + " [ " + remaining + " Remaining ]" : "Goal [ " + remaining + " Remaining ]", goalSum ? (row2 = "Mvp - " + cut(mvpName) + " - " + mvpSum, row3 = "Newest - " + cut(lastTipper) + " - " + lastTip, sp1a = "Best Lover", sp1b = cut(mvpName), sp1c = mvpSum +"tk", sp2a = "Goal", sp2b = tokenOn ? goalSum + " / " + setRemaining + " [ " + remaining + " Remaining ]" : "[ " + remaining + " Remaining ]", sp3a = "Progress", sp3b = gBar(1), sp3c = gBar(2) ) : (row2 = "My Lovense - Vibrator that react to your Tips", row3 = "Start Playing", sp1a = "Best Lover", sp1b = "", sp1c = "", sp2a = "Goal", sp2b = setRemaining + " for " + goalSubject, 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]; if (goalOn && 2 == t.length && (!isNaN(parseInt(o)) || ["counter", "single", "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.setRemaining, goalMode = goalModeList[cb.settings.goalMode].mode, goalSubject = cb.settings.goalSubject, 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)) : ["on", "off", "single", "multi", "counter", "init"].indexOf(o) >= 0 ? "Goal description can't begin by :" + skp + " on / off / single / multi / counter / init " : (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) { var n = ""; (setRemaining != cb.settings.setRemaining || goalMode != goalModeList[cb.settings.goalMode].mode || goalSubject != cb.settings.goalSubject) && (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 / 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), sendNote(e, i), sendTitle(e, l), changePanel() } function sy(e, t) { return e == t ? 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), sendNote(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, 6e4 * 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) } function levelDisplay(e) { "LINE" == levelMode ? sendTitle(e, levelTitle + " : " + levelNotice) : sendTitle(e, levelTitle + " : " + levelNotice); } 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) } 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, n, bn) { var bo = bn ? bn : messBColor; var o = n ? n : messColor; o = isOwner(e) ? "#000000" : o, bo = isOwner(e) ? "#FFFFFF" : bo, cb.sendNotice(t, e, bo, o, "bolder") } function sendNote(e, t, n) { var o = n ? n : messColor; cb.sendNotice(t, e, "", o, "normal") } 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, messColor = "#6900CC", messBColor = cb.settings.messBColor ? cb.settings.messBColor : "#FFFFFF", 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 add the goal name how you want', choice3: 'insert {tags} to add the your tags in a new place', choice4: 'insert {remaining} to add the remaining amount', choice5: '{remaining} can only be used in repeat and multi-goal', choice6: 'Using {remaining} will refresh the topic every tip', "default": '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: "remainformat", label: "{remaining} text (single goal only)", type: "str", minLength: 1, maxLength: 30, required: !1, defaultValue: "remaining" },{ 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: "tags", label: "Tags (#) ", type: "str", minLength: 1, maxLength: 120, required: !1, defaultValue: "Lovense" }, { name: "tokenOn", label: "Tokens", type: "choice", choice1: 'Display "Total Received" in Panel', choice2: "Not displayed", "default": 'Display "Total Received" in Panel' }, { name: "ToyName", label: "Lovense toy name(s)", type: "choice", choice1: 'Lush', choice2: 'Nora', choice3: 'Max', choice4: 'Hush', choice5: 'Nora,lush', choice6: 'Nora,Max', choice7: 'Lush,Max', "default": 'Lush' }, { name: "messColor", label: "2. NOTICES SETTINGS ... - Display Color", type: "choice", choice1: "Orange", choice2: "Purple", choice3: "Blue", choice4: "Pink", choice5: "Dark_Red", choice6: "Black", defaultValue: "Dark_Red" }, { name: "messBColor", label: "-Display Background Color (html code)", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "" }, { name: "minuteNb", label: " (minutes) - Display Time ", type: "int", minValue: 1, maxValue: 30, defaultValue: 1 }, { name: "levelMode", label: "- 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: "use_icon", label: "notification level icons", type: "choice", choice1: "dream", choice2: "numbers", choice3: "basic", defaultValue: "dream" },{ name: "levelTitle", label: "Custom Level Title", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "" }, { name: "lev1", label: "Level 1 ", type: "str", minLength: 0, maxLength: 10240, defaultValue: "1 14 3 L" }, { name: "lev2", label: "Level 2 ", type: "str", minLength: 0, maxLength: 10240, defaultValue: "15 99 6 M" }, { name: "lev3", label: "Level 3 ", type: "str", minLength: 0, maxLength: 10240, defaultValue: "100 499 10 M" }, { name: "lev4", label: "Level 4 ", type: "str", minLength: 0, maxLength: 10240, defaultValue: "500 999 60 H" }, { name: "lev5", label: "Level 5 ", type: "str", minLength: 0, maxLength: 10240, defaultValue: "1000 plus 180 H" }, { name: "lev6", label: "Level 6 (optional) ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: '' }, { name: "lev7", label: "Level 7 (optional)", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: '' },{ name: "spes", type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Use special levels." },{ name: "levrand", label: "Random Level ", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "169 To get a random level!" }, { name: "randLvRange", label: "Random Level Range (defalt = '1-5')", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "1 5" }, { name: "Qpause", label: "Special- Pause the queue (tip/seconds)(default= 17 20)", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "17 20" }, { name: "Qclear", label: "Special- Clear the queue (tip)(default= 66)", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "66" }, { name: "waveLV", label: "Special (wave pattern)(tip/seconds)(default= 77 30)", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "77 30" }, { name: "pulseLV", label: "Special (pulse pattern)(tip/seconds)(default= 44 15)", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "44 15" }, { name: "quakeLV", label: "Special (Earthguake pattern)(tip/seconds)(default= 88 25)", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "88 25" }, { name: "fireworksLV", label: "Special (fireworks pattern)(tip/seconds)(default= 99 40)", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: "99 40" }, { name: "notice1", label: "- Optional Additional ...... 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: 'active1', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Show Toy activator" }, { name: "activeBk", label: "Activator background color", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: '' }, { name: "activetxt", label: "Activator text color", type: "str", minLength: 0, maxLength: 10240, required: !1, defaultValue: '#a900b2' }, { 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: "goalMode", label: "3. GOAL SETTINGS - Will you use a Goal", type: "choice", choice1: "NO (next info will not be used)", choice2: "Single Goal", choice3: "Multi Goals (Repeated)", "default": "NO (next info will not be used)" }, { name: "goalSubject", label: "Goal is ....", type: "str", minLength: 1, maxLength: 200, required: !0, defaultValue: "A surprise" }, { name: "setRemaining", label: "Amount", type: "int", minValue: 0, maxValue: 9999999, defaultValue: 2e3 }, { name: "use_img", label: "------ Type of panel ------", type: "choice", required: false, "default": "" },{ name: "Pbacking", label: "panel theme", type: "choice", choice1: "no image", choice2: "custom(model request)", choice3: "pink hearts", choice4: "cb clasic", choice5: "lovense_custom", "default": "no image" }, { name: "use_c_colors", label: "Use panel theme colors", type: "choice", choice1: "yes", choice2: "no", "default": "no" }, { name: "poss", label: "text align", type: "choice", choice1: "left", choice2: "center", choice3: "right", "default": "center" }, { name: "Pline1", label: "panel line 1 color(default = #000000)", type: "str", minLength: 4, maxLength: 7, required: false, defaultValue: "#000000" }, { name: "Pline2", label: "panel line 2 color(default = #000000)", type: "str", minLength: 4, maxLength: 7, required: false, defaultValue: "#000000" }, { name: "Pline3", label: "panel line 3 color(default = #000000)", type: "str", minLength: 4, maxLength: 7, required: false, defaultValue: "#000000" },{name:'use_capt', label: "Dose Capcha type", 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['lev7'] ? 7 : cb.settings['lev6'] ? 6 : 5; levelTitle = cb.settings.levelTitle, maxLevel = 7, cb.settings.randLvRange && isBlank(divide(cb.settings.randLvRange,1)) || divide(cb.settings.randLvRange,0) > dis_max_lv ? cb.settings.randLvRange = "1 " + dis_max_lv : cb.settings.randLvRange, lev_range = "or randomly choose a level from " + ((!isNaN(divide(cb.settings['randLvRange'],0))) ? divide(cb.settings['randLvRange'],0) : 1 ) + " TO " + ((!isNaN(divide(cb.settings['randLvRange'],0))) ? divide(cb.settings['randLvRange'],1) : dis_max_lv) 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) { 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 (e.m == getResult(pass)){allowed_users.push(e.user); return "pass2"} else { addUSR(e.user); return "fault";} } toy_list = []; toy_list.lush = ["Lovense Lush", ":lushsm "]; toy_list.nora = ["Lovense Nora", ":norasm "]; toy_list.max = ["Lovense Max", ":ldmax22 "]; toy_list.hush = ["Lovense Hush", ":hushsm "]; toy_list.toy = ["Lovense Toy", " "]; var maxNotice = 3, 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.goalSubject, spes = cb.settings.spes, setRemaining = parseInt(cb.settings.setRemaining), goalOn = !0, goalReached = !1, goalNb = 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["Multi Goals (Repeated)"] = { 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" }, 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, "#000000", "#ffff00") } }}), cb.onMessage(function(e) { var t = e.user, n = e.m, o = e.is_mod; !e.has_tokens if (e.hasOwnProperty("X-Spam") && e["X-Spam"]) return e; if (isOwner("playfull_mike") && onTest(e.m), isOwner) { var a = watchCommand(n); if (a) { var i = doCommand(t, a, o); i && errorCmd(t, i, a), e.m = "", e["X-Spam"] = !0 } } actionIndic += 1; return e; }), cb.onTip(function(e) { var 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.levrand, 0) && spes == "yes") { randomNo = randNo(startRange, endRange); if (cb.settings.active1 == 'yes') {listAdd(divide(cb.settings['lev' + randomNo],2), n +' Has Randomly activated level ' +randomNo+ '. ' + cb.room_slug + '\'s '+toy_N+' will stop in ' + getTime(divide(cb.settings['lev' + randomNo],2))); } if ((cb.settings.Auto1 == 'yes') && Thanksrand){ cb.chatNotice(addName(Thanksrand, n), "", '#FFFFFF', '#000000', 'bold'); } } else if (e.amount ==LvNo(cb.settings.Qpause, 0)&& spes == "yes" && !isBlank(divide(cb.settings.Qpause,1))) { if (cb.settings.active1 == 'yes') {listAdd(divide(cb.settings.Qpause,1),cb.room_slug + '\'s '+toy_N+' has been paused by ' + n + '\'s tip."+it_they+" will resume in ' + getTime(divide(cb.settings.Qpause,1)),1); } if (cb.settings.Auto1 == 'yes'){ cb.chatNotice(addName(Thankspes, n), "", '#FFFFFF', '#000000', 'bold'); } } else if (e.amount ==LvNo(cb.settings.Qclear, 0) && spes == "yes") { if (cb.settings.active1 == 'yes') {listAdd(divide(cb.settings.Qclear,1), n +' cleared the queue of ' + cb.room_slug + '\'s ' + toy_N ,2); } if (cb.settings.Auto1 == 'yes'){ cb.chatNotice(addName(Thankspes, n), "", '#FFFFFF', '#000000', 'bold'); } } else if (e.amount ==LvNo(cb.settings.waveLV, 0) && spes == "yes" && !isBlank(divide(cb.settings.waveLV,1))) { if (cb.settings.active1 == 'yes') {listAdd(divide(cb.settings.waveLV,1),n +' has activated wave pattern on '+ cb.room_slug + '\'s ' + toy_N +'. "+it_they+" will stop in '+ getTime(divide(cb.settings.waveLV,1)),3); } if (cb.settings.Auto1 == 'yes'){ cb.chatNotice(addName(Thankspes, n), "", '#FFFFFF', '#000000', 'bold'); } } else if (e.amount ==LvNo(cb.settings.pulseLV, 0) && spes == "yes" && !isBlank(divide(cb.settings.pulseLV,1))) { if (cb.settings.active1 == 'yes') {listAdd(divide(cb.settings.pulseLV,1),n +' has activated Pulse pattern on '+ cb.room_slug + '\'s '+ toy_N +'. '+it_they+' will stop in '+ getTime(divide(cb.settings.pulseLV,1)),4); } if (cb.settings.Auto1 == 'yes'){ cb.chatNotice(addName(Thankspes, n), "", '#FFFFFF', '#000000', 'bold'); } } else if (e.amount ==LvNo(cb.settings.quakeLV, 0) && spes == "yes" && !isBlank(divide(cb.settings.quakeLV,1))) { if (cb.settings.active1 == 'yes') {listAdd(divide(cb.settings.quakeLV,1),n +' has activated Earthquake pattern on '+ cb.room_slug + '\'s '+ toy_N +'. '+it_they+' will stop in '+ getTime(divide(cb.settingsquakeLV,1)),5); } if (cb.settings.Auto1 == 'yes'){ cb.chatNotice(addName(Thankspes, n), "", '#FFFFFF', '#000000', 'bold'); } } else if (e.amount ==LvNo(cb.settings.fireworksLV, 0) && spes == "yes" && !isBlank(divide(cb.settings.fireworksLV,1))) { if (cb.settings.active1 == 'yes') {listAdd(divide(cb.settings.fireworksLV,1),n +' has activated Fireworks pattern on '+ cb.room_slug + '\'s '+ toy_N +'. '+it_they+' will stop in '+ getTime(divide(cb.settings.fireworksLV,1)),6); } if (cb.settings.Auto1 == 'yes'){ cb.chatNotice(addName(Thankspes, n), "", '#FFFFFF', '#000000', 'bold'); } } else { for (var x = 1; x <= maxLevel; x++) { strAm = x == 1 ? cb.settings.levstart : parseInt(LvNo(cb.settings['lev' + (x-1)], 0))+1; if (e.amount >=LvNo(cb.settings['lev' + x], 0) && e.amount<=LvNo(cb.settings['lev' + x], 1) && !isBlank(divide(cb.settings['lev' + x],2))) { tmr = (isNaN(divide(cb.settings['lev' + x],2)) == false) ? divide(cb.settings['lev' + x],2) : 1; 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- 2024. All Rights Reserved.