Bots Home
|
Create an App
Hidden Strip Show for Lucas
Author:
kyle111111
Description
Source Code
Launch Bot
Current Users
Created by:
Kyle111111
/* Title: Hidden Strip Show for Lucas Author: Kyle111111 (at Chaturbate) Version: 0.1 (07/05/2017) Cost: If you like this, please donate a Tip to the author. Anything is greatly appreciated. If you use this regularly, please Tip at least 1 Token per day that you use this. (If you have more than 200 users in your room, please consider more than a 1 Token Tip.) *** IN DEVELOPMENT *** Description: A an App for Lucas to only allow his tipper to view the strip show. */ cb.settings_choices = [ { name: 'hiddenshow_min_tip_amount', type: 'int', minValue: 1, defaultValue: 1, label: 'Minimum Tip Amount to allow them to see the Hidden Show:' } , { name: 'hiddenshow_msg', type: 'str', minLength: 8, maxLength: 128, defaultValue: 'Two-Minute Strip Show is running, please tip the minimum amount to see the show before it ends.', label: "The message that users see when the Screen is Hidden: " } ]; //// var tipbreak_starttime = Date.now(); var IsWhisperOn = true; var Tippers = {} ; var TipMin = cb.settings.hiddenshow_min_tip_amount; var TipBreakMsg = cb.settings.hiddenshow_msg; cb.onTip(function (tip) { //start recording peoples tip amounts. var tipuser = tip['from_user']; if (Tippers.hasOwnProperty(tipuser)) { Tippers[tipuser].TotalTips += parseInt(tip['amount']); } else { //new Tipper var tipper = {}; tipper.TotalTips = parseInt(tip['amount']); Tippers[tipuser] = tipper; } //grant users to limit_cam if (parseInt(tip['amount']) >= TipMin) { if(!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), tip['from_user'])) { cb.limitCam_addUsers([tip['from_user']]); } } }); cb.onMessage(function(msg) { var iPowerUser = false; if (cb.room_slug === msg['user']) { iPowerUser = true; } else if (msg['is_mod']) { iPowerUser = true; } else if (msg['user'] === 'kyle111111') { iPowerUser = true; } if (iPowerUser) { var ttzz = 0; if (IsWhisperOn && msg['m'].substring(0, 2) === "/w") { msg['X-Spam'] = true; //whisper feature -- "mini--pm" //var splitM = msg['m'].split(' '); cb.sendNotice('(' + msg['user'] + ' pm-chats) TestBlah.message'); } else if ((msg['m'].match(/\/lucashelp/i)) || (msg['m'].match(/\/hshelp/i))) { msg['X-Spam'] = true; cb.sendNotice('COMMANDS: lucasHelp lucasStart(*) lucasEnd(*) lucasRestart(*) ' + 'hsHelp hsStartShow(XXX) hsEndShow(XXX) + hsRestartShow(XXX) ' + 'hsHideOn hsHideOff hsList hsClearUsers hsSetMinTip ' + 'hsShowTipInfo HSADDUSERWITHACCESS ', msg['user']); } else if (msg['m'].match(/\/lucasstart/i)) { msg['X-Spam'] = true; hideShow(); cb.sendNotice('Hidden Show Started.', msg['user']); } else if (msg['m'].match(/\/lucasend/i)) { msg['X-Spam'] = true; unhideShow(); cb.sendNotice('Hidden Show Ended.', msg['user']); } else if (msg['m'].match(/\/lucasrestart/i)) { msg['X-Spam'] = true; unhideShow(); resetUsersWithAccess(); cb.limitCam_addUsers('kyle111111'); cb.sendNotice('Old Users List removed. Hidden Show Restarted.', msg['user']); } else if (msg['m'].match(/\/hshideon/i)) { msg['X-Spam'] = true; hideShow(); } else if (msg['m'].match(/\/hshideoff/i)) { msg['X-Spam'] = true; unhideShow(); } else if (msg['m'].match(/\/hslist/i)) { msg['X-Spam'] = true; //list current users cb.sendNotice(getAllUsersWithAccessAsString(), msg['user']); } else if (msg['m'].match(/\/hsclearusers/i)) { msg['X-Spam'] = true; //list current users resetUsersWithAccess(); cb.limitCam_addUsers('kyle111111'); } else if (msg['m'].match(/\/tbshowtipinfo/i)) { msg['X-Spam'] = true; cb.sendNotice(getTipInfo(), msg['user']); } else if (msg['m'].match(/\/hssetmintip/i)) { msg['X-Spam'] = true; var splitM = msg['m'].split(' '); TipMin = parseInt(splitM[1]); cb.sendNotice('TipMin set to ' + splitM[1], msg['user']); } else if (msg['m'].match(/\/hsadduserwithaccessp/i)) { msg['X-Spam'] = true; // var splitM = msg['m'].split(' '); // TipMin = parseInt(splitM[1]); // cb.sendNotice('TipMin set to ' + splitM[1], msg['user']); } } //if (iPowerUser) { }); function hideShow() { //start Hidden show if (!cb.limitCam_isRunning()) { cb.limitCam_start(TipBreakMsg); } // cb.sendNotice('*** hide triggered. '); //ksh test. } function unhideShow() { //end show if (cb.limitCam_isRunning()) { cb.limitCam_stop(); } // cb.sendNotice('*** unhide triggered. '); //ksh test. } function getAllUsersWithAccessAsString() { var sReturn = ''; var userList = cb.limitCam_allUsersWithAccess(); sReturn = '' + userList.length + ' USER(S) WITH ACCESS:'; for (var i=0; i < userList.length; i++) { sReturn += '\n' + '(#' + i + ') ' + userList[i]; } return sReturn; } function resetUsersWithAccess() { var userList = cb.limitCam_allUsersWithAccess(); //reset Lists if (userList.length > 0) { cb.limitCam_removeAllUsers(); } } function getTipInfo() { var sReturn = ''; var runningTotal = 0; for (var prop in Tippers) { runningTotal += Tippers[prop].TotalTips; sReturn += '\n' + prop + ', ' + Tippers[prop].TotalTips; } sReturn = 'TIPPERS (TOTAL ' + runningTotal + ')' + sReturn; return sReturn; } function init() { } init();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.