Bots Home
|
Create an App
lush ,
Author:
larissalov
Description
Source Code
Launch Bot
Current Users
Created by:
Larissalov
// ######################### // 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 } ]; var LEVELS = 5; var Graphics = [ { label: "Low", emote: ":p67_lo_low" }, { label: "Medium", emote: ":p67_lo_med" }, { label: "High", emote: ":p67_lo_high" }, { label: "Ultra High", emote: ":p67_lo_ultrahigh" }, { label: "Not Used", emote: "" }, { label: "Pause", emote: ":p67_pause" }, { label: "Cancel", emote: ":p67_cancel" }, { label: "Random", emote: ":p67_random" }, { label: "Pulse", emote: ":p67_lo_pulse" }, { label: "Wave", emote: ":p67_lo_wave" }, { label: "Fireworks", emote: ":p67_lo_fire" }, { label: "Earthquake", emote: ":p67_lo_quake" } ]; // CB Settings cb.settings_choices = [ { name: "levelTitle", label: "Title For The Notice", type: "str", minLength: 1, maxLength: 1000, defaultValue: "Interactive Toy That Responds to Your Tips", required: true }, { name: "levelSubTitle", label: "Subtitle For The 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: "level6Tip", label: "Level 6 Minimum Tokens (set to 0 if not used)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 0, required: false }, { name: "level7Tip", label: "Level 7 Minimum Tokens (set to 0 if not used)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 0, required: false }, { name: "level8Tip", label: "Level 8 Minimum Tokens (set to 0 if not used)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 0, required: false }, { name: "textColorFG", label: "Text Color (html code default Dark Pink #cf318c)", type: "str", defaultValue: "#cf318c", 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: 6, 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: ":p67" }, { name: "level1Icon", label: "Number Icon Used For Level 1", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":p67_lvl1", required: true }, { name: "level2Icon", label: "Number Icon Used For Level 2", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":p67_lvl2", required: true }, { name: "level3Icon", label: "Number Icon Used For Level 3", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":p67_lvl3", required: true }, { name: "level4Icon", label: "Number Icon Used For Level 4", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":p67_lvl4", required: true }, { name: "level5Icon", label: "Number Icon Used For Level 5", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":p67_lvl5", required: true }, { name: "level6Icon", label: "Number Icon Used For Level 6", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":p67_lvl6", required: true }, { name: "level7Icon", label: "Number Icon Used For Level 7", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":p67_lvl7", required: true }, { name: "level8Icon", label: "Number Icon Used For Level 8", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":p67_lvl8", required: true }, { name: "level1Vib", label: "Level 1 Intensity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "Low" }, { name: "level1Time", label: "Level 1 Reaction Time (in seconds)", type: "int", minValue: 1, maxValue: 10000, defaultValue: 2, required: true }, { name: "level2Vib", label: "Level 2 Intensity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "Low" }, { name: "level2Time", label: "Level 2 Reaction Time (in seconds)", type: "int", minValue: 1, maxValue: 10000, defaultValue: 5, required: true }, { name: "level3Vib", label: "Level 3 Intensity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "Medium" }, { name: "level3Time", label: "Level 3 Reaction Time (in seconds)", type: "int", minValue: 1, maxValue: 10000, defaultValue: 15, required: true }, { name: "level4Vib", label: "Level 4 Intensity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "Medium" }, { name: "level4Time", label: "Level 4 Reaction Time (in seconds)", type: "int", minValue: 1, maxValue: 10000, defaultValue: 30, required: true }, { name: "level5Vib", label: "Level 5 Intensity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", defaultValue: "High" }, { name: "level5Time", label: "Level 5 Reaction Time (in seconds)", type: "int", minValue: 1, maxValue: 10000, defaultValue: 120, required: true }, { name: "level6Vib", label: "Level 6 Intensity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", choice5: "Not Used", defaultValue: "Not Used" }, { name: "level6Time", label: "Level 6 Reaction Time (in seconds)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 0, required: false }, { name: "level7Vib", label: "Level 7 Intensity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", choice5: "Not Used", defaultValue: "Not Used" }, { name: "level7Time", label: "Level 7 Reaction Time (in seconds)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 0, required: false }, { name: "level8Vib", label: "Level 8 Intensity", type: "choice", choice1: "Low", choice2: "Medium", choice3: "High", choice4: "Ultra High", choice5: "Not Used", defaultValue: "Not Used" }, { name: "level8Time", label: "Level 8 Reaction Time (in seconds)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 0, required: false }, { name: "specialEnable", label: "Enable The Special Levels?", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "No" }, { name: "specialTitle", label: "Title For The Special Levels", type: "str", minLength: 1, maxLength: 10000, defaultValue: "Special Levels", required: true }, { name: "specialPauseQueueTip", label: "Pause The Queue Tokens (set to 0 if not used)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 0, required: true }, { name: "specialPauseQueueSeconds", label: "Pause The Queue Time (in seconds)", type: "int", minValue: 0, maxValue: 1000, defaultValue: 0, required: true }, { name: "specialClearQueueTip", label: "Clear The Queue Tokens (set to 0 if not used)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 0, required: true }, { name: "specialRandomLevelsTip", label: "Random Levels Tokens (set to 0 if not used)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 69, required: true }, { name: "specialLowerRandomRange", label: "Lower Random Level Range", type: "int", minValue: 1, maxValue: 5, defaultValue: "1", required: true }, { name: "specialUpperRandomRange", label: "Upper Random Level Range", type: "int", minValue: 1, maxValue: 5, defaultValue: "4", required: true }, { name: "specialPulseVib", label: "Pulse Pattern Icon", type: "str", minLength: 1, maxLength: 10000, defaultValue: ":p67_lo_pulse", required: true }, { name: "specialPulseTip", label: "Pulse Pattern Tokens (set to 0 if not used)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 99, required: true }, { name: "specialPulseTime", label: "Pulse Pattern Reaction Time (in seconds)", type: "int", minValue: 1, maxValue: 10000, defaultValue: 20, required: true }, { name: "specialWaveVib", label: "Wave Pattern Icon", type: "str", minLength: 1, maxLength: 10000, defaultValue: ":p67_lo_wave", required: true }, { name: "specialWaveTip", label: "Wave Pattern Tokens (set to 0 if not used)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 75, required: true }, { name: "specialWaveTime", label: "Wave Pattern Reaction Time (in seconds)", type: "int", minValue: 1, maxValue: 10000, defaultValue: 20, required: true }, { name: "specialFireworksVib", label: "Fireworks Pattern Icon", type: "str", minLength: 1, maxLength: 10000, defaultValue: ":p67_lo_fire", required: true }, { name: "specialFireworksTip", label: "Fireworks Pattern Tokens (set to 0 if not used)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 0, required: true }, { name: "specialFireworksTime", label: "Fireworks Pattern Reaction Time (in seconds)", type: "int", minValue: 1, maxValue: 10000, defaultValue: 20, required: true }, { name: "specialEarthquakeVib", label: "Earthquake Pattern Icon", type: "str", minLength: 1, maxLength: 10000, defaultValue: ":p67_lo_quake", required: true }, { name: "specialEarthquakeTip", label: "Earthquake Pattern Tokens (set to 0 if not used)", type: "int", minValue: 0, maxValue: 10000, defaultValue: 0, required: true }, { name: "specialEarthquakeTime", label: "Earthquake Pattern Reaction Time (in seconds)", type: "int", minValue: 1, maxValue: 10000, defaultValue: 20, required: true }, { name: "iconLush", label: "Icon Used For The Lovense Lush", type: "str", minLength: 1, maxLength: 1000, defaultValue: ":p67_lush", required: true } ]; /***** App Commands *****/ var COMMAND = { SHOWLUSH : "showlush", /* Display the settings */ }; var roomHost = cb.room_slug; // ######################### // Function for Notice // ######################### function ChatNotice() { cb.log("ChatNotice"); var notice = FormatNotice(); cb.sendNotice(notice,'',cb.settings['textColorBG'],cb.settings['textColorFG'],'bold'); cb.setTimeout(ChatNotice, cb.settings.toymenuTimer * 60000); } function FormatNotice() { cb.log("FormatNotice"); var msg; var sep = "| "; var lvl1, lvl2, lvl3, lvl4, lvl5, lvl6, lvl7, lvl8; for (var c = 0; c <= MAXSEP - 1; c++) cb.settings.sepchar == separators[c].label && (sep = separators[c].shortcut + " "); for (var c = 0; c <= LEVELS - 1; c++) cb.settings.level1Vib == Graphics[c].label && (lvl1 = Graphics[c].emote + " "); for (var c = 0; c <= LEVELS - 1; c++) cb.settings.level2Vib == Graphics[c].label && (lvl2 = Graphics[c].emote + " "); for (var c = 0; c <= LEVELS - 1; c++) cb.settings.level3Vib == Graphics[c].label && (lvl3 = Graphics[c].emote + " "); for (var c = 0; c <= LEVELS - 1; c++) cb.settings.level4Vib == Graphics[c].label && (lvl4 = Graphics[c].emote + " "); for (var c = 0; c <= LEVELS - 1; c++) cb.settings.level5Vib == Graphics[c].label && (lvl5 = Graphics[c].emote + " "); for (var c = 0; c <= LEVELS - 1; c++) cb.settings.level6Vib == Graphics[c].label && (lvl6 = Graphics[c].emote + " "); for (var c = 0; c <= LEVELS - 1; c++) cb.settings.level7Vib == Graphics[c].label && (lvl7 = Graphics[c].emote + " "); for (var c = 0; c <= LEVELS - 1; c++) cb.settings.level8Vib == Graphics[c].label && (lvl8 = Graphics[c].emote + " "); msg = " " + sep + " " + cb.settings.levelTitle + " " + sep + "\n " + sep + " " + cb.settings.levelSubTitle + " " + sep + "\n"; msg += cb.settings["level1Icon"] + " Tip " + parseInt(cb.settings["level1Tip"]) + "-" + (parseInt(cb.settings["level2Tip"]) - 1) + " " + cb.settings.iconLush + " " + cb.settings["level1Time"] + " sec " + lvl1 + "\n"; msg += cb.settings["level2Icon"] + " Tip " + parseInt(cb.settings["level2Tip"]) + "-" + (parseInt(cb.settings["level3Tip"]) - 1) + " " + cb.settings.iconLush + " " + cb.settings["level2Time"] + " sec " + lvl2 + "\n"; msg += cb.settings["level3Icon"] + " Tip " + parseInt(cb.settings["level3Tip"]) + "-" + (parseInt(cb.settings["level4Tip"]) - 1) + " " + cb.settings.iconLush + " " + cb.settings["level3Time"] + " sec " + lvl3 + "\n"; msg += cb.settings["level4Icon"] + " Tip " + parseInt(cb.settings["level4Tip"]) + "-" + (parseInt(cb.settings["level5Tip"]) - 1) + " " + cb.settings.iconLush + " " + cb.settings["level4Time"] + " sec " + lvl4 + "\n"; msg += cb.settings["level5Icon"] + " Tip " + parseInt(cb.settings["level5Tip"]) if (parseInt(cb.settings["level6Tip"]) != 0) { msg += "-" + (parseInt(cb.settings["level6Tip"]) - 1) + " " } else { msg += "+ " } msg += cb.settings.iconLush + " " + cb.settings["level5Time"] + " sec " + lvl5 + "\n"; if (parseInt(cb.settings["level6Tip"]) != 0) { msg += cb.settings["level6Icon"] + " Tip " + parseInt(cb.settings["level6Tip"]) if (parseInt(cb.settings["level7Tip"]) != 0) { msg += "-" + (parseInt(cb.settings["level7Tip"]) - 1) + " " } else { msg += "+ " } msg += cb.settings.iconLush + " " + cb.settings["level6Time"] + " sec " + lvl6 + "\n"; } if (parseInt(cb.settings["level7Tip"]) != 0) { msg += cb.settings["level7Icon"] + " Tip " + parseInt(cb.settings["level7Tip"]) if (parseInt(cb.settings["level8Tip"]) != 0) { msg += "-" + (parseInt(cb.settings["level8Tip"]) - 1) + " " } else { msg += "+ " } msg += cb.settings.iconLush + " " + cb.settings["level7Time"] + " sec " + lvl7 + "\n"; } if (parseInt(cb.settings["level8Tip"]) != 0) { msg += cb.settings["level8Icon"] + " Tip " + parseInt(cb.settings["level8Tip"]) + "+ " + cb.settings.iconLush + " " + cb.settings["level8Time"] + " sec " + lvl8 + "\n"; } if (cb.settings.specialEnable == "Yes") { msg += "\n " + sep + " " + cb.settings.specialTitle + " " + sep + "\n"; if (cb.settings.specialPauseQueueTip > 0) { msg += " Special :p67_pause Tip " + parseInt(cb.settings["specialPauseQueueTip"]) + " " + cb.settings.iconLush + " To Pause The Queue For " + parseInt(cb.settings["specialPauseQueueSeconds"]) + " seconds\n"; } if (cb.settings.specialClearQueueTip > 0) { msg += " Special :p67_cancel Tip " + parseInt(cb.settings["specialClearQueueTip"]) + " " + cb.settings.iconLush + " To Clear The Queue\n"; } if (cb.settings.specialRandomLevelsTip > 0) { msg += " Special :p67_random 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.specialPulseTip > 0) { msg += " Special " + cb.settings["specialPulseVib"] + " Tip " + parseInt(cb.settings["specialPulseTip"]) + " " + cb.settings.iconLush + " for " + parseInt(cb.settings["specialPulseTime"]) + " seconds " +"\n"; } if (cb.settings.specialWaveTip > 0) { msg += " Special " + cb.settings["specialWaveVib"] + " Tip " + parseInt(cb.settings["specialWaveTip"]) + " " + cb.settings.iconLush + " for " + parseInt(cb.settings["specialWaveTime"]) + " seconds " + "\n"; } if (cb.settings.specialFireworksTip > 0) { msg += " Special " + cb.settings["specialFireworksVib"] + " Tip " + parseInt(cb.settings["specialFireworksTip"]) + " " + cb.settings.iconLush + " for " + parseInt(cb.settings["specialFireworksTime"]) + " seconds " + "\n"; } if (cb.settings.specialEarthquakeTip > 0) { msg += " Special " + cb.settings["specialEarthquakeVib"] + " Tip " + parseInt(cb.settings["specialEarthquakeTip"]) + " " + cb.settings.iconLush + " for " + parseInt(cb.settings["specialEarthquakeTime"]) + " seconds " + "\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.log("Init"); cb.sendNotice("Thank you for using PersLushBot!", cb.room_slug, '', ''); var notice = FormatNotice(); cb.sendNotice(notice,'',cb.settings['textColorBG'],cb.settings['textColorFG'],'bold'); cb.setTimeout(ChatNotice, cb.settings.toymenuTimer * 60000); } init();
© Copyright Freesexcam 2011- 2024. All Rights Reserved.