Bots Home
|
Create an App
18's Token Poll & Tip Menu
Author:
18yearoldcouple
Description
Source Code
Launch Bot
Current Users
Created by:
18yearoldcouple
function showBoard(e){var t="---------- Token Poll board"+(""==e?" (sent to all)":"")+": ----------\n",l=cb.settings.poll_title;if(poll_running){var o=[];for(var n in opt_votes)o.push({votes:opt_votes[n],id:n});for(o.sort(function(e,t){return t.votes-e.votes}),i=0;i<o.length;i++)0!=opt_tokens[o[i].id]&&(l+="\n - "+opt_labels[o[i].id]+" ["+opt_votes[o[i].id]+" votes]: "+opt_tokens[o[i].id]+" tokens");var s="";switch(cb.settings.poll_mode){case txt_minutes:s=mins_remain+" minute"+(mins_remain>1?"s":"")+" remaining to vote\n";break;case txt_votecount:s=votes_remain+" vote"+(votes_remain>1?"s":"")+" remaining before poll closes\n";break;case txt_wincount:s="First option to "+cb.settings.poll_count+" votes wins!\n"}s+="Simply tip the shown token amounts to register your vote. Type !poll at any time to see poll board.",void 0==e&&(e="",cb.setTimeout(showBoard,60*cb.settings.board_interval*1e3)),cb.sendNotice(t+l,e,cb.settings.background,cb.settings.foreground,"bold"),cb.sendNotice(s,e,cb.settings.background,cb.settings.foreground)}}function sanitizeBoard(){for(i=1;i<opt_tokens.length;i++)if(0==opt_tokens[i]||""!=opt_labels[i])for(j=0;j<i;j++){if(0!=opt_tokens[i]&&opt_tokens[i]==opt_tokens[j]){cb.sendNotice("Token Poll Warning: Token amount for option "+(i+1)+" is not unique -- removing from poll board!",cb.soom_slug,cb.settings.background,fg_warn,"bold"),opt_tokens[i]=0;break}if(0!=opt_tokens[i]&&opt_labels[i]==opt_labels[j]){cb.sendNotice("Token Poll Warning: Label for option "+(i+1)+" is not unique -- removing from poll board!",cb.soom_slug,cb.settings.background,fg_warn,"bold"),opt_tokens[i]=0;break}}else cb.sendNotice("Token Poll Warning: Label for option "+(i+1)+" is blank -- removing from poll board!",cb.soom_slug,cb.settings.background,fg_warn,"bold"),opt_tokens[i]=0}function showWinner(){var e=[];for(i=0;i<opt_tokens.length;i++)e[i]=i;e.sort(function(e,t){return opt_votes[t]-opt_votes[e]});var t=1;for(i=1;i<opt_tokens.length&&opt_votes[e[i]]==opt_votes[e[0]];i++)0!=opt_tokens[e[i]]&&t++;var l="---------- Token Poll has ended! ----------\n",o="Winner"+(t>1?"s ("+t+"-way tie)":"")+":";for(i=0;i<t;i++)0!=opt_tokens[e[i]]&&(o+="\n - "+opt_labels[e[i]]+": "+opt_votes[e[i]]+" votes");cb.sendNotice(l+o,"",cb.settings.background,cb.settings.foreground,"bold")}function checkPollEnd(){var e=poll_running;switch(cb.settings.poll_mode){case txt_never:return;case txt_minutes:1>mins_remain&&(poll_running=!1);break;case txt_votecount:1>votes_remain&&(poll_running=!1);break;case txt_wincount:for(i=0;i<opt_tokens.length;i++)opt_votes[i]>=cb.settings.poll_count&&(poll_running=!1)}e&&!poll_running&&showWinner()}function tickTimer(){mins_remain--,checkPollEnd(),mins_remain>0&&cb.setTimeout(tickTimer,6e4)}function whatTime(){var e=new Date,t=3600*startTime.getHours()+60*startTime.getMinutes()+startTime.getSeconds()-3600*e.getHours()-60*e.getMinutes()-e.getSeconds();return t/=60}function to_hex(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t}function toVips(e,t){for(var l=0;l<colorList.length;l++)colorList[l][1]>=cb.settings.lvl1tip&&cb.sendNotice("► "+t+": "+e,colorList[l][0],"#993399","#fff","bolder");cb.sendNotice("► "+t+": "+e,"","#993399","#fff","bolder","red"),cb.sendNotice("► "+t+": "+e,cb.room_slug,"#993399","#fff","bolder")}function html_color(e,t,l){return"#"+to_hex(e)+to_hex(t)+to_hex(l)}function hue_strength(e){return Math.pow(.5*(1+Math.cos(2*Math.PI*e/120)),gamma)}function assign_color(){for(currentMinutes=whatTime(),baseMinutes=typicalTime,percentDone=currentMinutes/baseMinutes,percentDone=Math.abs(percentDone);percentDone>1;)percentDone-=1;var e=200,t=100,l=0;return percentDone<.25&&(e=200),.25<=percentDone&&percentDone<.5&&(e=200*(.5-percentDone)*4),.5<=percentDone&&percentDone<.75&&(e=0),.75<=percentDone&&percentDone<1&&(e=200*(percentDone-.75)*4),percentDone<.25&&(t=200*percentDone*4),.25<=percentDone&&percentDone<.5&&(t=200),.5<=percentDone&&percentDone<.75&&(t=200*(.75-percentDone)*4),.75<=percentDone&&percentDone<1&&(t=0),percentDone<.25&&(l=0),.25<=percentDone&&percentDone<.5&&(l=200*(percentDone-.25)*4),.5<=percentDone&&percentDone<.75&&(l=200),.75<=percentDone&&percentDone<1&&(l=200*(1-percentDone)*4),e=Math.round(e),t=Math.round(t),l=Math.round(l),html_color(e,t,l)}function pick_color(){var e=360*Math.random(),t=Math.floor(e/60),l=255*(min_level+(1-min_level)*Math.random()*hue_strength(e)),o=e/60-t,n=Math.floor(l*(1-o)),s=Math.floor(l*o);l=Math.floor(l);var i=0,a=0,r=0;return 0==t?(i=l,a=s,r=0):1==t?(i=n,a=l,r=0):2==t?(i=0,a=l,r=s):3==t?(i=0,a=n,r=l):4==t?(i=s,a=0,r=l):5==t&&(i=l,a=0,r=n),html_color(i,a,r)}function get_user_color(e){return"undefined"==typeof colors[e]&&set_user_color(e),colors[e]}function set_user_color(e){"Disabled"==cb.settings.whatMode&&(colors[e]="#444"),"Random"==cb.settings.whatMode&&(colors[e]=pick_color()),"Ordered"==cb.settings.whatMode&&(colors[e]=assign_color())}function get_user_font(e){return"undefined"==typeof fonts[e]&&set_user_font(e),fonts[e]}function pick_font(){var e=Math.floor(Math.random()*available_fonts.length);return available_fonts[e]}function set_user_font(e){fonts[e]=pick_font()}function findRainbowTipper(e,t){for(var l=0;l<colorList.length;l++)if(colorList[l][0]==e){colorList[l][1]=colorList[l][1]+t;break}return l==colorList.length&&(colorListPopulate(e,t),findRainbowTipper(e,0)),(cb.settings.vipPromote="Yes")&&(j=colorList[l][1],cb.settings.lvl1tip>j-t&&j>=cb.settings.lvl1tip&&j<cb.settings.lvl2tip&&"Yes"==cb.settings.lvl1yes&&cb.sendNotice("We've got a new VIP CLUB member! "+colorList[l][0]+" is now "+cb.settings.lvl1name+"!!","","#666",cb.settings.lvl1color,"bolder"),cb.settings.lvl2tip>j-t&&j>=cb.settings.lvl2tip&&j<cb.settings.lvl3tip&&"Yes"==cb.settings.lvl2yes&&cb.sendNotice("It's a Promotion! "+colorList[l][0]+" is now "+cb.settings.lvl2name+"!!","","#666",cb.settings.lvl2color,"bolder"),cb.settings.lvl3tip>j-t&&j>=cb.settings.lvl3tip&&j<cb.settings.lvl4tip&&"Yes"==cb.settings.lvl3yes&&cb.sendNotice("Just like that! "+colorList[l][0]+" is now "+cb.settings.lvl3name+"!!","","#666",cb.settings.lvl3color,"bolder"),cb.settings.lvl4tip>j-t&&j>=cb.settings.lvl4tip&&j<cb.settings.lvl5tip&&"Yes"==cb.settings.lvl4yes&&cb.sendNotice("Ayye, well done! "+colorList[l][0]+" is now "+cb.settings.lvl4name+"!!","","#666",cb.settings.lvl4color,"bolder"),cb.settings.lvl5tip>j-t&&j>=cb.settings.lvl5tip&&j<cb.settings.lvl6tip&&"Yes"==cb.settings.lvl5yes&&cb.sendNotice("BAM BOOM BAM! "+colorList[l][0]+" is now "+cb.settings.lvl5name+"!!","","#666",cb.settings.lvl5color,"bolder"),cb.settings.lvl6tip>j-t&&j>=cb.settings.lvl6tip&&j<cb.settings.lvl7tip&&"Yes"==cb.settings.lvl6yes&&cb.sendNotice("You've reached new heights! I'm impressed :D "+colorList[l][0]+" is now "+cb.settings.lvl6name+"!!","","#666",cb.settings.lvl6color,"bolder"),cb.settings.lvl7tip>j-t&&j>=cb.settings.lvl7tip&&"Yes"==cb.settings.lvl7yes&&cb.sendNotice("Guess who's ontop of the WORLD now? "+colorList[l][0]+" is now "+cb.settings.lvl7name+"!!","","#666",cb.settings.lvl7color,"bolder")),l}function colorListPopulate(e,t){colorList.push([e,t])}function welcomeVip(e){var t="#ddd",l=colorList[e][1];l>=cb.settings.lvl1tip&&"Yes"==cb.settings.lvl1yes&&(t=cb.settings.lvl1color),l>=cb.settings.lvl2tip&&"Yes"==cb.settings.lvl2yes&&(t=cb.settings.lvl2color),l>=cb.settings.lvl3tip&&"Yes"==cb.settings.lvl3yes&&(t=cb.settings.lvl3color),l>=cb.settings.lvl4tip&&"Yes"==cb.settings.lvl4yes&&(t=cb.settings.lvl4color),l>=cb.settings.lvl5tip&&"Yes"==cb.settings.lvl5yes&&(t=cb.settings.lvl5color),l>=cb.settings.lvl6tip&&"Yes"==cb.settings.lvl6yes&&(t=cb.settings.lvl6color),l>=cb.settings.lvl7tip&&"Yes"==cb.settings.lvl7yes&&(t=cb.settings.lvl7color),"#ddd"!=t&&colorEntered[e]<3&&(cb.sendNotice("Welcome: "+colorList[e][0]+"!!","",t,"#111","bold"),colorEntered[e]++)}function cyaVip(e){var t="#ddd",l=colorList[e][1];l>=cb.settings.lvl1tip&&"Yes"==cb.settings.lvl1yes&&(t=cb.settings.lvl1color),l>=cb.settings.lvl2tip&&"Yes"==cb.settings.lvl2yes&&(t=cb.settings.lvl2color),l>=cb.settings.lvl3tip&&"Yes"==cb.settings.lvl3yes&&(t=cb.settings.lvl3color),l>=cb.settings.lvl4tip&&"Yes"==cb.settings.lvl4yes&&(t=cb.settings.lvl4color),l>=cb.settings.lvl5tip&&"Yes"==cb.settings.lvl5yes&&(t=cb.settings.lvl5color),l>=cb.settings.lvl6tip&&"Yes"==cb.settings.lvl6yes&&(t=cb.settings.lvl6color),l>=cb.settings.lvl7tip&&"Yes"==cb.settings.lvl7yes&&(t=cb.settings.lvl7color),"#ddd"!=t&&colorEntered[e]<3&&(cb.sendNotice("Peace Out: "+colorList[e][0],cb.room_slug,t,"#111","bold"),colorEntered[e]++)}function findColor(e){for(var t=0;t<colorList.length&&colorList[t][0]!=e;t++);t==colorList.length&&(colorListPopulate(e,0),findRainbowTipper(e,0));var l=colorList[t][1],o="undefined";return l>=cb.settings.lvl1tip&&"Yes"==cb.settings.lvl1yes&&(o=cb.settings.lvl1color),l>=cb.settings.lvl2tip&&"Yes"==cb.settings.lvl2yes&&(o=cb.settings.lvl2color),l>=cb.settings.lvl3tip&&"Yes"==cb.settings.lvl3yes&&(o=cb.settings.lvl3color),l>=cb.settings.lvl4tip&&"Yes"==cb.settings.lvl4yes&&(o=cb.settings.lvl4color),l>=cb.settings.lvl5tip&&"Yes"==cb.settings.lvl5yes&&(o=cb.settings.lvl5color),l>=cb.settings.lvl6tip&&"Yes"==cb.settings.lvl6yes&&(o=cb.settings.lvl6color),l>=cb.settings.lvl7tip&&"Yes"==cb.settings.lvl7yes&&(o=cb.settings.lvl7color),l<cb.settings.lvl1tip&&"Yes"==cb.settings.lvl1yes&&(o="null"),"null"!=o?o:void 0}function changeMessage(e,t){for(var l=0;l<colorList.length&&colorList[l][0]!=e;l++);l==colorList.length&&(colorListPopulate(e,0),findRainbowTipper(e,0));var o=colorList[l][1],n="undefined",s=" ";return"Yes"==cb.settings.tipTitles&&colorList[l][1]>0&&(s=" |"+o+"| "),o>=cb.settings.lvl1tip&&o<cb.settings.lvl2tip&&"Yes"==cb.settings.lvl1yes&&(n=cb.settings.lvl1color,t=cb.settings.lvl1icon+s+t),o>=cb.settings.lvl2tip&&o<cb.settings.lvl3tip&&"Yes"==cb.settings.lvl2yes&&(n=cb.settings.lvl2color,t=cb.settings.lvl2icon+s+t),o>=cb.settings.lvl3tip&&o<cb.settings.lvl4tip&&"Yes"==cb.settings.lvl3yes&&(n=cb.settings.lvl3color,t=cb.settings.lvl3icon+s+t),o>=cb.settings.lvl4tip&&o<cb.settings.lvl5tip&&"Yes"==cb.settings.lvl4yes&&(n=cb.settings.lvl4color,t=cb.settings.lvl4icon+s+t),o>=cb.settings.lvl5tip&&o<cb.settings.lvl6tip&&"Yes"==cb.settings.lvl5yes&&(n=cb.settings.lvl5color,t=cb.settings.lvl5icon+s+t),o>=cb.settings.lvl6tip&&o<cb.settings.lvl7tip&&"Yes"==cb.settings.lvl6yes&&(n=cb.settings.lvl6color,t=cb.settings.lvl6icon+s+t),o>=cb.settings.lvl7tip&&"Yes"==cb.settings.lvl7yes&&(n=cb.settings.lvl7color,t=cb.settings.lvl7icon+s+t),o<cb.settings.lvl1tip&&"Yes"==cb.settings.lvl1yes&&(n="null",t=s+t),t}function howManyLeft(e){for(var t=0;t<colorList.length&&colorList[t][0]!=e;t++);t==colorList.length&&(colorListPopulate(e,0),findRainbowTipper(e,0));var l,o=colorList[t][1];if(o>99){o>=cb.settings.lvl1tip&&o<cb.settings.lvl2tip&&"Yes"==cb.settings.lvl1yes&&(l=cb.settings.lvl2tip-o,cb.sendNotice(l+" left until you're "+cb.settings.lvl2name,e,"","#BBBBBB","")),o>=cb.settings.lvl2tip&&o<cb.settings.lvl3tip&&"Yes"==cb.settings.lvl2yes&&(l=cb.settings.lvl3tip-o,cb.sendNotice(l+" left until you're "+cb.settings.lvl3name,e,"","#BBBBBB","")),o>=cb.settings.lvl3tip&&o<cb.settings.lvl4tip&&"Yes"==cb.settings.lvl3yes&&(l=cb.settings.lvl4tip-o,cb.sendNotice(l+" left until you're "+cb.settings.lvl4name,e,"","#BBBBBB","")),o>=cb.settings.lvl4tip&&o<cb.settings.lvl5tip&&"Yes"==cb.settings.lvl4yes&&(l=cb.settings.lvl5tip-o,cb.sendNotice(l+" left until you're "+cb.settings.lvl5name,e,"","#BBBBBB","")),o>=cb.settings.lvl5tip&&o<cb.settings.lvl6tip&&"Yes"==cb.settings.lvl5yes&&(l=cb.settings.lvl6tip-o,cb.sendNotice(l+" left until you're "+cb.settings.lvl6name,e,"","#BBBBBB","")),o>=cb.settings.lvl6tip&&o<cb.settings.lvl7tip&&"Yes"==cb.settings.lvl6yes&&(l=cb.settings.lvl7tip-o,cb.sendNotice(l+" left until you're "+cb.settings.lvl7name,e,"","#BBBBBB","")),o<cb.settings.lvl1tip&&"Yes"==cb.settings.lvl1yes&&(l=cb.settings.lvl1tip-o,cb.sendNotice(l+" left until you're "+cb.settings.lvl1name,e,"","#BBBBBB","")),o<cb.settings.lvl1tip&&o>cb.settings.lvl1tip/2&&"Yes"==cb.settings.lvl1yes&&cb.sendNotice("PS: Once you're VIP, you're VIP forever! Sounds cool right? You're almost there too!",e,"","#BBBBBB","")}}function sortColors(){var e;do{e=!1;for(var t=0;t<colorList.length;t++)j=colorList[t][1],j.valueOf()<cb.settings.lvl1tip&&(colorList.splice(t,1),t+=-1,e=!0)}while(e)}function addTop(){for(var e,t=["18yearoldcouple"],l=0;l<colorList.length;l++)j=colorList[l][1],j.valueOf()>=cb.settings.addTop&&(e=colorList[l][0],t.push(e));return t}function tipPoll(e,t,l){if(poll_running)for(i=0;i<opt_tokens.length;i++)if(t==opt_tokens[i]){colorList[l][1]>=cb.settings.tipPoll&&0!=cb.settings.tipPoll?(cb.sendNotice(e+" has DOUBLE voted for "+opt_labels[i],"",cb.settings.background,cb.settings.foreground),opt_votes[i]++,opt_votes[i]++):(cb.sendNotice(e+" has voted for "+opt_labels[i],"",cb.settings.background,cb.settings.foreground),opt_votes[i]++),txt_votecount==cb.settings.poll_mode&&votes_remain--,checkPollEnd();break}}function pollStart(){sanitizeBoard(),showBoard(),txt_minutes==cb.settings.poll_mode&&cb.setTimeout(tickTimer,6e4)}function chatAdManualCallPrivate(e){menuOn&&cb.sendNotice(tipMenuMsg,e,cb.settings.noticeback,cb.settings.noticecolor,"bold")}function chatAdManualCall(){menuOn&&cb.sendNotice(tipMenuMsg,"",cb.settings.noticeback,cb.settings.noticecolor,"bold")}function chatAd(){menuOn&&!menuShort&&cb.sendNotice(tipMenuMsg,"",cb.settings.noticeback,cb.settings.noticecolor,"bold"),menuOn&&menuShort&&cb.sendNotice(menuShortMsg,"",cb.settings.noticeback,cb.settings.noticecolor,"bold"),cb.setTimeout(chatAd,6e4*cb.settings.chat_ad)}function main(){if(0==ranAlread){for(""!=cb.settings.rainbowList&&"Yes"==cb.settings.lvl1yes?(cb.sendNotice("Adding VIPs: "+cb.settings.rainbowList,cb.room_slug,"","#007BFF","bold"),rainbowListEntered=cb.settings.rainbowList,colorList=JSON.parse(rainbowListEntered),sortColors(),cb.sendNotice("Here's the VIP club after omitting tips lower than LVL1: "+JSON.stringify(colorList),cb.room_slug,"","#FF7B00","bold")):cb.sendNotice("You left the rainbow list blank in the settings, but that's ok... just use the /load <DATA> command to restore instead",cb.room_slug,"","#007BFF","bold"),poll_running="Yes"==cb.settings.poll_on?!0:!1,pollStart(),i=0;i<=MAXSEP-1;i++)cb.settings.sepchar==separators[i].label&&(separator_char=separators[i].shortcut+" ");for(tipMenuMsg="Tip Menu: ",i=1;i<=MAXITEMS;i++){var e;if(e=cb.settings["item"+i]){var t=e.split("--"),l=parseInt(t[0]);l>0&&(tipmenuprice[i]=l,tipmenuitem[i]=t[1],i>=2&&(tipMenuMsg+=separator_char),tipMenuMsg+=t[1]+"("+l+") ")}}for("Yes"==cb.settings.tipMenu?(menuOn=!0,cb.sendNotice("The tip menu is on."),chatAdManualCall()):cb.sendNotice("The tip menu is off."),"No"==cb.settings.tipMenuShort&&(menuShort=!0,menuShortMsg+=cb.settings.shortMsg,cb.sendNotice("Ya I know it sent the whole menu. It only did it this once so you can see it so chill. The rest of the time it'll just send: ***"+menuShortMsg+" ***",cb.room_slug)),i=1;i<=MAXITEMS;i++){var o;o=cb.settings["itemr"+i],o?tipmenuitemr[i]=o:tipmenuitemr[i]="Thank You!"}ranAlread=!0}}cb.sendNotice("I am your true color app has started.",cb.room_slug,"","#9966ff","bolder"),cb.sendNotice("Version: 1.1 By: Shaggy of 18yearoldcouple",cb.room_slug,"","#9966ff","bolder"),cb.sendNotice("Build date: 13 June 2016",cb.room_slug,"","#9966ff","bolder"),cb.sendNotice("You just started an app by 18yearoldcouple, congrats.","","","#9966ff","bolder");var colors=[],preset_colors={"/red":"#FF0000","/green":"#00aa00","/blue":"#0000FF","/pink":"#FF00FF","/yellow":"#AAAA00","/cyan":"#008888","/purple":"#990099"},fonts=[],available_fonts=["default","Arial, Calibri","Consolas","Gisha",'"Corbel"',"Verdana","Trebuchet MS"],broadcaster=cb.room_slug,min_level=.5,gamma=.1;startTime=new Date;var colorList=[["18yearoldcouple",10001],["19yearoldcouple",10001]],colorEntered=[0,0,0];"18yearoldcouple"==cb.room_slug&&(colorList=[["20yearoldcouple",10001],["19yearoldcouple",1]]);var rainbowListEntered,ranAlread=!1,fg_warn="#FF0000",txt_never="When I end it",txt_minutes="After x minutes",txt_votecount="After x votes",txt_wincount="When one option reaches x votes",opt_votes=[0,0,0,0,0],opt_labels=[cb.settings.opt1_label,cb.settings.opt2_label,cb.settings.opt3_label,cb.settings.opt4_label,cb.settings.opt5_label],opt_tokens=[cb.settings.opt1_tokens,cb.settings.opt2_tokens,cb.settings.opt3_tokens,cb.settings.opt4_tokens,cb.settings.opt5_tokens],mins_remain=cb.settings.poll_count,votes_remain=cb.settings.poll_count,poll_running=!0,tip_amt=0,separator_char="| ",tipMenuMsg,menuOn=!1,menuShort=!1,menuShortMsg="",MAXITEMS=20,tipmenuprice=[],tipmenuitem=[],tipmenuitemr=[],MAXSEP=6;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"}],cb.settings_choices=[{name:"ignoreTheRest2",label:"------------------------------------------------------------------------------------------------- Part 1) ------------- TOKEN POLL :) ------------------------------------------------- ------------------------------------------------------------------------------------------ ",required:!1,type:"choice"},{name:"poll_on",type:"choice",label:"Do you want to use a token poll?",choice1:"Yes",choice2:"No",defaultValue:"No"},{name:"foreground",type:"str",minLength:1,maxLength:7,label:"Poll Text Color (Hex color codes start with #):",defaultValue:"#FFFFFF"},{name:"background",type:"str",minLength:1,maxLength:7,label:"Poll Background Color:",defaultValue:"#0629AC"},{name:"poll_title",type:"str",minLength:1,maxLength:255,label:"Poll Title",defaultValue:"My Poll"},{name:"board_interval",type:"int",minValue:1,"default":3,label:"Board Display Interval (mins)"},{name:"poll_mode",type:"choice",label:"Poll ends...",choice1:txt_never,choice2:txt_minutes,choice3:txt_votecount,choice4:txt_wincount,defaultValue:txt_minutes},{name:"poll_count",type:"int",minValue:1,"default":15,label:"... Where x is ..."},{name:"opt1_label",type:"str",minLength:1,maxLength:255,label:"Option 1",defaultValue:"I Suck!"},{name:"opt1_tokens",type:"int",minValue:1,"default":10,label:"Option 1 tokens"},{name:"opt2_label",type:"str",minLength:1,maxLength:255,label:"Option 2",defaultValue:"I Rock!"},{name:"opt2_tokens",type:"int",minValue:1,"default":11,label:"Option 2 tokens"},{name:"opt3_label",type:"str",minLength:1,maxLength:255,label:"Option 3",required:!1},{name:"opt3_tokens",type:"int",minValue:0,"default":0,label:"Option 3 tokens",required:!1},{name:"opt4_label",type:"str",minLength:1,maxLength:255,label:"Option 4",required:!1},{name:"opt4_tokens",type:"int",minValue:0,"default":0,label:"Option 4 tokens",required:!1},{name:"opt5_label",type:"str",minLength:1,maxLength:255,label:"Option 5",required:!1},{name:"opt5_tokens",type:"int",minValue:0,"default":0,label:"Option 5 tokens",required:!1},{name:"ignoreTheRest4",label:"----------------------------------------------------------------------------------------------- Part 2) ------------- TIP MENU :) ------------------------------------------------- ------------------------------------------------------------------------------------------ ",required:!1,type:"choice"},{name:"tipMenu",label:"This is an optional tip menu. :) Start and stop with /menuoff & /menuon Would you like to start the menu immediately?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",required:!1},{name:"tipMenuShort",label:"Send the full menu on the rotation? If NO, the below message will display instead: ",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"Yes",required:!1},{name:"shortMsg",type:"str",label:"!menu reminder:",defaultValue:"TIP MENU ACTIVE! type !menu to show!"},{name:"sepchar",type:"choice",choice1:"Vertical Bar",choice2:"Hearts",choice3:"Glitter",choice4:"Flowers",choice5:"Bow",choice6:"Hearts2",choice7:"Smiley",defaultValue:"Vertical Bar",label:"Separator character"},{name:"item1",type:"str",label:"Item 1 (eg 10--flash tits)"},{name:"item2",type:"str",required:!1,label:"Item 2"},{name:"item3",type:"str",required:!1,label:"Item 3"},{name:"item4",type:"str",required:!1,label:"Item 4"},{name:"item5",type:"str",required:!1,label:"Item 5"},{name:"item6",type:"str",required:!1,label:"Item 6"},{name:"item7",type:"str",required:!1,label:"Item 7"},{name:"item8",type:"str",required:!1,label:"Item 8"},{name:"item9",type:"str",required:!1,label:"Item 9"},{name:"item10",type:"str",required:!1,label:"Item 10"},{name:"item11",type:"str",required:!1,label:"Item 11"},{name:"item12",type:"str",required:!1,label:"Item 12"},{name:"item13",type:"str",required:!1,label:"Item 13"},{name:"item14",type:"str",required:!1,label:"Item 14"},{name:"item15",type:"str",required:!1,label:"Item 15"},{name:"item16",type:"str",required:!1,label:"Item 16"},{name:"item17",type:"str",required:!1,label:"Item 17"},{name:"item18",type:"str",required:!1,label:"Item 18"},{name:"item19",type:"str",required:!1,label:"Item 19"},{name:"item20",type:"str",required:!1,label:"Item 20"},{name:"ignoreTheRest8",label:"------------------------------------------------------------------------------- -----Response Messages: (Sends a reply to the tipper)------ ------------------------------------------------------------------------------------------ ",required:!1,type:"choice"},{name:"itemr1",type:"str",required:!1,label:"Reply 1 (eg tell us who!)"},{name:"itemr2",type:"str",required:!1,label:"Reply 2"},{name:"itemr3",type:"str",required:!1,label:"Reply 3"},{name:"itemr4",type:"str",required:!1,label:"Reply 4"},{name:"itemr5",type:"str",required:!1,label:"Reply 5"},{name:"itemr6",type:"str",required:!1,label:"Reply 6"},{name:"itemr7",type:"str",required:!1,label:"Reply 7"},{name:"itemr8",type:"str",required:!1,label:"Reply 8"},{name:"itemr9",type:"str",required:!1,label:"Reply 9"},{name:"itemr10",type:"str",required:!1,label:"Reply 10"},{name:"itemr11",type:"str",required:!1,label:"Reply 11"},{name:"itemr12",type:"str",required:!1,label:"Reply 12"},{name:"itemr13",type:"str",required:!1,label:"Reply 13"},{name:"itemr14",type:"str",required:!1,label:"Reply 14"},{name:"itemr15",type:"str",required:!1,label:"Reply 15"},{name:"itemr16",type:"str",required:!1,label:"Reply 16"},{name:"itemr17",type:"str",required:!1,label:"Reply 17"},{name:"itemr18",type:"str",required:!1,label:"Reply 18"},{name:"itemr19",type:"str",required:!1,label:"Reply 19"},{name:"itemr20",type:"str",required:!1,label:"Reply 20"},{name:"noticecolor",type:"str",label:"Menu text color (html code default red #FF0000)",defaultValue:"#FF0000"},{name:"noticeback",type:"str",label:"Menu background color (html code default white #FFFFFF)",defaultValue:"#FFFFFF"},{name:"chat_ad",type:"int",minValue:1,maxValue:999,defaultValue:1,label:"Delay in minutes between notice being displayed (minimum 1)"},{name:"ignoreTheRest6",label:"------------------------------------------------------------------------------------------------ Part 3) ------------- Color People's Text... If you want :) ------------------- ------------------------------------------------------------------------------------------ ",required:!1,type:"choice"},{name:"whatMode",label:"Do you want colors to be assigned randomly or in order by when users join the room?",type:"choice",choice1:"Random",choice2:"Ordered",choice3:"Disabled",defaultValue:"Disabled"},{name:"typicalTime",type:"str",label:"What is your typical show time in hours? (example: 1.5 for an hour and a half)",defaultValue:"1.5",required:!1},{name:"ignoreTheRest",label:"If you aren't 18yearoldcouple, guess what? You're done! You can ignore the rest! Congrats. :)",required:!1,type:"choice"},{name:"ignoreTheRest7",label:"------------------------------------------------------------------------------------------------ Part 4) ------------- Ignore the rest. :) --------------------------------------- ------------------------------------------------------------------------------------------ ",required:!1,type:"choice"},{choice1:"",choice2:"",defaultValue:"",label:"Shameless Plug: If you want your own VIP Club or another Custom App, you can email 18yearoldcouple@gmail.com",name:"myplug",required:!1,type:"choice"},{name:"tipTitles",label:"Do you want to display users' tip totals as titles? Note: VIP club will have lifetime tips as titles. Also: If you're using ultrabot as-well, disable tip-titles there and enable here.",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No"},{name:"tipReminder",label:"Do you want to send users' a notice of how many tips left until the next VIP level in the chat?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No"},{name:"vipPromote",label:"Do you want to send a public congrats message when someone promotes to the next VIP level?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No"},{name:"addTop",label:"What tip total gets a user in the /addvip command for CrazyTicket show?",type:"int",required:!1},{name:"tipPoll",label:"What tip total gets a user double votes on the token poll? Leave 0 if disabled",type:"int","default":0,required:!1},{name:"rainbowHeader",label:"****RainbowVIPlist: ***** PS: If you're going to use this, probably a good idea to read the app description.",type:"choice",choice1:"",choice2:"",defaultValue:"",required:!1},{name:"rainbowList",label:"Put saved list in here, or use /load command in room: PS: Enter in saved list with no spaces, and no /load in-front.",type:"str",minLength:1,maxLength:2048,required:!1},{name:"lvl1name",label:"LVL1 (lowest level) Name:",type:"str",maxLength:30,defaultValue:"The Awesome Club",required:!1},{name:"lvl1color",label:"LVL1 Color",type:"str",maxLength:7,defaultValue:"#f3d8d8"},{name:"lvl1icon",label:"LVL1 vip badge: (with colon):",type:"str",maxLength:30,defaultValue:":smallCrown",required:!1},{name:"lvl1yes",label:"LVL1 Want to use:",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",required:!1},{name:"lvl1tip",label:"LVL1 amount: No Lower than 1000. Enter in Numbers only, no commas. No commas!!",type:"int",minValue:1,maxValue:1e5,defaultValue:1e3},{name:"lvl2name",label:"LVL2 Name:",type:"str",maxLength:30,defaultValue:"The Awesome Club",required:!1},{name:"lvl2color",label:"LVL2 Color",type:"str",maxLength:7,defaultValue:"#ffebcc"},{name:"lvl2icon",label:"LVL2 vip badge:",type:"str",maxLength:30,defaultValue:":smallCrown",required:!1},{name:"lvl2yes",label:"LVL2 Want to use:",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",required:!1},{name:"lvl2tip",label:"LVL2 amount: ",type:"int",minValue:1,maxValue:1e5,defaultValue:2e3},{name:"lvl3name",label:"LVL3 Name:",type:"str",maxLength:30,defaultValue:"The Awesome Club",required:!1},{name:"lvl3color",label:"LVL3 Color",type:"str",maxLength:7,defaultValue:"#ffffcc"},{name:"lvl3icon",label:"LVL3 vip badge:",type:"str",maxLength:30,defaultValue:":smallCrown",required:!1},{name:"lvl3yes",label:"LVL3 Want to use:",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",required:!1},{name:"lvl3tip",label:"LVL3 amount: ",type:"int",minValue:1,maxValue:1e5,defaultValue:3e3},{name:"lvl4name",label:"LVL4 Name:",type:"str",maxLength:30,defaultValue:"The Awesome Club",required:!1},{name:"lvl4color",label:"LVL4 Color",type:"str",maxLength:7,defaultValue:"#ccffdd"},{name:"lvl4icon",label:"LVL4 vip badge:",type:"str",maxLength:30,defaultValue:":smallCrown",required:!1},{name:"lvl4yes",label:"LVL4 Want to use:",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",required:!1},{name:"lvl4tip",label:"LVL4 amount: ",type:"int",minValue:1,maxValue:1e5,defaultValue:4e3},{name:"lvl5name",label:"LVL5 Name:",type:"str",maxLength:30,defaultValue:"The Awesome Club",required:!1},{name:"lvl5color",label:"LVL5 Color",type:"str",maxLength:7,defaultValue:"#ccffff"},{name:"lvl5icon",label:"LVL5 vip badge:",type:"str",maxLength:30,defaultValue:":smallCrown",required:!1},{name:"lvl5yes",label:"LVL5 Want to use:",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",required:!1},{name:"lvl5tip",label:"LVL5 amount: ",type:"int",minValue:1,maxValue:1e5,defaultValue:5e3},{name:"lvl6name",label:"LVL6 Name:",type:"str",maxLength:30,defaultValue:"The Awesome Club",required:!1},{name:"lvl6color",label:"LVL6 Color",type:"str",maxLength:7,defaultValue:"#eaccff"},{name:"lvl6icon",label:"LVL6 vip badge:",type:"str",maxLength:30,defaultValue:":smallCrown",required:!1},{name:"lvl6yes",label:"LVL6 Want to use:",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",required:!1},{name:"lvl6tip",label:"LVL6 amount: ",type:"int",minValue:1,maxValue:1e5,defaultValue:6e3},{name:"lvl7name",label:"LVL7 Name:",type:"str",maxLength:30,defaultValue:"The Awesome Club",required:!1},{name:"lvl7color",label:"LVL7 Color",type:"str",maxLength:7,defaultValue:"#ffb3ff"},{name:"lvl7icon",label:"LVL7 vip badge:",type:"str",maxLength:30,defaultValue:":smallCrown",required:!1},{name:"lvl7yes",label:"LVL7 Want to use:",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No",required:!1},{name:"lvl7tip",label:"LVL7 amount: ",type:"int",minValue:1,maxValue:1e5,defaultValue:7e3}];var typicalTime=60*Number.parseFloat(cb.settings.typicalTime);cb.setTimeout(chatAd,6e4*cb.settings.chat_ad),cb.onMessage(function(e){var t=e.m,l=e.user,o=e.is_mod,n=cb.room_slug==l||e.is_mod,s=l==cb.room_slug,i=(e.c,e.background,e.in_fanclub,e.gender,t.split(" ")),a="just a word",r='* Not enough privileges to use "'+i[0]+'".\n* This command is restricted to moderators.';"m"==t.charAt(0)&&"e"==t.charAt(1)&&"n"==t.charAt(2)&&"u"==t.charAt(3)&&(n?(menuOn||cb.sendNotice("Yo, the tip menu is off, use /menuon to turn on and /menuoff to turn off.",l,"","#BBBBBB",""),menuOn&&chatAdManualCall()):(menuOn||cb.sendNotice("We aren't using the tip menu right now.",l,"","#BBBBBB",""),menuOn&&chatAdManualCallPrivate(l)));var c=!1;if("/"==t.charAt(0),!0){switch(i[0]){case"/addvip":var u=addTop();e.m="/add "+cbjs.arrayJoin(u,", ");break;case"/tovips":case"/tovip":case"/tvips":case"/tvip":(o||s)&&toVips(i[1],l);break;case"/save":(o||s)&&(sortColors(),cb.sendNotice("VIP list exported! Hint: Save in a txt file.",l,"","#ff0066","bold"),cb.sendNotice("/load "+JSON.stringify(colorList),l,"","#666666","bold")),c=!0;break;case"/load":o||s?(a=i[1],null!=a?(cb.sendNotice("/load "+a,l,"","#ff0066","bold"),colorList=JSON.parse(a),sortColors(colorList),cb.sendNotice(colorList)):cb.sendNotice("* Syntax: /load <saved data>",l,"","#ff0066","bold")):cb.sendNotice(r,l,"","#ff0066","bold"),c=!0;break;case"/poll":case"/p":case"!p":case"!poll":t["X-Spam"]=!n,n?poll_running?showBoard(""):showWinner():poll_running?showBoard(l):showWinner(),c=!0;break;case"/endpoll":case"/endp":case"!endp":case"!endpoll":if(n){poll_running=!1,showWinner(),c=!0;break}n||cb.sendNotice("Yo, you're not a mod.",l,"","#BBBBBB","");break;case"/startpoll":case"/startp":case"!startp":case"!startpoll":if(n){if(!poll_running){poll_running=!0,pollStart(),cb.sendNotice("Yo, you started the poll.",l,"","#BBBBBB",""),c=!0;break}poll_running&&cb.sendNotice("Yo, the poll is running already.",l,"","#BBBBBB","")}n||cb.sendNotice("Yo, you're not a mod.",l,"","#BBBBBB","");break;case"/menu":case"!menu":if(n){if(!menuOn){cb.sendNotice("Yo, the tip menu is off, use /menuon to turn on and /menuoff to turn off.",l,"","#BBBBBB",""),c=!0;break}if(menuOn){chatAdManualCall(),c=!0;break}}else menuOn||cb.sendNotice("We aren't using the tip menu right now.",l,"","#BBBBBB",""),menuOn&&chatAdManualCallPrivate(l);break;case"/menuon":case"!menuon":if(n){if(menuOn){chatAdManualCall(),cb.sendNotice("Yo, I know it sounds crazy but the menu was already on. Just type /menu to show it.",l,"","#BBBBBB",""),c=!0;break}if(!menuOn){menuOn=!0,chatAdManualCall(),cb.sendNotice("Yo, you started the tip menu.",l,"","#BBBBBB",""),c=!0;break}}n||cb.sendNotice("Yo, you're not a mod.",l,"","#BBBBBB","");break;case"/menuoff":case"!menuoff":if(n){if(!menuOn){cb.sendNotice("Yo, I know it sounds crazy but the menu was already off. It it's still going that's a technical support problem you can email 18yearoldcouple about.",l,"","#BBBBBB",""), c=!0;break}if(menuOn){menuOn=!1,cb.sendNotice("Yo, you stopped the tip menu.",l,"","#BBBBBB",""),c=!0;break}}n||cb.sendNotice("Yo, you're not a mod.",l,"","#BBBBBB","");break;case"/cmds":case"/commands":c=!0,cb.sendNotice("I Am Your True Color Command List",l,"","#666666"),cb.sendNotice("",l,"","#666666"),cb.sendNotice("\n/addvip\n/tovips\n/tvip\n/save\n/load\n/poll\n/p\n/endpoll\n/endp\n/startpoll\n/startp\n/menu\n/menuon\n/menuoff\n/commands",l),cb.sendNotice("",l,"","#666666")}var b=e.user;if((b in colors||"#494949"==e.c)&&(b in fonts||"default"==e.f)&&(e.c=get_user_color(b),e.f=get_user_font(b)),"/color"==e.m)set_user_color(b),e.c=get_user_color(b),e["X-Spam"]=!0;else if("/font"==e.m)set_user_font(b),e.f=get_user_font(b),e["X-Spam"]=!0;else if(e.m[0]="/")for(var p in preset_colors)e.m==p&&(colors[e.user]=preset_colors[p],e.c=get_user_color(b),e["X-Spam"]=!0);e.background=findColor(b),k=findRainbowTipper(b,0),colorList[k][1]>=cb.settings.lvl1tip&&"Yes"==cb.settings.lvl1yes&&(e.c="#222"),"/"!=t.charAt(0)&&(e.m=changeMessage(b,e.m))}return e}),cb.onEnter(function(e){var t=findRainbowTipper(e.user,0);colorList[t][1]>=cb.settings.lvl1tip&&"Yes"==cb.settings.lvl1yes&&welcomeVip(t),poll_running&&cb.sendNotice("Hello "+e.user+", Checkout the token poll. ;) \nType !poll to see voting options.",e.user,cb.settings.background,cb.settings.foreground)}),cb.onLeave(function(e){userId=findRainbowTipper(e.user,0),colorList[userId][1]>=cb.settings.lvl1tip&&"Yes"==cb.settings.lvl1yes&&cyaVip(userId)}),cb.onTip(function(e){var t=e.from_user,l=(e.from_user_has_tokens,e.from_user_in_fanclub,e.from_user_is_mod,Number.parseInt(e.amount,10)),o=parseInt(e.amount),n=(e.message,findRainbowTipper(t,l));"Yes"==cb.settings.tipReminder&&howManyLeft(t),tipPoll(t,o,n);for(var s=1;MAXITEMS>=s;s++)l==tipmenuprice[s]&&(cb.sendNotice(e.from_user+" tipped for "+tipmenuitem[s],"",cb.settings.noticeback,cb.settings.noticecolor,"bold"),cb.sendNotice(tipmenuitemr[s],t,cb.settings.noticecolor,cb.settings.noticeback,"bold"))}),main();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.