Apps Home
|
Create an App
lunepusa
Author:
lunepusa
Description
Source Code
Launch App
Current Users
Created by:
Lunepusa
/* Author: created by lunepusa. sections (rotating notifier) taken from badbadbubba Version: 1.1 (03/07/2015) */ cb.settings_choices = [ {name:'sct1', type:'choice',required: false, label: "--------------------------------section 1, general ----------------------------- "}, {name:'sub', type:'str',required: false, label: "subject"}, {name:'tags', type:'str',required: false, label: "tags"}, {name:'line3', type:'str',required: false, label: "line 3 of panel",defaultValue: "/menu /goal"}, {name: 'msgonentry', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display Message on entry privately on entry - set to no for busy rooms"}, {name:'ntcoe', type:'str', required: false, label:'message on entry',}, {name:'ntccolor', type:'str', label:'Notice color (html code default dark red #9F000F)', defaultValue: '#9F000F'}, {name:'cmnd97', type: 'str' , required: false , label: "whisper to broadcaster commands"}, {name:'cmnd95', type: 'str' , required: false , label: "list of all commands commands",defaultValue:"/help"}, {name:'cmnd86', type: 'str' , required: false , label: "commands for the tip king/top tipper",defaultValue:"/king"}, {name:'cmndpub', type: 'str' , required: false , label: "word to make command public(ex '/menu pub ' is sent to the chat publicly while '/menu ' is private)",defaultValue:"pub"}, {name:'favs', type: 'str' , required: false , label: "list of users you want to highlight the messge of and be notified when they join and leave.",defaultValue:"name1 name2"}, {name:'sct2', type:'choice',required: false, label: "--------------------------------section 2 commands----------------------------- "}, {name:'cmnd1', type:'str',required: false, label: "commands 1(seperate with a space) ", defaultValue: "/twitter /twit"}, {name:'ntc1', type: 'str' , required: false , label: "what commands 1 output", defaultValue: "My Twitter is @example!"}, {name:'cmnd2', type:'str',required: false, label: "commands 2 "}, {name:'ntc2', type: 'str' , required: false , label: "what commands 2 output"}, {name:'cmnd3', type:'str',required: false, label: "commands 3"}, {name:'ntc3', type: 'str' , required: false , label: "what commands 3 output"}, {name:'cmnd4', type:'str',required: false, label: "commands 4 "}, {name:'ntc4', type: 'str' , required: false , label: "what commands 4 output"}, {name:'cmnd5', type:'str',required: false, label: "commands 5 "}, {name:'ntc5', type: 'str' , required: false , label: "what commands 5 output"}, {name:'cmnd6', type:'str',required: false, label: "commands 6"}, {name:'ntc6', type: 'str' , required: false , label: "what commands 6 output"}, {name:'cmnd7', type:'str',required: false, label: "commands 7"}, {name:'ntc7', type: 'str' , required: false , label: "what commands 7 output"}, {name:'cmnd8', type:'str',required: false, label: "commands 8 "}, {name:'ntc8', type: 'str' , required: false , label: "what commands 8 output"}, {name:'cmnd9', type:'str',required: false, label: "commands 9"}, {name:'ntc9', type: 'str' , required: false , label: "what commands 9 output"}, {name:'cmnd10', type:'str',required: false, label: "commands 10"}, {name:'ntc10', type: 'str' , required: false , label: "what commands 1poutput"}, {name:'sct3', type:'choice',required: false, label: "--------------------------------section 3 rotating notifier ----------------------------- "}, {name: 'chat_ad', type:'int', minValue: 1, maxValue: 999, defaultValue: 2, label: 'Delay in minutes between notices being displayed (minimum 1)'}, {name:'rntc1', type:'str', required: false, label:'Message 1',}, {name:'rntc2', type:'str', required: false, label:'Message 2',}, {name:'rntc3', type:'str', required: false, label:'Message 3',}, {name:'rntc4', type:'str', required: false, label:'Message 4',}, {name:'rntc5', type:'str', required: false, label:'Message 5',}, {name:'rntc6', type:'str', required: false, label:'Message 6',}, {name:'rntc7', type:'str', required: false, label:'Message 7',}, {name:'rntc8', type:'str', required: false, label:'Message 8',}, {name:'rntc9', type:'str', required: false, label:'Message 9',}, {name:'rntc10', type:'str', required: false, label:'Message 10',}, {name:'sct4', type:'choice',required: false, label: "--------------------------------section 4 tip menu ----------------------------- "}, {name:'cmnd99', type: 'str' , required: false , label: "commands for complete tip menu"}, {name:'ntc11', type: 'str' , required: false , label: "tip menu 1(do not set multiple items to 1 price)", defaultValue: "10:flash tits,20:spank ass"}, {name:'cmnd11', type: 'str' , required: false , label: "commands for tip menu 1", defaultValue: "/menue1 , /genmenue"}, {name:'ntc12', type: 'str' , required: false , label: "tip menu 2"}, {name:'cmnd12', type: 'str' , required: false , label: "commands for tip menu 2"}, {name:'ntc13', type: 'str' , required: false , label: "tip menu 3"}, {name:'cmnd13', type: 'str' , required: false , label: "commands for tip menu 3"}, {name:'ntc14', type: 'str' , required: false , label: "tip menu 4"}, {name:'cmnd14', type: 'str' , required: false , label: "commands for tip menu 4"}, {name:'ntc15', type: 'str' , required: false , label: "tip menu 5"}, {name:'cmnd15', type: 'str' , required: false , label: "commands for tip menu 5"}, {name:'sct5', type:'choice',required: false, label: "--------------------------------section 5 tip goal ----------------------------- "}, {name:'goalca', type: 'int' , required: false , label: "total continuous tip goal ammount"}, {name:'goalcc', type: 'int' , required: false , label: "current continuous tip goal ammount(how much has been made already)"}, {name:'goalc', type: 'str' , required: false , label: "what is your continuous tip goal for"}, {name:'goal1a', type: 'int' , required: false , label: "tip goal 1 ammount"}, {name:'goal1', type: 'str' , required: false , label: "tip goal 1"}, {name:'goal2a', type: 'int' , required: false , label: "tip goal 2 amount(smallest to)"}, {name:'goal2', type: 'str' , required: false , label: "tip goal 2"}, {name:'goal3a', type: 'int' , required: false , label: "tip goal 3 ammount"}, {name:'goal3', type: 'str' , required: false , label: "tip goal 3"}, {name:'goal4a', type: 'int' , required: false , label: "tip goal 4 ammount"}, {name:'goal4', type: 'str' , required: false , label: "tip goal 4"}, {name:'goal5a', type: 'int' , required: false , label: "tip goal 5 ammount(largest)"}, {name:'goal5', type: 'str' , required: false , label: "tip goal 5"}, {name:'cmnd98', type: 'str' , required: false , label: "commands for tip goals"}, {name:'sct6', type:'choice',required: false, label: "--------------------------------section 6 games/fun ----------------------------- "}, {name:'cmnd96', type: 'str' , required: false , label: "random number commands(ex. /r 20. Sends a notice with a random number between 1 and 20)",defaultValue: "/r"}, {name:'cmnd85', type: 'str' , required: false , label: "timer commands(use command space number of minutes. Ex. /t 2.5",defaultValue: "/t"}, {name:'ntc16', type: 'str' , required: false , label: "card game 1 rules",defaultValue: "blackjack is a game where you try and get as close to 21 as you can without going over. Number cards are their listed value face cards are 10 and ace is either 1 or 11. Each player gets to decide case by case. The game loop is each player draws one card publicly(/draw pub) everyone can see that card. Then each player keeps drawing (/draw)until the total of their cards is as close as they feel comftorble to 21. When everyone is done and is ok with their total everyone will show their hand publicly(/hand pub) . The winner is whoever got closest to 21 without going over. Other helpful commands are /hand /draw"}, {name:'cmnd16', type: 'str' , required: false , label: "commands for card game 1 rules",defaultValue:"/blackjack"}, {name:'ntc17', type: 'str' , required: false , label: "card game 2 rules"}, {name:'cmnd17', type: 'str' , required: false , label: "commands for card game 2 rules"}, {name:'ntc18', type: 'str' , required: false , label: "card game 3 rules"}, {name:'cmnd18', type: 'str' , required: false , label: "commands for card game 3 rules"}, {name:'ntc19', type: 'str' , required: false , label: "card game 4 rules"}, {name:'cmnd19', type: 'str' , required: false , label: "commands for card game 4 rules"}, {name:'ntc20', type: 'str' , required: false , label: "card game 5 rules"}, {name:'cmnd20', type: 'str' , required: false , label: "commands for card game 5 rules"}, {name:'cmnd94', type: 'str' , required: false , label: "shuffle deck commands(resets the deck and shuffles it)",defaultValue: "/shuffle"}, {name:'cmnd93', type: 'str' , required: false , label: "draws a card to your hand commands",defaultValue: "/draw"}, {name:'cmnd92', type: 'str' , required: false , label: "display cards in hand",defaultValue: "/hand"}, {name:'cmnd91', type: 'str' , required: false , label: "discard specified card(format /discard {pvt/pub must include something here} { card number in hand} ex. /discard pub 3 discards card 3 from hand and displays a notice of that publicly)",defaultValue: "/discard"}, {name:'cmnd90', type: 'str' , required: false , label: "gives specified card to specified user THIS COMMAND CANNOT BE PUBLIC(format /giveto {target user} { card number in hand} ex. /discard lunepusa 3 gives card 3 in hand to lunepusa)",defaultValue: "/giveto"}, {name:'cmnd89', type: 'str' , required: false , label: "plays specified card to the 'table' THIS IS COMMAND IS ALWAYS PUBLIC(format /play <card number in hand> ex. /play 3 plays card 3 onto the table)",defaultValue: "/play"}, {name:'cmnd88', type: 'str' , required: false , label: "picks up specified card from the 'table' THIS IS COMMAND IS ALWAYS PUBLIC(format /pickup <card number on table> ex. /pickup 3 plays card 3 onto the table)",defaultValue: "/pickup"}, {name:'cmnd87', type: 'str' , required: false , label: "display cards on the table command",defaultValue: "/table"} ]; var i=0 var c=0 var g=1 var kinga=0 var king ='no king yet!' var tkobj={} var toktot = 0 var model = cb.room_slug var ntc99=String(cb.settings.ntc11)+'|' +String(cb.settings.ntc12)+'|'+String(cb.settings.ntc13)+'|'+String(cb.settings.ntc14)+'|'+String(cb.settings.ntc15); var cmnd99 = String(cb.settings.cmnd99).split(' ') var cmnd98 = String(cb.settings.cmnd98).split(' ') var cmnd96 = String(cb.settings.cmnd96).split(' ') var cmnd95 = String(cb.settings.cmnd95).split(' ') var cmnd94 = String(cb.settings.cmnd94).split(' ') var cmnd93 = String(cb.settings.cmnd93).split(' ') var cmnd92 = String(cb.settings.cmnd92).split(' ') var cmnd91 = String(cb.settings.cmnd91).split(' ') var cmnd90 = String(cb.settings.cmnd90).split(' ') var cmnd89 = String(cb.settings.cmnd89).split(' ') var cmnd88 = String(cb.settings.cmnd88).split(' ') var cmnd86 = String(cb.settings.cmnd86).split(' ') var cmnd85 = String(cb.settings.cmnd85).split(' ') var cmnd87 = String(cb.settings.cmnd87).split(' ') var cmnd97 = String(cb.settings.cmnd97).split(' ') var favs = String(cb.settings.favs).split(' ') var cgoala = parseInt(cb.settings.goal1a) var cgoal = cb.settings.goal1 var goalca= parseInt(cb.settings.goalca) var goalcc= parseInt(cb.settings.goalcc) var goalc = cb.settings.goalc var allcmnds = cb.settings.cmnd1 +' '+ cb.settings.cmnd2 +' '+ cb.settings.cmnd3 +' '+ cb.settings.cmnd4 +' '+ cb.settings.cmnd5 +' '+ cb.settings.cmnd6 +' '+cb.settings.cmnd7 +' '+ cb.settings.cmnd8 +' '+ cb.settings.cmnd9 +' '+ cb.settings.cmnd10 +' '+ cb.settings.cmnd11 +' '+ cb.settings.cmnd12 +' '+ cb.settings.cmnd13 +' '+ cb.settings.cmnd14 +' '+ cb.settings.cmnd15 +' '+ cb.settings.cmnd99 +' '+ cb.settings.cmnd98 +' '+ cb.settings.cmnd97+' '+ cb.settings.cmnd96+' '+ cb.settings.cmnd16 +' '+ cb.settings.cmnd17 +' '+ cb.settings.cmnd18 +' '+ cb.settings.cmnd19 +' '+ cb.settings.cmnd20 var deckhands ={table:[]} var deck = ['a :OfHearts ','2 :OfHearts ','3 :OfHearts ','4 :OfHearts ','5 :OfHearts ','6 :OfHearts ','7 :OfHearts ','8 :OfHearts ','9 :OfHearts ','10 :OfHearts ','J :OfHearts ','K :OfHearts ','Q :OfHearts ','a :OfDiamonds ','2 :OfDiamonds ','3 :OfDiamonds ','4 :OfDiamonds ','5 :OfDiamonds ','6 :OfDiamonds ','7:OfDiamonds ','8 :OfDiamonds ','9 :OfDiamonds ','10 :OfDiamonds ','J :OfDiamonds ','K :OfDiamonds ','Q :OfDiamonds ','a :OfClubs ','2 :OfClubs ','3 :OfClubs ','4 :OfClubs ','5 :OfClubs ','6 :OfClubs ','7 :OfClubs ','8 :OfClubs ','9 :OfClubs ','10 :OfClubs ','J :OfClubs ','K :OfClubs ','Q :OfSpades ','a :OfSpades ','2 :OfSpades ','3 :OfSpades ','4 :OfSpades ','5 :OfSpades ','6 :OfSpades ','7 :OfSpades ','8 :OfSpades ','9 :OfSpades ','10 :OfSpades ','J :OfSpades ','K :OfSpades ','Q :OfSpades '] var ntc98 = 'Ongoing goal|'+String(cb.settings.goalc)+':'+String(cb.settings.goalca)+'Nightly goals-'+String(cb.settings.goal1)+':'+String(cb.settings.goal1a)+','+String(cb.settings.goal2)+':'+String(cb.settings.goal2a)+','+String(cb.settings.goal3)+':'+String(cb.settings.goal3a)+','+String(cb.settings.goal4)+':'+String(cb.settings.goal4a)+','+String(cb.settings.goal5)+':'+String(cb.settings.goal5a) var mnu = ntc99.split('|'); var menu = {}; mnu.forEach(function(property) { var menue = property.split(';'); menu[menue[0]] = menue[1];}) cb.changeRoomSubject(cb.settings.sub+' '+ cb.settings.tags) shuffle(deck) cb.onDrawPanel(function(user) { let goalcdp = toktot + goalcc return { 'template': '3_rows_11_21_31', 'row1_value': cgoal +':'+ cgoala +' | Ongoing goal-'+ goalc, 'row2_value': 'total tokens tipped: ' + toktot+' | '+ goalcdp + ' out of ongoing goal '+ goalca, 'row3_value': cb.settings.line3 }; }); cb.onMessage(function (command) { //turn the message into an array var marray = command['m'].split(' '); var comm; var note; var user = command['user']; if(cmnd95.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; if(marray[1] == cb.settings.cmndpub) {cb.sendNotice(allcmnds,',','',cb.settings['ntccolor'],'bold');} else {cb.sendNotice(allcmnds,command['user'],'',cb.settings['ntccolor'],'bold'); return command;return false}} else if(cmnd96.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; var roll = Math.floor(Math.random()*marray[1])+1 cb.sendNotice('Random number between 1 and ' +marray[1]+ ' is :' + roll,',','',cb.settings['ntccolor'],'bold'); return command;return false} else if(cmnd98.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; if(marray[1] == cb.settings.cmndpub) {cb.sendNotice(ntc98,',','',cb.settings['ntccolor'],'bold');} else {cb.sendNotice(ntc98,command['user'],'',cb.settings['ntccolor'],'bold'); return command;return false}} else if(cmnd99.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; if(marray[1] == cb.settings.cmndpub) {cb.sendNotice(ntc99,',','',cb.settings['ntccolor'],'bold');} else {cb.sendNotice(ntc99,command['user'],'',cb.settings['ntccolor'],'bold'); return command;return false}} else if(cmnd86.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; if(marray[1] == cb.settings.cmndpub) {cb.sendNotice('The current top tipper tonight is '+king+'! Tip more then '+kinga+' tokens to become the top tipper!',',','',cb.settings['ntccolor'],'bold');} else {cb.sendNotice('The current top tipper tonight is '+king+'! Tip more then '+kinga+' tokens to become the top tipper!',command['user'],'',cb.settings['ntccolor'],'bold'); return command;return false}} else if(cmnd85.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = false; let time = parseInt(marray[1]); cb.setTimeout(timer, time*60000) cb.sendNotice(user+' started a timer for '+time+' minutes!',',','',cb.settings['ntccolor'],'bold'); return command;return false} else if(cmnd94.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; if(marray[1] == cb.settings.cmndpub) {shuffle(deck);cb.sendNotice('deck has been shuffled and reset',',','',cb.settings['ntccolor'],'bold');deckhands ={table:[]}} else {cb.sendNotice('deck has been shuffled and reset',command['user'],'',cb.settings['ntccolor'],'bold');deckhands ={table:[]}; return command;return false}} else if(cmnd93.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; var card= deck.pop(); if(marray[1] == cb.settings.cmndpub) { if (typeof deckhands[user]!=="undefined"){deckhands[user].push(card);cb.sendNotice(card + 'has been added to ' + user + 's hand',',','',cb.settings['ntccolor'],'bold');} else {deckhands[user] = [card];cb.sendNotice(card + 'has been added to ' + user + 's hand ',',','',cb.settings['ntccolor'],'bold'); }} else {if (typeof deckhands[user] !== "undefined"){deckhands[user].push(card);cb.sendNotice(card + 'has been added to ' + user + 's hand' ,user,'',cb.settings['ntccolor'],'bold');cb.sendNotice(user +'drew a card',',','',cb.settings['ntccolor'],'bold'); } else {deckhands[user] = [card];cb.sendNotice(card + 'has been added to ' + user + 's hand ',user,'',cb.settings['ntccolor'],'bold');cb.sendNotice(user +'drew a card',',','',cb.settings['ntccolor'],'bold'); } return command;return false}} else if(cmnd92.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; if(marray[1] == cb.settings.cmndpub) {cb.sendNotice(user + ' s hand:' + deckhands[user],',','',cb.settings['ntccolor'],'bold');} else {cb.sendNotice(user + ' s hand:' + deckhands[user],command['user'],'',cb.settings['ntccolor'],'bold'); return command;return false}} else if(cmnd91.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; var card = deckhands[user].splice(marray[2]-1,1) if(marray[1] == cb.settings.cmndpub) {cb.sendNotice(card+'was discarded from'+user+' s hand',',','',cb.settings['ntccolor'],'bold');} else {cb.sendNotice(card+'was discarded from'+user+' s hand',command['user'],'',cb.settings['ntccolor'],'bold');cb.sendNotice(user+'discarded a card',',','',cb.settings['ntccolor'],'bold'); return command;return false}} else if(cmnd90.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; var card = deckhands[user].splice(marray[2]-1,1); var target = marray[1]; if (typeof deckhands[user]!=="undefined") {deckhands.target.push(card);cb.sendNotice(card + 'has been added to ' + target + 's hand',target,'',cb.settings['ntccolor'],'bold');cb.sendNotice(card + 'has been added to ' + target + 's hand',user,'',cb.settings['ntccolor'],'bold');} else {deckhands[target] = [card];cb.sendNotice(card + 'has been added to ' + target + 's hand target,','',cb.settings['ntccolor'],'bold');cb.sendNotice(card + 'has been added to ' + target + 's hand', user,'',cb.settings['ntccolor'],'bold'); return command;return false}} else if(cmnd89.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; var card = deckhands[user].splice(marray[1]-1,1); deckhands.table.push(card); cb.sendNotice(user+' played '+card+' to the table',',','',cb.settings['ntccolor'],'bold'); } else if(cmnd88.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; var card = deckhands.table.splice(marray[1]-1,1) deckhands.user.push(card);cb.sendNotice(user+'picked up'+card+'from the table',',','',cb.settings['ntccolor'],'bold'); return command;return false} else if(cmnd87.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; if(marray[1] == cb.settings.cmndpub) {cb.sendNotice('table:' + deckhands.table,',','',cb.settings['ntccolor'],'bold');} else {cb.sendNotice('table:' + deckhands.table,command['user'],'',cb.settings['ntccolor'],'bold'); return command;return false}} else if(cmnd97.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; cb.sendNotice("pm from " + command['user']+ ":"+command['m'],cb.room_slug,'','#00688B','bold'); return command;return false} else{ for (c = 1; c<=20; c++){ comm = String(cb.settings['cmnd' + (c)]).split(' '); note = cb.settings['ntc' + (c)]; if(comm.some(v=> marray.indexOf(v) !== -1)) { command['X-Spam'] = true; if(marray[1] == cb.settings.cmndpub) {cb.sendNotice(note,',','',cb.settings['ntccolor'],'bold');} else {cb.sendNotice(note,command['user'],'',cb.settings['ntccolor'],'bold')} return command;return false}} if (favs.includes(user)){ command['m']=':heart7'+command['m']; command['background']='#FFCDD2';if (typeof tkobj[command['user']]!== "undefined"){ command['m']='-'+tkobj[command['user']]+'- '+command['m']; if( user == king){command['m']=':crowngif282'+command['m']; return command;return false }return command;return false}return command;return false} else { if (typeof tkobj[command['user']]!== "undefined"){ command['m']='-'+tkobj[command['user']]+'- '+command['m']; if( user == king){command['m']=':crowngif282'+command['m']; return command;return false }return command;return false}return command;return false} }}) cb.onEnter(function(user) { if (cb.settings['msgonentry'] == 'yes') { cb.sendNotice('Welcome ' + user['user'] + '! ' + cb.settings['ntcoe'],user['user'],'',cb.settings['ntccolor'],'bold'); }; if(favs.includes(user['user'])) { cb.sendNotice(user['user'] + ' joined! :hicat',model,'',cb.settings['ntccolor'],'bold'); } }); cb.onLeave(function(user){if(favs.includes(user['user'])) { cb.sendNotice(user['user'] + ' left :bye6',model,'',cb.settings['ntccolor'],'bold'); }}) cb.onTip(function (tip) { var tip_amt = parseInt(tip['amount']); var tip_itm = menu[tip_amt]; var tipper = String(tip['from_user']); toktot += tip_amt; if (parseInt(toktot) >= parseInt(cgoala)) { cb.sendNotice('goal ' + cgoal +'reached!!','','#F9E79F','#17202A','bolder'); g++; cgoal=cb.settings['goal'+(g)]; cgoala=parseInt(cb.settings['goal'+(g)+'a']); cb.drawPanel()}else{cb.drawPanel()}; if (typeof tkobj[tipper]!=="undefined"){ tkobj[tipper]=parseInt(tip_amt)+parseInt(tkobj[tipper]) } else {tkobj[tipper]=tip_amt}; if (typeof tip_itm !== 'undefined'){ cb.sendNotice('!Someone tipped '+ parseInt(tip['amount']) + ' tokens for ' + tip_itm + "!",'','#F9E79F','#17202A','bolder'); }; if (parseInt(tkobj[tipper]) > kinga){ kinga = parseInt(tkobj[tipper]); king = tipper; }; } ) function timer() { cb.sendNotice(':TimesUpResized The timer is now done!','','',cb.settings['ntccolor'],'bold') }; function chatAd() { var msg; while (cb.settings['rntc' + (i + 1)] == 0) { //skip empty messages i++; i %= 10; } msg = cb.settings['rntc' + (i + 1)]; i++; i %= 10; cb.sendNotice(msg,'','',cb.settings['ntccolor'],'bold'); cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); } cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)) ; function shuffle(deck) { // for 1000 turns // switch the values of two random cards for (var s= 0; s< 1000; s++) { var location1 = Math.floor((Math.random() * deck.length)); var location2 = Math.floor((Math.random() * deck.length)); var tmp = deck[location1]; deck[location1] = deck[location2]; deck[location2] = tmp; }; deckhands = {table:[]} } function init() { } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.