Bots Home
|
Create an App
testytest
Author:
daisy_marz_test
Description
Source Code
Launch Bot
Current Users
Created by:
Daisy_Marz_Test
// // just peachy [spank bank bot] // author @daisy_marz // // cb.settings_choices =[ {name: 'spankbank_onetip', type: 'int', label: 'how many tokens to add a single spank to the bank?'}, {name: 'spankbank_tentip', type: 'int', label: 'how many tokens to add ten spanks to the bank?'}, {name: 'spankbank_fiftytip', type: 'int', label: 'how many tokens to add fifty spanks to the bank?'}, {name: 'previous_spanks', type: 'int', minvalue: '0', defaultValue: '0', label: "how many spanks are currently in the bank at the time you're starting this bot? (set to 0 if it is empty)"}, {name: 'bank_ends_toggle', type: 'choice', choice1: 'when i end it', choice2: 'in x minutes', choice3: 'in x days', choice4: 'when there are x spanks in the bank', label: 'the spank bank ends:'}, {name: 'bank_ends_x', type: 'int', label: 'where x is:', required: false}, {name: 'msg_color', type: 'str', label: "notice color #1 (default candied peach #F590AA)", defaultValue: '#F590AA' }, {name: 'alt_msg_color', type: 'str', label: "notice color #2 (default juicy peach #E34B9C)", defaultValue: '#E34B9C' }, {name: 'hl_color', type: 'str', label: "notice highlight color (default fuzzy peach #'#FFD1E0')", defaultValue: '#FFD1E0' }, {name: 'bank_reminder', type: 'int', minvalue: '1', maxvalue: '30', defaultValue: '10', label: 'minutes between spankbank reminder:'} ] //universal vars var total_spanks = cb.settings.previous_spanks; var bank_active = true; var timeleft = cb.settings.bank_ends_x * 60 * 1000; var reminder_minutes = cb.settings.bank_reminder *60 *1000; cb.onTip( function( tip ) { var member = tip['from_user'] var new_spanks = false; if (bank_active == true) { if (parseInt(tip['amount']) == cb.settings.spankbank_onetip) { var new_spanks = true total_spanks += 1 cb.sendNotice( member + " tipped for one more spank in the bank!", '', '', cb.settings['msg_color'], 'bold' ); } if (parseInt(tip['amount']) == cb.settings.spankbank_tentip) { var new_spanks = true total_spanks += 10 cb.sendNotice( member + " tipped for ten more spanks in the bank!", '', '', cb.settings['msg_color'], 'bold' ); } if (parseInt(tip['amount']) == cb.settings.spankbank_fiftytip) { var new_spanks = true total_spanks += 50 var notices setTimeout(function() {cb.sendNotice(" what.", '', '', cb.settings['msg_color'], 'bold' ); }, 50); setTimeout(function() {cb.sendNotice(" the.", '', '', cb.settings['msg_color'], 'bold' ); }, 60); setTimeout(function() {cb.sendNotice(" heck.", '', '', cb.settings['msg_color'], 'bold' ); }, 70); setTimeout(function() {cb.sendNotice( member + " tipped for FIFTY more spanks in the bank! what are you, some kind of sadist?", '', '', cb.settings['msg_color'], 'bold' ); }, 80); } if (new_spanks == true) { setTimeout(function() {cb.sendNotice('that makes ' + total_spanks + ' total spanks in the bank! ouch!', '', '', cb.settings['alt_msg_color'], 'bold'); }, 100); if (cb.settings.bank_ends_toggle == 'in x days') { setTimeout(function() {cb.sendNotice('all spankbank spanks will happen in ' + cb.settings.bank_ends_x + ' days!', '', '', cb.settings['msg_color'], 'bold'); }, 110); } else if (cb.settings.bank_ends_toggle == 'in x minutes') { if (timeleft <= 6000) { setTimeout(function() {cb.sendNotice('all spankbank spanks will happen in less than a minute! get ready!', '', '', cb.settings['msg_color'], 'bold'); }, 110); } else if (timeleft <= 300000) { setTimeout(function() {cb.sendNotice('all spankbank spanks will happen in ' + timeleft / 60000 + ' minutes! get ready!', '', '', cb.settings['msg_color'], 'bold'); }, 110); } else { setTimeout(function() {cb.sendNotice('all spankbank spanks will happen in ' + timeleft / 60000 + ' minutes!', '', '', cb.settings['msg_color'], 'bold'); }, 110); } } else if (cb.settings.bank_ends_toggle == 'when there are x spanks in the bank') { setTimeout(function() {cb.sendNotice('all spankbank spanks will happen when we reach ' + cb.settings.bank_ends_x + ' spanks in the bank!', '', '', cb.settings['msg_color'], 'bold'); }, 110); if (total_spanks == cb.settings.bank_ends_x) { bank_end(); } } } } else { if (parseInt(tip['amount']) == cb.settings.spankbank_onetip) { cb.sendNotice("thanks, but the spank bank is closed! we ended with " + total_spanks + " total spanks! ", '', '', cb.settings['msg_color'], 'bold' ); } if (parseInt(tip['amount']) == cb.settings.spankbank_tentip) { cb.sendNotice("thanks, but the spank bank is closed! we ended with " + total_spanks + " total spanks! ", '', '', cb.settings['msg_color'], 'bold' ); } if (parseInt(tip['amount']) == cb.settings.spankbank_fiftytip) { cb.sendNotice("thanks, but the spank bank is closed! we ended with " + total_spanks + " total spanks! ", '', '', cb.settings['msg_color'], 'bold' ); } } }); cb.onMessage( function( msg ) { var message = msg['m'].split(' '); if( message[0].charAt(0) == '/' ) { msg['X-Spam'] = true; if( message[0] == "/spankbank" ) { bank_info( msg['user'] ); } if( message[0] == "/aboutbank" ) { credit( msg['user'] ); } if ( cb.settings.bank_ends_toggle == 'when i end it' && msg['user'] == cb.room_slug && message[0] == "/endspankbank" ) { bank_end(); } } }); function bank_end(user) { bank_active = false; setTimeout(function() {cb.sendNotice('ding ding ding!', '', '', cb.settings['alt_msg_color'], 'bold'); }, 100); setTimeout(function() {cb.sendNotice('the spank bank is now officially closed!', '', '', cb.settings['alt_msg_color'], 'bold'); }, 200); setTimeout(function() {cb.sendNotice('counting up the spanks...', '', '', cb.settings['msg_color'], 'bold'); }, 300); setTimeout(function() {cb.sendNotice('...............', '', '', cb.settings['msg_color'], 'bold'); }, 500); setTimeout(function() {cb.sendNotice('............', '', '', cb.settings['msg_color'], 'bold'); }, 700); setTimeout(function() {cb.sendNotice('........', '', '', cb.settings['msg_color'], 'bold'); }, 900); setTimeout(function() {cb.sendNotice('i have a whopping ' + total_spanks + ' total spanks to do. fuck.', '', cb.settings['hl_color'], '', 'bold'); }, 1000); } function bank_info(user) { if (bank_active == true) { if (cb.settings.bank_ends_toggle == 'when i end it') { var notices = ' :daisy_marz-peachiconleft ----------[spank bank info]---------- :daisy_marz-peachiconright\n'; notices += 'tip ' + cb.settings.spankbank_onetip + ' to add a spank to the bank!\n'; notices += 'tip ' + cb.settings.spankbank_tentip + ' to add 10 spanks to the bank!\n'; notices += 'tip ' + cb.settings.spankbank_fiftytip + ' to add 50 spanks to the bank!\n'; notices += 'there are currently ' + total_spanks + ' in the bank!' } else if (cb.settings.bank_ends_toggle == 'in x minutes') { var notices = ' :daisy_marz-peachiconleft ----------[spank bank info]---------- :daisy_marz-peachiconright\n'; notices += 'tip ' + cb.settings.spankbank_onetip + ' to add a spank to the bank!\n'; notices += 'tip ' + cb.settings.spankbank_tentip + ' to add 10 spanks to the bank!\n'; notices += 'tip ' + cb.settings.spankbank_fiftytip + ' to add 50 spanks to the bank!\n'; notices += 'there are currently ' + total_spanks + ' in the bank!\n' notices += 'the bank will close in ' + timeleft / 6000 + ' minutes!\n'; } else if (cb.settings.bank_ends_toggle == 'in x days') { var notices = ' :daisy_marz-peachiconleft ----------[spank bank info]---------- :daisy_marz-peachiconright\n'; notices += 'tip ' + cb.settings.spankbank_onetip + ' to add a spank to the bank!\n'; notices += 'tip ' + cb.settings.spankbank_tentip + ' to add 10 spanks to the bank!\n'; notices += 'tip ' + cb.settings.spankbank_fiftytip + ' to add 50 spanks to the bank!\n'; notices += 'there are currently ' + total_spanks + ' in the bank!\n' notices += 'the bank will close in ' + cb.settings.bank_ends_x + ' days!\n'; } else if (cb.settings.bank_ends_toggle == 'when there are x spanks in the bank') { var notices = ' :daisy_marz-peachiconleft ----------[spank bank info]---------- :daisy_marz-peachiconright\n'; notices += 'tip ' + cb.settings.spankbank_onetip + ' to add a spank to the bank!\n'; notices += 'tip ' + cb.settings.spankbank_tentip + ' to add 10 spanks to the bank!\n'; notices += 'tip ' + cb.settings.spankbank_fiftytip + ' to add 50 spanks to the bank!\n'; notices += 'there are currently ' + total_spanks + ' in the bank!\n' notices += 'the bank will close when we reach' + cb.settings.bank_ends_x + ' spanks in the bank!\n'; } cb.sendNotice( notices, user, cb.settings['hl_color'], '', 'bold' ); } else { cb.sendNotice("the spank bank is now closed! it ended with " + total_spanks + " total spanks! ", user, '', cb.settings['msg_color'], 'bold' ); } } function bank_announcement() { if ( bank_active == true ) { cb.sendNotice('there is currently a spank bank in progress! type /spankbank in the chat for more info!', '', '', cb.settings['alt_msg_color'], 'bold'); cb.sendNotice('type /aboutbank in the chat for bot info & credit!', '', '', cb.settings['alt_msg_color'], 'bold'); cb.setTimeout(bank_announcement, reminder_minutes) } } function credit(user) { cb.sendNotice(" :daisy_marz-peachiconleftsmall just peachy [spank bank] by @daisy_marz (version 1.0.1) :daisy_marz-peachiconrightsmall", user, cb.settings['hl_color'], '', 'bold'); //, '', '#FFD1E0', '', 'bold' } function banktimer() { if ( timeleft <= 0 ) { bank_end(); return; } else { timeleft -= 60000; if (timeleft == 300000) { cb.sendNotice('the spankbank closes in 5 minutes!', '', '', cb.settings['alt_msg_color'], 'bold'); } cb.setTimeout(banktimer, 60000); } } bank_announcement(); if (cb.settings.bank_ends_toggle == 'in x minutes') { banktimer(); }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.