Apps Home
|
Create an App
Dalynnda sybian
Author:
ayot3ch
Description
Source Code
Launch App
Current Users
Created by:
Ayot3ch
"use strict"; var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } if (cb == null) { var cb = { changeRoomSubject: function changeRoomSubject(new_subject) {}, drawPanel: function drawPanel() {}, log: function log(message) {}, onDrawPanel: function onDrawPanel(func) {}, onEnter: function onEnter(func) {}, onLeave: function onLeave(func) {}, onMessage: function onMessage(func) {}, onShowStatus: function onShowStatus(func) {}, onTip: function onTip(func) {}, room_slug: "", sendNotice: function sendNotice(message, to_user, background, foreground, weight, to_group) { console.log(message); }, setTimeout: function setTimeout(func, msec) {}, settings_choices: [], settings: {}, tipOptions: function tipOptions(func) {}, limitCam_start: function limitCam_start(message, allowed_users) {}, limitCam_stop: function limitCam_stop() {}, limitCam_addUsers: function limitCam_addUsers(allowed_users) {}, limitCam_removeUsers: function limitCam_removeUsers(removed_users) {}, limitCam_removeAllUsers: function limitCam_removeAllUsers() {}, limitCam_userHasAccess: function limitCam_userHasAccess(user) {}, limitCam_allUsersWithAccess: function limitCam_allUsersWithAccess() {}, limitCam_isRunning: function limitCam_isRunning() {} }; } var App = function App(name, version, type) { var _this = this; _classCallCheck(this, App); this.name = name; this.version = version; this.type = type; this.setCbChoices = (function () { var that = _this; cb.settings_choices = [{ name: "header", type: "choice", choice1: "", choice2: "", label: "***** Settings for \"" + that.name + "\" *****", required: false }, { name: "enableNoticesOnStartup", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", label: "Enable torture notices as soon as the app starts?\nIf \"No\" then type \"/tnotices on\" when ready to start." }, { name: "invalidCmdWarn", type: "choice", choice1: "Yes", choice2: "No", defaultValue: "Yes", label: "Warn when an invalid command is entered?" }, { name: "roomTitle", type: "str", minLength: 1, maxLength: 128, defaultValue: "Torture!", label: "Room title. (Prices are automatically added.)" }, { name: "tortDevice", type: "choice", choice1: "Doxy (10 speeds)", choice2: "Original Hitachi (2 speeds)", choice3: "Hitachi Magic Wand (7 speeds)", choice4: "Sybian with rotation", choice5: "Other", label: "Device that will be used in this session." }, { name: "numberOfSpeeds", type: "int", minValue: 1, label: "Number of speeds that the device has. (Use this only if you chose \"Other\" above.)", required: false }, { name: "separator2", type: "choice", choice1: "", choice2: "", label: "***** Tip options settings ***** Note: Please do NOT use repeated prices. Each option must have a different price.", required: false }, { name: "tortStart", type: "int", minValue: 1, label: "Tokens to start torture." }, { name: "tortStop", type: "int", minValue: 1, label: "Tokens to stop torture." }, { name: "rotStart", type: "int", minValue: 1, label: "Tokens to start rotation. (Only applies to Sybian.)", required: false }, { name: "rotStop", type: "int", minValue: 1, label: "Tokens to stop rotation. (Only applies to Sybian.)", required: false }, { name: "powerUp", type: "int", minValue: 1, label: "Tokens to increase vibration speed." }, { name: "powerDown", type: "int", minValue: 1, label: "Tokens to decrease vibration speed." }, { name: "rotUp", type: "int", minValue: 1, label: "Tokens to increase rotation speed. (Only applies to Sybian.)", required: false }, { name: "rotDown", type: "int", minValue: 1, label: "Tokens to decrease rotation speed. (Only applies to Sybian.)", required: false }, { name: "separator3", type: "choice", choice1: "", choice2: "", label: "***** The settings below are optional. Leave them blank if you're not going to use them.", required: false }, { name: "muteAmount", type: "int", label: "Tokens to mute the broadcaster.", required: false }, { name: "unmuteAmount", type: "int", label: "Tokens to unmute the broadcaster.", required: false }, { name: "instaAmount", type: "int", label: "Tokens to toggle instacum.", required: false }, { name: "denialAmount", type: "int", label: "Tokens to toggle cum denial.", required: false }]; })(); this.callCbHandlers = (function () { var that = _this; cb.log("calling onmsg handler"); cb.onMessage(function (msg) { MsgHandler.onMessage(msg); }); cb.log("calling ontip handler"); cb.onTip(function (tip) { TipHandler.onTip(tip); }); })(); }; var TortMain = (function (_App) { _inherits(TortMain, _App); function TortMain() { _classCallCheck(this, TortMain); _get(Object.getPrototypeOf(TortMain.prototype), "constructor", this).call(this, "Dalynnda's Torture", "1.0", "app"); this.version_extra = "devpreview"; // internal: script version - extra info (e.g. alpha1, beta1, rc1). set to null if stable this.version_type = "devpreview"; // internal: script version type (stable, alpha, beta, dev preview, experimental, release candidate) this.revision = null; // internal: script revision (set to null if none). Don't use with experimental versions this.rc_version = null; // internal: script RC version number. Use only with release candidates this.author = "dalynnda__"; // developer this.build_date = "11 August 2015"; // script build date // colours this.Color = { dark_green: "#002a15", med_green: "#0ad80a", lite_green: "#a2ffa2", dark_red: "#4a0000", med_red: "#d80a00", lite_red: "#ff0a11", dark_blue: "#001a70", med_blue: "#000adc", lite_blue: "#1144ff", holo_blue: "#33b5e5", mtrl_teal: "#009688", mtrl_bluegray: "#607d8b", pink_lace: "#ffddf4", white: "#fff", black: "#000", // misc syntax: "#995b00", notice_grn: "#284", notice_prp: "#6900cc", notice_red: "#e84a10", hilite: "#eee5ff", hvtext: "#d80a00", hvback: "#ffffbf", info: "#144d8c", error: "#b94a48" }; this.Command = { tnotices: "/tnotices", topt: "/topt" }; this.DevCommand = { devdump: "/devdump" }; this.Flag = { dev: false, thl: false }; this.List = { devList: [] }; this.TCost = { start: 0, stop: 0, powerup: 0, powerdown: 0, // sybian only rotstart: 0, rotstop: 0, rotup: 0, rotdown: 0, // end sybian mute: 0, unmute: 0, instacum: 0, denial: 0 }; this.Misc = { start_time: new Date(), dash_line: new Array(37).join("\u2014"), room_host: cb.room_slug, tOpt: "Type \"" + this.Command.topt + "\" for tip options.", tip_total: 0, min_speed: 1, max_speed: 0, def_speed: 1, min_rot_spd: 1, max_rot_spd: 10, def_rot_spd: 1, highest_tipper: null, highest_tipper_amt: 0, latest_tipper: null, latest_tipper_amt: 0 }; this.TFlag = { active: false, denial: false, insta: false, mute: false, notices: false, hitachi: false, hmax: false, hmin: false, dmax: false, dmin: false, sybian: false, rotactive: false, rmax: false, rmin: false }; } /***** TortureApp variables *****/ _createClass(TortMain, [{ key: "main", value: function main() { cb.sendNotice(dashLine + "\n* \"" + this.name + "\" by Dalynnda", broadcaster, "", color.notice_grn, "bold"); if (this.revision != null) { cb.sendNotice("* Version: " + this.version + " (" + this.revision + ")", broadcaster, "", color.notice_grn, "bold"); } else if (this.version_type == "release_candidate") { cb.sendNotice("* Version: " + this.version + "-" + this.version_extra + " (" + this.rc_version + ")", broadcaster, "", color.notice_grn, "bold"); } else if (this.version_type == "alpha" || this.version_type == "beta" || this.version_type == "devpreview" || this.version_type == "experimental") { cb.sendNotice("* Version: " + this.version + "-" + this.version_extra, broadcaster, "", color.notice_grn, "bold"); } else { cb.sendNotice("* Version: " + this.version, broadcaster, "", color.notice_grn, "bold"); } cb.sendNotice("* Build date: " + this.build_date + "\n" + dashLine, broadcaster, "", color.notice_grn, "bold"); if (this.revision != null) { cb.sendNotice("\"" + this.name + "\" version " + this.version + " (" + this.revision + ") (" + this.build_date + ") has started.", "", "", color.info, "bold"); } else if (this.version_type == "release_candidate") { cb.sendNotice("\"" + this.name + "\" version " + this.version + "-" + this.version_extra + " (" + this.rc_version + ") (" + this.build_date + ") has started.", "", "", color.info, "bold"); } else if (this.version_type == "alpha" || this.version_type == "beta" || this.version_type == "devpreview" || this.version_type == "experimental") { cb.sendNotice("\"" + this.name + "\" version " + this.version + "-" + this.version_extra + " (" + this.build_date + ") has started.", "", "", color.info, "bold"); } else { cb.sendNotice("\"" + this.name + "\" version " + this.version + " (" + this.build_date + ") has started.", "", "", color.info, "bold"); } cb.sendNotice("Type \"/topt\" for torture tip options.\nType \"/topt all\" to send these options to all viewers if you're a mod or the broadcaster.", "", "", color.mtrl_teal, "bold"); if (cb.settings.enableNoticesOnStartup == "Yes") { this.TFlag.notices = true; } else { this.TFlag.notices = false; cb.sendNotice(dashLine + "\n* " + this.name + " has started with Action Notices DISABLED.\n* Type \"/tnotices on\" to enable them before starting your session.\n" + dashLine, broadcaster, color.hvback, color.hvtext, "bold"); } this.setDevice(); this.setRoomTitle(); } }, { key: "dump", value: function dump(user) { var date = new Date(); var dump_info = dashLine + "\n* Dev dump"; dump_info += "\n\n* App info:"; dump_info += "\n* Name: " + this.name + " / Type: " + this.type + " / Version number: " + this.version + " / Version type: " + this.version_type + " / Version extra info: " + this.version_extra; dump_info += "\n* Time started: " + this.Misc.start_time + "\n* Time now: " + date; dump_info += "\n* Total tipped: " + this.Misc.tip_total; dump_info += "\n* Flags: (TortureApp.TFlag.active: " + this.TFlag.active + ") / (TortureApp.TFlag.denial: " + this.TFlag.denial + ")" + " / (TortureApp.TFlag.insta: " + this.TFlag.insta + ") / (TortureApp.TFlag.notices: " + this.TFlag.notices + ") / (TortureApp.TFlag.sybian: " + this.TFlag.sybian + ") / (TortureApp.Flag.dev: " + this.Flag.dev + ")" + "\n" + dashLine; return cb.sendNotice(dump_info, user, "", color.mtrl_bluegray, "bold"); } }, { key: "sendOptions", value: function sendOptions(user) { var tipOptStr = dashLine + "\n***** Torture Tip Options *****"; tipOptStr += "\n* Vib Start: " + cb.settings.tortStart; tipOptStr += "\n* Vib Stop: " + cb.settings.tortStop; tipOptStr += "\n* Vib Faster: " + cb.settings.powerUp; tipOptStr += "\n* Vib Slower: " + cb.settings.powerDown; if (tflag.sybian == true) { tipOptStr += "\n* Rotation Start: " + cb.settings.rotStart; tipOptStr += "\n* Rotation Stop: " + cb.settings.rotStop; tipOptStr += "\n* Rotation Faster: " + cb.settings.rotUp; tipOptStr += "\n* Rotation Slower: " + cb.settings.rotDown; } if (cb.settings.muteAmount != null) tipOptStr += "\n* Mute: " + cb.settings.muteAmount; if (cb.settings.unmuteAmount != null) tipOptStr += "\n* Unmute: " + cb.settings.unmuteAmount; if (cb.settings.instaAmount != null) tipOptStr += "\n* Instacum toggle: " + cb.settings.instaAmount; if (cb.settings.denialAmount != null) tipOptStr += "\n* Cum denial toggle: " + cb.settings.denialAmount; tipOptStr += "\n" + dashLine; if (user == "all") return cb.sendNotice(tipOptStr, "", "", color.notice_prp, "bold");else return cb.sendNotice(tipOptStr, user, "", color.notice_prp, "bold"); } }, { key: "setCost", value: function setCost() { // This function must be called only once, which will be during app startup cost.start = cb.settings.tortStart; cost.stop = cb.settings.tortStop; cost.powerup = cb.settings.powerUp; cost.powerdown = cb.settings.powerDown; if (tflag.sybian == true) { cost.rotstart = cb.settings.rotStart; cost.rotstop = cb.settings.rotStop; cost.rotup = cb.settings.rotUp; cost.rotdown = cb.settings.rotDown; } cost.mute = cb.settings.muteAmount; cost.unmute = cb.settings.unmuteAmount; cost.instacum = cb.settings.instaAmount; cost.denial = cb.settings.denialAmount; } }, { key: "setDevice", value: function setDevice() { var isDoxy = cb.settings.tortDevice == "Doxy (10 speeds)"; var isOgHitachi = cb.settings.tortDevice == "Original Hitachi (2 speeds)"; var isHitachiMw = cb.settings.tortDevice == "Hitachi Magic Wand (7 speeds)"; var isSybian = cb.settings.tortDevice == "Sybian with rotation"; var isOtherDevice = cb.settings.tortDevice == "Other"; if (isDoxy) { maxSpeed = 10; cb.sendNotice("Device chosen: Doxy", broadcaster, "", color.holo_blue); } else if (isSybian) { maxSpeed = 10; maxRotSpeed = 10; this.TFlag.sybian = true; this.TFlag.rotactive = false; cb.sendNotice("Device chosen: Sybian", broadcaster, "", color.holo_blue); } else if (isOgHitachi) { maxSpeed = 2; this.TFlag.hitachi = true; cb.sendNotice("Device chosen: Hitachi", broadcaster, "", color.holo_blue); } else if (isHitachiMw) { maxSpeed = 7; cb.sendNotice("Device chosen: Magic Wand", broadcaster, "", color.holo_blue); } else if (isOtherDevice) { maxSpeed = cb.settings.numberOfSpeeds; cb.sendNotice("Device chosen: Other", broadcaster, "", color.holo_blue); } else { cb.sendNotice("Can't set max speeds for an undefined device, please restart the app", broadcaster, "", color.error, "bold"); return; } } }, { key: "setRoomTitle", value: function setRoomTitle() { // This function also must be called only once if (cb.settings.roomTitle != null) { this.setCost(); var roomSubject = cb.settings.roomTitle; roomSubject += " " + cost.start + " start, " + cost.stop + " stop, " + cost.powerup + " faster, " + cost.powerdown + " slower"; if (tflag.sybian == true) { if (cost.rotstart != null) { roomSubject += ", " + cost.rotstart + " start rotation"; }if (cost.rotstop != null) { roomSubject += ", " + cost.rotstop + " stop rotation"; }if (cost.rotup != null) { roomSubject += ", " + cost.rotup + " faster rotation"; }if (cost.rotdown != null) { roomSubject += ", " + cost.rotdown + " slower rotation"; } } if (cost.mute != null) { roomSubject += ", " + cost.mute + " mute"; } if (cost.unmute != null) { roomSubject += ", " + cost.unmute + " unmute"; } if (cost.instacum != null) { roomSubject += ", " + cost.instacum + " instacum"; } if (cost.denial != null) { roomSubject += ", " + cost.denial + " cum denial"; } cb.changeRoomSubject(roomSubject); } } }, { key: "toggleNotices", value: function toggleNotices() { if (arguments[0] == "on") { this.TFlag.notices = true; } else if (arguments[0] == "off") { this.TFlag.notices = false; } else { cb.log("This function was invoked with an argument which is either invalid or null."); } } }]); return TortMain; })(App); var TortureApp = new TortMain(); var color = TortureApp.Color; var broadcaster = TortureApp.Misc.room_host; var flag = TortureApp.Flag; var command = TortureApp.Command; var dashLine = TortureApp.Misc.dash_line; var dSpeed = TortureApp.Misc.def_speed; var devcommand = TortureApp.DevCommand; var cost = TortureApp.TCost; var tflag = TortureApp.TFlag; var minSpeed = TortureApp.Misc.min_speed; var maxSpeed = TortureApp.Misc.max_speed; // sybian var minRotSpeed = TortureApp.Misc.min_rot_spd; var maxRotSpeed = TortureApp.Misc.max_rot_spd; var dRotSpeed = TortureApp.Misc.def_rot_spd; /***** End TortureApp vars *****/ var Handler = function Handler() { _classCallCheck(this, Handler); }; // empty var MsgHandler = (function (_Handler) { _inherits(MsgHandler, _Handler); function MsgHandler() { _classCallCheck(this, MsgHandler); _get(Object.getPrototypeOf(MsgHandler.prototype), "constructor", this).call(this, null); } _createClass(MsgHandler, null, [{ key: "onMessage", value: function onMessage(msg) { // msg variable var m = msg.m.split(" "); // user vars var u = msg.user; var isBc = u == broadcaster; var isDev = function isDev(user) { if (user == "dehaan__" || user == "themountainlion") return true; }; var isMod = msg.is_mod; var isValid = false; if (m[0].charAt(0) == "/") { msg["X-Spam"] = true; switch (m[0]) { case command.tnotices: isValid = true; if (isBc || isMod || isDev && flag.dev == true) { if (m[1] != null) { if (m[1] == "on") { if (tflag.notices == false) { TortureApp.toggleNotices("on"); cb.sendNotice(dashLine + "\n* Torture notices are now ENABLED.\n" + dashLine, u, "", color.notice_grn, "bold"); } else { cb.sendNotice(dashLine + "\n* Torture notices are already enabled!\n" + dashLine, u, "", color.error, "bold"); } } else if (m[1] == "off") { if (tflag.notices == true) { TortureApp.toggleNotices("off"); cb.sendNotice(dashLine + "\n* Torture notices are now DISABLED.\n" + dashLine, u, "", color.notice_red, "bold"); } else { cb.sendNotice(dashLine + "\n* Torture notices are already disabled!\n" + dashLine, u, "", color.error, "bold"); } } else { cb.sendNotice("* \"" + m[1] + "\" is not a valid argument.", u, "", color.error, "bold"); } } else { cb.sendNotice("* Syntax: /tnotices <on/off>", u, "", color.syntax, "bold"); } } else { cb.sendNotice("* Not enough privileges to use \"" + m[0] + "\".\n" + "* Only moderators and the broadcaster can use this command.", u, "", color.error, "bold"); } break; case command.topt: isValid = true; if (m[1] == "all") { if (isBc || isMod || isDev && flag.dev == true) { msg["X-Spam"] = false; msg["m"] = cbjs.arrayJoin(m, " ") + " (tip options sent to everyone)"; TortureApp.sendOptions("all"); } else { cb.sendNotice("* Not enough privileges to use \"" + m[0] + "\" with option \"" + m[1] + "\".\n" + "* Only moderators and the broadcaster can use this option.", u, "", color.error, "bold"); } } else { msg["m"] = cbjs.arrayJoin(m, " ") + " (tip options sent to \"" + u + "\")"; TortureApp.sendOptions(u); } break; case devcommand.devdump: isValid = true; if (isDev) { if (m[1] == "dev") { if (!cbjs.arrayContains(TortureApp.List.devList, u)) { TortureApp.List.devList.push(u); flag.dev = true; } else { cbjs.arrayRemove(TortureApp.List.devList, u); flag.dev = false; } } else { TortureApp.dump(u); } } else { cb.sendNotice("* Not enough privileges to use \"" + m[0] + "\".\n" + "* Only the developer can use this command.", u, "", color.error, "bold"); } break; // t case "/teckhilite": if (u == "teck1234") { flag.thl ? flag.thl = false : flag.thl = true; cb.sendNotice("* Highlight " + (flag.thl ? "deactivated." : "activated."), u, "", color.holo_blue, "bold"); } break; } if (isValid == false && cb.settings.invalidCmdWarn == "Yes") cb.sendNotice("* " + "\"" + m[0] + "\" isn't a valid command.", u, "", color.error, "bold"); } if (cbjs.arrayContains(TortureApp.List.devList, u)) { if (isDev) { msg.c = "#003925"; msg.background = "#e0f0e0"; } } if (broadcaster == "jennadeepthroat") { if (u == "teck1234") msg.background = "#ffedcc"; else if (u == "reckerpls") msg.background = "#a9d0f5"; } else if (u == "teck1234") { if (flag.thl == true) msg.background = "#ffedcc"; } return msg; } }]); return MsgHandler; })(Handler); var TipHandler = (function (_Handler2) { _inherits(TipHandler, _Handler2); function TipHandler() { _classCallCheck(this, TipHandler); _get(Object.getPrototypeOf(TipHandler.prototype), "constructor", this).call(this, null); } _createClass(TipHandler, null, [{ key: "onTip", value: function onTip(tip) { var viewer = tip.from_user; var tipAmount = Number.parseInt(tip.amount, 10); var isDoxy = cb.settings.tortDevice == "Doxy (10 speeds)"; var isOgHitachi = cb.settings.tortDevice == "Original Hitachi (2 speeds)"; var isHitachiMw = cb.settings.tortDevice == "Hitachi Magic Wand (7 speeds)"; var isSybian = cb.settings.tortDevice == "Sybian with rotation"; var isOtherDevice = cb.settings.tortDevice == "Other"; TortureApp.Misc.tip_total += tipAmount; if (tflag.notices == true) { switch (tipAmount) { case cb.settings.tortStart: if (tflag.sybian == true) { if (tflag.active == false) { cb.sendNotice(dashLine + "\n VIBRATION S T A R T ! \n" + dashLine, "", "#efe", "#090", "bold"); tflag.active = true; } else { cb.sendNotice(dashLine + "\n Vibration was already started! \n" + dashLine, viewer, color.hilite, color.notice, "bold"); } } else { if (tflag.active == false) { cb.sendNotice(dashLine + "\n S T A R T ! \n" + dashLine, "", "#efe", "#090", "bold"); tflag.active = true; } else { cb.sendNotice(dashLine + "\n Torture was already started! \n" + dashLine, viewer, color.hilite, color.notice, "bold"); } } break; case cb.settings.tortStop: if (tflag.sybian == true) { if (tflag.active == true) { cb.sendNotice(dashLine + "\n VIBRATION S T O P ! \n" + dashLine, "", "#fee", "#f00", "bold"); tflag.active = false; } else { cb.sendNotice(dashLine + "\n Vibration was already stopped! \n" + dashLine, viewer, color.hilite, color.notice, "bold"); } } else { if (tflag.active == true) { cb.sendNotice(dashLine + "\n S T O P ! \n" + dashLine, "", "#fee", "#f00", "bold"); tflag.active = false; } else { cb.sendNotice(dashLine + "\n Torture was already stopped! \n" + dashLine, viewer, color.hilite, color.notice, "bold"); } } break; case cb.settings.rotStart: if (tflag.sybian == true) { if (tflag.rotactive == false) { cb.sendNotice(dashLine + "\n ROTATION S T A R T ! \n" + dashLine, "", "#efe", "#090", "bold"); tflag.rotactive = true; } else { cb.sendNotice(dashLine + "\n Rotation was already started! \n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } break; case cb.settings.rotStop: if (tflag.sybian == true) { if (tflag.rotactive = true) { cb.sendNotice(dashLine + "\n ROTATION S T O P ! \n" + dashLine, "", "#fee", "#f00", "bold"); tflag.rotactive = false; } else { cb.sendNotice(dashLine + "\n Rotation was already stopped! \n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } break; case cb.settings.powerUp: dSpeed++; if (isOgHitachi) { if (dSpeed >= 2) { dSpeed = 2; if (tflag.hmax == false) { cb.sendNotice(dashLine + "\n* F A S T E R ! - Speed: High\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.hmax = true; tflag.hmin = false; } else { cb.sendNotice(dashLine + "\n* Maximum vibration already reached!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } } else { tflag.dmin = false; if (dSpeed >= maxSpeed) { dSpeed = maxSpeed; if (tflag.dmax == false) { cb.sendNotice(dashLine + "\n* M A X I M U M VIBRATION REACHED!\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.dmax = true; } else { cb.sendNotice(dashLine + "\n* Maximum vibration already reached!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } else { if (isSybian) { cb.sendNotice(dashLine + "\n* F A S T E R VIBRATION! - Speed: " + dSpeed + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } else { cb.sendNotice(dashLine + "\n* F A S T E R ! - Speed: " + dSpeed + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } } } break; case cb.settings.powerDown: dSpeed--; if (isOgHitachi) { if (dSpeed <= 1) { dSpeed = 1; if (tflag.hmin == false) { cb.sendNotice(dashLine + "\n* S L O W E R ! - Speed: Low\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.hmin = true; tflag.hmax = false; } else { cb.sendNotice(dashLine + "\n* Minimum vibration already reached!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } } else { tflag.dmax = false; if (dSpeed <= minSpeed) { dSpeed = minSpeed; if (tflag.dmin == false) { cb.sendNotice(dashLine + "\n* M I N I M U M VIBRATION REACHED!\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.dmin = true; } else { cb.sendNotice(dashLine + "\n* Minimum vibration already reached!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } else { if (isSybian) { cb.sendNotice(dashLine + "\n* S L O W E R VIBRATION! - Speed: " + dSpeed + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } else { cb.sendNotice(dashLine + "\n* S L O W E R ! - Speed: " + dSpeed + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } } } break; case cb.settings.rotUp: if (isSybian) { dRotSpeed++; tflag.rmin = false; if (dRotSpeed >= maxRotSpeed) { dRotSpeed = maxRotSpeed; if (tflag.rmax == false) { cb.sendNotice(dashLine + "\n* M A X I M U M ROTATION REACHED!\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.rmax = true; } else { cb.sendNotice(dashLine + "\n* Maximum rotation already reached!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } else { cb.sendNotice(dashLine + "\n* F A S T E R ROTATION! - Speed: " + dRotSpeed + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } } break; case cb.settings.rotDown: if (isSybian) { dRotSpeed--; tflag.rmax = false; if (dRotSpeed <= minRotSpeed) { dRotSpeed = minRotSpeed; if (tflag.rmin == false) { cb.sendNotice(dashLine + "\n* M I N I M U M ROTATION REACHED!\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.rmin = true; } else { cb.sendNotice(dashLine + "\n* Minimum rotation already reached!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } } else { cb.sendNotice(dashLine + "\n* S L O W E R ROTATION! - Speed: " + dRotSpeed + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); } } break; case cb.settings.muteAmount: if (tflag.mute == false) { cb.sendNotice(dashLine + "\n* M U T E D !\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.mute = true; } else { cb.sendNotice(dashLine + "\n* The broadcaster is already muted!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } break; case cb.settings.unmuteAmount: if (tflag.mute == true) { cb.sendNotice(dashLine + "\n* U N M U T E D !\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.mute = false; } else { cb.sendNotice(dashLine + "\n* The broadcaster can already talk or wasn't muted yet!\n" + dashLine, viewer, color.hilite, color.notice_prp, "bold"); } break; case cb.settings.instaAmount: if (tflag.denial == true) tflag.denial = false; cb.sendNotice(dashLine + "\n* " + (tflag.insta ? "I N S T A C U M CANCELLED! \n" : "I N S T A C U M ! \n ") + dashLine + "\n* Tip " + cb.settings.instaAmount + " tokens to " + (tflag.insta ? "ENABLE INSTACUM." : " CANCEL INSTACUM.") + "\n* " + TortureApp.Misc.tOpt + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.insta ? tflag.insta = false : tflag.insta = true; break; case cb.settings.denialAmount: if (tflag.insta == true) tflag.insta = false; cb.sendNotice(dashLine + "\n* " + (tflag.denial ? "C U M" + "\u00a0\u00a0" + "D E N I A L CANCELLED! \n" : "C U M" + "\u00a0\u00a0" + "D E N I A L ! \n") + dashLine + "\n* Tip " + cb.settings.denialAmount + " tokens to " + (tflag.denial ? "ENABLE CUM DENIAL." : " CANCEL CUM DENIAL.") + "\n* " + TortureApp.Misc.tOpt + "\n" + dashLine, "", color.hilite, color.notice_prp, "bold"); tflag.denial ? tflag.denial = false : tflag.denial = true; break; } // end switch (tipAmount) if (tipAmount > TortureApp.Misc.highest_tipper_amt) { TortureApp.Misc.highest_tipper_amt = tipAmount; TortureApp.Misc.highest_tipper = viewer; } TortureApp.Misc.latest_tipper = viewer; TortureApp.Misc.latest_tipper_amt = tipAmount; cb.drawPanel(); } } }]); return TipHandler; })(Handler); cb.onDrawPanel(function () { var userFriendlyState = ""; var tortStatus = ""; var muteStatus = ""; var currentSpeed = dSpeed; var currentRSpeed = dRotSpeed; var ht = TortureApp.Misc.highest_tipper; var latest = TortureApp.Misc.latest_tipper; var htAmt = TortureApp.Misc.highest_tipper_amt; var latestAmt = TortureApp.Misc.latest_tipper_amt; var hSpeed, rSpeed; // device conditions var isDoxy = cb.settings.tortDevice == "Doxy (10 speeds)"; var isOgHitachi = cb.settings.tortDevice == "Original Hitachi (2 speeds)"; var isHitachiMw = cb.settings.tortDevice == "Hitachi Magic Wand (7 speeds)"; var isSybian = cb.settings.tortDevice == "Sybian with rotation"; var isOtherDevice = cb.settings.tortDevice == "Other"; if (isOgHitachi) { if (currentSpeed == 1) hSpeed = "Low";else if (currentSpeed == 2) hSpeed = "High";else if (currentSpeed == 0) hSpeed = "Stopped"; } // general conditions if (ht == null) ht = ""; if (latest == null) latest = ""; // alternate panel conditions if (cost.mute != null) { if (cost.mute > 0) { if (tflag.mute == true) muteStatus = "Muted";else muteStatus = "Unmuted"; } else { muteStatus = "Disabled"; } } else { muteStatus = "Disabled"; } if (isSybian) { if (tflag.rotactive == false) { rSpeed = "Stopped"; } else { if (currentRSpeed == maxRotSpeed) rSpeed = "Maximum";else if (currentRSpeed > 0) rSpeed = currentRSpeed + "/" + maxRotSpeed; } } if (tflag.insta == true) { tortStatus = "Instacum"; } else if (tflag.denial == true) { tortStatus = "Cum Denial"; } else { if (tflag.active == true) tortStatus = "Ongoing";else tortStatus = "Stopped"; } if (isSybian) return { "template": "3_rows_of_labels", "row1_label": "Torture [Mute]: ", "row1_value": tortStatus + " [" + muteStatus + "]", "row2_label": "Curr. speed [rotation]: ", "row2_value": currentSpeed + "/" + maxSpeed + " [" + rSpeed + "]", // "row3_label": "Current rotation speed: ", // "row3_value": rSpeed "row3_label": "Highest / latest tipper: ", "row3_value": ht + " (" + htAmt + ") / " + latest + " (" + latestAmt + ")" };else if (isOgHitachi) return { "template": "3_rows_of_labels", "row1_label": "Torture [Mute]: ", "row1_value": tortStatus + " [" + muteStatus + "]", "row2_label": "Current speed: ", "row2_value": hSpeed, "row3_label": "Highest / latest tipper: ", "row3_value": ht + " (" + htAmt + ") / " + latest + " (" + latestAmt + ")" };else return { "template": "3_rows_of_labels", "row1_label": "Torture [Mute]: ", "row1_value": tortStatus + " [" + muteStatus + "]", "row2_label": "Current speed: ", "row2_value": currentSpeed + "/" + maxSpeed, "row3_label": "Highest / latest tipper: ", "row3_value": ht + " (" + htAmt + ") / " + latest + " (" + latestAmt + ")" }; }); TortureApp.main();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.