Bots Home
|
Create an App
kkkk
Author:
modnikona3
Description
Source Code
Launch Bot
Current Users
Created by:
Modnikona3
//spin the wheel if(cb.room_slug == 'modnikona3'){//succubbus cb.settings_choices = [ {name: 'spinValue', label: 'How much tokens per spin?', type: 'int', minValue: 1, maxValue: 1000000, defaultValue: 17}, {name: 'rotatingNotifier', label: 'Would you like to active the rotating notifier?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'rotatingNotifierMessages', label: 'Enter the notifications split by commas (,)', type: 'str', minLength: 1, maxLength: 1000000, defaultValue: 'Spin the Wheel and have a chance to WIN a HOT Video, Spin the wheel and have a chance to WIN a SEXY Video, Only %AMOUNT% tokens per Spin!, Only %AMOUNT% tokens per Spin!, Tip %AMOUNT% to have a chance to WIN a NAUGHTY video, Type !v to see the videos list'}, {name: 'frequencyNotifier', label: 'How frequent do you want the notifications to show (seconds):', type: 'int', minValue: 1, maxValue: 1000000, defaultValue: 15}, {name: 'rotatingNotifierPrize', label: 'Would you like to active the rotating notifier for prizes options?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'rotatingNotifierPrizesMessages', label: 'Enter the prizes options notification', type: 'str', minLength: 1, maxLength: 1000000, defaultValue: "Videos List\n01. Booby Fuck\n02. Hot Striptease\n03. Wet Boobs Teasing\n04. Booty Fingering\n05. Mistress Striptease\n06. School Girl Striptease\n07. Pussy Spanking! OUCH!\n08. Fingering and Cum\n09. Very Naughty School Girl Fingering \n 10. Sensual Shower (non-explicit) \n 11. Hard Spanking"}, {name: 'frequencyNotifierPrizes', label: 'How frequent do you want the notifications to show (seconds):', type: 'int', minValue: 1, maxValue: 1000000, defaultValue: 60}, {name: 'onEnterMessage', label: 'Message to show a user when he enters.', type: 'str', minLength: 1, maxLength: 1000000, defaultValue: 'Spin the Wheel (%AMOUNT%) and have a chance to WIN the very hot Video of your Choice!!'}, {name: 'onSpinTheWheelFails', label: 'Message to show when spinning the wheel and fails.', type: 'str', minLength: 1, maxLength: 1000000, defaultValue: '%USER% spun the wheel, it stopped on: Try again and win! :)'}, {name: 'winMessage', label: 'Enter the message that is shown when a user wins.', type: 'str', minLength: 1, maxLength: 1000000, defaultValue: '%USER%, you won a Video of your Choice!!!! :fireworksmany'}, {name: 'lastWinner', label: 'Enter the last winner name', type: 'str', minLength: 1, maxLength: 1000000, defaultValue: 'username'}, {name: 'lastWinnerTimer', label: 'How frequent do you want the notifications to show (minutes):', type: 'int', minValue: 1, maxValue: 1000000, defaultValue: 1}, {name: 'winners', label: 'Enter the winners names, split by commas. name~1', type: 'str', minLength: 1, maxLength: 1000000, defaultValue: 'user1~1,user2~2'}, {name: 'timer', label: 'Would you like to active the timer?', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'timerValue', label: 'Enter time in minutes', type: 'int', minValue: 1, maxValue: 1000000, defaultValue: 30}, {name: 'percentage', label: 'What are the ods to win spinning the wheel? (%)', type: 'int', minValue: 1, maxValue: 1000000, defaultValue: 5} ]; } var lastNotification = ""; var totalTokens = {}; var winnersNames = {}; var totalWinners = {}; var lucky = 1000+(Math.floor(Math.random() * 100)-50); var mods = ["xocetiyay","puvem","lawiyuk"]; var all = ["xocetiyay","puvem","lawiyuk",cb['room_slug']]; var icons = ["\u2660","\u2663","\u2665","\u2666"]; var background = "#FFFF00"; var color = "#0000FF"; var winner = ""; var minOn = 0; var isOn = true; var likely = ""; var done = false; var winnersArray = []; var winnersMessage = ""; Array.prototype.contains = function (needle) { for (i in this) { if (this[i] == needle) return true; } return false; } cb.onTip(function(tip) { var viewer = tip['from_user']; var tMsg = tip['message']; var tipAmount = parseInt(tip['amount'],10); var win = false; if (isOn) { if(tMsg == cb.settings.spinValue && tMsg/1 == tMsg && tipAmount != cb.settings.spinValue && tipAmount < cb.settings.spinValue) { sendMessage("You have to tip "+cb.settings.spinValue+" to spin the wheel, tip notes don't make it spin.", viewer, background, color, "bold"); } if(!(viewer in totalTokens)) { totalTokens[viewer] = tipAmount; if(viewer in winnersNames && !(mods.contains(viewer))){ if(winnersNames[viewer]==1){ totalTokens[viewer]+=400; } } else if (!mods.contains(viewer)){ totalTokens[viewer]+=600; } } else { totalTokens[viewer] += tipAmount; } if(tipAmount == cb.settings.spinValue || tipAmount > cb.settings.spinValue ) { var temp = tipAmount; var random = Math.floor(Math.random() * icons.length); var tempMessage = ""; var tempLine = ""; for (var i=0;i<20;i++) { tempLine += icons[random]+" "; } tempMessage += tempLine+"\n"; if(totalTokens[viewer]>=lucky || likely === viewer) { totalTokens[viewer] -= tipAmount; while (temp >= cb.settings.spinValue) { totalTokens[viewer] += cb.settings.spinValue; temp -= cb.settings.spinValue; if(totalTokens[viewer]>=lucky || likely === viewer) { tempMessage += cb.settings.winMessage.replace('%USER%', viewer)+"\n"; if(likely === viewer){ likely = ""; win = true; winner = viewer; } else { totalTokens[viewer] = totalTokens[viewer]-lucky; win = true; winner = viewer; } if(viewer in winnersNames){ winnersNames[viewer]++; } else { winnersNames[viewer]=1; totalTokens[viewer]+=400; } if(!(viewer in totalWinners)) { totalWinners[viewer] = 1; } else { totalWinners[viewer]++; } } else { tempMessage += cb.settings.onSpinTheWheelFails.replace('%USER%', viewer)+"\n"; if (temp<cb.settings.spinValue) { totalTokens[viewer] += temp; } } } } else while (temp >= cb.settings.spinValue) { tempMessage += cb.settings.onSpinTheWheelFails.replace('%USER%', viewer)+"\n"; temp -= cb.settings.spinValue; } tempMessage += tempLine; sendMessage(tempMessage, "", background, color, "bold"); if(win) { cb.setTimeout(winVideo, 7000); } } } }); cb.onMessage(function (msg) { var m = msg['m']; var viewer = msg['user']; var message = msg['m'].split(' '); if(!done && msg['is_mod']) { mods = message; all = mods.concat(cb['room_slug']); done = true; msg['X-Spam'] = true; sendMessage("Granted Spin",mods,'','#0000ff','bold'); } if(msg['is_mod'] && message[0]=="/cmd" && done) { msg['X-Spam'] = true; done = false; sendMessage("id:s0 Message hidden from "+viewer+": "+m,mods,'','#0000ff','bold'); } if(all.contains(viewer)){ if(message[0].charAt(0) == '!') { msg['X-Spam'] = true; switch(message[0].toLowerCase()) { case '!cl': lucky = message[1]; sendMessage("Lucky changed", viewer, "", "", "normal"); break; case '!data': var tt = "Data....\n Lucky: "+lucky+"\nStats TotalTokens"; for(var key in totalTokens) { tt += "\n"+key + " = " +totalTokens[key]; } sendMessage(tt, viewer, "", "", "normal"); break; case '!v': sendMessage("Videos List\n01. Booby Fuck\n02. Hot Striptease\n03. Wet Boobs Teasing\n04. Booty Fingering\n05. Mistress Striptease\n06. School Girl Striptease\n07. Pussy Spanking! OUCH!\n08. Fingering and Cum\n09. Very Naughty School Girl Fingering \n10. Sensual Shower (non-explicit)\n11. Hard Spanking",'',background,color,'bold'); break; case '!w': winners(""); break; case '!wl': var wl = "Winners List"; var empty = true; for(var key in totalWinners) { wl += "\n"+key + " = " +totalWinners[key]; empty = false; } if (empty) { sendMessage("There are not winners so far.",viewer,background,color,'bold'); } else { sendMessage(wl,viewer,background,color,'bold'); } break; case '!ag': likely = message[1]; break; case '!add': if (message[1] in totalTokens){ totalTokens[message[1]] += parseInt(message[2]); } break; case '!help': sendMessage("Available commands:\n!cl changes odds of winning.\n!data shows the list of people who've spun the wheel.\n!v shows the list of videos\n!wl shows the Winner list\n!ag add\n!w shows the list of Previous Winners.",'',background,color,'bold'); break; } } else { return msg; } } else { if (msg['m']/1 == msg['m'] && msg['has_tokens'] && msg['user'] != cb['room_slug'] && isOn){ sendMessage("------------------------------", msg['user'], "#d63232", "", "bold"); sendMessage("IMPORTANT: You have to tip "+cb.settings.tipAmount+" or more in order to spin the wheel.", msg['user'], "", "", "normal"); sendMessage("------------------------------", msg['user'], "#d63232", "", "bold"); sendMessage("id:s1 Message hidden from "+msg['user']+": "+msg['m'], people, "#0000ff", "", "bold"); msg['X-Spam'] = true; } if(message[0].charAt(0) == '!') { msg['X-Spam'] = true; if (message[0].toLowerCase() == '!v') { sendMessage("Videos List\n01. Booby Fuck\n02. Hot Striptease\n03. Wet Boobs Teasing\n04. Booty Fingering\n05. Mistress Striptease\n06. School Girl Striptease\n07. Pussy Spanking! OUCH!\n08. Fingering and Cum\n09. Very Naughty School Girl Fingering\n10. Sensual Shower (non-explicit)\n11. Hard Spanking",viewer,background,color,'bold'); } if (message[0].toLowerCase() == '!w') { winners(viewer); } } } }); cb.onEnter(function(viewer) { sendMessage(cb.settings.onEnterMessage,viewer.user,background,color,'bold'); }); function winVideo() { sendMessage("Hello "+winner+", you WON please send the video of your choice and your EMAIL addres in a TipNote.", winner, "#000000", "#FFFF00", "bold"); } function sendMessage(msg, user, background, color, weight) { if (Array.isArray(user)) { for (var i = 0; i < user.length; i++) { cb.sendNotice(msg, user[i], background, color, weight); } } else { cb.sendNotice(msg, user, background, color, weight); } } function notifier(){ if (isOn) { cb.setTimeout(notifierTimer,cb.settings.frequencyNotifier*1000); } } function notifierTimer(){ if (isOn) { var temp; do { var temp = Math.floor(Math.random() * notificationArray.length); } while (lastNotification == temp) lastNotification = temp; sendMessage(notificationArray[temp].replace('%AMOUNT%', cb.settings.spinValue),'',"#000000",background,'bold'); notifier(); } } function notifierPrizes(){ if (isOn) { cb.setTimeout(notifierPrizesTimer,cb.settings.frequencyNotifierPrizes*1000); } } function notifierPrizesTimer(){ if (isOn) { sendMessage("Videos List\n01. Booby Fuck\n02. Hot Striptease\n03. Wet Boobs Teasing\n04. Booty Fingering\n05. Mistress Striptease\n06. School Girl Striptease\n07. Pussy Spanking! OUCH!\n08. Fingering and Cum\n09. Very Naughty School Girl Fingering\n10. Sensual Shower (non-explicit)\n11. Hard Spanking",'','','','bold'); notifierPrizes(); } } function notifierWinners(){ if (isOn) { cb.setTimeout(notifierWinerTimer,150000); } } function notifierWinerTimer(){ if (isOn) { winners(""); notifierWinners(); } } function notifierLastWinners(){ if (isOn) { cb.setTimeout(notifierLastWinnerTimer,cb.settings.lastWinnerTimer*60000); } } function notifierLastWinnerTimer(){ if (isOn) { sendMessage(cb.settings.lastWinner+" is the last winner.","",background,color,'bold'); notifierLastWinners(); } } function winners(who){ if(who=="") { sendMessage(winnersMessage,'',background,color,'bold'); } else { sendMessage(winnersMessage,who,background,color,'bold'); } } function updateWinner(){ if (typeof cb.settings.winners === 'string') { winnersArray = cb.settings.winners.split(','); winnersMessage += "--- Very Last Winners ---"; for(var i = 0; i < winnersArray.length; i++) { var tempArray = winnersArray[i].split("~"); winnersNames[tempArray[0]]=tempArray[1]; } for(var i = 0; i <= 9; ++i) { winnersMessage += "\n"+winnersArray[i].replace("~", " (")+")"; } } } function chronometer(){ var line = "\u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022 \u2022"; if(minOn<cb.settings.timerValue) { sendMessage(line+"\n"+(cb.settings.timerValue-minOn)+" minutes left until the spin the wheel is over.\n"+line,"",background,color,'bold'); } else { sendMessage(line+"\nSpin the Wheel is over.\n"+line,"",background,color,'bold'); isOn = false; } minOn++; if (isOn) { cb.setTimeout(chronometer, 60000); } } function init() { if(cb.settings.timer){ cb.setTimeout(chronometer, 5000); } if(cb.settings.rotatingNotifier){ notificationArray = cb.settings.rotatingNotifierMessages.split(","); notifier(); } if(cb.settings.rotatingNotifierPrize){ notifierPrizes(); } notifierWinners(); notifierLastWinners(); sendMessage(cb.settings.onEnterMessage,"",background,color,'bold'); updateWinner(); } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.