Bots Home
|
Create an App
Pornlesque Lovense
Author:
pornlesque1
Description
Source Code
Launch Bot
Current Users
Created by:
Pornlesque1
/* Name: Pornlesque Lovense Bot Author: Pornlesque Version: 0.1 Created: 2020.02.25 Last Modified: 2020.02.25 For support enquiries, or for custom work, contact pornlesque@gmail.com The moral right of "Pornlesque" to be identified as the author of this work has been asserted. The above line was "borrowed" from mx2k6. Version History ====================================================================== 0.1 The beginning. Basic functionality */ var Application = { Name: "Pornlesque Lovense", // The name of the application Version: 0.1, // The current version of the application Author: "Pornlesque", // The author of this version. Don't change this unless you modified something! OriginalAuthor: "Pornlesque", // The original author, I.E. me. If you change this, you're not very nice. It's not like it gets displayed anywhere Debug: true, // Whether the application is in debug (verbose) mode. Don't change this in production, or much will go wrong StartupTime: null, // The time the application started up. Don't set this, it gets set at runtime }; // Global function definations // Classes class Toy { constructor(toyName) { this._name = toyName, this.levels = []; this.enabled = true; } get name() { return this._name; } addLevel(minTokens, runTime, pwr, msg) { // if (!minTokens) {throw('minTokensZero')}; var lvl = new Level(minTokens, runTime, pwr, msg); this.levels.push(lvl); lvl.id = this.levels.length; this.sortLevels(); } sortLevels() { if (this.levels.length > 1) { this.levels = this.levels.sort((a, b) => a.minTokens - b.minTokens); } } } class Level { constructor(minCount, runFor, pwr, msg) { this._id = Number, this.minTokens = minCount, this.runTime = runFor, this.power = pwr, this.enabled = true; this.message = msg; } get id() { return this._id; } set id(num) { this._id = num; } } // Toy information var toys = [] var lush = new Toy("Lush"); // addLevel(minTokens, runTime, pwr, msg) lush.addLevel(1, 3, "Low", "Thank-you!"); lush.addLevel(5, 6, "Low", "Thank-you!!"); lush.addLevel(25, 12, "Medium", "Woot! Thank-you!"); lush.addLevel(100, 18, "Medium", "Well ... Isn't that nice!"); lush.addLevel(500, 24, "High", "Ohh Myyy!! That is amazing!!!"); toys.push(lush); // Set up Launch Bot tab cb.settings_choices = []; toys.forEach(function (toy, i) { var levelCount = toy.levels.length; cb.settings_choices.push({ name: toy.name, label: toy.name, type: 'str', }); toy.levels.forEach(function (lvl, i){ // Enable Level cb.settings_choices.push({ name: 'lvl' + lvl.id.toString(), label: 'Enable ' + toy.name + ' level ' + lvl.id, type: 'choice', choice1: true, choice2: false, defaultValue: lvl.enabled }); // Min Tokens cb.settings_choices.push({ name: 'min' + lvl.id.toString(), label: 'Minimum Tokens', type: 'int', defaultValue: lvl.minTokens, minValue: 0 }); // Time cb.settings_choices.push({ name: 'sec' + lvl.id.toString(), label: 'Time', type: 'int', defaultValue: lvl.runTime, minValue: 1 }); // Power cb.settings_choices.push({ name: 'pwr' + lvl.id.toString(), label: 'Power', type: 'choice', choice1: 'Low', choice2: 'Medium', choice3: 'High', choice4: 'Ultra High', defaultValue: lvl.power }); // Text cb.settings_choices.push({ name: 'txt' + lvl.id.toString(), label: 'Thank you message', type: 'str', required: false, defaultValue: lvl.message }); }); }); /*==============================< INTERACTION > ===============================*/ // cb functions cb.onTip(function(tip) { cb.sendNotice("test") // cb.chatNotice(tip) });
© Copyright Chaturbate 2011- 2025. All Rights Reserved.