Apps Home
|
Create an App
Mad Match
Author:
daddybones
Description
Source Code
Launch App
Current Users
Created by:
Daddybones
cb.settings_choices = [ { name: 'gamePhrase', type: 'str', minLength: 1, maxLength: 255, label: "'Match' phrase shown to players. " + "Indicate the missing component of " + "the phrase by replacing the word(s) with brackets []." }, { name:'guessAmount', type:'int', minValue: 1, maxValue: 1000000, label: "Number of tokens required enter a guess" } ]; function Player(name, guess) { this.name = name; this.guess = guess; } var playerNames = []; var players = {}; cb.onDrawPanel(function(user) { return { 'template': '3_rows_of_labels', 'row1_label': 'Match Phrase:', 'row1_value': cb.settings.gamePhrase, 'row2_label': 'Players:', 'row2_value': Object.keys(players).toString(), 'row3_label': 'Time Remaining:', 'row3_value': '0' }; }); cb.onTip(function (tip) { if (tip['amount'] == cb.settings.guessAmount) { playerNames.push(tip['from_user']); players[tip['from_user']] = tip['message']; cb.drawPanel(); } }); cb.onMessage(function (msg) { if ((msg['m'] == '/reveal') && (msg['user'] == cb.room_slug)) { msg['X-Spam'] = true; cb.chatNotice(Object.keys(players).toString()); } return msg; });
© Copyright Chaturbate 2011- 2025. All Rights Reserved.