Bots Home
|
Create an App
Trick ir Treat
Author:
warppipe
Description
Source Code
Launch Bot
Current Users
Created by:
Warppipe
cb.settings_choices = [ {name:'minutes', label:'Minutes between notifications', type:'int', defaultValue:4}, {name: 'costume1', label: 'Costume One', type: 'str', required: false, defaultValue:'Ghost'}, {name: 'tip1', label: 'Tokens', type: 'int', required: false}, {name: 'trick1', label: 'Trick', type: 'str', required: false}, {name: 'treat1', label: 'Treat', type: 'str', required: false}, {name: 'costume2', label: 'Costume Two', type: 'str', required: false, defaultValue:'Mummy'}, {name: 'tip2', label: 'Tokens', type: 'int', required: false}, {name: 'trick2', label: 'Trick', type: 'str', required: false}, {name: 'treat2', label: 'Treat', type: 'str', required: false}, {name: 'costume3', label: 'Costume Three', type: 'str', required: false, defaultValue:'Werewolf'}, {name: 'tip3', label: 'Tokens', type: 'int', required: false}, {name: 'trick3', label: 'Trick', type: 'str', required: false}, {name: 'treat3', label: 'Treat', type: 'str', required: false}, {name: 'costume4', label: 'Costume Four', type: 'str', required: false, defaultValue:'Vampire'}, {name: 'tip4', label: 'Tokens', type: 'int', required: false}, {name: 'trick4', label: 'Trick', type: 'str', required: false}, {name: 'treat4', label: 'Treat', type: 'str', required: false}, {name: 'costume5', label: 'Costume Five', type: 'str', required: false}, {name: 'tip5', label: 'Tokens', type: 'int', required: false}, {name: 'trick5', label: 'Trick', type: 'str', required: false}, {name: 'treat5', label: 'Treat', type: 'str', required: false}, {name: 'costume6', label: 'Costume Six', type: 'str', required: false}, {name: 'tip6', label: 'Tokens', type: 'int', required: false}, {name: 'trick6', label: 'Trick', type: 'str', required: false}, {name: 'treat6', label: 'Treat', type: 'str', required: false}, ]; var costumes = []; var notice_string = ''; var bg_color = '#000000'; var text_color = '#FF6600' cb.onTip(function(tip){ var tip_notice = '' for (let i = 0; i< costumes.length; i++){ if (tip['amount'] == costumes[i]['tip']){ tip_notice = '\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\nDing Dong! There\'s a ' + costumes[i]['costume'] + ' at the door!\n' if (Math.random() < 0.5){ tip_notice += 'TRICK! ' + costumes[i]['trick']; } else { tip_notice += 'TREAT! ' + costumes[i]['treat']; } tip_notice += '\n\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83' cb.sendNotice(tip_notice,'',bg_color,text_color,'bold') }; }; }) function initialize(){ notice_string = '\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\nTrick or Treat! Tip to ring the doorbell, and randomly win one of two prizes!\n' for(let i = 1; i < 7; i++){ if(cb.settings['costume' + i] != '' && cb.settings['tip' + i] != 0 && cb.settings['trick' + 1] != '' && cb.settings['treat' + i] != ''){ costumes.push({costume: cb.settings['costume' + i], tip: cb.settings['tip' + i], trick: cb.settings['trick' + i], treat: cb.settings['treat' + i]}); notice_string += '\ud83c\udf83 ' + cb.settings['tip' + i] + ' tokens: Ring the bell as a ' + cb.settings['costume' + i] + '\n' + cb.settings['trick' + i] + ' (trick) OR ' + cb.settings['treat' + i] + ' (treat)\n'; }; }; notice_string += 'Happy Halloween!\n\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83\ud83c\udf83'; } function notify(){ cb.sendNotice(notice_string, '', bg_color, text_color, 'bold'); cb.setTimeout(notify, 60000 * cb.settings['minutes']) } initialize() notify()
© Copyright Chaturbate 2011- 2025. All Rights Reserved.