Bots Home
|
Create an App
666 Sin-ners Club
Author:
nicky7282
Description
Source Code
Launch Bot
Current Users
Created by:
Nicky7282
/******************************************************************** ** 666 Sin-ners Club for sinmore ** by Nicky7282 (druixure@yahoo.com) (twitter: @nicky7282) ** This bot is model specific, your mileage may vary. If YOU would like a custom bot please tweet me! :D ** ** If you modify, adapt, or copy parts of this bot in ANY WAY please credit me: nicky7282 ** *Liam Neeson voice* ** IF YOU DON'T CREDIT ME... ಠ_ಠ ** I WILL FIND YOU... ಡ_ಡ ** AND I WILL KILL YOU... (⌐■_■)︻╦╤─ (╥﹏╥) ** ... ** .. ** So thanks for crediting me! THAT'S FUCKIN' TEAMWORK! ᕕ( ᐛ )ᕗ ** ** ** ** HIGH FIVE! ********************************************************************/ cb.settings_choices = [ { name: 'sinClubList', label: "SinClub Members Separated by commas. Erase this and copy/paste from google-doc or email.", type: 'str', required: false, defaultValue: '', }, { name: 'sinClubPrice', label: "SinClub price:", type: 'int', defaultValue: 999 }, { name: 'helpAd', label: '(Default: 2) How many minutes between cum counter notices?', type:'int', minValue: 1, maxValue: 999, defaultValue: 2, }, { name: 'sinClubTitle', label: "What style title should SinClub members have?", type: 'choice', choice1: '1', choice2: '2', choice3: '3', choice4: '4', choice5: '5', defaultValue: '1', }, ]; // PAID SIN CLUB MEMBERS $$$$$$$$$$$$$$$$$$$$ var clubList = cb.settings.sinClubList; var club = []; var id = {}; var idCounter = 0; var cumCounter = 0; // club interface constants var USERNAME = 0; var USERID = 1; var CLUBTYPE = 2; var EMOJI = 3; var TITLE = 4; var sinClubTitles = ["[Sin-ner] ", "\u{1D564}\u{1D55A}\u{1D55F}-\u{1D55F}\u{1D556}\u{1D563}: ", "\u{1D598}\u{1D58E}\u{1D593}-\u{1D593}\u{1D58A}\u{1D597}: ", "SI\u{0418}-\u{0418}\u{039E}\u{042F}: ", "\u{015E}i\u{0E96}-\u{0E96}\u{0113}r: "]; function titlesString(){ var titlesMSG = ''; for (i in sinClubTitles){ var oboe = (parseFloat(i)+1); titlesMSG += "\n" + oboe + ": " + sinClubTitles[i]; } return titlesMSG; } var emoji = ["\u{1F608}", "\u{1F47F}"]; function emojiString(){ var emojiMSG = ''; for (i in emoji){ var oboe = (parseFloat(i)+1); emojiMSG += "["+ oboe + emoji[i]+ "] \t"; } return emojiMSG; } cb.onMessage(function (msg) { initializeUser(msg['user']); if ( (msg['m'].charAt(0) != ('/')) && (msg['m'].charAt(0) != ('!')) ){ makeMsgPretty(msg); } else { chatCommands(msg); } }); function chatCommands(msg){ var user = msg['user']; // /addsinclub if ((msg['m'].toLowerCase().startsWith('/addsinclub'))){ msg['X-Spam'] = true; if ((msg['is_mod']) || (user == cb['room_slug'])){ var separatedCommand = msg['m'].toLowerCase().split(" "); if (!separatedCommand[1]){ cb.sendNotice('You need to specify a username. example: "/addsinclub '+user+'"', user,' ','#FF0000', 'bold'); } else if (typeof id[separatedCommand[1]] == 'undefined') { cb.sendNotice('Username has not been initialized. Please check for typos.', user,' ','#FF0000', 'bold'); } else{ makeSinClub(separatedCommand[1]); cb.sendNotice('Everyone please welcome ' +separatedCommand[1]+ ' to the 666 Sin-ners Club!', '', '#F30129', '#ffffff', 'bold'); cb.sendNotice('[HIDDEN] '+separatedCommand[1]+' was added to 666 Sin-ners Club temporarily by '+user+'. To add them permanently, add "'+separatedCommand[1]+'" to the google-doc or list-email.', cb['room_slug'], '', '#0000FF', 'bold'); } } else { cb.sendNotice("You don't have access to that command.", user,' ','#FF0000', 'bold'); } } // /rmsinclub if ((msg['m'].toLowerCase().startsWith('/rmsinclub'))){ msg['X-Spam'] = true; if ((msg['is_mod']) || (user == cb['room_slug'])){ var separatedCommand = msg['m'].toLowerCase().split(" "); if (!separatedCommand[1]){ cb.sendNotice('You need to specify a username. example: "/rmsinclub '+user+'"', user,' ','#FF0000', 'bold'); } else if (typeof id[separatedCommand[1]] == 'undefined') { cb.sendNotice('Username has not been initialized. Please check for typos.', user,' ','#FF0000', 'bold'); } else{ removeSinClub(separatedCommand[1]); cb.sendNotice(separatedCommand[1]+ ' has been temporarily removed from the 666 Sin-ners Club by ' + user, user, '#F30129', '#ffffff', 'bold'); if (user != cb['room_slug']) { cb.sendNotice(separatedCommand[1]+ ' has been temporarily removed from the 666 Sin-ners Club by ' + user, cb['room_slug'], '', '#0000FF', 'bold'); } } } else { cb.sendNotice("You don't have access to that command.", user,' ','#FF0000', 'bold'); } } // /cumcounter else if ('/cumcounter' == msg['m'].toLowerCase()){ msg['X-Spam'] = true; if ((msg['is_mod']) || (user == cb['room_slug'])){ cb.sendNotice(cumCounterString(), '', '', '#F30129', 'bold'); } else { cb.sendNotice(cumCounterString(), user, '', '#F30129', 'bold'); } } // /addcum else if ((msg['m'].toLowerCase().startsWith('/addcum'))){ msg['X-Spam'] = true; if ((msg['is_mod']) || (user == cb['room_slug'])){ var separatedCommand = msg['m'].toLowerCase().split(" "); if ((!separatedCommand[1]) || isNaN(separatedCommand[1])) { cb.sendNotice('You need to specify a number. example: "/addcum 1" or "/addcum -1"', user, '', '#F30129', 'bold'); } else { cumCounter += parseFloat(separatedCommand[1]); cb.sendNotice(cumCounterString(), '', '', '#F30129', 'bold'); } } else { cb.sendNotice("You don't have access to that command.", user,' ','#FF0000', 'bold'); } } // /emoji else if ((msg['m'].toLowerCase().startsWith('/emoji'))){ msg['X-Spam'] = true; if (club[id[user]][CLUBTYPE] == '666 Sin-ners Club'){ var separatedCommand = msg['m'].toLowerCase().split(" "); if ((!separatedCommand[1]) || isNaN(separatedCommand[1])) { cb.chatNotice('Pick an emoji from below. example: "/emoji 3"\n'+emojiString(), user, '', '#F30129', 'bold'); } else if ((separatedCommand[1] > emoji.length) || (separatedCommand[1] <= 0)){ cb.chatNotice('Pick an emoji from below. example: "/emoji 3"\n'+emojiString(), user, '', '#F30129', 'bold'); } else { var oboe = Math.floor(parseFloat(separatedCommand[1])) - 1; if (oboe == -1){ oboe = 0; } club[id[user]][EMOJI] = emoji[oboe]; cb.chatNotice("Your emoji has been updated to: "+emoji[oboe], user, '', '#F30129', 'bold'); } } else { cb.chatNotice("You are not a club member. \n666 Sin-ners Club members get to pick from the following emojis:\n"+emojiString(), user,' ','#FF0000', 'bold'); } } // /clubtitle else if ((msg['m'].toLowerCase().startsWith('/clubtitle'))){ msg['X-Spam'] = true; if (club[id[user]][CLUBTYPE] == '666 Sin-ners Club'){ var separatedCommand = msg['m'].toLowerCase().split(" "); if ((!separatedCommand[1]) || isNaN(separatedCommand[1])) { cb.chatNotice('Your title has not been updated. \nPick a title from below. example: "/clubtitle 2"'+titlesString(), user, '', '#F30129', 'bold'); } else if ((separatedCommand[1] > sinClubTitles.length) || (separatedCommand[1] <= 0)){ cb.chatNotice('Your title has not been updated. \nPick a title from below. example: "/clubtitle 2"'+titlesString(), user, '', '#F30129', 'bold'); } else { var oboe = Math.floor(parseFloat(separatedCommand[1])) - 1; if (oboe == -1){ oboe = 0; } club[id[user]][TITLE] = sinClubTitles[oboe]; cb.chatNotice("Your title has been updated to: "+sinClubTitles[oboe], user, '', '#F30129', 'bold'); } } else { cb.chatNotice("You are not a club member. \n666 Sin-ners Club members get to pick from the following titles:"+titlesString(), user,' ','#FF0000', 'bold'); } } // /cmds else if ((msg['m'].toLowerCase().startsWith('/cmds'))){ msg['X-Spam'] = true; if ((msg['is_mod']) || (user == cb['room_slug'])) { cb.chatNotice("SinClub commands:\n /emoji \n /cumcounter \n /clubtitle \n /addsinclub \n /addcum \n /rmsinclub", user,' ','#FF0000', 'bold'); } else { cb.chatNotice("SinClub commands:\n /emoji \n /cumcounter \n /clubtitle", user,' ','#FF0000', 'bold'); } } } function makeMsgPretty(msg){ var user = msg['user']; if (club[id[user]][CLUBTYPE] == '666 Sin-ners Club') { msg['background'] = '#FAECEF'; msg['m'] = club[id[user]][EMOJI] + club[id[user]][TITLE] + msg['m']; } return msg; } function randomSinEmoji(){ var randomEmoji = emoji[Math.floor(Math.random() * emoji.length)]; return randomEmoji; } cb.onEnter(function(user) { initializeUser(user['user']); if (club[id[user['user']]][CLUBTYPE] == '666 Sin-ners Club'){ cb.sendNotice('666 Sin-ners Club Member ' + user['user'] + ' has entered the room!', '', '#F30129', '#ffffff', 'bold'); } }); cb.onTip(function (tip) { var user = tip['from_user']; initializeUser(user); var amountTipped = parseInt(tip['amount']); if ((amountTipped == cb.settings.sinClubPrice) && (isNewSinClub(user))){ cb.sendNotice('Everyone please welcome ' +user+ ' to the 666 Sin-ners Club!', '', '#F30129', '#ffffff', 'bold'); cb.sendNotice('[HIDDEN] SCREENSHOT THIS NOTICE and remember to add '+user+' to the google-doc or list-email.', cb['room_slug'], '', '#0000FF', 'bold'); makeSinClub(user); } }); function initializeUser(user) { if (typeof id[user] == 'undefined') { id[user] = idCounter; club[id[user]] = []; club[id[user]][USERNAME] = user; club[id[user]][USERID] = id[user]; club[id[user]][CLUBTYPE] = ''; club[id[user]][EMOJI] = ''; club[id[user]][TITLE] = ''; idCounter += 1; } } function isNewSinClub(user){ if (club[id[user]][CLUBTYPE] != '666 Sin-ners Club'){ return true; } else return false; } function makeSinClub(user){ club[id[user]][CLUBTYPE] = '666 Sin-ners Club'; club[id[user]][EMOJI] = randomSinEmoji(); club[id[user]][TITLE] = sinClubTitles[(parseFloat(cb.settings.sinClubTitle) -1)]; } function removeSinClub(user){ club[id[user]][CLUBTYPE] = ''; club[id[user]][EMOJI] = ''; club[id[user]][TITLE] = ''; } function cumCounterString(){ if (cumCounter == 1) { return ' :sparklpink Sin has cum '+cumCounter+' time today :sparklpink '; } else { return ' :sparklpink Sin has cum '+cumCounter+' times today :sparklpink '; } } function helpAd() { cb.sendNotice('666 Sin-ners Club membership is '+cb.settings.sinClubPrice+' tokens. See bio for more details!\n'+ cumCounterString(), '', '', '#F30129', 'bold'); cb.setTimeout(helpAd, (cb.settings.helpAd * 60000)); } cb.setTimeout(helpAd, (cb.settings.helpAd * 60000)); function botStartup() { cb.log("initializing sin club members"); initializeUser(cb['room_slug']); if (clubList) { var clubSettings = clubList.split(','); for (i = 0; i < clubSettings.length; i++) { var username = clubSettings[i].toLowerCase().replace(/ /g,""); initializeUser(username); makeSinClub(username); } } cb.log("finished initializing sin club members"); } botStartup();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.