Apps Home
|
Create an App
Calmmie's ramdom dice acts
Author:
plumberdude37
Description
Source Code
Launch App
Current Users
Created by:
Plumberdude37
/* * Title: Dice with BBD. Boy * Author: Plumberdude37 edit of floridawetdreams Crazybob dice game * March,23,2016 6:38pm * Summary:Roll a dice for free * Description: Options: - Set the number of Dice to roll (1 to 3) - Set the delay for displaying commands (4 to 10 minutes) - Set if mods can roll the Dice too- Set the prizes for each dice number: 1 Dice: prizes 1 to 6 ( Best is Make these prizes FREE ) 2 Dice: prizes 7 to 12 ( Charge a set amount you tell them to PLAY 2 dice ) 3 Dice: prizes 13 to 18 ( Charge a set amount you tell them to PLAY 3 dice ) It's better to fill all the prizes so you can change the number of Dice during game. List of commands: !r username = roll the dice for username !d1 XX to play with one Dice (XX = new tokens rate, optionnal) !d2 XX to play with two Dice (XX = new tokens rate, optionnal) !d3 XX to play with three Dice (XX = new tokens rate, optionnal) !z to reset rolls list !s to pause/resume the game !p to see the prizes !w to display the list of rolls !h to display the commands Have fun! Naturist_be * */ var pause = 'No'; var last_player = null; var last_winner = null; var prize_won = ""; var player = ""; var score = 0; var scores = ""; var addon =""; var lines = '\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501'; Winners = new Array(); cb.settings_choices = [ {name: 'nbDice', label: "Number of Dice to play", type:'choice', choice1:'1', choice2:'2', choice3:'3', default:'2'}, {name: 'notfree', label: "Play for Tokens? (if Yes you still can roll it for free)", type:'choice', choice1:'No', choice2:'No', default:'No'}, {name: 'tokens', type: 'int', minValue: 0, default: 0, label: 'Tokens to roll the dice'}, {name: 'ADVERT_TIME', type: 'int', minValue: 4, maxValue: 10, defaultValue: 5, label: 'Delay for commands display (4 to 10 min) '}, {name: 'mod_as_king', label: "Allow mods to roll the Dice?", type:'choice', choice1:'Yes', choice2:'No', default:'Yes'}, {name: 'prize1', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 1', default: 'Wiggle Ass '}, {name: 'prize2', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 2', default: 'Flash Bra '}, {name: 'prize3', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 3', default: 'Bend Over, showing side '}, {name: 'prize4', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 4', default: 'Flash upper thigh (if wearing Skirt, otherwise, try again) '}, {name: 'prize5', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 5', default: 'Try again, sorry '}, {name: 'prize6', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 6', default: 'Flash arse '}, {name: 'prize7', type: 'str', minLength: 1, maxLength: 255, label: 'If u selected 2 Dice : Prize for 7', default: 'A little dance '}, {name: 'prize8', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 8', default: ' Flash Bra '}, {name: 'prize9', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 9', default: ' Bend Over, arse to camera (clothed) '}, {name: 'prize10', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 10', default: ' Down blouse '}, {name: 'prize11', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 11', default: ' Sorry, hard luck '}, {name: 'prize12', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 12', default: ' caress body over clothes '}, {name: 'prize13', type: 'str', minLength: 1, maxLength: 255, label: 'If u selected 3 Dice : Prize for 13', default: ' Sorry try again '}, {name: 'prize14', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 14', default: ' Down blouse '}, {name: 'prize15', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 15', default: ' Upskirt'}, {name: 'prize16', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 16', default: ' Strip blouse/top '}, {name: 'prize17', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 17', default: ' Strip Skirt/Trousers '}, {name: 'prize18', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for 18', default: ' Flash Underwear '}, {name: 'act_triple', label: "Enable prizes for triple same Dice?", type:'choice', choice1:'Yes', choice2:'No', default:'Yes'}, {name: 'triple1', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for triple 1', default: ' Your Choice of one piece of clothing to strip '}, {name: 'triple2', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for triple 2', default: ' Your Choice to chose one piece of clothing to wear '}, {name: 'triple3', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for triple 3', default: ' Make this slut your bitch to do your bidding with one act '}, {name: 'triple4', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for triple 4', default: ' Complete choice of clothing (not naked, but you get to chose everything- see photo gallery for clothes '}, {name: 'triple5', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for triple 5', default: ' Make the slut repeat whatever degrading thing you wish '}, {name: 'triple6', type: 'str', minLength: 1, maxLength: 255, label: 'Prize for triple 6', default: ' She is your whore to control now! '}, ]; function rollDice(player){ last_player = player; var triple = 0; switch (cb.settings.nbDice) { case '1': var dice1 = Math.floor(Math.random() * 6 + 1); score = dice1; break; case '2': var dice1 = Math.floor(Math.random() * 6 + 1); var dice2 = Math.floor(Math.random() * 6 + 1); score = dice1 + dice2; break; case '3': var dice1 = Math.floor(Math.random() * 6 + 1); var dice2 = Math.floor(Math.random() * 6 + 1); var dice3 = Math.floor(Math.random() * 6 + 1); score = dice1 + dice2 + dice3; break; } drawDice(dice1, dice2, dice3); if (cb.settings.nbDice == '3' && cb.settings.act_triple == 'Yes') { if (dice1 == dice2 && dice2 == dice3){ prize_won = cb.settings["triple" + dice1]; triple = 1; } else { prize_won = cb.settings["prize" + score];} } else { prize_won = cb.settings["prize" + score]; } stateChange(player, prize_won, triple); } function stateChange(player, prize_won, triple) { setTimeout(function(){ if(player){ if (triple == 0) cb.chatNotice(' \u2605 ' + player + ', you win: ' + prize_won + ' \u2605','','#666699','#FFFFFF'); else cb.chatNotice(' \u2605 TRIPLE WIN!! ' + player + ', you win: ' + prize_won + ' \u2605', '', '#B00000','#FFFFFF','bold'); last_winner = player; updateUser(player, score); cb.drawPanel();} }, 3500); } cb.onMessage(function (msg) { if (msg['user'] == cb.room_slug && msg['m'].indexOf('!roll') === 0) { msg['X-Spam'] = true; cb.chatNotice('New command!! use !r username', msg['user'],'','','bold'); } if (msg['user'] == cb.room_slug && msg['m'].indexOf('!r ') === 0) { msg['X-Spam'] = true; player = msg['m'].replace("!r ", ""); cb.chatNotice('Rolling Dice for '+ player,'','','','bold'); rollDice(player); } if (msg['user'] == cb.room_slug && msg['m'].indexOf('!s') === 0) { msg['X-Spam'] = true; if (pause == 'Yes') { pause = 'No'; cb.chatNotice('Game is resumed! You can play again!','','','','bold'); } else { pause = 'Yes'; cb.chatNotice('Game is paused! Wait for tipping!','','','','bold'); cb.chatNotice('Type !s again to resume game.', cb.room_slug,'','','bold'); } } if (msg['m'].indexOf('!p') === 0) { drawprizes(msg['user']); } if (msg['user'] == cb.room_slug && msg['m'].indexOf('!z') === 0) { msg['X-Spam'] = true; Winners = new Array(); cb.chatNotice('The winners list has been reset.','','','','bold'); } if (msg['m'].indexOf('!h') === 0) { help(msg['user']); } if (msg['m'].indexOf('!w') === 0) { drawWinners(msg['user']); } if (msg['user'] == cb.room_slug && msg['m'].indexOf('!d1') === 0) { msg['X-Spam'] = true; var tks = msg['m'].replace("!d1 ", ""); if (tks > 0) { cb.settings.tokens = tks; addon = 'Tip ' + tks + ' tokens to roll Dice.'; } cb.chatNotice(' Now, we are playing with 1 dice ! '+ addon, '', '#B00000','#FFFFFF','bold'); cb.settings.nbDice = '1'; updateSubject(); } if (msg['user'] == cb.room_slug && msg['m'].indexOf('!d2') === 0) { msg['X-Spam'] = true; var tks = msg['m'].replace("!d2 ", ""); if (tks > 0) { cb.settings.tokens = tks; addon = 'New token rate for playing: ' + tks + ' tokens.'; } cb.chatNotice(' Now, we are playing with 2 Dice ! '+addon, '', '#B00000','#FFFFFF','bold'); cb.settings.nbDice = '2'; updateSubject(); } if (msg['is_mod'] == true && cb.settings.mod_as_king === "Yes" && msg['m'].indexOf("!r") === 0) { msg['X-Spam'] = true; player = msg['m'].replace("!r ", ""); cb.chatNotice('Rolling Dice for '+ player,'','','','bold'); rollDice(player); } if (msg['user'] == cb.room_slug && msg['m'].indexOf('!d3') === 0) { msg['X-Spam'] = true; var tks = msg['m'].replace("!d3 ", ""); if (tks > 0) { cb.settings.tokens = tks; addon = 'New token rate for playing: ' + tks + ' tokens.'; } cb.chatNotice(' Now, we are playing with 3 Dice ! '+addon, '', '#B00000','#FFFFFF','bold'); cb.settings.nbDice = '3'; updateSubject(); } return msg; }); function drawprizes(user) { var out = ''; var j = cb.settings.nbDice; for (i=j; i < cb.settings.nbDice*6+1; i++) { out += i + ': ' + cb.settings["prize" + i] + '\n'; } out += lines; cb.chatNotice(' Prizes: ', user, '#B00000','#FFFFFF','bold'); cb.chatNotice(out, user); } cb.onTip(function(tip){ player = tip.from_user; var amount = tip.amount; if (amount == cb.settings.tokens){ if (pause == 'Yes') { cb.chatNotice('Game is paused. Broadcaster will roll Dice for you when resumed.','','','','bold'); } else { if (cb.settings.notfree == 'Yes'){ rollDice(player); } } } cb.drawPanel(); }); cb.onDrawPanel(function(user){ if (last_winner == null) last_winner = "What will you win?" + '\u2605 '; if (prize_won == "") var tit3 = ""; else tit3 = "Win: "; if (score == 0) scores = ''; else scores = ' | ' + score + ' points \u2605'; return { 'template': '3_rows_11_21_31', 'row1_value': 'Dice Game!', 'row2_value': '\u2605 ' + last_winner + scores, 'row3_value': tit3 + prize_won, } }); function updateUser(user, score){ Winners.push({user:user,pz:cb.settings["prize" + score]}); } function drawWinners(user){ var out = ""; for (var i=0; i < Winners.length; i++) { out += '\u2605 ' + Winners[i].user + ' won ' + Winners[i].pz + '\n'; } out += lines; cb.chatNotice(' Winners: ', user, '#B00000','#FFFFFF','bold'); cb.chatNotice(out, user); } function init(){ updateSubject(); cb.drawPanel(); drawprizes(); advert(); } function advert() { if (pause == 'Yes') { cb.chatNotice('Game is paused. Broadcaster will type !s to resume game.','','','','bold');} else { if (cb.settings.notfree == 'Yes') cb.chatNotice('Tip ' + cb.settings.tokens + ' free to roll the ' + cb.settings.nbDice + ' Dice!! Type !p to see the prizes! Type !w to see the played rolls. Type !h to display commands.'); else cb.chatNotice('Play with Broadcaster to roll the ' + cb.settings.nbDice + ' Dice and win a prize! Type !p to see the prizes! Type !w to see the played rolls. Type !h to display commands.'); cb.chatNotice('Type !r username to roll the Dice\nType !z to reset the winners list.\nType !d1 XX (or !d2 XX or !d3 XX ) to change number of Dice\n(XX \= new TK rate, optional): !d2 is FREE and !d3 is FREE .\nType !s to pause or resume game.', cb.room_slug); } cb.setTimeout(advert, (cb.settings.ADVERT_TIME * 60000)); } function help(user) { if (pause == 'Yes') cb.chatNotice('Game is paused. Broadcaster type !s to resume game.','','','','bold'); if (cb.settings.notfree == 'Yes') cb.chatNotice('Tip ' + cb.settings.tokens + ' tokens to roll the ' + cb.settings.nbDice + ' Dice!! Type !p to see the prizes! Type !w to see the played rolls. Type !h to display commands.', user); else cb.chatNotice('Play with Broadcaster to roll the ' + cb.settings.nbDice + ' Dice and win a prize! Type !p to see the prizes! Type !w to see the played rolls. Type !h to display commands.', user); if (user == cb.room_slug) cb.chatNotice('Type !r username to roll the Dice\nType !z to reset the winners list.\nType !d1 XX (or !d2 or !d3) to change number of Dice\n(XX \= new TK rate, optional):2 Dice Game is FREE and 3 Dice Game FREE .\nType !s to pause or resume game.', user); } function updateSubject() { if (cb.settings.notfree == 'Yes') var newSubject = ' ALL FREE dice game ' + cb.settings.tokens + ' FREE for 3 Dice Game! Playing ' + cb.settings.nbDice + ' Dice Game Now! Type !p - prizes! Type !w - winners.\nType !h commands.'; else var newSubject = ' ALL FREE Dice Game, cost nothing and triple prizes are awesome (' + cb.settings.nbDice + ' Dice)!! Type !p to see the prizes! Type !w to see the played rolls.\nType !h to display commands.'; cb.log("Changing subject to: " + newSubject); cb.changeRoomSubject(newSubject); } drawings = { 1: ":tdr1", 2: ":tdr2", 3: ":tdr3", 4: ":tdr4", 5: ":tdr5", 6: ":tdr6" }; function drawDice(dice1, dice2, dice3){ switch (cb.settings.nbDice) { case '1': cb.chatNotice(drawings[dice1]); break; case '2': cb.chatNotice(drawings[dice1] + ' ' + drawings[dice2]); break; case '3': cb.chatNotice(drawings[dice1] + ' ' + drawings[dice2] + ' ' + drawings[dice3]); break; } } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.