Apps Home
|
Create an App
dick
Author:
gragontatoo
Description
Source Code
Launch App
Current Users
Created by:
Gragontatoo
// Title: BIG COCK(Or "Win a ticket to the VIP show") // Author: Silver (thefunnestcouple) // Version: 1.0.3 (1/18/2014) // The skeleton of this bot came from the "secret show" bot v 1.0 by justin, Thank you // // Version History // 1.0 // 1.01 Added a notifier message // Added /add command // 1.02 Fixed bugs on notifier // Fixed bug for join = 0 // Game now runs both in and out of VIP mode so that notification is accurate. // 1.03 Added user setting for time interval on notifier // Added /status command // Added /set command // // *** Bot Description and Options *** //----------------------------------------------------------- // A tipping game in which random tippers win a ticket to the VIP show // Each round of the game involves a random number (say "n") of tips to be issued. The "nth" tipper of the round is the lucky duck. He wins access to the VIP room. // Options include the lower and upper limits for the range "n" can fall in, and the minimum amount that must be tipped to qualify. // If the broadcaster wants the award to be issued after a constant, rather than random number of tips, simply set equal lower and upper limits. // Note: Tips from users who already have access are excluded from the game. This is meant to avoid discouraging VIPs from continuing to tip for the reason that they don't want to take someone else's chance to win. Their tips don't affect the game. // Note: An optional notifier tells users the minimum amount to tip try to win access. Disable to keep it a secret. // Broadcasters can also set a tip amount which allows users to directly gain access to show, both before and during the VIP show. // // *** About combining with other bots/apps *** //----------------------------------------------------------- // This runs as a bot so that it can go alongside other bots and an app, EXCEPT OTHER BOTS/APPS that use the limitCam feature. // Hint: Avoid combining with apps and bots that post a lot of messages upon tipping, especially if your minimum tip amount is low. // This app encourages frequent (if not high) tipping. PREPARE FOR YELLOW WALLS! // Thorough testing with combinations of other apps and bots was NOT performed prior to release. Success and failure reports are appreciated. // //*** Suggestions for Settings *** //----------------------------------------------------------- // I reccommend that broadcasters use default settings on first 3 options (Hot Tip amount, min & max number of hot tips) for the first time you use this bot just so you get enough activity on it that you can see how it works. // // *** Contest *** //----------------------------------------------------------- // This bot was written as an entry into the January 2014 contest for apps/bots incorporating the limitCam feature. // Super duper Thank you to all broadcasters who "vote" for me by trying and using BIG COCK bot as much as possible in January 2014. // // *** Liner Notes *** //----------------------------------------------------------- // This is not only my first original app/bot for chaturbate, it is also my first javascript program! // Thanks to tutorialspoint.com/javascript for a great tutorial on javascript. // Thanks to Djkanis for testbed help // Thanks also to chaturbate viewers, broadcasters, developers, advertisers, fans, and supporters. We have a great community! Luv! XO // // *** What to look for on future versions *** (A checklist of sorts, suggestions welcome) //----------------------------------------------------------- // 1. "Skew" option to raise the expected value of n. This will lower predictablity and raise the average number of tip events... cool. // 2. Remove chat from users not in VIP room at that time // 3. Option to highlight chat of users who are in private show. // 4. Option to include or exclude certain individuals or groups from gaining admittance from user settings. // 5. Option for a maximum number of VIPs and an notification and/or command to show how many spaces are available // 6. Notification Improvement // a. That the bot is running // i. Low, Medium, High disclosure of settings // ii. With or without emoticon // b. To VIPs to remind them to stay to see the VIP show // 7. Option for moderator control // 8. A busy mode (not sure what that would be exactly...thinking on it.) // // // // *** Contact Me *** //----------------------------------------------------------- // On chaturbate as http://chaturbate.com/affiliates/in/7Bge/h7lZz/?room=gragontatoo // // On email at pgl.pglll@yahoo.com // // //************************ //* BROADCASTER COMMANDS * //****************************************************************************************************** //* /start starts the VIP show //* /stop ends the VIP show //* /list shows each user on the VIP list. Note- A long list will "spam" your chat //* /add [username] e.g. "/add BIG COCK" adds a specific user to the VIP list //* /remove [username] e.g. "/BIG COKC" checks if a particular user is on the VIP listremove thefunnestcouple" removes a specific user from the VIP list //* /check [username] e.g. "/check //* /set [number] e.g. "/set 20" sets the hot tip amount to 20. Use it to increase or decrease. //* /status shows message to BROADCASTER only about how many hot tips are needed for next winner and other handy details. //****************************************************************************************************** //USER SETTINGS cb.settings_choices = [ { name: "hotTipMin", type: "int", minValue: "1", maxValue: "10000", defaultValue: "2", label: "What is the minimum tip amount (i.e. \"hot tip\") to play the game?", //(the lower the number the yellower your wall will be) }, { name: "lowerInterval", type: "int", minValue: "1", maxValue: "1000", defaultValue: "2", label: "At least how many hot tips before a Lucky Duck?:", // lower number means more winners }, { name: "upperInterval", type: "int", minValue: "2", maxValue: "1000", defaultValue: "5", label: "Max number of hot tips to get a Lucky Duck?:", //the higher the number, the harder to guess when the winning hot tip will be }, { name: 'min_start_tokens', type: 'int', minValue: "1", maxValue: "1000", defaultValue: "133", label: "Tip this amount (in single tip) to directly buy access to the VIP show in public mode", }, { name: 'min_join_tokens', type: 'int', minValue: "0", maxValue: "10000", defaultValue: "152", label: "Tip this amount (in single tip) to directly buy access during VIP show." }, { name: 'notifyRateInMins', type: 'int', minValue: "1", maxValue: "1000", defaultValue: "5", label: "How many minutes between informational chat notifier? (1000 effectively disables)" } ]; var hotCount = 1; var hotTip = cb.settings.hotTipMin; var currentMagicNumber = magicNumber(cb.settings.lowerInterval, cb.settings.upperInterval); function magicNumber(x,y) { var value = Math.floor(Math.random() * ((y-x)+1) + x); return value; } cb.onTip(function(tip) { //if user is not already on the list if (!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), tip['from_user'])) { //and the user tips the key amount when not in VIP show he gets added to list if(!cb.limitCam_isRunning() && parseInt(tip['amount']) >= cb.settings.min_start_tokens) { output('Added '+ tip['from_user'] + ' to VIP show!'); cb.limitCam_addUsers([tip['from_user']]); } //or the user tips the key amount while in the VIP show he gets added to list if(cb.limitCam_isRunning() && parseInt(tip['amount']) >= cb.settings.min_join_tokens && cb.settings.min_join_tokens > 0) { output('Added '+ tip['from_user'] + ' to VIP show!'); cb.limitCam_addUsers([tip['from_user']]); } //or the user tips a hot tip (at least enough to be have a chance to win) // if(!cb.limitCam_isRunning() && parseInt(tip['amount']) >= cb.settings.hotTipMin) // NOTE: LuckyDuck game runs even if limitCam is running in order to make the notification accurate, because there is no way, that I know of to turn off or change a notification once it starts. If you know a way, please advise. if(parseInt(tip['amount']) >= hotTip) { if (hotCount == currentMagicNumber) { output('Winner! You Lucky Duck!'); output('Added '+ tip['from_user'] + ' to VIP show!'); cb.limitCam_addUsers([tip['from_user']]); hotCount = 1; currentMagicNumber = magicNumber(cb.settings.lowerInterval, cb.settings.upperInterval); } else { hotCount++; } } } } ); cb.onMessage(function (msg) { var message = msg['m']; var user = msg['user']; var username = ""; if (cb.room_slug === user && message == '/start' && !cb.limitCam_isRunning()) { output(cb.room_slug + ' has started the show!'); if (cb.settings.min_join_tokens == 0) { cb.limitCam_start("VIP Show in progress! Tip for a chance to win access!"); } else { cb.limitCam_start("VIP Show in progress! Tip at least " + cb.settings.min_join_tokens + " tokens to watch!"); } } if (cb.room_slug === user && message == '/stop' && cb.limitCam_isRunning()) { output(cb.room_slug + ' has stopped the show!'); cb.limitCam_stop(); } if (cb.room_slug === user && message.substring(0, 7) == '/remove' && cb.limitCam_allUsersWithAccess().length > 0) { 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 show!'); } } 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 show!"); } else { output(username + " is not in the show!"); } } var userlist = cb.limitCam_allUsersWithAccess(); if (cb.room_slug === user && message === '/list') { if (userlist.length > 0) { output("" + userlist.length + (userlist.length > 1 ? " users" : " user") + " in show: " + cbjs.arrayJoin(userlist, ", ")); } else { output("No users in show."); } } 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('Added: ' + username + ' to the show!'); } } if (cb.room_slug === user && message === '/status') { // var statusNotify = "foo"; var current = hotCount - 1; var minTokens var statusNotify if (cb.limitCam_isRunning()) { minTokens = cb.settings.min_join_tokens; } else { minTokens = cb.settings.min_start_tokens; }; statusNotify = "Status: " + current + " out of " + currentMagicNumber + " hot tips for this round. Hot tips are at least " + hotTip + " tokens. Or tip " + minTokens + " to buy access. Currently, there " + (userlist.length !== 1 ? "are " +userlist.length + " users" : "is " + userlist.length + " user") + " in the show."; cb.sendNotice(statusNotify, cb.room_slug, "#CC9999", "#000000"); } if (cb.room_slug === user && message.substring(0, 4) == '/set') { hotTip = message.substring(5, message.length); var hotTipNotify = "Minimum hot tip amount changed to " + hotTip; cb.sendNotice(hotTipNotify, cb.room_slug, "#CC9999", "#000000"); } if (message[0] == '/') { msg['X-Spam'] = true; } return msg; }); var notifyRateInMS = cb.settings.notifyRateInMins * 60000; function notify() { cb.chatNotice(" :VIPHeart1234 Lucky Duck bot is running! Tip at least "+ hotTip + " tokens for a chance to win access to VIP show! Please :follow and Vote :satisfiediam"); //cb.setTimeout(notify, 2400) cb.setTimeout(notify, notifyRateInMS) }; //cb.setTimeout(notify, 2400) cb.setTimeout(notify, notifyRateInMS) function output(message) { cb.chatNotice(message); }
© Copyright Chaturbate 2011- 2026. All Rights Reserved.