Apps Home
|
Create an App
digApp
Author:
digitaltest
Description
Source Code
Launch App
Current Users
Created by:
Digitaltest
var ht_username = null; cb.settings_choices = [{ name: 'goal', type: 'int', minValue: 0, defaultValue: 100, label: "Goal Amount (Set to 0 to Disable)" }, { name: 'reset', type: 'choice', choice1: 'Yes', choice2: 'No', label: "Reset the Goal when it is Met?" }, { name: 'goalAd', type: 'str', minLength: 0, MaxLength: 300, label: "Goal Description. Will automatically post in chat when Goal is reached (Optional)", required: false }, { name: 'item1', type: 'str', minLength: 1, maxLength: 30, label: "Menu Item 1 (required)" }, { name: 'price1', type: 'int', minValue: 0, defaultValue: 10, label: "Item 1 Price (required)" }, { name: 'item2', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 2 (required)" }, { name: 'price2', type: 'int', minValue: 0, defaultValue: 20, label: "Item 2 Price (required)" }, { name: 'item3', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 3", required: false }, { name: 'price3', type: 'int', minValue: 0, label: "Item 3 Price", required: false }, { name: 'item4', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 4", required: false }, { name: 'price4', type: 'int', minValue: 0, label: "Item 4 Price", required: false }, { name: 'item5', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 5", required: false }, { name: 'price5', type: 'int', minValue: 0, label: "Item 5 Price", required: false }, ]; var menu1 = '' + cb.settings.item1 + ' For ' + cb.settings.price1 + 'tks '; var menu2 = '' + cb.settings.item2 + ' For ' + cb.settings.price2 + 'tks '; var menu3 = '--------'; var menu4 = '-------'; var menu5 = '------'; var listMenu = [menu1, menu2, menu3, menu4, menu5]; cb.onTip(function(tip) { total_tips += tip['amount']; goal_tips += tip['amount']; if (tip['amount'] === cb.settings.price1) { cb.chatNotice(cb.settings.item1); } if (tip['amount'] === cb.settings.price2) { cb.chatNotice(cb.settings.item2); } if (tip['amount'] === cb.settings.price3) { cb.chatNotice(cb.settings.item3); } if (tip['amount'] === cb.settings.price4) { cb.chatNotice(cb.settings.item4); } if (tip['amount'] === cb.settings.price5) { cb.chatNotice(cb.settings.item5); } if (tip['amount'] === cb.settings.price6) { cb.chatNotice(cb.settings.item6); } if (tip['amount'] === cb.settings.price7) { cb.chatNotice(cb.settings.item7); } if (tip['amount'] === cb.settings.price8) { cb.chatNotice(cb.settings.item8); } if (tip['amount'] === cb.settings.price9) { cb.chatNotice(cb.settings.item9); } if (tip['amount'] === cb.settings.price10) { cb.chatNotice(cb.settings.item10); } update_app(); last_tip = tip['amount']; last_tipper = tip['from_user']; if (tip['amount'] > ht_amount) { ht_amount = tip['amount']; ht_username = tip['from_user']; } cb.drawPanel(); }); cb.onMessage(function(msg) { if (msg['user'] == ht_username) { msg['background'] = '#CCFF99 '; } if (msg['m'] == '/menu') { cb.chatNotice('-----' + cb.room_slug + 's Tip Menu -----', msg['user']); for (var i = 0; i < listMenu.length; i++) { cb.chatNotice(listMenu[i], msg['user']); } } if (msg['m'] == '/showmenu' && msg['user'] == cb.room_slug) { cb.chatNotice('-----' + cb.room_slug + 's Tip Menu -----'); for (var i = 0; i < listMenu.length; i++) { cb.chatNotice(listMenu[i]); } } return msg; });
© Copyright Chaturbate 2011- 2025. All Rights Reserved.