Apps Home
|
Create an App
mvn4
Author:
armincheggg
Description
Source Code
Launch App
Current Users
Created by:
Armincheggg
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:10, label: 'How Often To Advertise The Plugin: (min)'}, {name:'multispin_count', type:'int', minValue:0, maxValue:999, defaultValue:3, label: 'How Many Multi-Spins To Allow? (0-999)'}, {name:'pos1', type:'str', minLength: 1, maxLength: 255, label: 'Reward #1 '}, {name:'pos2', type:'str', minLength: 1, maxLength: 255, label: 'Reward #2 '}, {name:'pos3', type:'str', minLength: 1, maxLength: 255, label: 'Reward #3 '}, {name:'pos4', type:'str', minLength: 0, maxLength: 255, label: 'Reward #4 ', required: false}, {name:'pos5', type:'str', minLength: 0, maxLength: 255, label: 'Reward #5 ', required: false}, {name:'pos6', type:'str', minLength: 0, maxLength: 255, label: 'Reward #6 ', required: false}, {name:'pos7', type:'str', minLength: 0, maxLength: 255, label: 'Reward #7 ', required: false}, {name:'pos8', type:'str', minLength: 0, maxLength: 255, label: 'Reward #8 ', required: false}, {name:'pos9', type:'str', minLength: 0, maxLength: 255, label: 'Reward #9 ', required: false}, {name:'pos10', type:'str', minLength: 0, maxLength: 255, label: 'Reward #10 ', required: false}, {name:'pos11', type:'str', minLength: 0, maxLength: 255, label: 'Reward #11 ', required: false}, {name:'pos12', type:'str', minLength: 0, maxLength: 255, label: 'Reward #12 ', required: false}, {name:'pos13', type:'str', minLength: 0, maxLength: 255, label: 'Reward #13 ', required: false}, {name:'pos14', type:'str', minLength: 0, maxLength: 255, label: 'Reward #14 ', required: false}, {name:'pos15', type:'str', minLength: 0, maxLength: 255, label: 'Reward #15 ', required: false}, {name:'pos16', type:'str', minLength: 0, maxLength: 255, label: 'Reward #16 ', required: false}, {name:'pos17', type:'str', minLength: 0, maxLength: 255, label: 'Reward #17 ', required: false}, {name:'pos18', type:'str', minLength: 0, maxLength: 255, label: 'Reward #18 ', required: false}, {name:'pos19', type:'str', minLength: 0, maxLength: 255, label: 'Reward #19 ', required: false}, {name:'pos20', type:'str', minLength: 0, maxLength: 255, label: 'Reward #20 ', required: false}, {name:'pos21', type:'str', minLength: 0, maxLength: 255, label: 'Reward #21 ', required: false}, {name:'pos22', type:'str', minLength: 0, maxLength: 255, label: 'Reward #22 ', required: false}, {name:'pos23', type:'str', minLength: 0, maxLength: 255, label: 'Reward #23 ', required: false}, {name:'pos24', type:'str', minLength: 0, maxLength: 255, label: 'Reward #24 ', required: false}, {name:'pos25', type:'str', 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}, ]; 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); var rewards = new Array(); for(var i = 0; i<temp.length; i++) { if(temp[i] != '') { rewards.push(temp[i]); } } if(cb.settings.multispin_count > 0) { multiMessage = 'Enabled! x ' + cb.settings.multispin_count; } cb.chatNotice(' Wheel of fortune!'); cb.chatNotice('--------------------------------'); cb.chatNotice('Wheel Value Set To : ' + cb.settings.cost_per_spin + ' tokens.'); cb.chatNotice('--------------------------------'); cb.chatNotice(' -= Rewards Active =- '); for(var x = 0; x < rewards.length; x++) { cb.chatNotice(rewards[x]); } cb.chatNotice('--------------------------------'); cb.chatNotice(' Good Luck And Have Fun. '); cb.chatNotice('--------------------------------'); cb.chatNotice(' Developed by @SweetDann '); cb.chatNotice(' Modified by @dreamming01 '); function spinWheel() { cb.chatNotice('********* Spinning The Wheel! ********'); var randomnumber = Math.floor(Math.random()*(rewards.length)); cb.chatNotice('**** The Wheel Stop On : ' + rewards[randomnumber] + ' *********'); cb.chatNotice('**************************************'); } cb.onTip(function (tip) { var tipJar = tip['amount']; var spinCount = 0; //While the Tip Jar Has More In it Then The Spin Cost... while(tipJar >= cb.settings.cost_per_spin) { //And If We Have A SpinCount Left... if(spinCount <= (cb.settings.multispin_count)) { //Spin The Wheel. if(spinCount > 0) { cb.chatNotice('! Multi-Spin Bonus Activated !'); } //Spin The Wheel in 3 seconds. //cb.setTimeout(spinWheel, 3000); spinWheel(); } //Remove The Spin Amount From The Tip Jar. tipJar -= cb.settings.cost_per_spin; //And Increase The SpinCount. spinCount++; } total_tipped += parseInt(tip['amount']) cb.drawPanel(); }); cb.onMessage(function (msg) { var userName = msg['user']; if(msg['m'] == '/rewards') { for(var x = 0; x < rewards.length; x++) { cb.chatNotice('Reward ' + x + ': ' + rewards[x], userName); } cb.chatNotice('--------------------------------', userName); cb.chatNotice(' Good Luck And Have Fun. ', userName); cb.chatNotice('--------------------------------', userName); } return msg; }); cb.onDrawPanel(function(user) { return { 'template': '3_rows_of_labels', 'row1_label': 'Total Tips: ', 'row1_value': total_tipped, 'row2_label': 'Spin Cost', 'row2_value': cb.settings.cost_per_spin + ' tokens.', 'row3_label': 'Multi-Spin:', 'row3_value': multiMessage }; }); function advert() { cb.chatNotice('Wheel of fortune Is ACTIVE! Tip ' + cb.settings.cost_per_spin + ' To Play! Type \'/rewards\' to get a wheel reward listing'); cb.setTimeout(advert, (cb.settings.advertise_in_chat * 60000)); } cb.setTimeout(advert, (cb.settings.advertise_in_chat * 60000));
© Copyright Chaturbate 2011- 2024. All Rights Reserved.