Bots Home
|
Create an App
rain
Author:
mistressadelle
Description
Source Code
Launch Bot
Current Users
Created by:
Mistressadelle
// Title: Make It Rain // Author: jalbre (justin@brechtmedia.com) // Version: 1.0 (01/08/2013) // Description: Make it Rain dollars in chat when a minimum tip amount is hit var colorChoices = ['red', 'green', 'orange', 'blue', 'purple', 'pink']; cb.settings_choices = [ {name: 'min_tokens', type: 'int', minValue: 1, maxValue: 10000, defaultValue: 500, label: "Minimum Tips to make it rain"}, {name: 'rain_amount', type: 'int', minValue: 1, maxValue: 50, defaultValue: 25, label: "Number of lines you want it to rain"}, {name: 'rain_color', type: 'choice', choice1:'Randomize Colors', choice2:'red', choice3:'green', choice4:'orange', choice5:'blue', choice6:'purple', choice7:'pink', defaultValue: 'Randomize Colors', label: 'Color of Rain (SOON)'} ]; cb.onTip(function(tip) { if(parseInt(tip['amount']) >= cb.settings.min_tokens) { globalMessage('$$$ '+ tip['from_user'] +' made it rain! $$$', ''); for(i=0;i<cb.settings.rain_amount;i++) { var dollars = Math.floor((Math.random()*10)+1), color = cb.settings.rain_color, msg = ''; if(color == 'Randomize Colors') { color = colorChoices[Math.floor((Math.random()*6)+1)]; } while(dollars) { msg += '$'; dollars--; } globalMessage(msg, color); } globalMessage('$$$ '+ tip['from_user'] +' made it rain! $$$', ''); } }); function globalMessage(message, color) { //Unfortunately color isn't supported yet. Soon! cb.chatNotice(message); }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.