Bots Home
|
Create an App
bndbn
Author:
mistressadelle
Description
Source Code
Launch Bot
Current Users
Created by:
Mistressadelle
////////////////////////////////////////////////////////////////////////////////////////////////// // Random Rewarder Bot ////////////////////////////////////////////////////////////////////////////////////////////////// // // It's like 3 Wheels of Fortune and a Tip Menu in one Bot // // by BigBoobiesFan // inspired by SweetDann's Wheel Of Fortune // ////////////////////////////////////////////////////////////////////////////////////////////////// // Version 1.4: A list of the last rewards, that can be viewed by the chat command /lrw // Version 1.3: Virtually unlimited Rewards per List, as you can put more than one reward in a slot // Easier change of lists beween shows through same mechanic // Option to show one list when advertizing // List & Notification colors made changeable // Added some Separators // Minor cosmetic changes // Version 1.2: Added option to en-/disable entire Rewards Lists without clearing rewards // Added commands for Broadcaster & Mods to en-/disable entire Rewards Lists // Minor cosmetic changes // Version 1.1: Added different seperators for Rewards Lists // Added Group Tipping Option // Added Group Tipping commands for Broadcaster & Mods // Minor cosmetic changes // Version 1.0: Three Wheels of Fortune and a Tip Menu ////////////////////////////////////////////////////////////////////////////////////////////////// cb.settings_choices = [ {name:'advertise_in_chat', type:'int', minValue:1, maxValue:999, defaultValue:5, label: '### General ###=> How Often Advertise The Plugin: (min)'}, {name:'advert_list', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes', label: 'Show one List when advertising'}, {name:'listLF', type: 'choice', choice1: 'LineBreak', choice2: 'Hyphen', choice3: 'Vertical Bar', choice4: 'Heart', choice5: 'Glitter Heart', choice6: 'Heartbeat', choice7: 'Kiss', choice8: 'Flower', choice9: 'Star', defaultValue: 'Kiss', label: 'List-Separator'}, {name:'lastRewardsListSize', type:'int', minValue:5, maxValue:30, defaultValue:10, label: 'How many Rewards shall be recorded:'}, {name:'groupTip', type: 'choice', choice1: 'No', choice2: 'Minor', choice3: 'Medium', choice4: 'Major', defaultValue: 'No', label: 'Enable Group Tipping'}, {name:'noteForeColor', type:'str', minLength: 1, maxLength: 7, label: 'Advert/Notice Font Color ', defaultValue:'#FFFFFF'}, {name:'noteBackColor', type:'str', minLength: 1, maxLength: 7, label: 'Advert/Notice Background Color ', defaultValue:'#8800BB'}, {name:'cost_sw', type:'int', minValue:0, maxValue:999, defaultValue:25, label: '### Minor Rewards ###=> Cost Per Minor Reward (1-999): '}, {name:'sw1', type:'str', minLength: 0, maxLength: 255, label: 'Minor Reward #1 ', defaultValue:'Oil on Boobs', required: false}, {name:'sw2', type:'str', minLength: 0, maxLength: 255, label: 'Minor Reward #2 ', defaultValue:'Oil on Ass', required: false}, {name:'sw3', type:'str', minLength: 0, maxLength: 255, label: 'Minor Reward #3 ', defaultValue:'Spank Ass x 10 with Hand', required: false}, {name:'sw4', type:'str', minLength: 0, maxLength: 255, label: 'Minor Reward #4 ', defaultValue:'Write your name on my Boobs', required: false}, {name:'sw5', type:'str', minLength: 0, maxLength: 255, label: 'Minor Reward #5 ', defaultValue:'A Smile and a Kiss!', required: false}, {name:'sw6', type:'str', minLength: 0, maxLength: 255, label: 'Minor Reward #6 ', defaultValue:'Show Feet', required: false}, {name:'sw7', type:'str', minLength: 0, maxLength: 255, label: 'Minor Reward #7 ', defaultValue:'Lick Nipples', required: false}, {name:'sw8', type:'str', minLength: 0, maxLength: 255, label: 'Minor Reward #8 ', defaultValue:'Show Ass', required: false}, {name:'sw9', type:'str', minLength: 0, maxLength: 255, label: 'Minor Reward #9 ', defaultValue:'Lotion on Boobs', required: false}, {name:'sw10', type:'str', minLength: 0, maxLength: 255, label: 'Minor Reward #10 ', defaultValue:'Lotion on Ass', required: false}, {name:'swChoose', type: 'choice', choice1: 'No', choice2: 'Minor', choice3: 'Medium', choice4: 'Major', choice5: 'Minor-Medium', choice6: 'Minor-Major', choice7: 'Medium-Major', choice8: 'Minor-Medium-Major', defaultValue: 'No', label: "Choose from Lists"}, {name:'swChooseChance', type:'int', minValue:1, maxValue:50, defaultValue:10, label: 'Chance of Choosing is 1 in:'}, {name:'minorListColor', type:'str', minLength: 1, maxLength: 7, label: 'Medium Rewards List Color ', defaultValue:'#0000FF'}, {name:'cost_mw', type:'int', minValue:0, maxValue:999, defaultValue:40, label: '### Medium Rewards ###=> Cost Per Medium Reward (0-999): '}, {name:'mw1', type:'str', minLength: 0, maxLength: 255, label: 'Medium Reward #1 ', defaultValue:'Pussy Play in Doggy', required: false}, {name:'mw2', type:'str', minLength: 0, maxLength: 255, label: 'Medium Reward #2 ', defaultValue:'Suck Fingers', required: false}, {name:'mw3', type:'str', minLength: 0, maxLength: 255, label: 'Medium Reward #3 ', defaultValue:'Spank Ass x 10 with Paddle', required: false}, {name:'mw4', type:'str', minLength: 0, maxLength: 255, label: 'Medium Reward #4 ', defaultValue:'Write your name on my Pussy', required: false}, {name:'mw5', type:'str', minLength: 0, maxLength: 255, label: 'Medium Reward #5 ', defaultValue:'Dildo Blowjob', required: false}, {name:'mw6', type:'str', minLength: 0, maxLength: 255, label: 'Medium Reward #6 ', defaultValue:'Stretch & Show', required: false}, {name:'mw7', type:'str', minLength: 0, maxLength: 255, label: 'Medium Reward #7 ', defaultValue:'Lotion Feet', required: false}, {name:'mw8', type:'str', minLength: 0, maxLength: 255, label: 'Medium Reward #8 ', defaultValue:'Pussy Play', required: false}, {name:'mw9', type:'str', minLength: 0, maxLength: 255, label: 'Medium Reward #9 ', defaultValue:'Lotion on Pussy', required: false}, {name:'mw10', type:'str', minLength: 0, maxLength: 255, label: 'Medium Reward #10 ', defaultValue:'Twerk', required: false}, {name:'mwChoose', type: 'choice', choice1: 'No', choice2: 'Minor', choice3: 'Medium', choice4: 'Major', choice5: 'Minor-Medium', choice6: 'Minor-Major', choice7: 'Medium-Major', choice8: 'Minor-Medium-Major', defaultValue: 'No', label: "Choose from Lists"}, {name:'mwChooseChance', type:'int', minValue:1, maxValue:50, defaultValue:10, label: 'Chance of Choosing is 1 in:'}, {name:'mediumListColor', type:'str', minLength: 1, maxLength: 7, label: 'Medium Rewards List Color ', defaultValue:'#008800'}, {name:'cost_lw', type:'int', minValue:0, maxValue:999, defaultValue:55, label: '### Major Rewards ###=> Cost Per Major Reward (0-999): '}, {name:'lw1', type:'str', minLength: 0, maxLength: 255, label: 'Major Reward #1 ', defaultValue:'Dildo in Pussy', required: false}, {name:'lw2', type:'str', minLength: 0, maxLength: 255, label: 'Major Reward #2 ', defaultValue:'Spread Pussy Closeup', required: false}, {name:'lw3', type:'str', minLength: 0, maxLength: 255, label: 'Major Reward #3 ', defaultValue:'Spank Ass x 10 each Cheek', required: false}, {name:'lw4', type:'str', minLength: 0, maxLength: 255, label: 'Major Reward #4 ', defaultValue:'Vibrator Clit Play', required: false}, {name:'lw5', type:'str', minLength: 0, maxLength: 255, label: 'Major Reward #5 ', defaultValue:'Dildo Pussy in Doggy', required: false}, {name:'lw6', type:'str', minLength: 0, maxLength: 255, label: 'Major Reward #6 ', defaultValue:'Spank Boobs 3x each', required: false}, {name:'lw7', type:'str', minLength: 0, maxLength: 255, label: 'Major Reward #7 ', defaultValue:'Dildo Titfuck', required: false}, {name:'lw8', type:'str', minLength: 0, maxLength: 255, label: 'Major Reward #8 ', defaultValue:'Ride Dildo', required: false}, {name:'lw9', type:'str', minLength: 0, maxLength: 255, label: 'Major Reward #9 ', defaultValue:'Ass Play', required: false}, {name:'lw10', type:'str', minLength: 0, maxLength: 255, label: 'Major Reward #10 ', defaultValue:'Naked Dance', required: false}, {name:'lwChoose', type: 'choice', choice1: 'No', choice2: 'Minor', choice3: 'Medium', choice4: 'Major', choice5: 'Minor-Medium', choice6: 'Minor-Major', choice7: 'Medium-Major', choice8: 'Minor-Medium-Major', defaultValue: 'No', label: "Choose from Lists"}, {name:'lwChooseChance', type:'int', minValue:1, maxValue:50, defaultValue:10, label: 'Chance of Choosing is 1 in:'}, {name:'majorListColor', type:'str', minLength: 1, maxLength: 7, label: 'Major Rewards List Color ', defaultValue:'#FF7700'}, {name:'dpActive', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes', label: '### Direct Rewards ###> Direct Reward List Active '}, {name:'dp1', type:'str', minLength: 0, maxLength: 255, label: 'Direct Reward #1 ', defaultValue:'Get a PM', required: false}, {name:'dp1c', type:'int', minValue:0, maxValue:999, defaultValue:22, label: 'Direct Reward #1 Cost '}, {name:'dp2', type:'str', minLength: 0, maxLength: 255, label: 'Direct Reward #2 ', defaultValue:'Lotion Feet', required: false}, {name:'dp2c', type:'int', minValue:0, maxValue:999, defaultValue:45, label: 'Direct Reward #2 Cost '}, {name:'dp3', type:'str', minLength: 0, maxLength: 255, label: 'Direct Reward #3 ', defaultValue:'Naked Dance or Twerk', required: false}, {name:'dp3c', type:'int', minValue:0, maxValue:999, defaultValue:60, label: 'Direct Reward #3 Cost '}, {name:'dp4', type:'str', minLength: 0, maxLength: 255, label: 'Direct Reward #4 ', defaultValue:'Watch your Cam for 5 min', required: false}, {name:'dp4c', type:'int', minValue:0, maxValue:999, defaultValue:75, label: 'Direct Reward #4 Cost '}, {name:'dp5', type:'str', minLength: 0, maxLength: 255, label: 'Direct Reward #5 ', defaultValue:'Pussy Play', required: false}, {name:'dp5c', type:'int', minValue:0, maxValue:999, defaultValue:95, label: 'Direct Reward #5 Cost '}, {name:'dp6', type:'str', minLength: 0, maxLength: 255, label: 'Direct Reward #6 ', defaultValue:'Dildo in Pussy', required: false}, {name:'dp6c', type:'int', minValue:0, maxValue:999, defaultValue:120, label: 'Direct Reward #6 Cost '}, {name:'dp7', type:'str', minLength: 0, maxLength: 255, label: 'Direct Reward #7 ', defaultValue:'Ride Dildo', required: false}, {name:'dp7c', type:'int', minValue:0, maxValue:999, defaultValue:130, label: 'Direct Reward #7 Cost '}, {name:'dp8', type:'str', minLength: 0, maxLength: 255, label: 'Direct Reward #8 ', defaultValue:'Oil all over show', required: false}, {name:'dp8c', type:'int', minValue:0, maxValue:999, defaultValue:140, label: 'Direct Reward #8 Cost '}, {name:'dp9', type:'str', minLength: 0, maxLength: 255, label: 'Direct Reward #9 ', defaultValue:'Dildo in Doggy Style', required: false}, {name:'dp9c', type:'int', minValue:0, maxValue:999, defaultValue:150, label: 'Direct Reward #9 Cost '}, {name:'dp10', type:'str', minLength: 0, maxLength: 255, label: 'Direct Reward #10 ', defaultValue:'Butt Plug', required: false}, {name:'dp10c', type:'int', minValue:0, maxValue:999, defaultValue:160, label: 'Direct Reward #10 Cost '}, {name:'directListColor', type:'str', minLength: 1, maxLength: 7, label: 'Direct Rewards List Color', defaultValue:'#8800BB'}, ]; var rewardsS = new Array(); var rewardsM = new Array(); var rewardsL = new Array(); var rewardsD = new Array(); var rewardsDC = new Array(); var lastRewardsList = new Array(); var cReturn = ' \n'; var cdarkgreen='#008800'; var cdarkblue='#0000FF'; var cdarkyellow='#FF7700'; var cdarkpurple='#8800BB'; var cdirect='#8800BB'; var cwhite='#FFFFFF'; var cblack='#000000'; var groupTipAmount=0; var advertCounter=0; init(); function init(){ var tempS = new Array(cb.settings.sw1,cb.settings.sw2,cb.settings.sw3,cb.settings.sw4,cb.settings.sw5,cb.settings.sw6,cb.settings.sw7,cb.settings.sw8,cb.settings.sw9,cb.settings.sw10); var tempM = new Array(cb.settings.mw1,cb.settings.mw2,cb.settings.mw3,cb.settings.mw4,cb.settings.mw5,cb.settings.mw6,cb.settings.mw7,cb.settings.mw8,cb.settings.mw9,cb.settings.mw10); var tempL = new Array(cb.settings.lw1,cb.settings.lw2,cb.settings.lw3,cb.settings.lw4,cb.settings.lw5,cb.settings.lw6,cb.settings.lw7,cb.settings.lw8,cb.settings.lw9,cb.settings.lw10); var tempD = new Array(cb.settings.dp1,cb.settings.dp2,cb.settings.dp3,cb.settings.dp4,cb.settings.dp5,cb.settings.dp6,cb.settings.dp7,cb.settings.dp8,cb.settings.dp9,cb.settings.dp10); var tempDC = new Array(cb.settings.dp1c,cb.settings.dp2c,cb.settings.dp3c,cb.settings.dp4c,cb.settings.dp5c,cb.settings.dp6c,cb.settings.dp7c,cb.settings.dp8c,cb.settings.dp9c,cb.settings.dp10c); var tmpValArray=new Array(); for(var i = 0; i<tempS.length; i++) { if(tempS[i] != '' && tempS[i] != undefined){ tmpValArray = tempS[i].split(';'); for(var t = 0; t<tmpValArray.length; t++) { if(tmpValArray[t] != '' && tmpValArray[t] != undefined){ rewardsS.push(tmpValArray[t].trim()); } } } } for(var i = 0; i<tempM.length; i++) { if(tempM[i] != '' && tempM[i] != undefined){ var tmpValArray=tempM[i].split(';'); for(var t = 0; t<tmpValArray.length; t++) { if(tmpValArray[t] != '' && tmpValArray[t] != undefined){ rewardsM.push(tmpValArray[t].trim()); } } } } for(var i = 0; i<tempL.length; i++) { if(tempL[i] != '' && tempL[i] != undefined){ var tmpValArray=tempL[i].split(';'); for(var t = 0; t<tmpValArray.length; t++) { if(tmpValArray[t] != '' && tmpValArray[t] != undefined){ rewardsL.push(tmpValArray[t].trim()); } } } } for(var i = 0; i<tempD.length; i++) { if(tempD[i] != '' && tempD[i] != undefined){ if(tempD[i].indexOf(';') < 0){ rewardsD.push(tempD[i].trim()); rewardsDC.push(tempDC[i]); }else{ tmpValArray=tempD[i].split(';'); for(var t = 0; t<tmpValArray.length; t++) { if (tmpValArray[t].indexOf(':') >= 0){ var dCost=parseInt(tmpValArray[t].split(':')[1].trim()); if(!isNaN(dCost)){ rewardsDC.push(dCost); rewardsD.push(tmpValArray[t].split(':')[0].trim()); } } } } } } switch(cb.settings.listLF){ case 'Hyphen': cReturn=' - '; break; case 'Vertical Bar': cReturn=' | '; break; case 'Heart': cReturn=' :heart2 '; break; case 'Glitter Heart': cReturn=' :pixelheart '; break; case 'Heartbeat': cReturn=' :heart7 '; break; case 'Kiss': cReturn=' :kissi '; break; case 'Flower': cReturn=' :tinyflower1 '; break; case 'Star': cReturn=' :1star '; break; } cdarkblue=cb.settings.minorListColor; cdarkgreen=cb.settings.mediumListColor; cdarkyellow=cb.settings.majorListColor; cdirect=cb.settings.directListColor; cdarkpurple=cb.settings.noteBackColor; cwhite=cb.settings.noteForeColor; advert(''); } function spinWheel(rewards, listName, userName) { var chooseChance=0; var chooseLists=new Array(); var bColor=cwhite; var fColor=cblack; switch(listName){ case 'Minor': chooseChance = cb.settings.swChooseChance; chooseLists=cb.settings.swChoose.split('-'); fColor=cdarkblue; break; case 'Medium': chooseChance = cb.settings.mwChooseChance; chooseLists=cb.settings.mwChoose.split('-'); fColor=cdarkgreen; break; case 'Major': chooseChance = cb.settings.lwChooseChance; chooseLists=cb.settings.lwChoose.split('-'); fColor=cdarkyellow; break; } var rndNr = Math.floor(Math.random()*(chooseChance)); if (chooseLists[0]=='No'){ rndNr=100; } if(rndNr==0){ rndNr = Math.floor(Math.random()*(chooseLists.length)); cb.sendNotice(':RRChooseReward ' + userName + ':','','',cdarkpurple,'bold'); switch(chooseLists[rndNr]){ case 'Minor': showPrizes('',chooseLists[rndNr], rewardsS); break; case 'Medium': showPrizes('',chooseLists[rndNr], rewardsM); break; case 'Major': showPrizes('',chooseLists[rndNr], rewardsL); break; } addToRewardsList(userName, chooseLists[rndNr], "Choice"); } else{ rndNr = Math.floor(Math.random()*(rewards.length)); cb.sendNotice(':RR'+listName+'Reward for ' + userName + ': ' + rewards[rndNr],'','',fColor,'bold'); addToRewardsList(userName, listName, rewards[rndNr]); } } cb.onEnter(function(user) { if (user['has_tokens']) { advertMessage(user['user']); } }); cb.onTip(function (tip) { var tipAmount = tip['amount']; switch(tip['amount']){ case cb.settings.cost_sw: spinWheel(rewardsS, 'Minor', tip['from_user']); break; case cb.settings.cost_mw: spinWheel(rewardsM, 'Medium', tip['from_user']); break; case cb.settings.cost_lw: spinWheel(rewardsL, 'Major', tip['from_user']); break; default: if (!testForDirectPrize(tip['amount'], tip['from_user'])){ checkGroupTip(tip['amount'], tip['from_user']); } } }); function testForDirectPrize(tipAmount, userName){ if (cb.settings.dpActive=='Yes'){ var dpIndex = rewardsDC.indexOf(tipAmount); if (dpIndex >= 0){ cb.sendNotice(':RRDirectReward * ' + userName +'\'s Choice was:\n' + rewardsD[dpIndex],'','',cdarkpurple,'bold'); addToRewardsList(userName, "Direct", rewardsD[dpIndex]); return true; } } return false; } function addToRewardsList(userName, rewardType, reward){ lastRewardsList.push( userName +": "+rewardType+" Reward > "+reward); while (lastRewardsList.length > cb.settings.lastRewardsListSize){ lastRewardsList.shift(); } } function checkGroupTip(tipAmount, userName){ if(cb.settings.groupTip != 'No'){ groupTipAmount += tipAmount; switch (cb.settings.groupTip){ case 'Minor': if(cb.settings.cost_sw > 0 && rewardsS.length > 0){ if (tipAmount > cb.settings.cost_sw){ spinWheel(rewardsS, 'Minor', userName); groupTipAmount -= tipAmount; } else if(groupTipAmount >= cb.settings.cost_sw){ spinWheel(rewardsS, 'Minor', 'Group Tipping'); groupTipAmount=0; } else { cb.sendNotice((cb.settings.cost_sw-groupTipAmount) +' token left for a Minor Reward!','','',cdarkblue,'bold'); } } break; case 'Medium': if (cb.settings.cost_mw > 0 && rewardsM.length > 0){ if (tipAmount > cb.settings.cost_mw){ spinWheel(rewardsM, 'Medium', userName); groupTipAmount -= tipAmount; } else if(groupTipAmount >= cb.settings.cost_mw){ spinWheel(rewardsM, 'Medium', 'Group Tipping'); groupTipAmount=0; } else { cb.sendNotice((cb.settings.cost_mw-groupTipAmount) +' token left for a Medium Reward!','','',cdarkgreen,'bold'); } } break; case 'Major': if (cb.settings.cost_lw > 0 && rewardsL.length > 0){ if (tipAmount > cb.settings.cost_lw){ spinWheel(rewardsL, 'Major', userName); groupTipAmount -= tipAmount; } else if(groupTipAmount >= cb.settings.cost_lw){ spinWheel(rewardsL, 'Major', 'Group Tipping'); groupTipAmount=0; } else { cb.sendNotice((cb.settings.cost_lw-groupTipAmount) +' token left for a Major Reward!','','',cdarkyellow,'bold'); } } break; } } } cb.onMessage(function (msg) { var userName=msg['user']; var msgSentTo=msg['user']; if ((msg['is_mod']) || (userName == cb.room_slug) || (userName == 'bigboobiesfan')){ msgSentTo='all guests'; if(msg['m'].indexOf('/gtoff') >= 0){ cb.settings.groupTip = 'No'; cb.sendNotice('Group Tipping disabled!','',cdarkpurple,cwhite,'bold'); msg['m']=''; }else if(msg['m'].indexOf('/gtmin') >= 0){ cb.settings.groupTip = 'Minor'; cb.sendNotice('Group Tipping for Minor Rewards enabled!','',cdarkpurple,cwhite,'bold'); msg['m']=''; }else if(msg['m'].indexOf('/gtmed') >= 0){ cb.settings.groupTip = 'Medium'; cb.sendNotice('Group Tipping for Medium Rewards enabled!','',cdarkpurple,cwhite,'bold'); msg['m']=''; }else if(msg['m'].indexOf('/gtmaj') >= 0){ cb.settings.groupTip = 'Major'; cb.sendNotice('Group Tipping for Major Rewards enabled!','',cdarkpurple,cwhite,'bold'); msg['m']=''; } if (msg['m'].indexOf('/sc')>=0){ SetRewardListCost(msg['m']); msg['m']=''; }else if (msg['m'].indexOf('/dron')>=0){ cb.settings.dpActive='Yes'; cb.sendNotice('Direct Reward List enabled!','',cdarkpurple,cwhite,'bold'); showPrizes('', 'Direct', rewardsD); msg['m']=''; }else if (msg['m'].indexOf('/drof')>=0){ cb.settings.dpActive='No'; cb.sendNotice('Direct Reward List DEACTIVATED!', '','','#FF0000','bold'); msg['m']=''; } if (msg['m'].indexOf('/rrhelp') >= 0){ cb.sendNotice('/gtoff = Group Tipping OFF; /gtmin = Group Tipping Minor Rewards; /gtmed = Group Tipping Medium Rewards; /gtmaj = Group Tipping Major Rewards;',userName,cdarkpurple,cwhite,'bold'); cb.sendNotice('/scmin nn = Set Cost Minor Rewards nn tk; /scmed nn = Set Cost Medium Rewards nn tk; /scmmaj nn = Set Cost Major Rewards nn tk; nn = 0 Deactivates List; /dron = Activates Direct Rewards; /droff = Deactivates Direct Rewards',userName,cdarkpurple,cwhite,'bold'); } userName=''; } if (msg['m'].indexOf('/lar') >= 0){ cb.sendNotice(':RandomRewarderActive',userName); if(cb.settings.cost_sw > 0){ showPrizes(userName, 'Minor', rewardsS); } if(rewardsM.length>0 && cb.settings.cost_mw > 0){ showPrizes(userName, 'Medium', rewardsM); } if(rewardsL.length>0 && cb.settings.cost_lw > 0){ showPrizes(userName, 'Major', rewardsL); } if(rewardsD.length>0 && cb.settings.dpActive == 'Yes'){ showPrizes(userName, 'Direct', rewardsD); } msg['m'] += ' (All Lists of Rewards sent to '+msgSentTo+')'; } else{ if (msg['m'].indexOf('/rrhelp') >= 0){ cb.sendNotice('/lsr = List Minor Rewards | /lmr = List Medium Rewards | /llr = List Major Rewards | /ldr = List Direct Rewards | /lrw = List of last '+cb.settings.lastRewardsListSize+' rewards won | /rrhelp = List of Commands', userName,cdarkpurple,cwhite,'bold'); msg['m'] += ' (List of commands sent to '+msgSentTo+')'; } if(msg['m'].indexOf('/lsr') >= 0){ if(cb.settings.cost_sw > 0){ cb.sendNotice(':RandomRewarderActive',userName); showPrizes(userName, 'Minor', rewardsS); msg['m'] += ' (List of Minor Rewards sent to '+msgSentTo+')'; } else{ cb.sendNotice('List of Minor Rewards DEACTIVATED!',userName,'','#FF0000','bold'); } } if(msg['m'].indexOf('/lmr') >= 0) { if(cb.settings.cost_mw > 0){ cb.sendNotice(':RandomRewarderActive',userName); showPrizes(userName, 'Medium', rewardsM); msg['m'] += ' (List of Medium Rewards sent to '+msgSentTo+')'; } else{ cb.sendNotice('List of Medium Rewards DEACTIVATED!',userName,'','#FF0000','bold'); } } if(msg['m'].indexOf('/llr') >= 0) { if(cb.settings.cost_lw > 0){ cb.sendNotice(':RandomRewarderActive',userName); showPrizes(userName, 'Major', rewardsL); msg['m'] += ' (List of Major Rewards sent to '+msgSentTo+')'; } else{ cb.sendNotice('List of Major Rewards DEACTIVATED!',userName,'','#FF0000','bold'); } } if(msg['m'].indexOf('/ldr') >= 0) { if(cb.settings.dpActive == 'Yes'){ cb.sendNotice(':RandomRewarderActive',userName); showPrizes(userName, 'Direct', rewardsD); msg['m'] += ' (List of Direct Rewards sent to '+msgSentTo+')'; } else{ cb.sendNotice('List of Direct Rewards DEACTIVATED!',userName,'','#FF0000','bold'); } } if(msg['m'].indexOf('/lrw') >= 0) { var lastRewards=':RandomRewarderActive \nLast ' + cb.settings.lastRewardsListSize + ' Rewards won (first=>last): '; if (lastRewardsList.length>0){ for(var r = 0; r<lastRewardsList.length; r++) { lastRewards += '\n' + (r+1) + ': ' + lastRewardsList[r]; } }else{ lastRewards += '\n' + 'No Rewards won so far'; } cb.sendNotice(lastRewards, userName,cwhite,cdarkpurple,'bold'); } } return msg; }); function SetRewardListCost(message){ var command=message.split(' '); var oldCost; var newCost; if (command.indexOf('/scmin')>=0 && command.length>=(command.indexOf('/scmin')+1)){ oldCost=cb.settings.cost_sw; newCost=parseInt(command[(command.indexOf('/scmin')+1)]); if(!isNaN(newCost)){ cb.settings.cost_sw=newCost; if(newCost==0){ cb.sendNotice('Minor Reward List DEACTIVATED!', '','','#FF0000','bold'); }else{ cb.sendNotice('Cost for Minor Rewards set to ' + newCost + ' token!', '','',cdarkblue,'bold'); showPrizes('', 'Minor', rewardsS); } } } if (command.indexOf('/scmed')>=0 && command.length>=(command.indexOf('/scmed')+1)){ newCost=parseInt(command[(command.indexOf('/scmed')+1)]); if(!isNaN(newCost)){ cb.settings.cost_mw=newCost; if(newCost==0){ cb.sendNotice('Medium Reward List DEACTIVATED!', '','','#FF0000','bold'); }else{ cb.sendNotice('Cost for Medium Rewards set to ' + newCost + ' token!', '','',cdarkgreen,'bold'); showPrizes('', 'Medium', rewardsM); } } } if (command.indexOf('/scmaj')>=0 && command.length>=(command.indexOf('/scmaj')+1)){ newCost=parseInt(command[(command.indexOf('/scmaj')+1)]); if(!isNaN(newCost)){ cb.settings.cost_lw=newCost; if(newCost==0){ cb.sendNotice('Major Reward List DEACTIVATED!', '','','#FF0000','bold'); }else{ cb.sendNotice('Cost for Major Rewards set to ' + newCost + ' token!', '','',cdarkyellow,'bold'); showPrizes('', 'Major', rewardsL); } } } } function showPrizes(userName, listName, rewards){ var fColor=''; var bColor=''; var listCost=0; var outMessage=''; switch(listName){ case 'Minor': fColor=cdarkblue; listCost=cb.settings.cost_sw; break; case 'Medium': fColor=cdarkgreen; listCost=cb.settings.cost_mw; break; case 'Major': fColor=cdarkyellow; listCost=cb.settings.cost_lw; break; case 'Direct': fColor=cdirect; break; } if (rewards.length > 0){ outMessage=':RR' + listName + 'Rewards'; if (listName == 'Direct'){ outMessage += ' (Tip exact amount in a single tip)\n'; } else{ outMessage += ' (' + listCost+' Token)\n'; } for(var x = 0; x < rewards.length; x++) { if(x > 0) {outMessage += cReturn;} if (listName == 'Direct'){ outMessage += rewardsD[x] + ': ' + rewardsDC[x] + ' tk'; } else{ outMessage+= rewards[x]; } } cb.sendNotice(outMessage, userName,bColor,fColor,'bold'); } } function advertMessage(userName){ var bColor=cdarkpurple; var fColor=cwhite; if (userName == ''){ advertCounter += 1; } var outmessage=':RandomRewarderActive \n'; if(cb.settings.cost_sw > 0){ outmessage +='Type \'/lsr\' for List of Small Rewards (' + cb.settings.cost_sw + ' tokens)\n'; } if(rewardsM.length>0 && cb.settings.cost_mw > 0){ outmessage += 'Type \'/lmr\' for List of Medium Rewards (' + cb.settings.cost_mw + ' tokens)\n'; } if(rewardsL.length>0 && cb.settings.cost_lw > 0){ outmessage += 'Type \'/llr\' for List of Large Rewards (' + cb.settings.cost_lw + ' tokens)\n'; } if(rewardsD.length>0 && cb.settings.dpActive == 'Yes'){ outmessage += 'Type \'/ldr\' for List of Direct Rewards and their costs\n'; } outmessage += 'Type \'/lar\' for all Lists of Rewards\nType \'/rrhelp\' for Lists of commands\n'; outmessage += '/lrw = List of last '+cb.settings.lastRewardsListSize+' rewards won\n'; if(cb.settings.groupTip != 'No'){ outmessage += 'Group Tipping for ' + cb.settings.groupTip +' Rewards is enabled!\n'; } outmessage += '### Have Fun and Good Luck! ###\n(V1.4, developed by BigBoobiesFan)'; cb.sendNotice(outmessage,userName,bColor,fColor,'bold'); if(cb.settings.advert_list == 'Yes'){ if((advertCounter % 4) == 0){ advertCounter=0; showPrizes(userName, 'Minor', rewardsS); } if((advertCounter % 4) == 1){ showPrizes(userName, 'Medium', rewardsM); } if((advertCounter % 4) == 2){ showPrizes(userName, 'Major', rewardsL); } if((advertCounter % 4) == 3){ showPrizes(userName, 'Direct', rewardsD); } } } function advert(){ advertMessage(''); cb.setTimeout(advert, (cb.settings.advertise_in_chat * 60000)); }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.