Apps Home
|
Create an App
Flint & Sky's Fairytips
Author:
flint_x_sky
Description
Source Code
Launch App
Current Users
Created by:
Flint_X_Sky
/** * App: Fairy Tips * Version: 1.5 * /list derived from: Zingknaat's Tip To See v1.00 12.22.13 * Author: Sethir * Date: 2015-08-18 */ var lastTipper = '--'; var lastTipAmount = 0; var tipCounter = 0; var lastItem = '--'; var currentGoal = 1; var currentList = 1; var tipTotals = {}; var maxGoals = 15; var adCounter = 0; cb.settings_choices = [ {name:'list1_item_1', type:'str', label:'List 1 -- Item #1', defaultValue:'show ass'}, {name:'list1_item_1_price', type:'int', label:'List 1 -- Price for item #1', defaultValue:25}, {name:'list1_item_2', type:'str', label:'List 1 -- Item #2 (optional)', defaultValue:'', required:false}, {name:'list1_item_2_price', type:'int', label:'List 1 -- Price for item #2', defaultValue:35}, {name:'list1_item_3', type:'str', label:'List 1 -- Item #3 (optional)', defaultValue:'', required:false}, {name:'list1_item_3_price', type:'int', label:'List 1 -- Price for item #3', defaultValue:45}, {name:'list1_item_4', type:'str', label:'List 1 -- Item #4 (optional)', defaultValue:'', required:false}, {name:'list1_item_4_price', type:'int', label:'List 1 -- Price for item #4', defaultValue:55}, {name:'list1_item_5', type:'str', label:'List 1 -- Item #5 (optional)', defaultValue:'', required:false}, {name:'list1_item_5_price', type:'int', label:'List 1 -- Price for item #5', defaultValue:65}, {name:'list1_item_6', type:'str', label:'List 1 -- Item #6 (optional)', defaultValue:'', required:false}, {name:'list1_item_6_price', type:'int', label:'List 1 -- Price for item #6', defaultValue:75}, {name:'list1_item_7', type:'str', label:'List 1 -- Item #7 (optional)', defaultValue:'', required:false}, {name:'list1_item_7_price', type:'int', label:'List 1 -- Price for item #7', defaultValue:85}, {name:'list1_item_8', type:'str', label:'List 1 -- Item #8 (optional)', defaultValue:'', required:false}, {name:'list1_item_8_price', type:'int', label:'List 1 -- Price for item #8', defaultValue:95}, {name:'list1_item_9', type:'str', label:'List 1 -- Item #9 (optional)', defaultValue:'', required:false}, {name:'list1_item_9_price', type:'int', label:'List 1 -- Price for item #9', defaultValue:100}, {name:'list1_item_10', type:'str', label:'List 1 -- Item #10 (optional)', defaultValue:'', required:false}, {name:'list1_item_10_price', type:'int', label:'List 1 -- Price for item #10', defaultValue:125}, {name:'list2_item_1', type:'str', label:'List 2 -- Item #1', defaultValue:'show ass'}, {name:'list2_item_1_price', type:'int', label:'List 2 -- Price for item #1', defaultValue:25}, {name:'list2_item_2', type:'str', label:'List 2 -- Item #2 (optional)', defaultValue:'', required:false}, {name:'list2_item_2_price', type:'int', label:'List 2 -- Price for item #2', defaultValue:35}, {name:'list2_item_3', type:'str', label:'List 2 -- Item #3 (optional)', defaultValue:'', required:false}, {name:'list2_item_3_price', type:'int', label:'List 2 -- Price for item #3', defaultValue:45}, {name:'list2_item_4', type:'str', label:'List 2 -- Item #4 (optional)', defaultValue:'', required:false}, {name:'list2_item_4_price', type:'int', label:'List 2 -- Price for item #4', defaultValue:55}, {name:'list2_item_5', type:'str', label:'List 2 -- Item #5 (optional)', defaultValue:'', required:false}, {name:'list2_item_5_price', type:'int', label:'List 2 -- Price for item #5', defaultValue:65}, {name:'list2_item_6', type:'str', label:'List 2 -- Item #6 (optional)', defaultValue:'', required:false}, {name:'list2_item_6_price', type:'int', label:'List 2 -- Price for item #6', defaultValue:75}, {name:'list2_item_7', type:'str', label:'List 2 -- Item #7 (optional)', defaultValue:'', required:false}, {name:'list2_item_7_price', type:'int', label:'List 2 -- Price for item #7', defaultValue:85}, {name:'list2_item_8', type:'str', label:'List 2 -- Item #8 (optional)', defaultValue:'', required:false}, {name:'list2_item_8_price', type:'int', label:'List 2 -- Price for item #8', defaultValue:95}, {name:'list2_item_9', type:'str', label:'List 2 -- Item #9 (optional)', defaultValue:'', required:false}, {name:'list2_item_9_price', type:'int', label:'List 2 -- Price for item #9', defaultValue:100}, {name:'list2_item_10', type:'str', label:'List 2 -- Item #10 (optional)', defaultValue:'', required:false}, {name:'list2_item_10_price', type:'int', label:'List 2 -- Price for item #10', defaultValue:125}, {name:'list3_item_1', type:'str', label:'List 3 -- Item #1', defaultValue:'show ass'}, {name:'list3_item_1_price', type:'int', label:'List 3 -- Price for item #1', defaultValue:25}, {name:'list3_item_2', type:'str', label:'List 3 -- Item #2 (optional)', defaultValue:'', required:false}, {name:'list3_item_2_price', type:'int', label:'List 3 -- Price for item #2', defaultValue:35}, {name:'list3_item_3', type:'str', label:'List 3 -- Item #3 (optional)', defaultValue:'', required:false}, {name:'list3_item_3_price', type:'int', label:'List 3 -- Price for item #3', defaultValue:45}, {name:'list3_item_4', type:'str', label:'List 3 -- Item #4 (optional)', defaultValue:'', required:false}, {name:'list3_item_4_price', type:'int', label:'List 3 -- Price for item #4', defaultValue:55}, {name:'list3_item_5', type:'str', label:'List 3 -- Item #5 (optional)', defaultValue:'', required:false}, {name:'list3_item_5_price', type:'int', label:'List 3 -- Price for item #5', defaultValue:65}, {name:'list3_item_6', type:'str', label:'List 3 -- Item #6 (optional)', defaultValue:'', required:false}, {name:'list3_item_6_price', type:'int', label:'List 3 -- Price for item #6', defaultValue:75}, {name:'list3_item_7', type:'str', label:'List 3 -- Item #7 (optional)', defaultValue:'', required:false}, {name:'list3_item_7_price', type:'int', label:'List 3 -- Price for item #7', defaultValue:85}, {name:'list3_item_8', type:'str', label:'List 3 -- Item #8 (optional)', defaultValue:'', required:false}, {name:'list3_item_8_price', type:'int', label:'List 3 -- Price for item #8', defaultValue:95}, {name:'list3_item_9', type:'str', label:'List 3 -- Item #9 (optional)', defaultValue:'', required:false}, {name:'list3_item_9_price', type:'int', label:'List 3 -- Price for item #9', defaultValue:100}, {name:'list3_item_10', type:'str', label:'List 3 -- Item #10 (optional)', defaultValue:'', required:false}, {name:'list3_item_10_price', type:'int', label:'List 3 -- Price for item #10', defaultValue:125}, {name:'notification_wait_time', type:'choice', label:'Time to notify viewers (in minutes)',choice1:1, choice2:2, choice3:3, choice4:4, choice5:5, choice6:10, choice7:15, choice8:20, choice9:25, choice10:30,defaultValue:15}, {name:'goal_announce', type:'str', label:'Goal Reached Announcement', defaultValue:'<goalname> Goal Reached \n :goalreached', required:false}, {name:'goal_1', type:'str', label:'Goal #1', defaultValue:'Topless'}, {name:'goal_1_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:1000}, {name:'goal_1_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'Warm up goals: Topless @1000, Naked @2000'}, {name:'goal_1_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_1_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_2', type:'str', label:'Goal #2', defaultValue:'', required:false}, {name:'goal_2_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_2_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_2_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_2_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_3', type:'str', label:'Goal #3', defaultValue:'', required:false}, {name:'goal_3_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_3_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_3_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_3_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_4', type:'str', label:'Goal #4', defaultValue:'', required:false}, {name:'goal_4_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_4_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_4_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_4_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_5', type:'str', label:'Goal #5', defaultValue:'', required:false}, {name:'goal_5_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_5_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_5_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_5_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_6', type:'str', label:'Goal #6', defaultValue:'', required:false}, {name:'goal_6_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_6_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_6_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_6_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_7', type:'str', label:'Goal #7', defaultValue:'', required:false}, {name:'goal_7_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_7_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_7_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_7_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_8', type:'str', label:'Goal #8', defaultValue:'', required:false}, {name:'goal_8_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_8_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_8_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_8_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_9', type:'str', label:'Goal #9', defaultValue:'', required:false}, {name:'goal_9_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_9_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_9_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_9_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_10', type:'str', label:'Goal #10', defaultValue:'', required:false}, {name:'goal_10_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_10_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_10_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_10_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_11', type:'str', label:'Goal #11', defaultValue:'', required:false}, {name:'goal_11_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_11_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_11_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_11_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_12', type:'str', label:'Goal #12', defaultValue:'', required:false}, {name:'goal_12_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_12_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_12_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_12_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_13', type:'str', label:'Goal #13', defaultValue:'', required:false}, {name:'goal_13_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_13_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_13_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_13_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_14', type:'str', label:'Goal #14', defaultValue:'', required:false}, {name:'goal_14_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_14_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_14_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_14_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'goal_15', type:'str', label:'Goal #15', defaultValue:'', required:false}, {name:'goal_15_total', type:'int', label:'Tokens to Achieve this goal', defaultValue:0}, {name:'goal_15_roomname', type:'str', label:'Room title to achive this goal', defaultValue:'', required:false}, {name:'goal_15_list', type:'choice', label:'List for this goal', choice1:'List 1', choice2:'List 2', choice3:'List 3', defaultValue: 'List 1'}, {name:'goal_15_resettips', type:'choice', label:'Reset tip total when this goal achieved', choice1:'No', choice2:'Yes', defaultValue: 'No'}, {name:'advert_1', type:'str', label:'Advert Text #1', defaultValue:':readbio', required:false}, {name:'advert_2', type:'str', label:'Advert Text #2', defaultValue:':demand', required:false}, {name:'advert_3', type:'str', label:'Advert Text #3', defaultValue:':tipfirst', required:false}, {name:'advert_4', type:'str', label:'Advert Text #4', defaultValue:':FOLLOW', required:false}, {name:'advert_5', type:'str', label:'Advert Text #5', defaultValue:':missfaiiry_twitter55', required:false}, {name:'advert_6', type:'str', label:'Advert Text #6', defaultValue:':missfairytip', required:false}, {name:'advert_7', type:'str', label:'Advert Text #7', defaultValue:'', required:false}, {name:'advert_8', type:'str', label:'Advert Text #8', defaultValue:'', required:false}, {name:'advert_9', type:'str', label:'Advert Text #9', defaultValue:'', required:false}, {name:'advert_10', type:'str', label:'Advert Text #10', defaultValue:'', required:false} ]; cb.onDrawPanel(function (user) { return { 'template': '3_rows_of_labels', 'row1_label': 'Last Item:', 'row1_value': lastItem, 'row2_label': 'Last Tipper:', 'row2_value': lastTipper + ' (' + lastTipAmount + ')', 'row3_label': 'Tip Jar:', 'row3_value': tipCounter + ' token(s)' }; }); cb.onTip(function (tip) { tipCounter += parseInt(tip['amount']); lastTipAmount = parseInt(tip['amount']); lastTipper = tip['from_user']; if(tipTotals[tip['from_user']]) { tipTotals[tip['from_user']] = tipTotals[tip['from_user']] + parseInt(tip['amount']); } else { tipTotals[tip['from_user']] = parseInt(tip['amount']); } lastItem = getItem(tip['amount']); if (lastItem) { cb.sendNotice(tip['from_user'] + ' wants to see: ' + getItem(tip['amount']), '', '#ABFFFB', '#000000', 'bold'); } checkGoals(tipCounter); cb.drawPanel(); }); cb.onEnter(function (user) { cb.sendNotice('Welcome ' + user['user'] + '. ' + cb.room_slug + ' has a tip menu.', user['user'], '', '', 'bold'); showListInstructions(user['user']); }); cb.onMessage(function(msg) { var arguments = msg['m'].split(' '); if(arguments[0].charAt(0) == '/') { // && !msg['X-Spam']) { switch(arguments[0].toLowerCase()) { case '/list': { msg['X-Spam'] = true; showList(msg['user']); break; } case '/blist': { if(msg['is_mod'] || msg['user'] == cb.room_slug) { msg['X-Spam'] = true; showList(''); } break; } case '/goals': { msg['X-Spam'] = true; showGoals(msg['user']); break; } case '/sendlist': { if((msg['is_mod'] || msg['user'] == cb.room_slug) && arguments.length >= 2) { msg['X-Spam'] = true; var modSender = arguments[1]; showList(modSender); cb.sendNotice('Sent /list to user ' + modSender, msg['user'], '#FCFCD7', '', ''); } break; } case '/tiplist': { if(msg['is_mod'] || msg['user'] == cb.room_slug) { msg['X-Spam'] = true; cb.sendNotice('Tippers List', msg['user'], '#FCFCD7', '', ''); for(var key in tipTotals) { cb.sendNotice(key + ': ' + tipTotals[key], msg['user'], '#FCFCD7', '', ''); } } break; } case '/settotal': { if(msg['user'] == cb.room_slug && arguments.length >= 2) { var newTotal = parseInt(arguments[1]); if(newTotal < 0) { cb.sendNotice('New total must be a number and greater than zero.', msg['user'], '', '', 'bold'); } else { tipCounter = newTotal; checkGoals(tipCounter); cb.drawPanel(); } } break; } case '/addtotal': { if(msg['user'] == cb.room_slug && arguments.length >= 2) { var addTotal = parseInt(arguments[1]); if(newTotal < 0) { cb.sendNotice('Tokens to add must be a number and greater than zero.', msg['user'], '', '', 'bold'); } else { tipCounter += addTotal; checkGoals(tipCounter); cb.drawPanel(); } } break; } case '/setgoal': { if(msg['user'] == cb.room_slug && arguments.length >= 2) { msg['X-Spam'] = true; var nextGoal = parseInt(arguments[1]); var oldList = currentList; if(nextGoal >= 1 && nextGoal <= maxGoals) { currentGoal = nextGoal; //Get correct value for tip counter tipCounter = 0; currentList = parseInt(cb.settings['goal_' + currentGoal + '_list'].substring(5,6)); for(i = 1; i < currentGoal; i++) { tipCounter = parseInt(cb.settings['goal_' + i + '_total']); if(cb.settings['goal_' + i + '_resettips'] == 'Yes') { tipCounter = 0; } } //We should have completed counting and adding for all previous (if any) goals, now set current cb.changeRoomSubject(cb.settings['goal_' + currentGoal + '_roomname']); if(currentGoal > 1) { if(cb.settings['goal_' + (i - 1) + '_resettips'] == 'Yes') { tipCounter = 0; } } if(oldList != currentList) { cb.sendNotice('Tip List has been updated.', '', '', '', 'bold'); showList(''); showListInstructions(''); } } else { cb.sendNotice('Current goal must be a number from 1 to ' + maxGoals + '.', msg['user'], '#FCFCD7', '', ''); } cb.drawPanel(); } break; } case '/tipped': { if((msg['is_mod'] || msg['user'] == cb.room_slug) && arguments.length >= 2) { msg['X-Spam'] = true; var tipperName = arguments[1]; if(tipTotals[tipperName]) { cb.sendNotice(tipperName + ' has tipped ' + tipTotals[tipperName], msg['user'], '#FCFCD7', '', ''); } else { cb.sendNotice(tipperName + ' has not tipped.', msg['user'], '#FC0C07', '', ''); } } break; } case '/fthelp': { if(msg['is_mod'] || msg['user'] == cb.room_slug) { msg['X-Spam'] = true; cb.sendNotice('As well as /list and /goals you can use the following commands:', msg['user'], '#FCFCD7', '', ''); cb.sendNotice('/blist - broadcasts a /list to all users.', msg['user'], '#FCFCD7', '', ''); cb.sendNotice('/sendlist username - sends a /list to the specified user.', msg['user'], '#FCFCD7', '', ''); cb.sendNotice('/tiplist - shows list of everyone who has tipped since app was started.', msg['user'], '#FCFCD7', '', ''); cb.sendNotice('/tipped username - checks if a specific user has tipped or not since the app was started.', msg['user'], '#FCFCD7', '', ''); cb.sendNotice('/setgoal number - resets the goal system to the point at which we\'ve just started goal specified. Broadcaster only.', msg['user'], '#FCFCD7', '', ''); cb.sendNotice('/settotal number - sets the tip total to the number specified. Broadcaster only.', msg['user'], '#FCFCD7', '', ''); cb.sendNotice('/addtotal number - add number to the current tip total. Broadcaster only.', msg['user'], '#FCFCD7', '', ''); } break; } } } return msg; }); function getItem(tokens) { for(var i=1;i<=10;i++) { if(parseInt(cb.settings['list' + currentList + '_item_' + i + '_price']) == parseInt(tokens)) { return cb.settings['list' + currentList + '_item_' + i]; } } } function showList(user) { var list = ""; for(var i=1;i<=10;i++) { if(cb.settings.get('list' + currentList + '_item_' + i) && (parseInt(cb.settings['list' + currentList + '_item_' + i + '_price']) > 0)) { if(list != "") list += '\n'; list += 'Tip ' + cb.settings['list' + currentList + '_item_' + i + '_price'] + ' for: ' + cb.settings['list' + currentList + '_item_' + i]; } } cb.sendNotice(list, user, '#FCFCD7', '', ''); } function showGoals(user) { var achieved = ''; var list = ''; for(var i=1;i<=10;i++) { if(cb.settings.get('goal_' + i) && (parseInt(cb.settings['goal_' + i + '_total']) > 0)) { if (i < currentGoal ) { achieved = ' **Goal Achieved**'; } else { achieved = ''; } if(list != "") list += '\n'; list += i + ': Tip Total ' + cb.settings['goal_' + i + '_total'] + ' for: ' + cb.settings['goal_' + i] + achieved; } } cb.sendNotice(list, user, '#FCFCD7', '', ''); } function advertise() { adCounter++; //cb.sendNotice('Fairy Tips by Sethir', '', '', '#AB001C'); cb.sendNotice('Type /list For ' + cb.room_slug + '\'s tip menu.', '', '', '#AB001C'); cb.sendNotice('Type /goals to see ' + cb.room_slug + '\'s goals.', '', '', '#AB001C'); cb.sendNotice('Type /fthelp to see broadcaster and mod commands.', '', '', '#AB001C'); if(adCounter > 10 || cb.settings['advert_' + adCounter] == '') { adCounter = 1; } if(['advert_' + adCounter] != '') { cb.sendNotice(cb.settings['advert_' + adCounter], '', '', '#AB001C'); } cb.setTimeout(advertise, cb.settings.notification_wait_time * 60000); } function showListInstructions(user) { cb.sendNotice('Type /list to see a list of things ' + cb.room_slug + ' will be showing.', user, '', '', 'bold'); cb.sendNotice('Type /goals to see ' + cb.room_slug + '\'s goals.', user, '', '', 'bold'); } function checkGoals(total) { var remainder = 0; if(total >= parseInt(cb.settings['goal_' + currentGoal + '_total'])) { remainder = tipCounter - parseInt(cb.settings['goal_' + currentGoal + '_total']); if(remainder < 0) remainder = 0; if(cb.settings['goal_' + currentGoal + '_resettips'] == 'Yes') { tipCounter = remainder; } var oldList = currentList; var goalAnnounce = cb.settings['goal_announce']; goalAnnounce = goalAnnounce.replace('<goalname>',cb.settings['goal_' + currentGoal]); cb.sendNotice(goalAnnounce, '', '#FFCC00', '#AB001C'); //Don't incremenet goals if no more defined if(cb.settings['goal_' + (currentGoal + 1)] != '') { currentGoal++; if(cb.settings['goal_' + currentGoal + '_list'] == 'List 1') { currentList = 1; } if(cb.settings['goal_' + currentGoal + '_list'] == 'List 2') { currentList = 2; } if(cb.settings['goal_' + currentGoal + '_list'] == 'List 3') { currentList = 3; } cb.changeRoomSubject(cb.settings['goal_' + currentGoal + '_roomname']); if(oldList != currentList) { cb.sendNotice('Tip List has been updated.', '', '', '', 'bold'); showListInstructions(''); } if(remainder > 0) checkGoals(tipCounter); } } } function init() { cb.changeRoomSubject(cb.settings['goal_' + currentGoal + '_roomname']); advertise(); } init();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.