Apps Home
|
Create an App
Bally's Snow
Author:
hunnibunch66
Description
Source Code
Launch App
Current Users
Created by:
Hunnibunch66
// Title: Make It Rain // Author: Hunnibunch66 ----based off of 'make it rain' by jalbre (justin@brechtmedia.com) // Version: 1.0 (03/20/2015) // Description: Make it Snow in chat when a minimum tip amount is hit var colorChoices = ['red', 'green', 'orange', 'blue', 'purple', 'pink', 'cyan', 'lightGrey', 'white']; cb.settings_choices = [ {name: 'min_tokens', type: 'int', minValue: 1, maxValue: 10000, defaultValue: 500, label: "Minimum Tips to make it snow"}, {name: 'snow_amount', type: 'int', minValue: 1, maxValue: 50, defaultValue: 25, label: "Number of lines you want it to snow"}, {name: 'snow_color', type: 'choice', choice1:'Randomize Colors', choice2:'red', choice3:'green', choice4:'orange', choice5:'blue', choice6:'purple', choice7:'pink', choice8:'cyan', choice9:'lightGrey', choice10: 'white', defaultValue: 'Randomize Colors', label: 'Color of Snow (SOON)'} ]; cb.onTip(function(tip) { if(parseInt(tip['amount']) >= cb.settings.min_tokens) { globalMessage('*** '+ tip['from_user'] +' made it snow! ***', ''); for(i=0;i<cb.settings.snow_amount;i++) { var dollars = Math.floor((Math.random()*10)+1), color = cb.settings.snow_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 snow! ***', ''); } }); function globalMessage(message, color) { cb.chatNotice(message); }
© Copyright Chaturbate 2011- 2026. All Rights Reserved.