kittycatxxx
Author: kittycat_xxx
Description Source Code Launch Bot Current Users

Short Description:

kitty

Full Description

cb.settings_choices = function () {

var output = [];
var ins_index = 0;

makeInstructions('[LOVENSE LEVELS] ----------- Set the below options to the same as in your Lovense control panel.');
makeLevel(1, 1, 14, 7, 'Low');
makeLevel(2, 15, 74, 7, 'Medium');
makeLevel(3, 75, 199, 15, 'High');
makeLevel(4, 200, 499, 20, 'Ultra High');
makeLevel(5, 500, 99999, 30, 'Ultra High');

// makeInstructions('[LOVENSE SPECIAL COMMANDS] ----------- Set the below options to the same as in your Lovense control panel. To disable an option, set the price to 0.');
// output.push({name: 'pause_price', label: '[PAUSE THE QUEUE] --- Price', type: 'int', minValue: 0, defaultValue: 0});
// output.push({name: 'pause_time', label: 'Time', type: 'int', minValue: 1, defaultValue: 10});

makeInstructions('[kathylovexxx:] ----------- This messages will appear when a user triggers the Lovense with a tip. {pwr} will be replaced with the power, {sec} with the duration, and {user} with the user who tipped.');
output.push({name: 'response', label: 'Response text', type: 'str', defaultValue: 'Vibrating at {pwr} power for {sec} seconds! (from {user})', required: false});
output.push({name: 'tColor', label: 'Text foreground color', type: 'str', defaultValue: '#333399', required: false});
output.push({name: 'tBg', label: 'Text background color', type: 'str', defaultValue: '#FFFFFF', required: false});

makeInstructions('[ROTATING NOTICES] ----------- These messages will appear periodically to remind viewers of the lovense settings.');
output.push({name: 'header', label: 'Header', type: 'str', defaultValue: '---Lovense Toys respond to tips. Models can create their own levels. Here are my levels:'});
output.push({name: 'freq', label: 'Frequency in seconds (0 = off)', type: 'int', defaultValue: 120});
output.push({name: 'rColor', label: 'Text foreground color', type: 'str', defaultValue: '#333399', required: false});
output.push({name: 'rBg', label: 'Text background color', type: 'str', defaultValue: '#FFFFFF', required: false});

function makeLevel(num, lo, hi, sec, pow) {
output.push({name: 'use' + (num - 1), label: '[LEVEL ' + num + '] --- Enabled', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'});
output.push({name: 'min' + (num - 1), label: 'Minimum Tokens', type: 'int', defaultValue: lo, minValue: 1});
output.push({name: 'max' + (num - 1), label: 'Maximum Tokens', type: 'int', defaultValue: hi, minValue: 1});
output.push({name: 'sec' + (num - 1), label: 'Time', type: 'int', defaultValue: sec, minValue: 1});
output.push({name: 'pwr' + (num - 1), label: 'Power', type: 'choice', choice1: 'Low', choice2: 'Medium', choice3: 'High', choice4: 'Ultra High', defaultValue: pow});
output.push({name: 'txt' + (num - 1), label: 'Text', type: 'str', required: false})
}

function makeInstructions(text) {
output.push({name: 'instructions_' + ins_index, label: text, type: 'choice', choice1: '', required: false});
ins_index++;
}

return output;
}();

var freq = $('freq');
var rBg = $('rBg');
var rColor = $('rColor');
var tBg = $('tBg');
var tColor = $('tColor');
var noticeResponse = $('response');
var specMenu = function () {
var obj = {};
return obj;
}();
var tipMenu = function () {
var arr = [];
for (var i = 0; i < 5; i++) {
if ($('use' + i) === 'Yes') {
var obj = {
min: $('min' + i),
max: $('max' + i),
sec: $('sec' + i),
pwr: $('pwr' + i, true),
txt: $('txt' + i)
};
arr.push(obj);
}
}
return arr;
}();
var rotatorText = function () {
var output = $('header') || '---Lovense Toys respond to tips. Models can create their own levels. Here are my levels:';
for (var i = 0; i < tipMenu.length; i++) {
var item = tipMenu[i];
output += '\n[' + item.min + ' to ' + item.max + ' tokens] = ';
if (item.txt && item.txt.trim().length > 0) {
output += item.txt;
} else {
output += item.sec + ' seconds (' + item.pwr + ' vibrations)';
}
}
return output;
}();

/**********
------------ TIPS ------------
**********/

cb.onTip(function (tip) {
react(tip);
});

function react(tip) {
cb.log('Reacting to ' + tip.amount + ' (' + tipMenu.length + ')');
for (var i = 0; i < tipMenu.length; i++) {
var item = tipMenu[i];
if (tip.amount >= item.min && tip.amount <= item.max) {
var notice = noticeResponse.replace(/\{pwr\}/g, item.pwr).replace(/\{sec\}/g, item.sec).replace(/\{user}/g, tip.from_user);
say(notice, '', tColor, tBg);
break;
}
}

}

/**********
------------ COMMUNICATION ------------
**********/

//send a message to the user
function say(text, user, color, bg) {
cb.sendNotice(newLines(text), user, bg, color, 'bold', '');
}

/**********
------------ MISC ------------
**********/

function $ (str, uc) {
var setting = cb.settings[str];
if (typeof setting === 'string') {
if (uc) setting = setting.toUpperCase();
setting = setting.trim();
if (setting.length > 0) return setting;
} else {
if (setting) return setting;
}
}

function newLines(input) {
return '\u25A0 ' + input.replace(new RegExp('\n', 'g'), '\n\u25A0 ');
}

/**********
------------ EXECUTE ------------
**********/

if (freq && freq > 0) {
(function rotate() {
say(rotatorText, '', rColor, rBg);
cb.setTimeout(rotate, freq * 1000);
})();
}

© Copyright Freesexcam 2011- 2024. All Rights Reserved.