Apps Home
|
Create an App
Mariusz Cymerman
Author:
cymer4949
Description
Source Code
Launch App
Current Users
Created by:
Cymer4949
// Prosty bot do prywatnego/secret show (limitCam) // Ustawienia startowe cb.settings_choices = [ { name: 'min_tokens_start', type: 'int', minValue: 1, maxValue: 2000, defaultValue: 50, label: 'Tokeny aby dołączyć PRZED startem show' }, { name: 'min_tokens_join', type: 'int', minValue: 0, maxValue: 2000, defaultValue: 30, label: 'Tokeny aby dołączyć W TRAKCIE show (0 = wyłączone)' }, { name: 'hide_message', type: 'str', minLength: 1, maxLength: 200, defaultValue: 'PRIVATE SHOW in progress! Tip to join.', label: 'Wiadomość gdy kamera jest ukryta' } ]; function notice(msg, user) { cb.sendNotice(msg, user || '', '#FFFFFF', '#000000'); } cb.onTip(function(tip) { var user = tip['from_user']; var amount = parseInt(tip['amount']); var allowed = cb.limitCam_allUsersWithAccess(); // Dołączenie przed startem if (!cb.limitCam_isRunning() && amount >= cb.settings.min_tokens_start) { if (allowed.indexOf(user) === -1) { cb.limitCam_addUsers([user]); notice(user + ' dołączył do private show!', ''); } } // Dołączenie w trakcie if (cb.limitCam_isRunning() && cb.settings.min_tokens_join > 0 && amount >= cb.settings.min_tokens_join) { if (allowed.indexOf(user) === -1) { cb.limitCam_addUsers([user]); notice(user + ' dołączył do trwającego private!', ''); } } }); cb.onMessage(function(msg) { var text = msg['m'].toLowerCase().trim(); var user = msg['user']; // Tylko broadcaster if (user !== cb.room_slug) return msg; if (text === '/startprivate' || text === '/start') { if (!cb.limitCam_isRunning()) { cb.limitCam_start(cb.settings.hide_message); notice('Private/Secret Show STARTED', ''); } msg['X-Spam'] = true; } if (text === '/stopprivate' || text === '/stop') { if (cb.limitCam_isRunning()) { cb.limitCam_stop(); notice('Private Show STOPPED – wracamy do publicznego', ''); } msg['X-Spam'] = true; } if (text === '/list') { var list = cb.limitCam_allUsersWithAccess(); notice('Aktualnie w private: ' + (list.length ? list.join(', ') : 'nikt'), user); msg['X-Spam'] = true; } return msg; }); // Start cb.onEnter(function(user) { if (cb.limitCam_isRunning()) { notice('Trwa private show. Tip ' + cb.settings.min_tokens_join + ' tk aby dołączyć.', user['user']); } });
© Copyright Chaturbate 2011- 2026. All Rights Reserved.