Bots Home
|
Create an App
JasMinSpin
Author:
j_a_s_m_i_n
Description
Source Code
Launch Bot
Current Users
Created by:
J_A_S_M_I_N
// Wheel Of Fortune! // Original idea by SweetDann // Modified by 4science + j_a_s_m_i_n //Version 1.2 // Made announcement more compact // Added a rare prize // Added a past winners list // Added some color :D // Added more options for Multi-Spins cb.settings_choices = [{ name: 'cost_per_spin', type: 'int', minValue: 1, maxValue: 999, defaultValue: 25, label: 'Cost Per Spin Of The Wheel (1-999): ' }, { name: 'advertise_in_chat', type: 'int', minValue: 1, maxValue: 999, defaultValue: 5, label: 'How Often To Advertise The Bot: (min)' }, { name: 'fontcolor', type: 'choice', choice1: 'White', choice2: 'Black', choice3: 'Yellow', defaultValue: 'White', label: 'Pick the color of the font:' }, { name: 'multispin_count', type: 'int', minValue: 0, maxValue: 99, defaultValue: 3, label: 'How Many Bonus Spins To Allow Per Tip? (0-99)' }, { name: 'multispin_over', type: 'int', minValue: 0, maxValue: 999, defaultValue: 0, label: 'Prevent the wheel from spinning if the tip amount is over X ( To turn off that feature, leave it at 0)' }, { name: 'multispin_exact', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'No', label: 'Only spin if the tip is an exact multiple of cost?' }, { name: 'rarePrize', type: 'str', default: 'Cum Show', minLength: 1, maxLength: 255, label: 'If you want a prize to be rare, enter it here', required: false }, { name: 'rareChance', type: 'int', minValue: 1, maxValue: 500, defaultValue: 79, label: ' Chance of rare prize - 1 in X? (the higher the number, less chance of getting the prize, up to 500)', required: false }, { name: 'rareMin', type: 'int', minValue: 1, maxValue: 100, defaultValue: 30, label: ' Rare will only happen after X roll', required: false }, { name: 'rareBonus', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'No', label: 'Should the rare prize only happen on bonus spins to encourage big tippers?' }, { name: 'pos1', type: 'str', default: 'Ass', minLength: 1, maxLength: 255, label: 'Reward #1 ' }, { name: 'pos2', type: 'str', default: 'Slap ass', minLength: 1, maxLength: 255, label: 'Reward #2 ', required: false }, { name: 'pos3', type: 'str', default: 'Pinch my nipples', minLength: 1, maxLength: 255, label: 'Reward #3 ', required: false }, { name: 'pos4', type: 'str', default: 'Oil boobs', minLength: 0, maxLength: 255, label: 'Reward #4 ', required: false }, { name: 'pos5', type: 'str', default: 'Ooops! Spin the wheel again!', minLength: 0, maxLength: 255, label: 'Reward #5 ', required: false }, { name: 'pos6', type: 'str', default: 'Ooops! Spin the wheel again!', minLength: 0, maxLength: 255, label: 'Reward #6 ', required: false }, { name: 'pos7', type: 'str', default: 'Oil ass', minLength: 0, maxLength: 255, label: 'Reward #7 ', required: false }, { name: 'pos8', type: 'str', default: 'Pussy tease with LovenseDomi 30 sec Low', minLength: 0, maxLength: 255, label: 'Reward #8 ', required: false }, { name: 'pos9', type: 'str', default: 'Ooops! Spin the wheel again!', minLength: 0, maxLength: 255, label: 'Reward #9 ', required: false }, { name: 'pos10', type: 'str', default: 'Flash of your choice', minLength: 0, maxLength: 255, label: 'Reward #10 ', required: false }, { name: 'pos11', type: 'str', default: 'Pussy tease with LovenseDomi 60 sec Med', minLength: 0, maxLength: 255, label: 'Reward #11 ', required: false }, { name: 'pos12', type: 'str', default: 'Dance Tease', minLength: 0, maxLength: 255, label: 'Reward #12 ', required: false }, { name: 'pos13', type: 'str', default: 'Ooops! Spin the wheel again!', minLength: 0, maxLength: 255, label: 'Reward #13 ', required: false }, { name: 'pos14', type: 'str', default: 'Butt plug jewelry', minLength: 0, maxLength: 255, label: 'Reward #14 ', required: false }, { name: 'pos15', type: 'str', default: 'Naked Transparent Chair tease', minLength: 0, maxLength: 255, label: 'Reward #15 ', required: false }, { name: 'pos16', type: 'str', default: 'Pussy tease with LovenseDomi 30 sec Med', minLength: 0, maxLength: 255, label: 'Reward #16 ', required: false }, { name: 'pos17', type: 'str', default: 'Twerk Ass', minLength: 0, maxLength: 255, label: 'Reward #17 ', required: false }, { name: 'pos18', type: 'str', default: 'Remove Panties', minLength: 0, maxLength: 255, label: 'Reward #18 ', required: false }, { name: 'pos19', type: 'str', default: 'Ooops! Spin the wheel again!', minLength: 0, maxLength: 255, label: 'Reward #19 ', required: false }, { name: 'pos20', type: 'str', default: 'Remove Bra', minLength: 0, maxLength: 255, label: 'Reward #20 ', required: false }, { name: 'pos21', type: 'str', default: 'Remove Cloth of your choice', minLength: 0, maxLength: 255, label: 'Reward #21 ', required: false }, { name: 'pos22', type: 'str', default: 'Hand Bra', minLength: 0, maxLength: 255, label: 'Reward #22 ', required: false }, { name: 'pos23', type: 'str', default: 'Show Bra', minLength: 0, maxLength: 255, label: 'Reward #23 ', required: false }, { name: 'pos24', type: 'str', default: 'Pussy tease with LovenseDomi 60 sec High', minLength: 0, maxLength: 255, label: 'Reward #24 ', required: false }, { name: 'pos25', type: 'str', default: 'Free PM 5 minutes', minLength: 0, maxLength: 255, label: 'Reward #25 ', required: false }, { name: 'pos26', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #26 ', required: false }, { name: 'pos27', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #27 ', required: false }, { name: 'pos28', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #28 ', required: false }, { name: 'pos29', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #29 ', required: false }, { name: 'pos30', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #30 ', required: false }, { name: 'pos31', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #31 ', required: false }, { name: 'pos32', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #32 ', required: false }, { name: 'pos33', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #33 ', required: false }, { name: 'pos34', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #34 ', required: false }, { name: 'pos35', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #35 ', required: false }, { name: 'pos36', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #36 ', required: false }, { name: 'pos37', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #37 ', required: false }, { name: 'pos38', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #38 ', required: false }, { name: 'pos39', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #39 ', required: false }, { name: 'pos40', type: 'str', minLength: 0, maxLength: 255, label: 'Reward #40 ', required: false }, ]; var total_tipped = 0; var reminderCount = 100; var multiMessage = 'Disabled!'; var temp = new Array(cb.settings.pos1, cb.settings.pos2, cb.settings.pos3, cb.settings.pos4, cb.settings.pos5, cb.settings.pos6, cb.settings.pos7, cb.settings.pos8, cb.settings.pos9, cb.settings.pos10, cb.settings.pos11, cb.settings.pos12, cb.settings.pos13, cb.settings.pos14, cb.settings.pos15, cb.settings.pos16, cb.settings.pos17, cb.settings.pos18, cb.settings.pos19, cb.settings.pos20, cb.settings.pos21, cb.settings.pos22, cb.settings.pos23, cb.settings.pos24, cb.settings.pos25, cb.settings.pos26, cb.settings.pos27, cb.settings.pos28, cb.settings.pos29, cb.settings.pos30, cb.settings.pos31, cb.settings.pos32, cb.settings.pos33, cb.settings.pos34, cb.settings.pos35, cb.settings.pos36, cb.settings.pos37, cb.settings.pos38, cb.settings.pos39, cb.settings.pos40); var rewards = new Array(); var winName = new Array(); var winPrize = new Array(); var spinCost = cb.settings.cost_per_spin; var maxSpin = cb.settings.multispin_count; var multiExact = cb.settings.multispin_exact; var multiOver = cb.settings.multispin_over; var rarePrize = ' :goldstar7 '+cb.settings.rarePrize +' :goldstar7 '; var rareChance = cb.settings.rareChance; var rareMin = cb.settings.rareMin; var background = " #AD296D"; var rollCount = 0; var foreground = "#FFFF83"; if ( cb.settings.fontcolor =='Yellow'){ foreground = "#FFFF83";} for (var i = 0; i < temp.length; i++) { if (temp[i] != '') { rewards.push(temp[i]); } } if ( cb.settings.rarePrize != "" && cb.settings.rareBonus == 'Yes' && maxSpin == 0 ){ cb.chatNotice(' Error - Rare is set to only happen on bonus spin and bonus spin is set to 0.', "", '#00FFFF', foreground); cb.settings.rarePrize = ""; } if (cb.settings.multispin_count > 0) { multiMessage = 'Enabled! x ' + cb.settings.multispin_count; } cb.chatNotice('--------------------------------', "", background, foreground); cb.chatNotice(' Wheel of fortune by SweetDann + 4science + j_a_s_m_i_n ', "", background, foreground); cb.chatNotice('Wheel Value Set To : ' + spinCost + ' tokens.', "", background, foreground); if (multiExact == 'Yes') { cb.chatNotice('The wheel will only spin for multiples of ' + (spinCost) + ' tokens', "", background, foreground); } cb.chatNotice('type /rewards to see all the prizes.', "", background, foreground); cb.chatNotice('--------------------------------', "", background, foreground); cb.onTip(function(tip) { var spinCount = Math.min(Math.floor(tip['amount'] / spinCost), maxSpin + 1); var randomnumber; var u = tip['from_user']; if (multiOver > 0 && tip['amount'] <= multiOver || multiOver == 0) { if (spinCount > 0) { if (multiExact == 'No' || tip['amount'] % spinCost == 0) { //Spin The Wheel. cb.chatNotice('**** ' + u + ' is spinning The Wheel! ****', "", background, foreground, "bold"); if (cb.settings.rareBonus == 'No' && cb.settings.rarePrize != "" && rollCount >= rareMin && Math.random() < (1 / rareChance)) { cb.chatNotice('**** The Wheel Stop On : ' + rarePrize + '!!!! Lucky you!!!', "", background, foreground, "bold"); winName.push(u); rollCount++; winPrize.push(rarePrize); } else { randomnumber = Math.floor(Math.random() * (rewards.length)); cb.chatNotice('**** The Wheel Stop On : ' + rewards[randomnumber], "", background, foreground, "bold"); winName.push(u); winPrize.push(rewards[randomnumber]); rollCount++; } if (spinCount > 1) { cb.chatNotice('*** ! Multi-Spin Bonus Activated ! ***', "", background, foreground, "bold"); for (var x = 1; x < spinCount; x++) { if (cb.settings.rarePrize != "" && rollCount >= rareMin && Math.random() < (1 / rareChance)) { cb.chatNotice('**** Bonus Spin Stop On : '+ rarePrize + '!!!! Lucky you!!!', "", background, foreground , "bold"); winName.push(u); rollCount++; winPrize.push(rarePrize); } else { randomnumber = Math.floor(Math.random() * (rewards.length)); cb.chatNotice('**** Bonus Spin Stop On : ' + rewards[randomnumber], "", background, foreground, "bold"); winName.push(u); winPrize.push(rewards[randomnumber]); rollCount++; } } } cb.chatNotice('**********************************', "", background, foreground); } } } }); cb.onMessage(function(m) { var u = m['user']; var msg = m['m'].split(" "); var isMod = (cb.room_slug == u || m['is_mod']); var message; if (msg['0'] == '/rewards' || msg['0'] == '/srewards') { m['X-Spam'] = true; m['background'] = '#BDD0FF'; if (isMod && msg['0'] != '/srewards') { u = ''; } message = '**** Here is the list of prizes on the wheel ****\n'; for (var x = 0; x < rewards.length; x++) { message +='Reward ' + (x + 1) + ': ' + rewards[x] +'\n'; } if (cb.settings.rarePrize != "" && cb.settings.rareBonus == 'Yes') { message +='Trigger the bonus spins to get a small chance of winning the rare prize: ' + rarePrize +'\n'; } if (cb.settings.rarePrize != "" && cb.settings.rareBonus == 'No') { message +='The rare prize: ' + rarePrize +'\n'; } message +='--------------------------------\n'; message +=' :goodluck1 \n' message +='--------------------------------'; cb.chatNotice(message, u, background, foreground, 'bold'); return m; } if (msg['0'] == '/winners' || msg['0'] == '/swinners' || msg['0'] == '/winner') { m['X-Spam'] = true; m['background'] = '#90D952'; if (isMod && msg['0'] != '/swinners') { u = ''; } var cmdVar1 = msg[1]; var cmdVar2 = parseInt(msg[1]); var nameNum; if (winName.length == 0){ cb.chatNotice('**** No one has won a prize yet ****', u, background, foreground); return m; } if ( isNaN(cmdVar1) && cmdVar1 !== undefined){ if (cmdVar1 == "all" || cmdVar1 == "All") { if( winName.length > 100 ){ message ='**** Here is the list of the last 100 winners! ****\n'; nameNum = winName.length - 100; }else { message ='**** Here is the list of all the winners! ****\n'; nameNum = winName.length; } for (var x = nameNum; x < winName.length; x++) { message += 'Roll #' + (x + 1) + ': ' + winName[x] + ' won ' + winPrize[x] +'\n'; } message += '**************************************'; cb.chatNotice(message, u, background, foreground); return m; } else if(cbjs.arrayContains(winName, cmdVar1)){ message ='**** Here is the list of all the prizes ' + cmdVar1 + ' won! ****\n'; var prizesWon =[]; for (var x = 0; x < winName.length; x++) { if (cmdVar1 == winName[x]){ prizesWon.push(winPrize[x]); } } message += prizesWon.join(', '); message += '\n**************************************'; cb.chatNotice(message, u, background, foreground); }else { cb.chatNotice('Unable to find '+ cmdVar1 +' on the winners list.', u, background, foreground); } }else{ if ( cmdVar1 === undefined){ cmdVar2 = 10; } if (cmdVar2 <= 0) { cb.chatNotice('**** Here are the last 0 winners! :p', u, background, foreground); return m; } if (winName.length < cmdVar2) { cmdVar2 = winName.length; } message = '**** Here are the last ' + cmdVar2 + ' winners! **** \n'; for (var x = winName.length - cmdVar2; x < winName.length; x++) { message += 'Roll #' + (x + 1) + ': ' + winName[x] + ' won ' + winPrize[x]+'\n'; } message += '**************************************'; cb.chatNotice(message, u, background, foreground); return m; } } if (msg['0'] == '/whowon' && msg['1'] == 'rare'|| msg['0'] == '/swhowon' && msg['1'] == 'rare') { m['X-Spam'] = true; m['background'] = '#BFD9A9'; if (isMod && msg['0'] != '/swhowon') { u = ''; } var winners =[]; for (var x = 0; x <winName.length; x++){ if(winPrize[x] == rarePrize){ winners.push(winName[x]); } } if (winners.length > 0){ message = '**** Here is everyone who won '+ rarePrize +'! **** \n'; message += winners.join(', '); message += '\n**************************************'; }else{ message = '**** No one has won '+ rarePrize +' yet. **** '; } cb.chatNotice(message, u, background, foreground); return m; } if (msg['0'] == '/whowon' || msg['0'] == '/swhowon') { m['X-Spam'] = true; m['background'] = '#FFD9FF'; if (isMod && msg['0'] != '/swhowon') { u = ''; } var winners =[]; var cmdVar1 = parseInt(msg[1]) - 1; for (var x = 0; x <winName.length; x++){ if(winPrize[x] == rewards[cmdVar1]){ winners.push(winName[x]); } } if (winners.length > 0){ message = '**** Here is everyone who won '+ rewards[cmdVar1]+'! **** \n'; message += winners.join(', '); message += '\n**************************************'; }else{ message = '**** No one has won '+ rewards[cmdVar1]+' yet. **** '; } cb.chatNotice(message, u, background, foreground); return m; } }); cb.onEnter(function(user) { var u = user['user']; cb.chatNotice('--------------------------------', u, background, foreground); cb.chatNotice(' Wheel of fortune is active', u, background, foreground, 'bold'); cb.chatNotice('Wheel Value Set To : ' + cb.settings.cost_per_spin + ' tokens.', u, background, foreground, 'bold'); if (cb.settings.multispin_count > 0) { cb.chatNotice('Bonus spins are enabled. Tip at least ' + (spinCost * 2) + ' tokens to get a bonus spin', u, background, foreground, 'bold'); } if (multiExact == 'Yes' ) { cb.chatNotice('The wheel will only spin for multiples of ' + (spinCost) + ' tokens', u, background, foreground, 'bold'); } if (cb.settings.rarePrize != "" && cb.settings.rareBonus == 'Yes' ) { cb.chatNotice('To have a chance at winning the rare prize, you have to trigger the bonus spin by tipping more than ' + (spinCost * 2) + ' tokens', u, background, foreground, 'bold'); } cb.chatNotice('type /rewards to see all the prizes.', u, background, foreground, 'bold'); cb.chatNotice('--------------------------------', u, background, foreground); }); function advert() { cb.chatNotice(' :spinjas Tip ' + cb.settings.cost_per_spin + ' To Play! Type \'/rewards\' to get a wheel reward listing', "", background, foreground, 'bold'); if (cb.settings.rarePrize != "" && cb.settings.rareBonus == 'Yes' ) { cb.chatNotice('To have a chance at winning the rare prize, you have to trigger the bonus spin by tipping more than ' + (spinCost * 2) + ' tokens', "", background, foreground, 'bold'); } cb.setTimeout(advert, (cb.settings.advertise_in_chat * 60000)); } cb.setTimeout(advert, (cb.settings.advertise_in_chat * 60000));
© Copyright Chaturbate 2011- 2026. All Rights Reserved.