Apps Home
|
Create an App
Arianna's Doxi Control
Author:
countytime
Description
Source Code
Launch App
Current Users
Created by:
Countytime
/* * Doxy Control * A version of Doxy/Hitachi torture where instead of many users controlling it, a single user makes a larger tip to control it. Other users can then tip the same amount to take control of it. * * by countytime * http://chaturbot.ninja * * ****************************************************** */ king = ''; count = 0; speed = 0; var regex = new RegExp(/\/(\d)/); /* colors **************/ purple = '#aa00aa'; green = '#00aa00'; mint = '#eeffee'; red = '#660000'; lightred = '#aa0000'; teal = '#009999'; orange = "#ff6600"; white = '#ffffff'; black = '#000000'; king_bg = "#ffcece"; pink_bg = "#ffeeee"; mint_bg = '#eeffee'; cb.settings_choices = [ {name: 'trigger_amount', type: 'int', minValue: 1, maxValue: 1000, defaultValue: 75, label: "Tokens to take control of Doxy"} ]; cb.onEnter(function(user) { cb.chatNotice('Welcome ' + user['user'] + "! We're playing Doxy Control! Tip "+cb.settings.trigger_amount+" to take control of the Doxy!", user['user'], white, red, 'bold'); }); cb.onTip(function (tip) { tipamount = parseInt(tip['amount']); if (tipamount == cb.settings.trigger_amount) { king = tip['from_user']; var msgcolor = count % 2 ? teal : purple; var msg = tip['from_user']+ " has taken control of the Doxy!! Control its speed from 0-9 with /0, /1, etc."; var pad = new Array(40).join("*"); Message(pad, msgcolor); Message(msg, msgcolor); count++; } }); cb.onMessage(function (msg) { if (msg['user'] == king) { var matches = msg['m'].match(regex); msg['m'] = ':doxicontroller-16 ' + msg['m']; msg['c'] = black; msg['background'] = king_bg; if (matches) { var ctrl = parseInt(matches[1]); if (ctrl >= 0 && ctrl <= 9) { speed = ctrl; if (ctrl == 0) { Message(":doxi-stop *** !!! STOP !!! *** :doxi-stop", lightred); Message("Tip "+cb.settings.trigger_amount+" to take control! Control the speed from 0-9 with /0, /1, etc.", red, white, 'normal'); } else { spdimg = ":ari-doxicontrol-" + speed; Message(spdimg + " *** Doxy speed set to "+ctrl+"! *** " +spdimg, red); Message("Tip "+cb.settings.trigger_amount+" to take control! Control the speed from 0-9 with /0, /1, etc.", red, white, 'normal'); } /* These two cases will no longer occur since we only grab a single digit now */ } else if (ctrl < 0) { speed = 0; Message(king+ " tried to set speed to "+ctrl+"! Setting to 0 instead.", red, pink_bg); Message(":doxi-stop *** !!! STOP !!! *** :doxi-stop", lightred); } else if (ctrl > 9) { speed = 9; spdimg = ":ari-doxicontrol-" + speed; Message(king+ " tried to set speed to "+ctrl+" but that speed doesn't exist! Maybe they're trying to kill her! Setting to 9 instead.", red, pink_bg); Message(spdimg + " *** Doxy speed set to "+speed+"! *** " + spdimg, red); } } } else if (msg['user'] == 'countytime') { msg['m'] = ':sexgod-12 : ' + msg['m']; msg['background'] = mint_bg; } return msg; }); function Message(msg, color, bgcolor, weight) { bgcolor = bgcolor || white; weight = weight || 'bold'; cb.chatNotice(msg, '', bgcolor, color, weight); } function recurringNotice() { Message("We're playing Doxy Control! Tip "+cb.settings.trigger_amount+" to take control of the Doxy!", red); cb.setTimeout(recurringNotice, 5*60*1000); } function init() { Message("Doxy Control started! Tip "+cb.settings.trigger_amount+" to take control of the Doxy! Control its speed from 0-9 with /0, /1, etc.", red); cb.setTimeout(recurringNotice, 5*60*1000); cb.changeRoomSubject("Doxy Control! Tip "+cb.settings.trigger_amount+" to take control of the Doxy!"); } init();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.