Bots Home
|
Create an App
scratch it 4
Author:
test345043
Description
Source Code
Launch Bot
Current Users
Created by:
Test345043
// Scratch the Card App for Chaturbate // Summary: "Scratch the Card: Tip as low as 1 token to scratch and maybe win exciting prizes! A fun, chat-based game with auto-reinitializing rewards and customizable settings—no card counts, just pure fun!" // Description: "Bring excitement to your room with Scratch the Card! Viewers tip as little as 1 token (up to 100) for a chance to win from up to 20 custom prizes with factors (e.g., '3*Flash ass'). The prize pool refreshes automatically when low, keeping the action alive. Customize with up to 10,000 cards, set your tip price, and define your prize list with factors. Use `/scprizes` to see remaining rewards, `/sclastwin` for the latest win, or `/screinit` to reset. Ads keep viewers hooked, all without revealing card counts. Boost tips and engagement now!" var ScratchTheCardBot = { // Game state remainingCards: 0, prizePool: [], // Array of {description: string, count: number} lastWin: null, adTimer: null, // Default prize list with factors (20 prizes) defaultPrizes: [ "3*Spit tits", "2*Lick toe", "3*2*Fingering pussy", "4*Flash ass", "2*10 spanks", "3*Oil boobs", "1*Blow kiss", "2*Dance tease", "3*Show feet", "2*Twerk", "1*Nipple tease", "2*Remove top", "3*Pussy close-up", "2*Doggy pose", "1*Suck finger", "2*Custom request", "3*Wink at cam", "2*Sing a line", "1*Flash smile", "2*Sexy stretch" ], // Handle tip events with 0.1% win chance onTip: function(tip) { var cardPrice = cb.settings.card_price; if (tip.amount === cardPrice && this.remainingCards > 0) { this.remainingCards--; // Decrease card count with every tip // Random chance to win (0.1% probability) var winChance = Math.random(); if (winChance < 0.001) { // 0.1% chance to win var availablePrizes = this.prizePool.filter(p => p.count > 0); if (availablePrizes.length === 0) { cb.sendNotice("No prizes left!", "", "#FF0000"); // Red for no prizes return; } var prizeIndex = Math.floor(Math.random() * availablePrizes.length); var prize = availablePrizes[prizeIndex]; prize.count--; // Decrease the prize's remaining count this.lastWin = prize.description; cb.sendNotice(tip.from_user + " scratched a card and won: " + prize.description + "!", "", "#00FF00"); // Green for wins this.checkReinit(); } else { cb.sendNotice(tip.from_user + " *scratched a card and struck out—better luck next time!*", "", "#FFA500"); // Orange, bold } } }, // Handle chat messages for commands onMessage: function(msg) { var text = msg.m.toLowerCase(); if (text === "/scprizes") { var prizeList = this.prizePool.map(p => p.count + "*" + p.description).join(", "); cb.sendNotice("Available prizes: " + prizeList, "", "#FFFF00"); // Yellow for info } else if (text === "/sclastwin") { cb.sendNotice(this.lastWin ? "Last win: " + this.lastWin : "No wins yet!", "", "#FFFF00"); } else if (text === "/screinit") { this.reinit(); cb.sendNotice("Game reinitialized!", "", "#00FFFF"); // Cyan for resets } }, // Check if reinitialization is needed (≤10% total prize instances left) checkReinit: function() { var totalInitialPrizes = this.defaultPrizes.reduce((sum, p) => sum + parseInt(p.split("*")[0]), 0); var totalRemainingPrizes = this.prizePool.reduce((sum, p) => sum + p.count, 0); var prizePercentage = (totalRemainingPrizes / totalInitialPrizes) * 100; if (prizePercentage <= 10) { this.reinit(); cb.sendNotice("Prize pool reinitialized!", "", "#00FFFF"); } }, // Reinitialize game state with custom or default prizes reinit: function() { this.remainingCards = cb.settings.total_cards; var customPrizes = cb.settings.prizes_list ? cb.settings.prizes_list.split(",").map(p => p.trim()) : []; var prizeInput = (customPrizes.length === 0 || customPrizes.every(p => p === "")) ? this.defaultPrizes : customPrizes.slice(0, 20); this.prizePool = prizeInput.map(prize => { var [count, description] = prize.split("*"); count = parseInt(count) || 1; // Default to 1 if no valid number return { description: description.trim(), count: count }; }); this.defaultPrizes = prizeInput; // Update defaultPrizes for reinitialization consistency }, // Start or restart ad timer using cb.setTimeout startAdTimer: function() { if (this.adTimer) { cb.clearTimeout(this.adTimer); // Clear existing timer } var self = this; function sendAd() { var totalPrizesLeft = self.prizePool.reduce((sum, p) => sum + p.count, 0); cb.sendNotice(" *Take a wild scratch for " + cb.settings.card_price + " tokens—win big with " + totalPrizesLeft + " prizes left!*", "", "#FFA500"); // Orange background, white bold text self.adTimer = cb.setTimeout(sendAd, cb.settings.ad_delay * 60 * 1000); // Schedule next ad } this.adTimer = cb.setTimeout(sendAd, cb.settings.ad_delay * 60 * 1000); // Initial call } }; // Define settings choices for the broadcaster cb.settings_choices = [ { name: "total_cards", type: "int", minValue: 50, maxValue: 10000, defaultValue: 10000, // 10,000 cards by default label: "Total Cards" }, { name: "card_price", type: "int", minValue: 1, maxValue: 100, defaultValue: 33, // 33 tokens as per announcement label: "Card Price (Tokens)" }, { name: "ad_delay", type: "int", minValue: 2, maxValue: 10, defaultValue: 5, label: "Ad Delay (Minutes)" }, { name: "prizes_list", type: "str", defaultValue: "3*Spit tits, 2*Lick toe, 3*2*Fingering pussy, 4*Flash ass, 2*10 spanks, 3*Oil boobs, 1*Blow kiss, 2*Dance tease, 3*Show feet, 2*Twerk, 1*Nipple tease, 2*Remove top, 3*Pussy close-up, 2*Doggy pose, 1*Suck finger, 2*Custom request, 3*Wink at cam, 2*Sing a line, 1*Flash smile, 2*Sexy stretch", label: "Prizes (e.g., '3*Prize', comma-separated, max 20)" } ]; // Register event handlers cb.onTip(function(tip) { ScratchTheCardBot.onTip(tip); }); cb.onMessage(function(msg) { ScratchTheCardBot.onMessage(msg); }); // Initialize the app with custom announcement ScratchTheCardBot.reinit(); // Set initial state with 10,000 cards and custom/default prizes ScratchTheCardBot.startAdTimer(); // Start the ad timer cb.sendNotice("* * * SCRATCH the Card * * *", "", "#00FFFF"); // Cyan, bold cb.sendNotice("---> Play a Card for " + cb.settings.card_price + " tokens.", "", "#00FFFF"); // Cyan cb.sendNotice("", "", "#00FFFF"); // Empty line cb.sendNotice("Type /scprizes to see prizes, /sclastwin to last winner.", "", "#00FFFF"); // Cyan cb.sendNotice("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━", "", "#00FFFF"); // Cyan line
© Copyright Chaturbate 2011- 2025. All Rights Reserved.