Apps Home
|
Create an App
Guess The Penis Size
Author:
mrbigtwink
Description
Source Code
Launch App
Current Users
Created by:
Mrbigtwink
cb.settings_choices = [ {name:'minTip', type:'int', minValue:1, maxValue:100, defaultValue:5, label: "Minimum amount of tokens for a guess"}, {name:'minNum', type:'int', minValue:0, maxValue:10001, defaultValue:1, label: "Min length"}, {name:'maxNum', type:'int', minValue:0, maxValue:10001, defaultValue:100, label: "Max length"} ]; var min = cb.settings.minNum; var max = cb.settings.maxNum; var correctNum = getRndInteger(min, max); var guesses = 0; var tipMin = cb.settings.minTip; var command; //setInterval(function() {cb.sendNotice('Guess how long the penis is! Tip at least '+tipMin+' to guess the length in the tip message.');}, 10000); //Handlers cb.onMessage(function (msg) { if(msg['m'].startsWith('!')) { if(msg['user'] == cb.room_slug) { command = msg['m'].split("!")[1]; if(command == 'restart'){ correctNum = getRndInteger(min, max); guesses = 0; } else if (command == 'correct') { cb.sendNotice('The size is ' + correctNum +'.'); } else if (command == 'min') { min = msg['m'],split(" ")[1]; cb.sendNotice('Changed the min to ' + msg['m'],split(" ")[1] +'.'); } else if (command == 'max') { max = msg['m'],split(" ")[1]; cb.sendNotice('Changed the max to ' + msg['m'],split(" ")[1] +'.'); } } else { cb.sendNotice('Only broadcaster can do commands.'); }} return msg; }); cb.onTip(function (tip){ var number = parseInt(tip['message']); if(Number.isInteger(number) && tip['amount'] >= tipMin) { guess(number, tip); } return; }); function guess(num, tip) { if(num == correctNum) { cb.sendNotice('You guessed the correct size! In '+guesses+' guesses. What is your request for the model?', tip['from_user'], '#FFFFFF', '#006400', 'bold'); } else if(num < correctNum) { cb.sendNotice('Nah that is just way too small..', '', '#FFFFFF', 'red'); guesses++; } else if(num > correctNum) { cb.sendNotice('Oh noo it is too big..', '', '#FFFFFF', 'red'); guesses++; } } function getRndInteger(min, max) { return Math.floor(Math.random() * (max - min) ) + min; }
© Copyright Freesexcam 2011- 2024. All Rights Reserved.