Apps Home
|
Create an App
MadiDice
Author:
inmy1
Description
Source Code
Launch App
Current Users
Created by:
Inmy1
/* * App: MadiDice * Version: 0.0.0 * Author: grey_madiran * Date: 2017-12-17 */ cb.settings_choices = [ { name: 'Level2Prize1', type: 'choice', label: 'Prize #1 for Level 2', choice1: 'BootyDance', choice2: 'LotionBody', choice3: 'ShowBra', choice4: 'ShowPanties', choice5: 'ShowFeet', choice6: 'ShowBoobs', choice7: 'ShowAss', choice8: 'ShowPussy', defaultValue: 'BootyDance' }, { name: 'Level2Prize2', type: 'choice', label: 'Prize #2 for Level 2', choice1: 'BootyDance', choice2: 'LotionBody', choice3: 'ShowBra', choice4: 'ShowPanties', choice5: 'ShowFeet', choice6: 'ShowBoobs', choice7: 'ShowAss', choice8: 'ShowPussy', defaultValue: 'LotionBody' }, { name: 'Level2Prize3', type: 'choice', label: 'Prize #3 for Level 2', choice1: 'BootyDance', choice2: 'LotionBody', choice3: 'ShowBra', choice4: 'ShowPanties', choice5: 'ShowFeet', choice6: 'ShowBoobs', choice7: 'ShowAss', choice8: 'ShowPussy', defaultValue: 'ShowBra' }, { name: 'Level2Prize4', type: 'choice', label: 'Prize #4 for Level 2', choice1: 'BootyDance', choice2: 'LotionBody', choice3: 'ShowBra', choice4: 'ShowPanties', choice5: 'ShowFeet', choice6: 'ShowBoobs', choice7: 'ShowAss', choice8: 'ShowPussy', defaultValue: 'ShowPanties' }, { name: 'Level2Prize5', type: 'choice', label: 'Prize #5 for Level 2', choice1: 'BootyDance', choice2: 'LotionBody', choice3: 'ShowBra', choice4: 'ShowPanties', choice5: 'ShowFeet', choice6: 'ShowBoobs', choice7: 'ShowAss', choice8: 'ShowPussy', defaultValue: 'ShowFeet' }, { name: 'Level2Prize6', type: 'choice', label: 'Prize #6 for Level 2', choice1: 'BootyDance', choice2: 'LotionBody', choice3: 'ShowBra', choice4: 'ShowPanties', choice5: 'ShowFeet', choice6: 'ShowBoobs', choice7: 'ShowAss', choice8: 'ShowPussy', defaultValue: 'ShowBoobs' }, { name: 'Level2Prize7', type: 'choice', label: 'Prize #7 for Level 2', choice1: 'BootyDance', choice2: 'LotionBody', choice3: 'ShowBra', choice4: 'ShowPanties', choice5: 'ShowFeet', choice6: 'ShowBoobs', choice7: 'ShowAss', choice8: 'ShowPussy', defaultValue: 'ShowAss' }, { name: 'Level2Prize8', type: 'choice', label: 'Prize #8 for Level 2', choice1: 'BootyDance', choice2: 'LotionBody', choice3: 'ShowBra', choice4: 'ShowPanties', choice5: 'ShowFeet', choice6: 'ShowBoobs', choice7: 'ShowAss', choice8: 'ShowPussy', defaultValue: 'ShowPussy' }, { name: 'Level3Prize1', type: 'choice', label: 'Prize #1 for Level 3', choice1: 'Striptease', choice2: 'FingerAss', choice3: 'PussyPlay', choice4: 'FootJob', choice5: 'BlowJob', choice6: 'HandJob', choice7: 'ToeSucking', choice8: 'Cum', defaultValue: 'Striptease' }, { name: 'Level3Prize2', type: 'choice', label: 'Prize #2 for Level 3', choice1: 'Striptease', choice2: 'FingerAss', choice3: 'PussyPlay', choice4: 'FootJob', choice5: 'BlowJob', choice6: 'HandJob', choice7: 'ToeSucking', choice8: 'Cum', defaultValue: 'FingerAss' }, { name: 'Level3Prize3', type: 'choice', label: 'Prize #3 for Level 3', choice1: 'Striptease', choice2: 'FingerAss', choice3: 'PussyPlay', choice4: 'FootJob', choice5: 'BlowJob', choice6: 'HandJob', choice7: 'ToeSucking', choice8: 'Cum', defaultValue: 'PussyPlay' }, { name: 'Level3Prize4', type: 'choice', label: 'Prize #4 for Level 3', choice1: 'Striptease', choice2: 'FingerAss', choice3: 'PussyPlay', choice4: 'FootJob', choice5: 'BlowJob', choice6: 'HandJob', choice7: 'ToeSucking', choice8: 'Cum', defaultValue: 'FootJob' }, { name: 'Level3Prize5', type: 'choice', label: 'Prize #5 for Level 3', choice1: 'Striptease', choice2: 'FingerAss', choice3: 'PussyPlay', choice4: 'FootJob', choice5: 'BlowJob', choice6: 'HandJob', choice7: 'ToeSucking', choice8: 'Cum', defaultValue: 'BlowJob' }, { name: 'Level3Prize6', type: 'choice', label: 'Prize #6 for Level 3', choice1: 'Striptease', choice2: 'FingerAss', choice3: 'PussyPlay', choice4: 'FootJob', choice5: 'BlowJob', choice6: 'HandJob', choice7: 'ToeSucking', choice8: 'Cum', defaultValue: 'HandJob' }, { name: 'Level3Prize7', type: 'choice', label: 'Prize #7 for Level 3', choice1: 'Striptease', choice2: 'FingerAss', choice3: 'PussyPlay', choice4: 'FootJob', choice5: 'BlowJob', choice6: 'HandJob', choice7: 'ToeSucking', choice8: 'Cum', defaultValue: 'ToeSucking' }, { name: 'Level3Prize8', type: 'choice', label: 'Prize #8 for Level 3', choice1: 'Striptease', choice2: 'FingerAss', choice3: 'PussyPlay', choice4: 'FootJob', choice5: 'BlowJob', choice6: 'HandJob', choice7: 'ToeSucking', choice8: 'Cum', defaultValue: 'Cum' }, { name: 'TotalForGoal', type: 'choice', label: 'Total of tokens for Goal', choice1: 500, choice2: 1000, choice3: 1500, choice4: 2000, choice5: 2500, choice6: 3000, choice7: 3500, choice8: 4000, choice9: 4500, choice10: 5000, defaultValue: 1000 }, {name: 'GoalPrize', type: 'choice', label: 'Prize when goal has been reached.', choice1: 'Lush', choice2: 'Ohmibod', choice3: 'Dildo', choice4: 'Model_chooses', default: 'Ohmibod' }, ]; var minTipToRoll = 10; var minTipForPrize = 25; var noticeFrequency = 3; // Time beetween automatic app advertises (in minutes). var tipForRollTotal = 0; var Prizes = []; var PrizesList_1 = []; var PrizesList_2 = []; var PrizesList_3 = []; var totalForGoal = parseInt(cb.settings.TotalForGoal, 10); var GoalReached = false; var dieCategory = ':RedDieSmall'; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ cb.onTip(function(tip) { var User = tip['from_user']; var Amount = parseInt(tip['amount'], 10); var message = "Thank you " + User + "."; cb.sendNotice(message, User, '', '#FF0000', 'bold'); if (Amount >= minTipToRoll) // more than 10 roll(User, Amount); }); //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ cb.onDrawPanel(function (user) { return { 'template': '3_rows_12_22_31', 'row1_label': 'Goal at ' + cb.settings.TotalForGoal + ' tokens.', 'row1_value': '', 'row2_label': tipForRollTotal + ' tokens received.', 'row2_value': '', 'row3_value': 'Tip 25 tokens or more to roll the dice.' }; }); //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ cb.onEnter(function(user) { var message = "Hello " + msg['user'] + "."; cb.sendNotice(message, user['user'], '', '#FF0000', 'bold'); showAppAd(user['user']); message = "-"; cb.sendNotice(message, '', '', '#FFFFFF', 'bold'); showPrizes(user['user']); }); //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ cb.onMessage(function(msg) { if (msg['m'].match(/\/p/i)) { msg['X-Spam'] = true; if (msg['m'].match(/all/i) && ((msg['is_mod'] == true) || (msg['user'] == cb.room_slug))) showPrizes(); else showPrizes(User); } /* */ else { var User = msg['user']; var Amount = parseInt(msg['m'], 10); var message = "Thank you " + User + "."; cb.sendNotice(message, User, '', '#FF0000', 'bold'); if (Amount >= minTipToRoll) // more than 10 roll(User, Amount); } /* */ return msg; }); //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function roll(User, Amount) { tipForRollTotal += Amount; var message; if ((GoalReached == false) && (tipForRollTotal >= totalForGoal)) { message = "GOAL reached !"; cb.sendNotice(message, '', '#F0F0F0', '#FF0000', 'bold'); GoalReached = true; } var die1 = Math.floor(Math.random() * 6) + 1; var die2 = Math.floor(Math.random() * 6) + 1; var total = die1 + die2; var level = 0; if ((Amount >= 25) && (Amount < 50)) level = 1; if ((Amount >= 50) && (Amount < 100)) level = 2; if (Amount >= 100) level = 3; var PrizeWon; switch (level) { case 0: PrizeWon = ":MadiNoPrize"; break; case 1: PrizeWon = PrizesList_1[total]; break; case 2: PrizeWon = PrizesList_2[total]; break; case 3: if (GoalReached) { PrizeWon = ":Madi" + cb.settings.GoalPrize; GoalReached = false; } else PrizeWon = PrizesList_3[total]; } cb.drawPanel(); message = ""; message += dieCategory + die1 + " " + dieCategory + die2 + "\n"; message += PrizeWon; cb.sendNotice(message, '', '#F0F0F0', '#000000', 'bold'); message = "-"; cb.sendNotice(message, '', '', '#FFFFFF', 'bold'); } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function setPrizes() { Prizes.push('1 to 9 tokens :'); Prizes.push("* * Don't Roll the Dice !"); Prizes.push('10 to 24 tokens :'); Prizes.push("* * Rolls the Dice but don't give a Prize !"); Prizes.push('25 to 49 tokens :'); Prizes.push('* * Smile - Kiss or Model chooses.'); Prizes.push('50 to 99 tokens :'); Prizes.push('* * Booty Dance - Lotion Body - Show Bra - Show Panties'); Prizes.push('* * ShowFeet - ShowBoobs - ShowAss - ShowPussy.'); Prizes.push('100 tokens and more :'); Prizes.push('* * Striptease - FingerAss - PussyPlay - FootJob'); Prizes.push('* * BlowJob - HandJob - ToeSucking - CumShow.'); Prizes.push(''); Prizes.push('GOAL Prize is ' + cb.settings.GoalPrize + "."); //////////////////////////////////////////// // 25 to 49 - level 1 PrizesList_1.push(':MadiSmile'); // 0 PrizesList_1.push(':MadiSmile'); // 1 PrizesList_1.push(':MadiBlowKiss'); // 2 PrizesList_1.push(':MadiSmile'); // 3 PrizesList_1.push(':MadiBlowKiss'); // 4 PrizesList_1.push(':MadiModelChooses'); // 5 PrizesList_1.push(':MadiBlowKiss'); // 6 PrizesList_1.push(':MadiSmile'); // 7 PrizesList_1.push(':MadiModelChooses'); // 8 PrizesList_1.push(':MadiBlowKiss'); // 9 PrizesList_1.push(':MadiSmile'); // 10 PrizesList_1.push(':MadiModelChooses'); // 11 PrizesList_1.push(':MadiSmile'); // 12 // 50 to 99 - level 2 PrizesList_2.push(':MadiSmile'); // 0 PrizesList_2.push(':MadiSmile'); // 1 PrizesList_2.push(':Madi' + cb.settings.Level2Prize7); // 2 PrizesList_2.push(':Madi' + cb.settings.Level2Prize2); // 3 PrizesList_2.push(':Madi' + cb.settings.Level2Prize7); // 4 PrizesList_2.push(':Madi' + cb.settings.Level2Prize6); // 5 PrizesList_2.push(':Madi' + cb.settings.Level2Prize3); // 6 PrizesList_2.push(':Madi' + cb.settings.Level2Prize5); // 7 PrizesList_2.push(':Madi' + cb.settings.Level2Prize4); // 8 PrizesList_2.push(':Madi' + cb.settings.Level2Prize8); // 9 PrizesList_2.push(':Madi' + cb.settings.Level2Prize1); // 10 PrizesList_2.push(':Madi' + cb.settings.Level2Prize2); // 11 PrizesList_2.push(':Madi' + cb.settings.Level2Prize1); // 12 // 100 or more - level 3 PrizesList_3.push(':MadiSmile'); // 0 PrizesList_3.push(':MadiSmile'); // 1 PrizesList_3.push(':Madi' + cb.settings.Level3Prize7); // 2 PrizesList_3.push(':Madi' + cb.settings.Level3Prize2); // 3 PrizesList_3.push(':Madi' + cb.settings.Level3Prize7); // 4 PrizesList_3.push(':Madi' + cb.settings.Level3Prize6); // 5 PrizesList_3.push(':Madi' + cb.settings.Level3Prize3); // 6 PrizesList_3.push(':Madi' + cb.settings.Level3Prize5); // 7 PrizesList_3.push(':Madi' + cb.settings.Level3Prize4); // 8 PrizesList_3.push(':Madi' + cb.settings.Level3Prize8); // 9 PrizesList_3.push(':Madi' + cb.settings.Level3Prize1); // 10 PrizesList_3.push(':Madi' + cb.settings.Level3Prize2); // 11 PrizesList_3.push(':Madi' + cb.settings.Level3Prize1); // 12 } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function showPrizes(username) { var message = ""; for (var i = 0; i < Prizes.length; i++) { if (i == 0) message += Prizes[i]; else message += "\n" + Prizes[i]; } cb.sendNotice(message, username, '', '#0000FF', 'bold'); message = "-"; cb.sendNotice(message, username, '', '#FFFFFF', 'bold'); } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function advertise() { showAppAd(); cb.setTimeout(advertise, noticeFrequency * 60000); } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function showAppAd(username) { var message = ""; message += "Current running APP is MadiDice. \n"; message += "One roll -> one prize. \n"; message += "Every TIP rolls the dice. \n"; message += "The more you tip, the more sexy the prize is. \n"; message += "Type \"/p\" to see the list of prizes. \n"; message += "Type \"/p all\" to send the list to all users (broadcaster and mod only)."; cb.sendNotice(message , username, '', '#BD5B03', 'bold'); message = "-"; cb.sendNotice(message , username, '', '#FFFFFF', 'bold'); } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function init() { setPrizes(); advertise(); cb.changeRoomSubject("Tip to roll the dice."); } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ init();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.