Bots Home
|
Create an App
lovetes
Author:
brn2fuk_1122
Description
Source Code
Launch Bot
Current Users
Created by:
Brn2fuk_1122
// Lush Control Bot // // Written By Perseus1967 // // Based on Multi-Toy Lovense Bot by lund0894 // // CB app settings // ######################### // NOTES START // ######################### /********** Variables **********/ var MAXSEP = 7; var separators = [ { label: "Heart", shortcut: ":hearta12" }, { label: "Pink Glitter", shortcut: ":pixelglitter" }, { label: "Flowers", shortcut: ":tinyflower2" }, { label: "Bow", shortcut: ":bluebow" }, { label: "Pixel Heart", shortcut: ":pixelheart" }, { label: "Pink Sparkle", shortcut: ":sparklpink" }, { label: "Custom [Enter Below]", shortcut: cb.settings.customSep } ]; cb.settings_choices = [ { name: "levelTitle", label: "Title Of Tip Menu Notice", type: "str", minLength: 1, maxLength: 1000, defaultValue: "Interactive Toy That Responds to Your Tips", required: true }, { name: "levelSubTitle", label: "Subtitle Of Tip Menu Notice", type: "str", minLength: 1, maxLength: 1000, defaultValue: "Durations and Intensity Levels", required: true }, { name: "level1Tip", label: "Level 1 Minimum Tokens", type: "int", minValue: 1, maxValue: 10000, defaultValue: 1, required: true }, { name: "level2Tip", label: "Level 2 Minimum Tokens", type: "int", minValue: 1, maxValue: 10000, defaultValue: 15, required: true }, { name: "level3Tip", label: "Level 3 Minimum Tokens", type: "int", minValue: 1, maxValue: 10000, defaultValue: 100, required: true }, { name: "level4Tip", label: "Level 4 Minimum Tokens", type: "int", minValue: 1, maxValue: 10000, defaultValue: 500, required: true }, { name: "level5Tip", label: "Level 5 Minimum Tokens", type: "int", minValue: 1, maxValue: 10000, defaultValue: 1000, required: true }, { name: "textColorFG", label: "Text Color (html code default Brown #925353)", type: "str", defaultValue: "#925353", required: true }, { name:'textColorBG', type:'str', label:'Background Color (html code default White #FFFFFF)', defaultValue: '#FFFFFF' },{ name: "toymenuTimer", label: "Interval (in mins) For Tip Menu", type: "int", minValue: 1, maxValue: 60, defaultValue: 3, required: true }, { name: "sepchar", type: "choice", choice1: "Vertical Bar", choice2: "Heart", choice3: "Pink Glitter", choice4: "Flowers", choice5: "Bow", choice6: "Pixel Heart", choice7: "Pink Sparkle", choice8: "Custom [Enter Below]", defaultValue: "Custom [Enter Below]", label: "Separator character" }, { name: "customSep", label: "Custom Separator (use :GIFNAME with colon)", type: "str", minLength: 0, maxLength: 60, required: false, defaultValue: ":fbzowie2" }, { name: "level1medred", label: "Number Icon Used For Level 1", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":level1medred", required: true }, { name: "level2medred", label: "Number Icon Used For Level 2", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":level2medred", required: true }, { name: "level3medred", label: "Number Icon Used For Level 3", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":level3medred", required: true }, { name: "level4medred", label: "Number Icon Used For Level 4", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":level4medred", required: true }, { name: "level5medred", label: "Number Icon Used For Level 5", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":level5medred", required: true }, { name: "level1LushVib", label: "Level 1 Intensity For Lush", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "Low" }, { name: "level1LushTime", label: "Level 1 Reaction Time Seconds For Lush", type: "int", minValue: 1, maxValue: 10000, defaultValue: 2, required: true }, { name: "level2LushVib", label: "Level 2 Intensity For Lush", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "Low" }, { name: "level2LushTime", label: "Level 2 Reaction Time Seconds For Lush", type: "int", minValue: 1, maxValue: 10000, defaultValue: 5, required: true }, { name: "level3LushVib", label: "Level 3 Intensity For Lush", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "Medium" }, { name: "level3LushTime", label: "Level 3 Reaction Time Seconds For Lush", type: "int", minValue: 1, maxValue: 10000, defaultValue: 15, required: true }, { name: "level4LushVib", label: "Level 4 Intensity For Lush", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "Medium" }, { name: "level4LushTime", label: "Level 4 Reaction Time Seconds For Lush", type: "int", minValue: 1, maxValue: 10000, defaultValue: 30, required: true }, { name: "level5LushVib", label: "Level 5 Intensity For Lush", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "High" }, { name: "level5LushTime", label: "Level 5 Reaction Time Seconds For Lush", type: "int", minValue: 1, maxValue: 10000, defaultValue: 120, required: true }, { name: "specialEnable", label: "Enable The Special Levels?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No" }, { name: "specialTitle", label: "Subtitle Of The Special Levels", type: "str", minLength: 1, maxLength: 10000, defaultValue: "Special Levels", required: true }, { name: "specialPauseQueueTip", label: "Special Pause The Queue Tokens", type: "int", minValue: 0, maxValue: 10000, defaultValue: 0, required: true }, { name: "specialPauseQueueSeconds", label: "Special Pause The Queue Seconds", type: "int", minValue: 0, maxValue: 1000, defaultValue: 0, required: true }, { name: "specialClearQueueTip", label: "Special Clear The Queue Tokens", type: "int", minValue: 0, maxValue: 10000, defaultValue: 0, required: true }, { name: "specialRandomLevelsTip", label: "Special Random Levels Tokens", type: "int", minValue: 0, maxValue: 10000, defaultValue: 69, required: true }, { name: "specialLowerRandomRange", label: "Special Lower Random Level Range", type: "int", minValue: 1, maxValue: 5, defaultValue: "1", required: true }, { name: "specialUpperRandomRange", label: "Special Upper Random Level Range", type: "int", minValue: 1, maxValue: 5, defaultValue: "4", required: true }, { name: "specialWaveTip", label: "Special Wave Tokens", type: "int", minValue: 0, maxValue: 10000, defaultValue: 75, required: true }, { name: "specialWaveLushVib", label: "Special Wave Intensity For Lush", type: "str", minLength: 1, maxLength: 10000, defaultValue: ":lvwave2", required: true }, { name: "specialWaveLushTime", label: "Special Wave Reaction Time Seconds For Lush", type: "int", minValue: 1, maxValue: 10000, defaultValue: 20, required: true }, { name: "specialPulseTip", label: "Special Pulse Tokens", type: "int", minValue: 0, maxValue: 10000, defaultValue: 99, required: true }, { name: "specialPulseLushVib", label: "Special Pulse Intensity For Lush", type: "str", minLength: 1, maxLength: 10000, defaultValue: ":lvpulse2", required: true }, { name: "specialPulseLushTime", label: "Special Pulse Reaction Time Seconds For Lush", type: "int", minValue: 1, maxValue: 10000, defaultValue: 20, required: true }, { name: "iconLush", label: "Icon Used For Lovense Lush", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":lushsm", required: true } ]; /***** App Commands *****/ var COMMAND = { SHOWLUSH : "showlush", /* Display the settings */ }; var roomHost = cb.room_slug; // ######################### // Function for Notice // ######################### function ChatNotice() { var msg = FormatNotice(); cb.sendNotice(msg,'',cb.settings['textColorBG'],cb.settings['textColorFG'],'bold'); cb.setTimeout(ChatNotice, (cb.settings.toymenuTimer * 60000)); } function FormatNotice() { var msg; var sep = "| "; for (var c = 0; c <= MAXSEP - 1; c++) cb.settings.sepchar == separators[c].label && (sep = separators[c].shortcut + " "); msg = " " + sep + " " + cb.settings.levelTitle + " " + sep + "\n " + sep + " " + cb.settings.levelSubTitle + " " + sep + "\n"; msg += cb.settings["level1medred"] + " Tip " + parseInt(cb.settings["level1Tip"]) + "-" + (parseInt(cb.settings["level2Tip"]) - 1) + " " + cb.settings.iconLush + " " + cb.settings["level1LushTime"] + " sec " + cb.settings["level1LushVib"] + "\n"; msg += cb.settings["level2medred"] + " Tip " + parseInt(cb.settings["level2Tip"]) + "-" + (parseInt(cb.settings["level3Tip"]) - 1) + " " + cb.settings.iconLush + " " + cb.settings["level2LushTime"] + " sec " + cb.settings["level2LushVib"] + "\n"; msg += cb.settings["level3medred"] + " Tip " + parseInt(cb.settings["level3Tip"]) + "-" + (parseInt(cb.settings["level4Tip"]) - 1) + " " + cb.settings.iconLush + " " + cb.settings["level3LushTime"] + " sec " + cb.settings["level3LushVib"] + "\n"; msg += cb.settings["level4medred"] + " Tip " + parseInt(cb.settings["level4Tip"]) + "-" + (parseInt(cb.settings["level5Tip"]) - 1) + " " + cb.settings.iconLush + " " + cb.settings["level4LushTime"] + " sec " + cb.settings["level4LushVib"] + "\n"; msg += cb.settings["level5medred"] + " Tip " + parseInt(cb.settings["level5Tip"]) + "+ " + cb.settings.iconLush + " " + cb.settings["level5LushTime"] + " sec " + cb.settings["level5LushVib"] + "\n"; if (cb.settings.specialEnable == "Yes") { msg += "\n " + sep + " " + cb.settings.specialTitle + " " + sep + "\n"; if (cb.settings.specialPauseQueueTip > 0) { msg += " Special :levelsppause Tip " + parseInt(cb.settings["specialPauseQueueTip"]) + " " + cb.settings.iconLush + " for " + parseInt(cb.settings["specialPauseQueueSeconds"]) + " seconds\n"; } if (cb.settings.specialClearQueueTip > 0) { msg += " Special :levelspcancel Tip " + parseInt(cb.settings["specialClearQueueTip"]) + " " + cb.settings.iconLush + " To Clear The Queue\n"; } if (cb.settings.specialRandomLevelsTip > 0) { msg += " Special :levelsprandom Tip " + parseInt(cb.settings["specialRandomLevelsTip"]) + " " + cb.settings.iconLush + " to randomly choose a level from " + parseInt(cb.settings["specialLowerRandomRange"]) + " - " + parseInt(cb.settings["specialUpperRandomRange"]) + "\n"; } if (cb.settings.specialWaveTip > 0) { msg += " Special :levelspwave Tip " + parseInt(cb.settings["specialWaveTip"]) + " " + cb.settings.iconLush + " for " + parseInt(cb.settings["specialWaveLushTime"]) + " seconds " + cb.settings["specialWaveLushVib"] + "\n"; } if (cb.settings.specialPulseTip > 0) { msg += " Special :levelsppulse Tip " + parseInt(cb.settings["specialPulseTip"]) + " " + cb.settings.iconLush + " for " + parseInt(cb.settings["specialPulseLushTime"]) + " seconds " + cb.settings["specialPulseLushVib"] +"\n"; } } return msg; } // ######################### // Handle CB Functions OnMessage // ######################### cb.onMessage(function (msg) { var regexCommandSplit = "^" + "/" + "(\\S+)(?:\\b\\s*)(.*)?"; var regexListSplit = /[,\s]+/; var reCmdSplit = new RegExp(regexCommandSplit); var cmdSplit = msg["m"].match(reCmdSplit); var cmd; var cmdval; var cmdValArray; if (cmdSplit) { cmd = cmdSplit[1]; cmdval = cmdSplit[2]; if (cmdval != null) { cmdval = cmdval.replace(/^\s+|\s+$/g,''); } if (cmdval != null) { cmdValArray = cmdval.split(regexListSplit); } else { cmdValArray = ""; } } // for convenience var m = msg.m; var u = msg.user; var isMod = msg.is_mod; var isRoomHost = (u == roomHost); var viewer, msgToViewer; var ONLY_MODS = "* Not enough privileges to use \"" + cmd + "\".\n* This command is restricted to moderators."; cb.log(cmd); // Start processing commands switch (cmd) { //Display Settings case COMMAND.SHOWLUSH: if (isMod || isRoomHost) { ChatNotice(); } else { cb.sendNotice(ONLY_MODS, u, "", COLOR.RED, "bold"); } break; } // End switch() if (m[0] == "/") msg['X-Spam'] = true; //suppress all command echoing in chat return msg; }); // ######################### // Init Function // ######################### function init() { cb.setTimeout(ChatNotice, (cb.settings.toymenuTimer * 60000)); cb.sendNotice("Thank you for using PersLushBot!", cb.room_slug, '', ''); } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.