Apps Home
|
Create an App
*Hands_On_Party*
Author:
handson901
Description
Source Code
Launch App
Current Users
Created by:
Handson901
var goal_tipped = 0; cb.settings_choices = [ {name: 'show_start_tokens', type: 'int', minValue: 1, maxValue: 20000, defaultValue: 100, label: "Tips needed to start a party"}, {name: 'min_join_tokens', type: 'int', minValue: 1, maxValue: 20000, defaultValue: 10, label: "Cost to join the party"}, {name: 'hide_message', label: 'Cam Message', type: 'str', minLength: 1, maxLength: 256, defaultValue: 'Party in progress! Tip at least 10 tokens to join Party!' }, {name: 'show_duration', type: 'int', minValue: 1, maxValue: 30, defaultValue: 2, label: "Party duration (minutes)"}, {name: 'goal_description', label: 'Goal is', type: 'str', minLength: 1, maxLength: 256, defaultValue: '2 minute nude show!'}, ]; cb.onTip(function(tip) { goal_tipped += tip['amount'] if (goal_tipped >= cb.settings.show_start_tokens) { goalReached(); } update_subject(); cb.drawPanel(); if (!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), tip['from_user'])) { if(parseInt(tip['amount']) >= cb.settings.min_join_tokens) { output(''+ tip['from_user'] + ' is now invited to the party!'); cb.limitCam_addUsers([tip['from_user']]); } } }); function refresh() { cb.log("Refresh called"); cb.setTimeout(refresh, 20000); cb.drawPanel(); } function update_subject() { } function goalReached() { cb.chatNotice("Goal was reached! Model will start the party soon"); cb.sendNotice("Type /start now to start your private party! Don't keep your tippers waiting.", cb.room_slug); } cb.onDrawPanel(function(user) { return { 'template': '3_rows_of_labels', 'row1_label': 'Received / Party start:', 'row1_value': '' + goal_tipped +'/'+cb.settings.show_start_tokens , 'row2_label': 'Join Party for:', 'row2_value': '' + cb.settings.min_join_tokens + '', 'row3_label': 'Party time:', 'row3_value': cb.settings.goal_description }; }); function endShow(){ if (cb.limitCam_isRunning()) { output('The party is over! Reach the goal to party again.'); cb.limitCam_stop(); } } cb.onMessage(function (msg) { var message = msg['m']; var user = msg['user']; var username = ""; if (cb.room_slug === user && message == '/start' && !cb.limitCam_isRunning()) { goal_tipped -= cb.settings.show_start_tokens; if(goal_tipped < 0){ goal_tipped = 0; } output(cb.room_slug + ' has started the party!'); cb.limitCam_start(cb.settings.hide_message); cb.setTimeout(endShow, 60000*cb.settings.show_duration); } if (cb.room_slug === user && message.substring(0, 7) == '/remove' && cb.limitCam_allUsersWithAccess().length > 0 && cb.limitCam_isRunning()) { username = message.substring(8, message.length); if (cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), username)) { cb.limitCam_removeUsers([username]); output(cb.room_slug + ' has removed ' + username + ' from the party!'); } } if (cb.room_slug === user && message.substring(0, 4) == '/add') { username = message.substring(5, message.length); if (cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), username)) { cb.limitCam_addUsers([username]); output(cb.room_slug + ' has added ' + username + ' to the party!'); } } if (cb.room_slug === user && message.substring(0, 6) == '/check') { username = message.substring(7, message.length); if (cb.limitCam_userHasAccess(username)) { output(username + " is in the party!"); } else { output(username + " is not in the party!"); } } if (cb.room_slug === user && message === '/list') { var userlist = cb.limitCam_allUsersWithAccess(); if (userlist.length > 0) { output("" + userlist.length + (userlist.length > 1 ? " users" : " user") + " in party: " + cbjs.arrayJoin(userlist, ", ")); } else { output("No users in party."); } } if (message[0] == '/') { msg['X-Spam'] = true; } return msg; }); function output(message) { cb.chatNotice(message); } function rules(){ cb.chatNotice("Every time the goal is reached, the model will start a private party"); cb.chatNotice("Tip the minimum fee to join the party. Buy just 1 time and watch the show tonight only!"); cb.setTimeout(rules, 300000); } function lucky_user(){ cb.setTimeout(lucky_user, 60000); } function init() { update_subject(); } init(); cb.setTimeout(refresh, 20000); cb.setTimeout(lucky_user, 60000); cb.setTimeout(rules, 5000);
© Copyright Freesexcam 2011- 2024. All Rights Reserved.