Bots Home
|
Create an App
ErectionBot
Author:
_dan_
Description
Source Code
Launch Bot
Current Users
Created by:
_Dan_
// Cb settings // // ErectionTip : Amount to Tip to show your erection - Default : 11. // tipMode' : The Tip must be "Exact" , or "Equal or more". // noticeTime : Number of minutes between BOT notifications - 1 to 10 Default : 3). // messColor : Notices Color (No #. Default : Cb Orange DC5500). // permanentString : Permanent Erections // cb.settings_choices = [ {name: 'ErectionTip', label: 'Tip to show your Erection ', type: 'int', minValue: 1, defaultValue: 11 }, {name: 'tipMode', label: 'The Tip must be ', type: 'choice', choice1: 'Equal or more', choice2: 'Exact', defaultValue: 'Equal or more' }, {name: 'noticeTime', label: 'Minute(s) between Notices ', type: 'int', minValue: 1, maxValue: 10, defaultValue: 3 }, {name: 'messColor', label: 'You can change Notices color (Default : Orange - DC5500) ' , type: 'str', minLength: 6, maxLength: 6, defaultValue: 'DC5500' }, {name: 'permanentString', label: 'Permanent Erections, if any, separated by space', type: 'str', minLength: 0, maxLength: 10240, required: false }, ]; // Variables // // tipMode : Tip mode choosen by the broadcaster : 1 "Equal or more", 2 "Exact" // messColor : Notices color // actionIndic : To stop Bot notifications if no action (message or Tip) // ErectionList : List of Erections of the day // permanentList : List of Permanent Erections // permNb : Number of Permanent Erections // botNotice : BOT Notification regularly sent to the room var tipMode = 0; var messColor = '#' + cb.settings.messColor; var actionIndic = 0; var ErectionList = {}; var permanentList = {}; var permNb = 0; var botNotice = "\n Tip " + cb.settings.ErectionTip + " to make your erection :errect throb for me and become my Luster Of The Day. \n" ; // // Init : // Initialize list of Erections and list of Permanent Erections // Welcome the broadcaster, and remind her/his parameters. // First call to the Bot notification function. // function init() { switch (cb.settings.tipMode) { case "Equal or more" : var mess = "OR MORE"; tipMode = 1 ; break; case "Exact" : var mess="EXACTLY"; tipMode = 2 ; break; } cb.sendNotice( "\nHi " + cb.room_slug + " :errect , ErectionOfTheDay is running : \n \n - Erection TIP : " + cb.settings.ErectionTip + " Tokens " + mess + " in one Tip. " , cb.room_slug ,'','#000000', 'bolder'); if (cb.settings.permanentString) { ErectionsListPopulate(); } if (permNb == 0) { cb.sendNotice (" - No Permanent Erections" , cb.room_slug, '', '#000000', 'bolder' ); } cb.sendNotice("\n Thanks for using ErectionOfTheDay. Be lusted :errect ", cb.room_slug, '', '#000000', 'bolder' ); timeBotNotice(); } function timeBotNotice() { if (actionIndic < 1) { cb.sendNotice(botNotice,'','', messColor ,'bolder'); actionIndic += 1 ; } cb.setTimeout(timeBotNotice, cb.settings.noticeTime * 60000) ; } // // On Enter : // Bot notification to the User // cb.onEnter(function(user) { var usr = user['user']; cb.sendNotice(botNotice, usr ,'',messColor, 'bolder'); }); // // On Tip : // // If the Tipper is does not have an Erection yet, and the Tip matches // (depending on the Tip mode), make the tipper a luster, // notify it and inhib the next Bot notice. // cb.onTip(function (tip) { actionIndic = 0; var usr = tip['from_user']; var amountTipped = parseInt(tip['amount']); if (!isLuster(usr) ) { if (( (tipMode == 1) && (amountTipped >= cb.settings.lusterTip) ) || ( (tipMode == 2) && (amountTipped == cb.settings.lusterTip) )) { makeLuster(usr); actionIndic += 1; cb.sendNotice(" :qq_heartthanks Thank you so much " + usr + ". Your penis now throbs for me :errect " ,'','', messColor ,'bolder'); } } }); // // On Message : // // Message of the broadcaster stay unchanged // Add the Lover graphic to Lovers messages // Add the Non-Lover graphic to Non-Lovers messages // cb.onMessage(function (msg) { var usr = msg['user']; actionIndic = 0; if (!isOwner(usr)) { if (isLover(usr)) { msg['m'] = " :errect " + msg['m']; } else { msg['m'] = " :mellow " + msg['m']; } } return msg; }); // Functions : // // isOwner : User is the broadcaster ? // isLover : User is in the list of Lovers ? // makeLover : Add the user to the list of Lovers // makePermanent : Add the user to the list of Permanent Lusters // function isOwner(username) { return (username == cb.room_slug); } function isLuster(username) { return (username in ErectionList); } function makeLuster(username) { ErectionList[username] = {'u': 1}; } function isPermanent(username) { return (username in permanentList); } function makePermanent(username) { permanentList[username] = {'u': 1}; } // // lusterListPopulate ( ) : // Initialize lustersList and permanentList. // function lusterListPopulate() { var usr = cb.room_room ; var b = '' ; var c = '#000000' ; var f = 'bolder' ; var permArray = cb.settings.permanentString.toLowerCase().split((" ")); if (cbjs.arrayContains (permArray, cb.room_slug) ) { permArray = cbjs.arrayRemove (permArray , cb.room_slug); cb.sendNotice( "- You are in the list of Permanent Lusters. Sorry, no heart beating for youself ... The option to choose your own graphic will come soon. ", usr, b, c, f) ; } for (var i = 0 ; i < permArray.length ; i++) { var perm = permArray[i].replace(/ /g, ""); if (perm && !isLuster(perm)) { makeLuster(perm) ; makePermanent(perm) ; permNb += 1 ; if (permNb == 1) { cb.sendNotice(" - Permanent Lusters : ", usr, b, c, f) ; } cb.sendNotice(permNb + " : " +perm, usr, b, c, f) ; } } } // // Init // // init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.