Bots Home
|
Create an App
test adsfa1
Author:
papapa
Description
Source Code
Launch Bot
Current Users
Created by:
Papapa
var author='jhonhanar'; cb.settings_choices = [ { name: 'tokens', type: 'int', minValue: 1, label: 'How much do you want to charge per roll?', defaultValue: 33 }, { name: 'remove_winning_prize', type: 'choice', label: 'Remove prize from list after each roll?', choice1: 'Yes', choice2: 'No', defaultValue: 'No' }, { name: 'multirolls', type: 'int', minValue: 1, label: 'What is the maximum number of rolls you want a user to be able to make in a single tip? (set to 1 to disable) Example: If you set this to 3 and you charge 33 tokens per roll, a user could tip 66 for 2 rolls or 99 for 3 rolls. Any other tip amounts will be ignored.', defaultValue: 3 }, { name: 'minimum_rolls', type: 'choice', label: 'What is the minimum number of rolls before the rare dice can appear? (Keep this a secret!)', choice1: 10, choice2: 15, choice3: 20, choice4: 25, choice5: 30, choice6: 35, choice7: 40, choice8: 45, choice9: 50, defaultValue: 20 }, { name: 'notice_wait_time', type: 'choice', label: 'In minutes, how often should the app advertise itself?', choice1: 5, choice2: 10, choice3: 15, choice4: 20, choice5: 25, choice6: 30, choice7: 45, choice8: 60, defaultValue: 10 }, { name: 'change_room_subject', type: 'choice', label: 'Change room subject when using this bot?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, {name: 'prize_1', type: 'str', label: 'Prize for rolling 1', defaultValue: 'dance'}, {name: 'prize_2', type: 'str', label: 'Prize for rolling 2', defaultValue: 'dance (you choose song)'}, {name: 'prize_3', type: 'str', label: 'Prize for rolling 3', defaultValue: 'flash boobs'}, {name: 'prize_4', type: 'str', label: 'Prize for rolling 4', defaultValue: 'flash pussy'}, {name: 'prize_5', type: 'str', label: 'Prize for rolling 5', defaultValue: 'flash butt'}, {name: 'prize_6', type: 'str', label: 'Prize for rolling 6', defaultValue: 'flash (you choose what)'}, {name: 'prize_7', type: 'str', label: 'Prize for rolling 7', defaultValue: 'suck nipples'}, {name: 'prize_8', type: 'str', label: 'Prize for rolling 8', defaultValue: 'pussy close up'}, {name: 'prize_9', type: 'str', label: 'Prize for rolling 9', defaultValue: 'camel toe'}, {name: 'prize_10', type: 'str', label: 'Prize for rolling 10', defaultValue: 'spank butt'}, {name: 'prize_11', type: 'str', label: 'Prize for rolling 11', defaultValue: 'spank butt both hands'}, {name: 'prize_12', type: 'str', label: 'Prize for rolling 12', defaultValue: 'spank pussy'}, {name: 'prize_13', type: 'str', label: 'Prize for rolling 13 (RARE if using traditional dice)', defaultValue: 'finger pussy 10 mins'}, {name: 'sepchar', type: 'choice', choice1: 'Vertical Bar', choice2: 'Hearts', choice3:'Glitter',choice4:'Flowers',choice5:'Bow',choice6:'Hearts2',choice7:'Smiley',choice8:'Text Heart', choice9:'Text Diamond', choice10:'Text Star', defaultValue: 'Text Heart', label: "Separator character"}, { name:'item1', type:'str', label:'Item 1 (ejemplo 10--flash tits)', default: "69--flash boobs",}, { name:'item2', type:'str', required: false, label:'Item 2', default: "77--Spank ass",}, { name:'item3', type:'str', required: false, label:'Item 3', default: "199--Show pussy",}, { name:'item4', type:'str', required: false, label:'Item 4',default: "399--Naked Dance",}, { name:'item5', type:'str', required: false, label:'Item 5',default: "555--Striptease",}, { name:'item6', type:'str', required: false, label:'Item 6',default: "44--Change Song",}, { name:'item7', type:'str', required: false, label:'Item 7',default: "22--Smile",}, { name:'item8', type:'str', required: false, label:'Item 8',default: "500--Snap",}, { name:'item9', type:'str', required: false, label:'Item 9',default: "909--wsp",}, { name:'item10', type:'str', required: false, label:'Item 10',}, { name:'item11', type:'str', required: false, label:'Item 11',}, { name:'item12', type:'str', required: false, label:'Item 12',}, { name:'item13', type:'str', required: false, label:'Item 13',}, { name:'item14', type:'str', required: false, label:'Item 14',}, { name:'item15', type:'str', required: false, label:'Item 15',}, { name:'item16', type:'str', required: false, label:'Item 16',}, { name:'item17', type:'str', required: false, label:'Item 17',}, { name:'item18', type:'str', required: false, label:'Item 18',}, { name:'item19', type:'str', required: false, label:'Item 19',}, { name:'item20', type:'str', required: false, label:'Item 20',}, { name:'item21', type:'str', required: false, label:'Item 21',}, { name:'noticecolor', type:'str', label:'Notice color ', defaultValue: '#ff37f9'}, ]; var price = cb.settings.tokens; var langTokens = (price > 1) ? 'tokens' : 'token'; var numberOfSides = 6; var multiRolls = cb.settings.multirolls; var lastRoller = '--'; var lastPrizeWon = '--'; var rollCounter = 0; var tipCounter = 0; var winners = []; var prizes = []; var minimumRollsToGetRareDice = parseInt(cb.settings.minimum_rolls); var maxOutcome = 13; var dieImagePrefix = ':pinkdie'; var rareChance = 10; // percent chance of rolling a RARE (minimum rolls must also be met) var eastereggprice = ''; cb.onTip(function (tip) { var maxTip = multiRolls * price; var tipAmount = parseInt(tip['amount']); // check to see if tip was for a dice roll if (tipAmount >= price && (maxTip / tipAmount <= multiRolls) && (tipAmount % price == 0)) { var numberOfRolls = Math.floor(parseInt(tip['amount']) / price); for (var i = 0; i < numberOfRolls; i++) { roll(tip['from_user']); lastRoller = tip['from_user']; } } else { // Tip was for something else, don't roll the dice var textColor = '#000000'; var bgColor = '#D9FAD7'; //cb.sendNotice('Tip was not for dice roll.', '', bgColor, textColor, 'bold'); //tipCounter += parseInt(tip['amount']); cb.drawPanel(); } if(tipAmount==eastereggprice){ cb.sendNotice(':eastereggna', '', '#A9BCF5', '#ff37f9', 'bold'); roll(tip['from_user']); lastRoller = tip['from_user']; } var menumsg=''; for(i=1;i<=MAXITEMSS;i++){ if(tipAmount==tipmenuprice[i]){ menumsg=tip['from_user']+" tipped for: "+tipmenuitem[i]; cb.sendNotice(menumsg, cb.room_slug, '', '#ff37f9', 'bold'); } } }); function easteregg(){ eastereggprice = Math.floor(Math.random() * price) + 1; } cb.onDrawPanel(function (user) { return { 'template': '3_rows_12_22_31', 'row1_label': 'Last prize won:', 'row1_value': lastPrizeWon, 'row2_label': 'Last player:', 'row2_value': lastRoller, 'row3_value': tipCounter + ' ' + langTokens + ' received / rolled ' + rollCounter + ' time(s)' }; }); cb.onEnter(function (user) { WelcomeAd(user['user']); }); function WelcomeAd(username) { var msg = ""; var p = Math.floor(Math.random() * 6); if (username != undefined) { msg += noticesad[p] + " Welcome, " + username + "! I'm Andrea, read my bio for know me. :heartspng "; } cb.sendNotice(msg, username, ' #F5E3E3', '#FC5491', 'bold'); } cb.onMessage(function (msg) { var colorandom = Math.floor(Math.random() * 3) + 1; if (msg['m'].match(/!fanclub/i)) { msg['X-Spam'] = true; fanclubmsg(msg['user']); } if (msg['m'].match(/!winners/i)) { msg['X-Spam'] = true; showPrizesWon(msg['user']); } else if (msg['m'].match(/!prizes/i)) { msg['X-Spam'] = true; if (msg['m'].match(/all/i) && ((msg['is_mod'] == true) || (msg['user'] == cb.room_slug))) { showPrizes(); } else { showPrizes(msg['user']); } } if (msg['m'].match(/!roll/i)) { msg['X-Spam'] = true; showAppAd2(msg['user']); } if (msg['m'].match(/!tipmenu/i)) { msg['X-Spam'] = true; if ((msg['is_mod'] == true) || (msg['user'] == cb.room_slug)){ tipmenu(); } else if(msg['has_tokens']==true){ tipmenu(msg['user']); } } if(msg['has_tokens']==true){ if(colorandom == '1'){ msg['background'] = '#B3E5EC'; }else if(colorandom == '2'){ msg['background'] = '#c4f4fc'; }else if(colorandom == '3'){ msg['background'] = '#b7ffef'; } } else{ if(colorandom == '1'){ msg['background'] = '#ffbc75'; }else if(colorandom == '2'){ msg['background'] = '#fffb9e'; }else if(colorandom == '3'){ msg['background'] = '#b7ffb7'; } } if(msg['user']=='_naughtyangel_'){ if(msg['m'].match(/reacting/i) || msg['m'].match(/--------/i)){ msg['background'] = '#FFFFFF'; } else{ msg['m'] = queen(msg['m']); msg['background'] = 'linear-gradient(to right, #ff7cf6 20%, #fff 100%)'; } } if(msg['tipped_recently']==true){ if(colorandom == '1'){ msg['background'] = 'linear-gradient(to right, #adccf7 20%, #fff 100%)'; }else if(colorandom == '2'){ msg['background'] = 'linear-gradient(to right, #90baf4 20%, #fff 100%)'; }else if(colorandom == '3'){ msg['background'] = 'linear-gradient(to right, #6a9ee2 20%, #fff 100%)'; } } if(msg['tipped_alot_recently']==true){ if(colorandom == '1'){ msg['background'] = 'linear-gradient(to right, #c29de8 20%, #fff 100%)'; }else if(colorandom == '2'){ msg['background'] = 'linear-gradient(to right, #be8fef 20%, #fff 100%)'; }else if(colorandom == '3'){ msg['background'] = 'linear-gradient(to right, #dfcbf4 20%, #fff 100%)'; } } if(msg['tipped_tons_recently']==true){ if(colorandom == '1'){ msg['background'] = 'linear-gradient(to right, #b97af9 20%, #fff 100%)'; }else if(colorandom == '2'){ msg['background'] = 'linear-gradient(to right, #cc9cfc 20%, #fff 100%)'; }else if(colorandom == '3'){ msg['background'] = 'linear-gradient(to right, #a676e0 20%, #fff 100%)'; } } if(msg['is_mod']==true){ msg['background'] = 'linear-gradient(to right, #ff6d6d 20%, #fff 100%)'; } if(msg['in_fanclub']==true){ msg['background'] = 'linear-gradient(to right, #80f783 20%, #fff 100%)'; } if(msg['m'].match(/arcoiris/i)){ msg['background'] = 'linear-gradient(to right, #9400D3 20%, #4B0082, #0000FF, #00ff00, #ffff00, #ff7f00, #FF0000 100%)'; msg['c'] = '#ffffff'; if(msg['user']=='_naughtyangel_'){ msg['m'] = msg['m'].substring(21, msg['m'].length); } else{ msg['m'] = msg['m'].substring(8, msg['m'].length); } } return msg; }); function queen(message){ // var m = ''; m = ':crown_queen ' + message; return m; } function roll(username) { rollCounter++; var die1 = Math.floor(Math.random() * numberOfSides) + 1; var die2 = Math.floor(Math.random() * numberOfSides) + 1; // see if there's a chance we can roll a rare die if (rollCounter > minimumRollsToGetRareDice) { if (Math.random() <= 1 / (rareChance / 100)) { die1 = 7; } } var total = die1 + die2; var winner = false; if (total >= 1) { winner = true; var prize = cb.settings['prize_' + total]; } else { winner = false; var prize = 'A Thank You!'; } var prizeIndex = prizes.indexOf(prize); if (prizeIndex >= 0) { if (cb.settings.remove_winning_prize == 'Yes') prizes.splice(prizeIndex, 1); } else { prize = 'A Thank You!'; } var msg = dieImagePrefix + die1 + " " + dieImagePrefix + die2 + "\n"; msg += username + " rolled a " + total + "! \n".toUpperCase(); msg += "Roll #" + rollCounter + " | Prize: " + prize; var textColor = '#000000'; var bgColor = '#D9FAD7'; if (winner) textColor = '#067D00'; if (total == maxOutcome) { bgColor = '#FFDBF3'; textColor = '#A805A6'; } cb.sendNotice(msg, '', bgColor, textColor, 'bold'); lastPrizeWon = prize; winners.push("Roll #" + rollCounter + " (" + total + "): " + username + " - " + prize); cb.drawPanel(); } function setPrizes() { var rareText = ''; for (var i = 1; i <= maxOutcome; i++) { if (i == maxOutcome) rareText = " (RARE)"; prizes.push(cb.settings['prize_' + i] + rareText); } } function showPrizes(username) { if (prizes.length) { var rareText = ''; var msg = "##### POSSIBLE PRIZES #####"; for (var i = 1; i <= maxOutcome; i++) { if (i == maxOutcome) rareText = " (RARE)"; if (prizes.indexOf(cb.settings['prize_' + i] + rareText) >= 0) msg += "\nRoll " + i + " - " + cb.settings['prize_' + i] + rareText; } } else { var msg = "SORRY! There are no prizes left in the list, but thank you for the tip. :thumbsup"; } cb.sendNotice(msg, username, '#DBFBFF', '#008596', 'bold'); } function showPrizesWon(username) { var msg = "##### LAST 20 WINNERS #####"; msg += "\nList sorted in chronological order"; if (winners.length == 0) { cb.sendNotice('No one has won anything yet. Roll the dice to win a prize!', username, '', '', 'bold'); } else { var recentWinners = winners.slice(-20); for (var i = 0; i < recentWinners.length; i++) msg += "\n" + recentWinners[i]; cb.sendNotice(msg, username, '#FFF0DE', '#8A4900', 'bold'); } } function advertise() { showAppAd(); cb.setTimeout(advertise, parseInt(cb.settings.notice_wait_time) * 60000); } function showAppAd(username) { var msg = ""; if (username != undefined) { msg += "Welcome, " + username + "! \n"; } msg += "We are playing Roll the Dice \n"; msg += ":minidie Tip " + price + " " + langTokens + " to roll the dice. :minidie \n"; msg += "Find the easter egg, between 1-" + price + " " + langTokens + " :eastereggna2 \n"; msg += "Type \"!prizes\" to see the list of prizes. \n"; msg += "Type \"!tipmenu\" to see the tip menu \n"; msg+= "Type \"!roll\" to see full info."; var msg2 = "Join my Fan Club. Type \"!fanclub\" for info"; cb.sendNotice(msg, username, '', '#ff37f9', 'bold'); cb.sendNotice(msg2, username, '', '#090', 'bold'); } function showAppAd2(username) { var msg = ""; msg += "We are playing Roll the Dice \n"; msg += "Find the easter egg, between 1-" + price + " " + langTokens + " :eastereggna2 \n"; msg += "Each roll reveals a prize. There are " + prizes.length + " possible prizes.\n"; if (cb.settings.remove_winning_prize == 'Yes') { msg += "Each prize won will be removed from the list.\n"; } else { msg += "Each prize won will stay on the list.\n"; } msg += "Tip " + price + " " + langTokens + " to roll the dice. \n"; if (multiRolls > 1) msg += "You can roll a maximum of " + multiRolls + " times in a single tip (" + (multiRolls*price) + " tokens). \n"; msg += "Type \"!prizes\" to see the list of prizes. \n"; msg += "Type \"!winners\" to see a list of the last 20 winners."; cb.sendNotice(msg, username, '', '#ff37f9', 'bold'); } var HEART = '\u2665'; // ♥ BDIAMOND = '\u2666'; // ♦ BSTAR = '\u2605'; // ★ var tip_amt = 0; var separator_char = "| "; var msgmenu; var tipmenuprice = []; var tipmenuitem= []; var MAXSEP = 9; var MAXITEMSS = 21; separators = [ {label:'Hearts',shortcut:':heart2'}, {label:'Glitter',shortcut:':pixelglitter'}, {label:'Flowers',shortcut:':tinyflower2'}, {label:'Bow',shortcut:':bluebow'}, {label:'Hearts2',shortcut:':pixelheart'}, {label:'Smiley',shortcut:':smile'}, {label:'Text Heart',shortcut:HEART}, {label:'Text Diamond',shortcut:BDIAMOND}, {label:'Text Star',shortcut:BSTAR}, ] function tipmenu(username) { for (i=0;i<=MAXSEP-1;i++) { if (cb.settings['sepchar'] == separators[i].label) { separator_char = separators[i].shortcut + ' '; } } msgmenu = 'Tip Menu: '; for (i=1;i<=MAXITEMSS;i++) { var tmp; tmp=cb.settings['item' + i]; if (tmp) { var arr= tmp.split('--'); if (arr[1]===undefined) { cb.sendNotice('Error-You need two dashes to separate the tip amount and menu item for item no '+ i,'','',cb.settings['noticecolor'],'bold'); } else { var amt=parseInt(arr[0]); if (amt>0) { tipmenuprice[i]=amt; tipmenuitem[i]=arr[1]; if (i>=2) { msgmenu += separator_char; } msgmenu += arr[1] + '(' + amt + ') '; } } } } if (msgmenu!= 'Tip Menu: ') { cb.sendNotice(msgmenu,username,cb.settings['noticecolor'],'#fff','bold'); } else { cb.sendNotice('Error-No menu items found','','',cb.settings['noticecolor'],'bold'); } } var i=0; var j=0; var MAXITEMS=6; var noticesad = [":naughtyangel_",":naughtyangelsexy",":naughtyangelapple",":naughtyangelsing", ":naughtyangeldance",":naughtyangelschool"] function noticesAd() { var msg; msg = noticesad[j]; j++; j %= MAXITEMS; cb.sendNotice(msg,'','#f238e9','#f238e9','bold'); cb.setTimeout(noticesAd, 420000); } function fanclubmsg(username){ var aviso=HEART+" Cool green color in chat. "+HEART+"\n"; aviso +=HEART+" Free PM. "+HEART+"\n" ; aviso +=HEART+" Get access to my locked photos. "+HEART; cb.sendNotice(aviso, username, '', '#090', 'bolder'); } function init() { setPrizes(); advertise(); easteregg(); if(cb.room_slug=='_naughtyangel_' || cb.room_slug==author){ noticesAd(); } } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.