Apps Home
|
Create an App
JillianDrake
Author:
xaelan
Description
Source Code
Launch App
Current Users
Created by:
Xaelan
cb.settings_choices = [ {name:'room_subject', type:'str', minLength: 2, maxLength: 500, label: 'Subject'}, {name:'rules', type:'str', minLength: 2, maxLength: 500, label: 'Text Posted Prior to Rule List', defaultValue: 'Follow these few simple rules or be kicked with no mercy:'}, {name:'promo_interval', type:'int', minValue: 1, maxValue: 30, label: 'Promo Interval in Minutes'}, {name:'dice_size', type:'int', minValue: 1, maxValue: 100, label: 'Dice Size'}, {name:'option_one', type:'str', minLength: 2, maxLength: 200, label: 'Option One'}, {name:'option_two', type:'str', minLength: 2, maxLength: 200, label: 'Option Two'}, {name:'option_three', type:'str', minLength: 2, maxLength: 200, label: 'Option Three', required: false}, {name:'option_four', type:'str', minLength: 2, maxLength: 200, label: 'Option Four', required: false}, {name:'option_five', type:'str', minLength: 2, maxLength: 200, label: 'Option Five', required: false}, {name:'option_one_price', type:'int', minValue: 1, maxValue: 500, label: 'Option One Price'}, {name:'option_two_price', type:'int', minValue: 1, maxValue: 500, label: 'Option Two Price'}, {name:'option_three_price', type:'int', minValue: 1, maxValue: 500, label: 'Option Three Price', required: false}, {name:'option_four_price', type:'int', minValue: 1, maxValue: 500, label: 'Option Four Price', required: false}, {name:'option_five_price', type:'int', minValue: 1, maxValue: 500, label: 'Option Five Price', required: false}, {name:'prize_one', type:'str', minLength: 2, maxLength: 200, label: 'Prize One', required: false}, {name:'prize_two', type:'str', minLength: 2, maxLength: 200, label: 'Prize Two', required: false}, {name:'prize_three', type:'str', minLength: 2, maxLength: 200, label: 'Prize Three', required: false}, {name:'prize_four', type:'str', minLength: 2, maxLength: 200, label: 'Prize Four', required: false}, {name:'prize_five', type:'str', minLength: 2, maxLength: 200, label: 'Prize Five', required: false}, {name:'prize_six', type:'str', minLength: 2, maxLength: 200, label: 'Prize Six', required: false}, {name:'prize_seven', type:'str', minLength: 2, maxLength: 200, label: 'Prize Seven', required: false}, {name:'prize_eight', type:'str', minLength: 2, maxLength: 200, label: 'Prize Eight', required: false}, {name:'prize_nine', type:'str', minLength: 2, maxLength: 200, label: 'Prize Nine', required: false}, {name:'prize_ten', type:'str', minLength: 2, maxLength: 200, label: 'Prize Ten', required: false}, {name:'prize_eleven', type:'str', minLength: 2, maxLength: 200, label: 'Prize Eleven', required: false}, {name:'prize_twelve', type:'str', minLength: 2, maxLength: 200, label: 'Prize Twelve', required: false}, {name:'prize_thirteen', type:'str', minLength: 2, maxLength: 200, label: 'Prize Thirteen', required: false}, {name:'prize_fourteen', type:'str', minLength: 2, maxLength: 200, label: 'Prize Fourteen', required: false}, {name:'prize_fifteen', type:'str', minLength: 2, maxLength: 200, label: 'Prize Fifteen', required: false}, {name:'prize_sixteen', type:'str', minLength: 2, maxLength: 200, label: 'Prize Sixteen', required: false}, {name:'prize_seventeen', type:'str', minLength: 2, maxLength: 200, label: 'Prize Seventeen', required: false}, {name:'prize_eighteen', type:'str', minLength: 2, maxLength: 200, label: 'Prize Eighteen', required: false}, {name:'prize_nineteen', type:'str', minLength: 2, maxLength: 200, label: 'Prize Nineteen', required: false}, {name:'prize_twenty', type:'str', minLength: 2, maxLength: 200, label: 'Prize Twenty', required: false}, {name:'phase_two_prize_one', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize One', required: false}, {name:'phase_two_prize_two', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Two', required: false}, {name:'phase_two_prize_three', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Three', required: false}, {name:'phase_two_prize_four', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Four', required: false}, {name:'phase_two_prize_five', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Five', required: false}, {name:'phase_two_prize_six', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Six', required: false}, {name:'phase_two_prize_seven', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Seven', required: false}, {name:'phase_two_prize_eight', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Eight', required: false}, {name:'phase_two_prize_nine', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Nine', required: false}, {name:'phase_two_prize_ten', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Ten', required: false}, {name:'phase_two_prize_eleven', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Eleven', required: false}, {name:'phase_two_prize_twelve', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Twelve', required: false}, {name:'phase_two_prize_thirteen', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Thirteen', required: false}, {name:'phase_two_prize_fourteen', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Fourteen', required: false}, {name:'phase_two_prize_fifteen', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Fifteen', required: false}, {name:'phase_two_prize_sixteen', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Sixteen', required: false}, {name:'phase_two_prize_seventeen', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Seventeen', required: false}, {name:'phase_two_prize_eighteen', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Eighteen', required: false}, {name:'phase_two_prize_nineteen', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Nineteen', required: false}, {name:'phase_two_prize_twenty', type:'str', minLength: 2, maxLength: 200, label: 'Phase Two - Prize Twenty', required: false} ]; var textColor = '#9933ff'; // purple var highlightColor = '#00aeff'; // blue var highlightTwoColor = '#8cba49'; // green var errorColor = '#9f0004'; // VOTING SECTION // var count_one = 0; var count_two = 0; var count_three = 0; var count_four = 0; var count_five = 0; var total_tipped = 0; var voting = 0; var goal = 0; var goalValue = 0; var goalCurrent = 0; var jenga = 0; var jenga_fee = 0; var counterCurrent = 0; var counterMax = 10; var menu = 0; var spin = 0; var phase2spin = 0; var spin_fee = 0; var prizes = []; var phase2prizes = []; var dice = 0; var dice_fee = 0; var rpg = 0; var rpg_turn_fee = 0; var rpg_turn_pending = 0; if (cb.settings.prize_one != '') { prizes.push(cb.settings.prize_one); } if (cb.settings.prize_two != '') { prizes.push(cb.settings.prize_two); } if (cb.settings.prize_three != '') { prizes.push(cb.settings.prize_three); } if (cb.settings.prize_four != '') { prizes.push(cb.settings.prize_four); } if (cb.settings.prize_five != '') { prizes.push(cb.settings.prize_five); } if (cb.settings.prize_six != '') { prizes.push(cb.settings.prize_six); } if (cb.settings.prize_seven != '') { prizes.push(cb.settings.prize_seven); } if (cb.settings.prize_eight != '') { prizes.push(cb.settings.prize_eight); } if (cb.settings.prize_nine != '') { prizes.push(cb.settings.prize_nine); } if (cb.settings.prize_ten != '') { prizes.push(cb.settings.prize_ten); } if (cb.settings.prize_eleven != '') { prizes.push(cb.settings.prize_eleven); } if (cb.settings.prize_twelve != '') { prizes.push(cb.settings.prize_twelve); } if (cb.settings.prize_thirteen != '') { prizes.push(cb.settings.prize_thirteen); } if (cb.settings.prize_fourteen != '') { prizes.push(cb.settings.prize_fourteen); } if (cb.settings.prize_fifteen != '') { prizes.push(cb.settings.prize_fifteen); } if (cb.settings.prize_sixteen != '') { prizes.push(cb.settings.prize_sixteen); } if (cb.settings.prize_seventeen != '') { prizes.push(cb.settings.prize_seventeen); } if (cb.settings.prize_eighteen != '') { prizes.push(cb.settings.prize_eighteen); } if (cb.settings.prize_nineteen != '') { prizes.push(cb.settings.prize_nineteen); } if (cb.settings.prize_twenty != '') { prizes.push(cb.settings.prize_twenty); } // Phase Two if (cb.settings.phase_two_prize_one != '') { phase2prizes.push(cb.settings.phase_two_prize_one); } if (cb.settings.phase_two_prize_two != '') { phase2prizes.push(cb.settings.phase_two_prize_two); } if (cb.settings.phase_two_prize_three != '') { phase2prizes.push(cb.settings.phase_two_prize_three); } if (cb.settings.phase_two_prize_four != '') { phase2prizes.push(cb.settings.phase_two_prize_four); } if (cb.settings.phase_two_prize_five != '') { phase2prizes.push(cb.settings.phase_two_prize_five); } if (cb.settings.phase_two_prize_six != '') { phase2prizes.push(cb.settings.phase_two_prize_six); } if (cb.settings.phase_two_prize_seven != '') { phase2prizes.push(cb.settings.phase_two_prize_seven); } if (cb.settings.phase_two_prize_eight != '') { phase2prizes.push(cb.settings.phase_two_prize_eight); } if (cb.settings.phase_two_prize_nine != '') { phase2prizes.push(cb.settings.phase_two_prize_nine); } if (cb.settings.phase_two_prize_ten != '') { phase2prizes.push(cb.settings.phase_two_prize_ten); } if (cb.settings.phase_two_prize_eleven != '') { phase2prizes.push(cb.settings.phase_two_prize_eleven); } if (cb.settings.phase_two_prize_twelve != '') { phase2prizes.push(cb.settings.phase_two_prize_twelve); } if (cb.settings.phase_two_prize_thirteen != '') { phase2prizes.push(cb.settings.phase_two_prize_thirteen); } if (cb.settings.phase_two_prize_fourteen != '') { phase2prizes.push(cb.settings.phase_two_prize_fourteen); } if (cb.settings.phase_two_prize_fifteen != '') { phase2prizes.push(cb.settings.phase_two_prize_fifteen); } if (cb.settings.phase_two_prize_sixteen != '') { phase2prizes.push(cb.settings.phase_two_prize_sixteen); } if (cb.settings.phase_two_prize_seventeen != '') { phase2prizes.push(cb.settings.phase_two_prize_seventeen); } if (cb.settings.phase_two_prize_eighteen != '') { phase2prizes.push(cb.settings.phase_two_prize_eighteen); } if (cb.settings.phase_two_prize_nineteen != '') { phase2prizes.push(cb.settings.phase_two_prize_nineteen); } if (cb.settings.phase_two_prize_twenty != '') { phase2prizes.push(cb.settings.phase_two_prize_twenty); } // function rollDie() { var roll = Math.floor((Math.random() * cb.settings.dice_size) + 1); setTimeout(function(){ cb.chatNotice('Rolling secret d20.', '', '', textColor, 'bold'); }, 200); setTimeout(function(){ cb.chatNotice('Rolling secret d20..', '', '', textColor, 'bold'); }, 400); setTimeout(function(){ cb.chatNotice('Rolling secret d20...', '', '', textColor, 'bold'); }, 600); setTimeout(function(){ cb.chatNotice(cb.room_slug + ' rolled ' + roll, '', '', highlightColor, 'bold'); }, 800); if (roll == 20) { setTimeout(function(){ cb.chatNotice('Critical success! To the EDGE!', '', '', highlightTwoColor, 'bold'); }, 1000); } else if (roll > 9) { setTimeout(function(){ cb.chatNotice('Success! Closeup pussy/ass flash!', '', '', highlightTwoColor, 'bold'); }, 1000); } else { setTimeout(function(){ cb.chatNotice('Roll failed, too low :(', '', '', errorColor, 'bold'); }, 1000); } } var hp = 0; function getHealth() { hp = Math.floor((Math.random() * 15) + 5); return hp; } var nextRoom = [ 'trap', 'monster' ]; var nextRoomIdentity = ''; var trap = [ 'an ice trap! Rub ice on your body for 30 seconds.', 'a flame trap! Drip hot wax on your body.', 'a pressure plate! Clamp your nipples through the next room.' ]; var monster = [ 'an orc with ' + getHealth() + 'hp!', 'a skeleton with ' + getHealth() + 'hp!', 'a ghost with ' + getHealth() + 'hp!', 'a goblin with ' + getHealth() + 'hp!', 'a troll with ' + getHealth() + 'hp!' ]; var lootTable = [ 'Penis-shaped pleasure device', 'Magical vibrating gem', 'Spell tome of self-pleasure', 'Mug of ale' ]; cb.onTip(function (tip) { total_tipped += parseInt(tip['amount']); if (menu == 1) { if (parseInt(tip['amount']) > 9 && parseInt(tip['amount']) < prizes.length + 10) { cb.chatNotice(tip['from_user'] + ' requested: ' + prizes[parseInt(tip['amount'])-10], '', '', highlightColor, 'bold'); } } if (spin == 1) { if (parseInt(tip['amount']) >= spin_fee) { setTimeout(function(){ cb.chatNotice('Spinning.', '', '', textColor, 'bold'); }, 200); setTimeout(function(){ cb.chatNotice('Spinning..', '', '', textColor, 'bold'); }, 400); setTimeout(function(){ cb.chatNotice('Spinning...', '', '', textColor, 'bold'); }, 600); setTimeout(function(){ cb.chatNotice('' + prizes[Math.floor(Math.random() * prizes.length)], '', '', highlightColor, 'bold'); }, 800); } } if (phase2spin == 1) { if (parseInt(tip['amount']) >= spin_fee) { setTimeout(function(){ cb.chatNotice('Spinning.', '', '', textColor, 'bold'); }, 200); setTimeout(function(){ cb.chatNotice('Spinning..', '', '', textColor, 'bold'); }, 400); setTimeout(function(){ cb.chatNotice('Spinning...', '', '', textColor, 'bold'); }, 600); setTimeout(function(){ cb.chatNotice('' + prizes[Math.floor(Math.random() * phase2prizes.length)], '', '', highlightColor, 'bold'); }, 800); } } if (jenga == 1) { if (parseInt(tip['amount']) >= jenga_fee) { cb.chatNotice('Take a turn!', '', '', highlightColor, 'bold'); } } if (rpg == 1) { if (rpg_turn_pending == 1 && parseInt(tip['amount']) == rpg_turn_fee) { nextRoomIdentity = nextRoom[Math.floor(Math.random() * nextRoom.length)]; if (nextRoomIdentity == 'trap') { cb.chatNotice(tip['from_user'] + ' unlocked the door and triggered ' + trap[Math.floor(Math.random() * trap.length)], '', '', highlightColor, 'bold'); } else { cb.chatNotice(tip['from_user'] + ' unlocked the door revealing ' + monster[Math.floor(Math.random() * monster.length)], '', '', highlightColor, 'bold'); } rpg_turn_pending = 0; } } if (goal == 1) { goalCurrent += parseInt(tip['amount']); if (goalCurrent >= goalValue) { goal = 0; cb.chatNotice('Goal reached!', '', '', highlightColor, 'bold'); } } if (dice == 1) { if (parseInt(tip['amount']) == dice_fee) { setTimeout(function(){ cb.chatNotice('Rolling.', '', '', textColor, 'bold'); }, 200); setTimeout(function(){ cb.chatNotice('Rolling..', '', '', textColor, 'bold'); }, 400); setTimeout(function(){ cb.chatNotice('Rolling...', '', '', textColor, 'bold'); }, 600); setTimeout(function(){ cb.chatNotice(tip['from_user'] + ' rolled ' + Math.floor((Math.random() * cb.settings.dice_size) + 1), '', '', highlightColor, 'bold'); }, 800); } } if (parseInt(tip['amount']) == cb.settings.turn_fee) { cb.chatNotice(cb.settings.turn_text, '', '', highlightColor, 'bold'); } if (parseInt(tip['amount']) == 50) { rollDie(); } // highestTipper(tip['from_user'], tip['amount']); updateTotalUserTips(tip['from_user'], tip['amount']); if (voting == 1) { // if voting is turned on if (parseInt(tip['amount']) == cb.settings.option_one_price) { count_one++; cb.chatNotice(tip['from_user'] + ' voted for "' + cb.settings.option_one + '"', '', '', highlightColor, 'bold'); outputVotingStatus(); } if (parseInt(tip['amount']) == cb.settings.option_two_price) { count_two++; cb.chatNotice(tip['from_user'] + ' voted for "' + cb.settings.option_two + '"', '', '', highlightColor, 'bold'); outputVotingStatus(); } if (parseInt(tip['amount']) == cb.settings.option_three_price) { count_three++; cb.chatNotice(tip['from_user'] + ' voted for "' + cb.settings.option_three + '"', '', '', highlightColor, 'bold'); outputVotingStatus(); } if (parseInt(tip['amount']) == cb.settings.option_four_price) { count_four++; cb.chatNotice(tip['from_user'] + ' voted for "' + cb.settings.option_four + '"', '', '', highlightColor, 'bold'); outputVotingStatus(); } if (parseInt(tip['amount']) == cb.settings.option_five_price) { count_five++; cb.chatNotice(tip['from_user'] + ' voted for "' + cb.settings.option_five + '"', '', '', highlightColor, 'bold'); outputVotingStatus(); } } cb.drawPanel(); }); function outputVotingStatus() { cb.chatNotice(cb.settings.room_subject, '', '', textColor, 'bold'); cb.chatNotice('~~~~~~~~~~~~~~~~~~~~~~~~~~~', '', '', textColor, 'bold'); if (cb.settings.option_one != '') { cb.chatNotice('(' +cb.settings.option_one_price + ' tokens) ' + cb.settings.option_one + ': ' + count_one, '', '', textColor, 'bold'); } if (cb.settings.option_two != '') { cb.chatNotice('(' +cb.settings.option_two_price + ' tokens) ' + cb.settings.option_two + ': ' + count_two, '', '', textColor, 'bold'); } if (cb.settings.option_three != '') { cb.chatNotice('(' +cb.settings.option_three_price + ' tokens) ' + cb.settings.option_three + ': ' + count_three, '', '', textColor, 'bold'); } if (cb.settings.option_four != '') { cb.chatNotice('(' +cb.settings.option_four_price + ' tokens) ' + cb.settings.option_four + ': ' + count_four, '', '', textColor, 'bold'); } if (cb.settings.option_five != '') { cb.chatNotice('(' +cb.settings.option_five_price + ' tokens) ' + cb.settings.option_five + ': ' + count_five, '', '', textColor, 'bold'); } cb.chatNotice('~~~~~~~~~~~~~~~~~~~~~~~~~~~', '', '', textColor, 'bold'); } function outputMenuStatus() { if (menu == 1) { i = 0; message = ''; while (i < prizes.length) { message += '\n(' + (i + 10) + ' tokens) ' + prizes[i]; i++; } cb.chatNotice('Tip Menu' + message, '', '', textColor, 'bold'); } } function broadcastSpinReminder() { if (spin == 1) { cb.chatNotice('Tip at least ' + spin_fee + ' tokens to spin for a prize!\nType /prizes to see what you can win!', '', '', textColor, 'bold'); setTimeout(function(){ broadcastSpinReminder(); }, 120000); } } function broadcastRollReminder() { if (dice == 1) { cb.chatNotice('Tip ' + dice_fee + ' tokens to roll the ' + cb.settings.dice_size + '-sided dice!', '', '', textColor, 'bold'); setTimeout(function(){ broadcastRollReminder(); }, 120000); } } function broadcastJengaReminder() { if (jenga == 1) { cb.chatNotice('Playing Jenga! Tip at least ' + jenga_fee + ' tokens to have Jillian take a turn.', '', '', textColor, 'bold'); setTimeout(function(){ broadcastJengaReminder(); }, 120000); } } function broadcastMenuReminder() { if (menu == 1) { cb.chatNotice('Type /menu to see options!', '', '', textColor, 'bold'); setTimeout(function(){ broadcastMenuReminder(); }, 120000); } } function incrementCounter() { counterCurrent ++; cb.drawPanel(); } cb.onMessage(function (msg) { var highIndex = totalTipsAmount.indexOf(Math.max.apply(Math, totalTipsAmount)); var highestTipper = totalTipsUser[highIndex]; if (msg['m'] == '/vote') { if (voting == 1) { outputVotingStatus(); } msg['X-Spam'] = true; } if (msg['m'] == '/menu' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { if (menu == 1) { outputMenuStatus(); } msg['X-Spam'] = true; } else if (msg['m'] == '/menu') { if (menu == 1) { i = 0; message = ''; while (i < prizes.length) { message += '\n(' + (i + 10) + ' tokens) ' + prizes[i]; i++; } cb.chatNotice('Tip Menu' + message, msg['user'], '', textColor, 'bold'); } msg['X-Spam'] = true; } if (msg['m'] == '/prizes' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { if (spin == 1) { i = 0; message = ''; while (i < prizes.length) { message += prizes[i] + '\n'; i++; } cb.chatNotice('Possible Prizes:', '', '', highlightColor, 'bold'); cb.chatNotice(message + 'Tip at least ' + spin_fee + ' tokens to spin for a prize!', '', '', textColor, 'bold'); } msg['X-Spam'] = true; } else if (msg['m'] == '/prizes') { if (spin == 1) { i = 0; message = ''; while (i < prizes.length) { message += prizes[i] + '\n'; i++; } cb.chatNotice('Possible Prizes:', msg['user'], '', highlightColor, 'bold'); cb.chatNotice(message + 'Tip at least ' + spin_fee + ' tokens to spin for a prize!', msg['user'], '', textColor, 'bold'); } msg['X-Spam'] = true; } if (msg['m'] == '/count') { incrementCounter(); } if (msg['m'] == '/roll' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { rollDie(); } if (msg['m'] == '/spin' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { setTimeout(function(){ cb.chatNotice('Spinning.', '', '', textColor, 'bold'); }, 200); setTimeout(function(){ cb.chatNotice('Spinning..', '', '', textColor, 'bold'); }, 400); setTimeout(function(){ cb.chatNotice('Spinning...', '', '', textColor, 'bold'); }, 600); setTimeout(function(){ cb.chatNotice('' + prizes[Math.floor(Math.random() * prizes.length)], '', '', highlightColor, 'bold'); }, 800); incrementCounter(); msg['X-Spam'] = true; } if (msg['m'].indexOf('/startspin') != -1 && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { if (parseInt(msg['m'].replace('/startspin ', '')) > 0) { spin = 1; spin_fee = parseInt(msg['m'].replace('/startspin ', '')); broadcastSpinReminder(); } else { cb.sendNotice('Please add a minimum spin amount (ex: /startspin 15)', msg['user'], '', errorColor, 'bold'); } msg['X-Spam'] = true; cb.drawPanel(); } if (msg['m'] == '/stopspin' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { spin = 0; cb.chatNotice('Spinning has ended.', '', '', textColor, 'bold'); msg['X-Spam'] = true; cb.drawPanel(); } if (msg['m'].indexOf('/startrpg') != -1 && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { if (parseInt(msg['m'].replace('/startrpg ', '')) > 0) { rpg = 1; rpg_turn_pending = 1; rpg_turn_fee = parseInt(msg['m'].replace('/startrpg ', '')); cb.chatNotice('Tip ' + rpg_turn_fee + ' tokens to unlock the next door!', '', '', highlightColor, 'bold'); } else { cb.sendNotice('Please add an exact turn price (ex: /startrpg 10)', msg['user'], '', errorColor, 'bold'); } msg['X-Spam'] = true; cb.drawPanel(); } if (msg['m'] == '/next' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { rpg_turn_pending = 1; cb.chatNotice('Tip ' + rpg_turn_fee + ' tokens to unlock the next door!', '', '', highlightColor, 'bold'); msg['X-Spam'] = true; } if (msg['m'] == '/stoprpg' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { rpg = 0; cb.chatNotice('Game over.', '', '', textColor, 'bold'); msg['X-Spam'] = true; cb.drawPanel(); } if (msg['m'] == '/startvoting' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { voting = 1; outputVotingStatus(); msg['X-Spam'] = true; cb.drawPanel(); } if (msg['m'] == '/stopvoting' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { voting = 0; cb.chatNotice('Voting has ended!', '', '', textColor, 'bold'); msg['X-Spam'] = true; cb.drawPanel(); } if (msg['m'] == '/startmenu' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { menu = 1; broadcastMenuReminder(); msg['X-Spam'] = true; cb.drawPanel(); } if (msg['m'] == '/stopmenu' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { menu = 0; msg['X-Spam'] = true; cb.drawPanel(); } if (msg['m'].indexOf('/startjenga') != -1 && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { if (parseInt(msg['m'].replace('/startjenga ', '')) > 0) { jenga = 1; jenga_fee = parseInt(msg['m'].replace('/startjenga ', '')); broadcastJengaReminder(); } else { cb.sendNotice('Please add a price to take a turn (ex: /startjenga 5)', msg['user'], '', errorColor, 'bold'); } msg['X-Spam'] = true; cb.drawPanel(); } if (msg['m'].indexOf('/maxgames') != -1 && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { if (parseInt(msg['m'].replace('/maxgames ', '')) > 0) { counterMax = parseInt(msg['m'].replace('/maxgames ', '')); } else { cb.sendNotice('Please add max counter value (ex: /counter 10)', msg['user'], '', errorColor, 'bold'); } cb.drawPanel(); } if (msg['m'] == '/stopjenga' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { jenga = 0; msg['X-Spam'] = true; cb.drawPanel(); } if (msg['m'].indexOf('/startdice') != -1 && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { if (parseInt(msg['m'].replace('/startdice ', '')) > 0) { dice = 1; dice_fee = parseInt(msg['m'].replace('/startdice ', '')); broadcastRollReminder(); } else { cb.sendNotice('Please add a token amount (ex: /startdice 10)', msg['user'], '', errorColor, 'bold'); } msg['X-Spam'] = true; } if (msg['m'] == '/stopdice' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { dice = 0; msg['X-Spam'] = true; } if (msg['m'].indexOf('/startgoal') != -1 && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { if (parseInt(msg['m'].replace('/startgoal ', '')) > 0) { goal = 1; goalValue = parseInt(msg['m'].replace('/startgoal ', '')); cb.chatNotice('Goal set to ' + goalValue + ' tokens!', '', '', textColor, 'bold'); goalCurrent = 0; } else { cb.sendNotice('Please add a goal amount (ex: /startgoal 500)', msg['user'], '', errorColor, 'bold'); } msg['X-Spam'] = true; cb.drawPanel(); } if (msg['m'] == '/stopgoal' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { goal = 0; msg['X-Spam'] = true; cb.drawPanel(); } if (msg['m'] == '/help' && (msg['is_mod'] == true || msg['user'] == cb.room_slug)) { setTimeout(function(){ cb.sendNotice('/help\nDisplays this message.\n\n/startspin [price]\nStarts the random prize/event spinner. Price determines the minimum number of tokens required to spin.\n\n/startvoting\nAllows previously-specified tip amounts to be applied to voting options.\n\n/startjenga [price]\nStarts Jenga. Price determines the cost of a turn.\n\n/maxgames [max]\nUpdates the max number of Jenga games. Does not change the current number.\n\n/spin\nManually spins the prize wheel. Also increments the Jenga game counter.\n\n/startdice [price]\nAllows tips to roll a dice. Price determines the exact amount of tokens required to roll.\n\n/startmenu\nAllows tippers to choose prizes from a tip-based menu.\n\nAll /start**** commands can be stopped with /stop****', msg['user'], '', errorColor, 'bold'); }, 200); msg['X-Spam'] = true; } if (msg['user'] == highestTipper) { msg['m'] = ':jilliantaispinningcoin ' + msg['m']; } }); // END VOTING SECTION // // ROOM RULES SECTION // function displayRules(who) { cb.chatNotice(cb.settings.rules + '\nRule #1: Be nice.\nRule #2: Respect us. We are real people sharing our sexual experiences with you.\nRule #3: No demanding. If you really want to see something, ask us if we\'re willing first.\nRule #4: Put quite simply, just don\'t be an idiot.', who, '', textColor, 'bold'); cb.sendNotice('Rule #5: NO ANAL! It will NOT happen. If you ask more than once, you will be banned. The end.', who, '', errorColor, 'bold'); } cb.onEnter(function(user) { cb.chatNotice('Welcome to our room, ' + user['user'] + '!', user['user'], '', textColor, 'bold'); displayRules(user['user']); }); // END ROOM RULES SECTION // // HIGHEST TIPPER ROSTER // var totalTipsUser = ['User']; var totalTipsAmount = [0]; function updateTotalUserTips(user, tip) { if (totalTipsUser.indexOf(user) != -1) { var activeIndex = totalTipsUser.indexOf(user); // if user already exists, sum tip totalTipsAmount[activeIndex] = parseInt(totalTipsAmount[activeIndex]) + parseInt(tip); } else { // if user does not exist, create new cell totalTipsUser.push(user); totalTipsAmount.push(tip); } } function broadcastPromo() { setTimeout(function(){ cb.chatNotice('Want full-length, high-quality videos of us? Go to www.amateurporn.com/jillian', '', '', highlightTwoColor, 'bold'); broadcastPromo(); }, (cb.settings.promo_interval * 1000 * 60)); } // END HIGHEST TIPPER ROSTER // // initiate cb.onDrawPanel(function(user) { if (jenga == 1) { var highIndex = totalTipsAmount.indexOf(Math.max.apply(Math, totalTipsAmount)); var highestTipper = totalTipsUser[highIndex] + ' (' + totalTipsAmount[highIndex] + ' tokens)'; return { 'template': '3_rows_11_21_31', 'row1_value': 'Jenga! Tip ' + jenga_fee + ' tokens to move a piece.', 'row2_value': 'Games Lost: ' + counterCurrent + '/' + counterMax, 'row3_value': 'Highest tipper: ' + highestTipper }; } else if (rpg == 1) { var highIndex = totalTipsAmount.indexOf(Math.max.apply(Math, totalTipsAmount)); var highestTipper = totalTipsUser[highIndex] + ' (' + totalTipsAmount[highIndex] + ' tokens)'; return { 'template': '3_rows_11_21_31', 'row1_value': 'Tip ' + rpg_turn_fee + ' tokens to unlock the next door!', 'row2_value': '', 'row3_value': 'Highest tipper: ' + highestTipper }; } else if (goal == 1 && menu == 1) { var highIndex = totalTipsAmount.indexOf(Math.max.apply(Math, totalTipsAmount)); var highestTipper = totalTipsUser[highIndex] + ' (' + totalTipsAmount[highIndex] + ' tokens)'; var goalPercentage = Math.floor((goalCurrent / goalValue) * 10); var visualGoal = '[' + '\u2665'.repeat(goalPercentage) + ' - '.repeat(10-goalPercentage) + ']'; return { 'template': '3_rows_11_21_31', 'row1_value': 'Type /menu to see options!', 'row2_value': 'Goal Progress: ' + goalCurrent + '/' + goalValue + '\240\240\240\240\240' + visualGoal, 'row3_value': 'Highest tipper: ' + highestTipper }; } else if (menu == 1) { var highIndex = totalTipsAmount.indexOf(Math.max.apply(Math, totalTipsAmount)); var highestTipper = totalTipsUser[highIndex] + ' (' + totalTipsAmount[highIndex] + ' tokens)'; return { 'template': '3_rows_11_21_31', 'row1_value': 'Type /menu to see options!', 'row2_value': 'Total tips so far: ' + total_tipped + ' tokens!', 'row3_value': 'Highest tipper: ' + highestTipper }; } else if (goal == 1 && spin == 1) { var highIndex = totalTipsAmount.indexOf(Math.max.apply(Math, totalTipsAmount)); var highestTipper = totalTipsUser[highIndex] + ' (' + totalTipsAmount[highIndex] + ' tokens)'; var goalPercentage = Math.floor((goalCurrent / goalValue) * 10); var visualGoal = '[' + '\u2665'.repeat(goalPercentage) + ' - '.repeat(10-goalPercentage) + ']'; return { 'template': '3_rows_11_21_31', 'row1_value': 'Tip at least ' + spin_fee + ' tokens to spin!', 'row2_value': 'Goal Progress: ' + goalCurrent + '/' + goalValue + '\240\240\240\240\240' + visualGoal, 'row3_value': 'Highest tipper: ' + highestTipper }; } else if (goal == 1 && voting == 1) { var highIndex = totalTipsAmount.indexOf(Math.max.apply(Math, totalTipsAmount)); var highestTipper = totalTipsUser[highIndex] + ' (' + totalTipsAmount[highIndex] + ' tokens)'; var goalPercentage = Math.floor((goalCurrent / goalValue) * 10); var visualGoal = '[' + '\u2665'.repeat(goalPercentage) + ' - '.repeat(10-goalPercentage) + ']'; return { 'template': '3_rows_11_21_31', 'row1_value': 'Type /vote to see options!', 'row2_value': 'Goal Progress: ' + goalCurrent + '/' + goalValue + '\240\240\240\240\240' + visualGoal, 'row3_value': 'Highest tipper: ' + highestTipper }; } else if (goal == 1) { var highIndex = totalTipsAmount.indexOf(Math.max.apply(Math, totalTipsAmount)); var highestTipper = totalTipsUser[highIndex] + ' (' + totalTipsAmount[highIndex] + ' tokens)'; var goalPercentage = Math.floor((goalCurrent / goalValue) * 10); var visualGoal = '[' + '\u2665'.repeat(goalPercentage) + ' - '.repeat(10-goalPercentage) + ']'; return { 'template': '3_rows_11_21_31', 'row1_value': 'Welcome to our room!', 'row2_value': 'Goal Progress: ' + goalCurrent + '/' + goalValue + '\240\240\240\240\240' + visualGoal, 'row3_value': 'Highest tipper: ' + highestTipper }; } else if (spin == 1) { var highIndex = totalTipsAmount.indexOf(Math.max.apply(Math, totalTipsAmount)); var highestTipper = totalTipsUser[highIndex] + ' (' + totalTipsAmount[highIndex] + ' tokens)'; return { 'template': '3_rows_11_21_31', 'row1_value': 'Tip at least ' + spin_fee + ' tokens to spin!', 'row2_value': 'Total tips so far: ' + total_tipped + ' tokens!', 'row3_value': 'Highest tipper: ' + highestTipper }; } else if (voting == 1) { var highIndex = totalTipsAmount.indexOf(Math.max.apply(Math, totalTipsAmount)); var highestTipper = totalTipsUser[highIndex] + ' (' + totalTipsAmount[highIndex] + ' tokens)'; return { 'template': '3_rows_11_21_31', 'row1_value': 'Type /vote to see options!', 'row2_value': 'Total tips so far: ' + total_tipped + ' tokens!', 'row3_value': 'Highest tipper: ' + highestTipper }; } else { var highIndex = totalTipsAmount.indexOf(Math.max.apply(Math, totalTipsAmount)); var highestTipper = totalTipsUser[highIndex] + ' (' + totalTipsAmount[highIndex] + ' tokens)'; return { 'template': '3_rows_11_21_31', 'row1_value': 'Welcome to our room!', 'row2_value': 'Total tips so far: ' + total_tipped + ' tokens!', 'row3_value': 'Highest tipper: ' + highestTipper }; } }); cb.drawPanel(); cb.changeRoomSubject(cb.settings.room_subject); if (voting == 1) { outputVotingStatus(); } broadcastPromo();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.