Apps Home
|
My Uploads
|
Create an App
psycho's banana bot
Author:
tok124
Description
Source Code
Launch App
Current Users
Created by:
Tok124
App Images
cb.settings_choices = [ //This will add a textfield in the bot settings that allows you to choose how many tokens it will cost to eat a banana (Default: 50 tokens) { name: 'bananaprice', type: 'int', label: 'Price to eat banana', defaultValue: '50' }, { name: 'bananacount', type: 'int', label: 'How many bananas do you have?', defaultValue: '10' } ]; var bananacounter = 0; var bananatipper = ""; var bananacount = cb.settings.bananacount; var backgroundImage = '3e2b540d-89ff-4b88-8d36-572205b819a3'; cb.onTip(function (user) { if(user['amount'] == cb.settings.bananaprice) { //Prints a message in the chat if user has tipped your choosen amount of tokens for eating a banana countbananas(user.from_user); if(bananacount > 0) { cb.sendNotice("Thank you "+user.from_user+", I will now eat a banana", "", "yellow", "black", "bold"); }else{ cb.sendNotice("Thank you "+user.from_user+" for tipping but i am out of bananas now", "", "yellow", "black", "bold"); } cb.drawPanel(); } }); function countbananas(user) { bananacounter = bananacount--; bananatipper = user; } cb.onDrawPanel(function(user) { if(bananacount < 0) { bananacount = 0; } return { "template": "image_template", "layers": [ {'type': 'image', 'fileID': backgroundImage}, { 'type': 'text', 'text': 'Bananas Left', 'top': 5, 'left': 61, 'font-size': 11, 'color': 'orange', }, { 'type': 'text', 'text': 'Last player', 'top': 29, 'left': 73, 'font-size': 11, 'color': 'orange', }, { 'type': 'text', 'text': bananacount+'/'+cb.settings.bananacount, 'top': 5, 'left': 147, 'font-size': 11, 'color': 'white', }, { 'type': 'text', 'text': bananatipper, 'top': 29, 'left': 147, 'font-size': 11, 'color': 'white', }, ], }; }); function init() { } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.