Bots Home
|
Create an App
DecemberApp Lily
Author:
polymathcs
Description
Source Code
Launch Bot
Current Users
Created by:
Polymathcs
/** * This is a bot made for Lily for december for the things she has planned * */ //var var NNstnadings = 0; var naughtyTA = 0; var niceTA = 0; var naughtyV = 0; var niceV = 0; var naughtyMsg = ''; var niceMsg = ''; var naughtyTVA = 0; var niceTVA = 0; var totalNNPurchases = 0; var rasSub = ''; var rafPrx = ''; var rafWarn = ''; var rafTicket1 = 0; var rafTicket6 = 0; var rafTicket12 = 0; var rafPurch = {}; var rafTotalTickets = 0; var rafList = []; var meanestPerson = ''; var nicestPerson = ''; var NNList = []; var noCountUsers = []; var msgArray = []; var NNTippers = []; //people whose tips don't count var noCount = []; //settings cb.settings_choices = [ { label: 'Naugthy Tip Ammount', name: 'naughtyTipAmmount', type: 'int', required: true, default: 26, minValue: 1 }, { label: 'Nice Tip Ammount', name: 'niceTip', type: 'int', required: true, default: 27, minValue: 2 }, { label: 'Naughty Votes', name: 'NaughtyVotes', type: 'int', default: 0 }, { label: 'Nice Votes', name: 'niceVotes', type: 'int', default: 0 }, { label: 'Naughty Message', name: 'naughtyMessage', type: 'str', default: 'You think that I am a Naughty' }, { label: 'Nice Message', name: 'niceMessage', type: 'str', default: 'I am an angel sent from heaven' }, { label: 'How many votes does each tip cast?', name: 'naughtyVotesPerTip', type: 'int', default: 3 }, { label: 'How many votes does each tip cast?', name: 'niceVotesPerTip', type: 'int', default: 3 }, //raffle area { label: 'Raffle subject', name: 'raffleSub', type: 'str', default: 'A Christmas Raffle where 3 prizes are available. Only one prize per person so one person can\'t win all 3' }, { label: 'Raffle Prizes', name: 'rafflePrizes', type: 'str', default: 'Candy, panties, and private' }, { label: 'Raffle Warning', name: 'raffleWarn', type: 'str', default: 'Only tips at the exact ammount will count towards raffle tickets. Tipping more then that stated amount will result in no raffle tickets. Prizes may be chnaged by the Broadcaster prior to the drawing of the winner or winners. If shipping is more than $50 US dollars the rest may be asked to be paid for by the winner shipping will be done by standard mail systems. a tracking Identification may be provided after the prize has been shipped. the shipper is not responsible for any tazes or VAT that may be add by the recieving country. the shipper is not responsible if the parcel is lost or damaged.' }, { label: '1 Raffle ticket costs', name: 'raffleTicket1', type: 'int', default: 98 }, { label: '6 raffle tickets cost', name: 'raffleTickets6', type: 'int', default: 499 }, { label: '12 raffle tickets cost', name: 'raffleTickets12', type: 'int', default: 999 }, { label: 'Users that you dont want tips to count for any of these offerings put user names in with a space between them', name: 'doesNotCount', type: 'str', default: 'downspout76' } ]; cb.onTip(function (tip) { var tipAmount = parseInt(tip['amount']); var pretUser = tip['from_user']; var tFanClub = tip['from_user_in_fanclub']; var tGender = tip['user_gender']; var tUser = pretUser.toLowerCase(); switch (tipAmount) { case 26: //naughty tip if (addNaughtyVote(tUser,tipAmount)) { sendNotice(naughtyMsg,'','#800000','#FFFFFF','bold',''); } else { sendNotice('********** ERROR ************ \nThe last vote was not counted from ' + tUser,cb.room_slug,'#FF0000','#FFFFFF','bold','red'); } break; case 27: //Nice tip if (addNiceVote(tUser,tipAmount)) { sendNotice(NiceMsg,'','#800000','#FFFFFF','bold',''); } else { sendNotice('********** ERROR ************ \nThe last vote was not counted from ' + tUser,cb.room_slug,'#FF0000','#FFFFFF','bold','red'); } break; default: break; } }); cb.onMessage(function (msg) { //when ever someone messages var msgUser = msg['user']; var msgMsg = msg['m']; var msgMod = (cb.room_slug === msg['user'] || msg['is_mod']); var msgArray = msgMsg.split(' '); var msgCommand = msgArray[0]; if (msgMsg.startsWith('/')) { //if (!doICount(msgUser)) { if (msgMod) { switch (msgCommand) { case '/addNoCount': var userToBeSilenced = msgArray[1]; addNoCount(userToBeSilenced, msgUser); cb.sendNotice('the User ' + userToBeSilenced + ' has been added to the No Count list',msgUser,'#FFC0CB','','bold',''); break; case '/showNoCount': showNoCount(msgUser); break; case '/niceLevel': break; case '/lead': whoLeads(); break; } } else { cb.sendNotice("Sorry your not allowed to do that",msgUser,'#FF0000','','bold',''); return msg; } //} } }); function doICount(user) { //this is for anyone that you may not want to count for raffle or votes cbjs.arrayContains(noCountUsers, user); //return array.contains(noCountUsers, user); } function addNoCount(user, mod) { //this is to add people to the no count list noCountUsers.push(user); return true; } function showNoCount(user) { //to show who is on no count list var printList = ''; var i = 0; while(noCountUsers[i]) { printlist += noCountUsers[i] + '\n'; i++; } cb.sendNotice('here are the people that are on the No Count list \n' + printList + ' ',user,'','','',''); } function isUserInNNTippers(user) { return cbjs.arrayContains(NNTippers, user); } function addNaughtyVote(user, vote) { if (!doICount(user)) { if (isUserInNNTippers(user)) { vote = (vote * naughtyTVA); totalNNPurchases += (vote * naughtyTVA); cb.sendNotice(user + 'casted ' + (votes * naughtyTVA) + ' votes for naughty','','','','',''); NNList.push(user + 'casted ' + (votes * naughtyTVA) + ' votes for naughty'); naughtyV += (vote * naughtyTVA); totalNNPurchases += (votes * naughtyTVA); return true; } else { cb.sendNotice('The first time someone tipped for naughty or nice','','','','',''); NNTippers.push(user); vote = (vote * naughtyTVA); totalNNPurchases += (vote * naughtyTVA); cb.sendNotice(user + 'casted ' + (votes * naughtyTVA) + ' votes for naughty', '', '', '', '', ''); NNList.push(user + 'casted ' + (votes * naughtyTVA) + ' votes for naughty'); naughtyV += (vote); return true; } } else { cb.sendNotice('*' + naughtyMsg + '*','','#FFC0CB','#000000','bold',''); return true; } } function addNiceVote(user, vote) { if (!doICount(user)) { if (isUserInNNTippers(user)) { vote = (vote * niceTVA); totalNNPurchases += (vote * niceTVA); cb.sendNotice(user + 'casted ' + (votes * niceTVA) + ' votes for naughty','','','','',''); NNList.push(user + 'casted ' + (votes * niceTVA) + ' votes for naughty'); naughtyV += (vote); return true; } else { cb.sendNotice('The first time someone tipped for naughty or nice','','','','',''); NNTippers.push(user); vote = (vote * niceTVA); totalNNPurchases += (vote * niceTVA); cb.sendNotice(user + 'casted ' + (votes * niceTVA) + ' votes for nice', '', '', '', '', ''); NNList.push(user + 'casted ' + (votes * niceTVA) + ' votes for nice'); niceV += (vote); return true; } } else { cb.sendNotice('*' + niceMsg + '*','','#FFC0CB','#000000','bold',''); return true; } } function createNNUser(object) { var tmp1 = { NNUser: object['user'], NNNumvotes: 0, NNUNice: 0, NNUNaug: 0, NNUHNiceKing: false, NNUHNaughKing: false }; } function whoLeads() { var winner = naughtyV > niceV ? "Nsughty is in the lead" : 'Nice is in the Lead'; cb.sendNotice(winner,'','#0000FF','#FFFFFF','bold',''); } //Raffle section. function init() { // if(cb.room_slug !== 'x_lily_x' || 'polymathcs') { // cb.settings_choices = [ // {name: 'sorry', // label: 'This bit is meant for one model sry for the inconvenience.', // type: 'int', // default: 0} // ]; // } else { /* var rafPurch = {}; var rafTotalTickets = 0; var rafList = []; var totalNNPurchases = 0; var meanestPerson = ''; var nicestPerson = ''; var NNList = {}; */ cb.sendNotice("The December Bot for Lily",cb.room_slug,'','','bold',''); naughtyTA = cb.settings.naughtyTipAmount; niceTA = cb.settings.niceTip; naughtyV = cb.settings.naughtyVotes; niceV = cb.settings.niceVotes; naughtyMsg = cb.settings.naughtyMessage; niceMsg = cb.settings.niceMessage; naughtyTVA = cb.settings.naughtyVotesPerTip; //The number of votes each tip casts niceTVA = cb.settings.niceVotesPerTip; //The number of votes each tip casts //raffle section rafSub = cb.settings.raffleSub; rafPrz = cb.settings.rafflePrizes; rafWarn = cb.settings.raffleWarn; rafTicket1 = cb.settings.raffleTicket1; rafTicket6 = cb.settings.raffleTickets6; rafTicket12 = cb.settings.raffleTicket12; // } } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.