Apps Home
|
Create an App
pogodbroddo
Author:
artisteerotique
Description
Source Code
Launch App
Current Users
Created by:
Artisteerotique
function resetNumbers(){newPrizeTip=[],newPrizeTips=[];for(var e=cb.settings.lowlimit;e<=cb.settings.highlimit;newPrizeTip[e++])newPrizeTip.push(e);lucky=newPrizeTip[Math.floor(Math.random()*newPrizeTip.length)];var i=newPrizeTip.indexOf(lucky);newPrizeTip.splice(i,1),shuffle(newPrizeTip),prizeTipCount(prizeCount),cb.chatNotice("Your new lucky number is: "+lucky,cb.room_slug,"",bcp.red,"bold"),cb.chatNotice("Your new extra prize tips are: "+newPrizeTips,cb.room_slug,"",bcp.red,"bold"),resetControl=!1}function store(){prizeTip1=cb.settings.prize1Tip,prizeTip2=cb.settings.prize2Tip,prizeTip3=cb.settings.prize3Tip,prizeTip4=cb.settings.prize4Tip,prizeTip5=cb.settings.prize5Tip,prizeTip6=cb.settings.prize6Tip,lucky=cb.settings.lucky}function prizeTipCount(e){var i;for(i=0;e>i;i++)newPrizeTips.push(newPrizeTip[i]);1==prizeCount&&(prizeTip1=newPrizeTip[0]),2==prizeCount&&(prizeTip1=newPrizeTip[0],prizeTip2=newPrizeTip[1]),3==prizeCount&&(prizeTip1=newPrizeTip[0],prizeTip2=newPrizeTip[1],prizeTip3=newPrizeTip[2]),4==prizeCount&&(prizeTip1=newPrizeTip[0],prizeTip2=newPrizeTip[1],prizeTip3=newPrizeTip[2],prizeTip4=newPrizeTip[3]),5==prizeCount&&(prizeTip1=newPrizeTip[0],prizeTip2=newPrizeTip[1],prizeTip3=newPrizeTip[2],prizeTip4=newPrizeTip[3],prizeTip5=newPrizeTip[4]),6==prizeCount&&(prizeTip1=newPrizeTip[0],prizeTip2=newPrizeTip[1],prizeTip3=newPrizeTip[2],prizeTip4=newPrizeTip[3],prizeTip5=newPrizeTip[4],prizeTip6=newPrizeTip[5]),newPrizeTips.sort(function(e,i){return e-i})}function shuffle(e){for(var i,t,n=e.length;0!==n;)t=Math.floor(Math.random()*n),n-=1,i=e[n],e[n]=e[t],e[t]=i;return e}function prizeList(){var e=[];0!=prizeTip1&&e.push(cb.settings.prize1),0!=prizeTip2&&e.push(cb.settings.prize2),0!=prizeTip3&&e.push(cb.settings.prize3),0!=prizeTip4&&e.push(cb.settings.prize4),0!=prizeTip5&&e.push(cb.settings.prize5),0!=prizeTip6&&e.push(cb.settings.prize6),extraPrizes=e,prizeCount=extraPrizes.length}function removePrize(e,i){for(var t=e.length-1;t>=0;t--)e[t]===i&&e.splice(t,1)}function showPrizes(){0!=extraPrizes.length&&0!=count&&(cb.chatNotice("\nThere are "+extraPrizes.length+" prizes hidden along with the LUCKY number.","","",bcp.maroon,"bold"),cb.setTimeout(showPrizes,42e4))}function buyHint(){hints.length>0&&0!=count&&(cb.chatNotice("\nTip "+cb.settings.hintTip+" tokens for a HINT just for YOU to find the LUCKY number.","","",bcp.maroon,"bold"),cb.setTimeout(buyHint,42e4))}function getHint(){hint=hints[Math.floor(Math.random()*hints.length)],hints=hints.filter(function(e){return hint>lucky?e<=hint:e>=hint});var e=hints.indexOf(hint);hints.splice(e,1),0==hints.length&&(cb.chatNotice("There are no hints remaining!","","",bcp.black,"bold"),noHints=!0)}function buildHints(){for(var e=cb.settings.lowlimit;e<=cb.settings.highlimit;hints[e++])hints.push(e);var i=hints.indexOf(lucky);hints.splice(i,1)}function reset_numbers(){for(var e=cb.settings.lowlimit;e<=cb.settings.highlimit;picked[e++])remaining=cb.settings.highlimit-cb.settings.lowlimit+1;BuildRemaining()}function BuildRemaining(){var e,i;for(ostr="",i=cb.settings.lowlimit;i<=cb.settings.highlimit;)if(1!=picked[i])if(51>remaining)ostr=ostr+i+" ",i++;else{for(e=i+1;e<=cb.settings.highlimit&&0==picked[e];e++);i+3>e?(ostr=ostr+i+" ",i++):(ostr=ostr+i+"-"+(e-1)+" ",i=e)}else i++;cb.drawPanel()}function showNumbers(){count>=52&&(cb.chatNotice("The Remaining Numbers are:\n"+ostr,"","",bcp.purple,"bold","","",bcp.blue,"bold"),cb.setTimeout(showNumbers,6e4*cb.settings.frequency))}function resetRules(){"Yes"==cb.settings.allowReset&&cb.chatNotice("\nYou have turned on the game reset feature. This feature allows yourself or your mods\nto reset the game at any time. This will reset the LUCKY number and the Prize tip values.\nYou will and only you will receive a message in the chat containing the new numbers.\nSimply type '/reset' in the chat to reset the game.\nIf you want to change the number of prizes, prizes won, or upper and lower limits you will\nneed to deactivate the game and start again.",cb.room_slug,"",bcp.red,"bold")}function ShowIntro(){0!=count&&(cb.chatNotice("\nGuess the LUCKY number from "+cb.settings.lowlimit+" to "+cb.settings.highlimit+". Prize: "+cb.settings.description+"\nType /numbers to see the remaining numbers.\nType /rules for complete details.\n\nTo tip without playing, type the word 'optout' in your tip note\n","","",bcp.blue,"bold"),cb.setTimeout(ShowIntro,6e5))}function ShowRules(e){cb.chatNotice("The Your Lucky Guess Game:\n\nYour job is to FIND the LUCKY number. Make your GUESS by TIPPING!\nIf you GUESS the LUCKY number, the prize is: "+cb.settings.description+"\nThe numbers that have NOT been tipped are shown in the panel below the video feed\nor by typing /numbers in the chat if there are too many to display.\nGood Luck and Enjoy the Show!\n\nTo tip without playing, put the word optout in your tip note.",e,"",bcp.blue,"bold")}function Init(){reset_numbers(),store(),prizeList(),cb.changeRoomSubject("Guess the LUCKY number! Guess between "+cb.settings.lowlimit+" and "+cb.settings.highlimit+" to "+cb.settings.description+". "+cb.settings.hashtags),ShowIntro(),count=remaining,showNumbers(),buildHints(),resetRules(),"Yes"==cb.settings.giveHint&&buyHint(),"Yes"==cb.settings.extraPrize&&showPrizes()}function InitReset(){picked=[],givenHints=[],reset_numbers(),prizeList(),cb.changeRoomSubject("Guess the LUCKY number! Guess between "+cb.settings.lowlimit+" and "+cb.settings.highlimit+" to "+cb.settings.description+". "+cb.settings.hashtags),count=remaining,showNumbers(),buildHints(),"Yes"==cb.settings.giveHint&&buyHint(),"Yes"==cb.settings.extraPrize&&showPrizes()}var lucky,prizeTip1,prizeTip2,prizeTip3,prizeTip4,prizeTip5,prizeTip6,remaining=0,count,resetControl=!1,resets=1,prizeCount,picked=[],extraPrizes=[],newPrizeTip=[],newPrizeTips=[],hints=[],givenHints=[],gameOver=!1,noHints=!1,ostr="",net=0,bonus=0,hintBonus=0,winner="",heart="♥",kiss=":kiss",bcp={aqua:"#00FFFF",black:"#000000",blue:"#0000FF",fuchsia:"#FF00FF",gray:"#808080",grey:"#808080",green:"#008000",lime:"#00FF00",maroon:"#800000",navy:"#000080",olive:"#808000",orange:"#FFA500",purple:"#800080",red:"#FF0000",silver:"#C0C0C0",teal:"#008080",white:"#FFFFFF",yellow:"#FFFF00"};cb.settings_choices=[{name:"lowlimit",type:"int",minValue:5,maxValue:499,defaultValue:11,label:"Lower Limit"},{name:"highlimit",type:"int",minValue:10,maxValue:500,defaultValue:45,label:"Upper Limit"},{name:"lucky",type:"int",minValue:5,maxValue:500,label:"Lucky Number"},{name:"description",type:"str",minLength:1,maxLength:255,label:"Prize"},{name:"entrance",label:"Show rules upon entrance?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No"},{name:"frequency",type:"int",minValue:1,maxValue:10,defaultValue:3,label:"Frequency to show Remainging Numbers? (In minutes)"},{name:"topic",type:"str",minLength:1,maxLength:255,required:!1,label:"Room Topic",defaultValue:"Let's copulate over and over ❤"},{name:"hashtags",type:"str",minLength:1,maxLength:255,required:!1,label:"Hashtags for your topic",defaultValue:"#lovense #ohmibod"},{name:"celebrationGIF",type:"str",minLength:1,maxLength:255,required:!1,label:"GIF For Winner",defaultValue:":congratulationslove"},{name:"giveHint",label:"Give Hints? (Only the person tipping for the hint will see.)",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No"},{name:"hintTip",type:"int",required:!1,defaultValue:501,label:"Tip amount necessary for hint"},{name:"extraPrize",label:"Have extra prizes to look for?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No"},{name:"prize1Tip",type:"int",minValue:0,maxValue:499,required:!0,defaultValue:0,label:"Prize 1 Lucky Number (Leave value at 0 if no prize"},{name:"prize1",type:"str",minLength:1,maxLegnth:255,required:!1,label:"Prize 1",defaultValue:"Prize"},{name:"prize2Tip",type:"int",minValue:0,maxValue:499,required:!1,defaultValue:0,label:"Prize 2 Lucky Number(Leave value at 0 if only 1 prize)"},{name:"prize2",type:"str",minLength:1,maxLegnth:255,required:!1,label:"Prize 2",defaultValue:"Prize"},{name:"prize3Tip",type:"int",minValue:0,maxValue:499,required:!1,defaultValue:0,label:"Prize 3 Lucky Number(Leave value at 0 if only 2 prizes)"},{name:"prize3",type:"str",minLength:1,maxLegnth:255,required:!1,label:"Prize 3",defaultValue:"Prize"},{name:"prize4Tip",type:"int",minValue:0,maxValue:499,required:!1,defaultValue:0,label:"Prize 4 Lucky Number (Leave value at 0 if only 3 prizes)"},{name:"prize4",type:"str",minLength:1,maxLegnth:255,required:!1,label:"Prize 4",defaultValue:"Prize"},{name:"prize5Tip",type:"int",minValue:0,maxValue:499,required:!1,defaultValue:0,label:"Prize 5 Lucky Number(Leave value at 0 if only 4 prizes)"},{name:"prize5",type:"str",minLength:1,maxLegnth:255,required:!1,label:"Prize 5",defaultValue:"Prize"},{name:"prize6Tip",type:"int",minValue:0,maxValue:499,required:!1,defaultValue:0,label:"Prize 6 Lucky Number(Leave value at 0 if only 5 prizes)"},{name:"prize6",type:"str",minLength:1,maxLegnth:255,required:!1,label:"Prize 6",defaultValue:"Prize"},{name:"prizeGIF",type:"str",minLength:1,maxLength:255,required:!1,label:"GIF for finding prizes",defaultValue:":hugsk"},{name:"repeatWin",label:"Repeat winning comment for every lucky number tip?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"Yes"},{name:"allowReset",label:"Allow Game to be Reset (use '/reset' in chat)?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No"}],cb.onDrawPanel(function(e){return 0==ostr?{template:"3_rows_11_21_31",row1_value:winner+" has guessed the LUCKY number!",row2_value:"Your prize is: "+cb.settings.description,row3_value:heart+" Thank you all for playing! "+heart}:51>=count?{template:"3_rows_11_21_31",row1_value:"GUESS The LUCKY Number Below:",row2_value:ostr,row3_value:""}:{template:"3_rows_11_21_31",row1_value:"GUESS The LUCKY Number Below:",row2_value:"Numbers Remaining: "+count,row3_value:"Type /numbers to see the remaining numbers."}}),cb.onTip(function(e){var i,t=parseInt(e.amount);if(null==e.message.match(/optout/i))if(net+=t,"Yes"==cb.settings.repeatWin&&t==lucky&&0==count&&(cb.chatNotice("Congratulations, "+e.from_user+", you GUESSED the LUCKY NUMEBR! ","","",bcp.green,"bold"),cb.chatNotice(cb.settings.celebrationGIF)),t==lucky&&0!=count)cb.changeRoomSubject(cb.settings.topic+" "+cb.settings.hashtags),cb.chatNotice("Congratulations, "+e.from_user+", for GUESSING the LUCKY NUMEBR! ","","",bcp.green,"bold"),cb.chatNotice(cb.settings.celebrationGIF),cb.chatNotice("Total tokens: "+net+". Duplicate and Out of Range Tips: "+(bonus-hintBonus)+". Hint Tokens: "+hintBonus*cb.settings.hintTip+". Average Tokens per round: "+Math.ceil(net/resets)+". Total dollars: $"+parseFloat(.05*net).toFixed(2),cb.room_slug),ostr=count=0,cb.drawPanel(),winner=e.from_user,i=net,gameOver=!0;else if("Yes"==cb.settings.extraPrize&&0!=count&&(t==prizeTip1&&1==extraPrizes.includes(cb.settings.prize1)&&(cb.chatNotice("Congratulations, "+e.from_user+", you found a PRIZE! ","","",bcp.green,"bold"),cb.chatNotice("Your Prize is: "+cb.settings.prize1,"","",bcp.green,"bold"),cb.chatNotice(cb.settings.prizeGIF),removePrize(extraPrizes,cb.settings.prize1)),t==prizeTip2&&1==extraPrizes.includes(cb.settings.prize2)&&(cb.chatNotice("Congratulations, "+e.from_user+", you found a PRIZE! ","","",bcp.green,"bold"),cb.chatNotice("Your Prize is: "+cb.settings.prize2,"","",bcp.green,"bold"),cb.chatNotice(cb.settings.prizeGIF),removePrize(extraPrizes,cb.settings.prize2)),t==prizeTip3&&1==extraPrizes.includes(cb.settings.prize3)&&(cb.chatNotice("Congratulations, "+e.from_user+", you found a PRIZE! ","","",bcp.green,"bold"),cb.chatNotice("Your Prize is: "+cb.settings.prize3,"","",bcp.green,"bold"),cb.chatNotice(cb.settings.prizeGIF),removePrize(extraPrizes,cb.settings.prize3)),t==prizeTip4&&1==extraPrizes.includes(cb.settings.prize4)&&(cb.chatNotice("Congratulations, "+e.from_user+", you found a PRIZE! ","","",bcp.green,"bold"),cb.chatNotice("Your Prize is: "+cb.settings.prize4,"","",bcp.green,"bold"),cb.chatNotice(cb.settings.prizeGIF),removePrize(extraPrizes,cb.settings.prize4)),t==prizeTip5&&1==extraPrizes.includes(cb.settings.prize5)&&(cb.chatNotice("Congratulations, "+e.from_user+", you found a PRIZE! ","","",bcp.green,"bold"),cb.chatNotice("Your Prize is: "+cb.settings.prize5,"","",bcp.green,"bold"),cb.chatNotice(cb.settings.prizeGIF),removePrize(extraPrizes,cb.settings.prize5)),t==prizeTip6&&1==extraPrizes.includes(cb.settings.prize6)&&(cb.chatNotice("Congratulations, "+e.from_user+", you found a PRIZE! ","","",bcp.green,"bold"),cb.chatNotice("Your Prize is: "+cb.settings.prize6,"","",bcp.green,"bold"),cb.chatNotice(cb.settings.prizeGIF),removePrize(extraPrizes,cb.settings.prize6))),"Yes"==cb.settings.giveHint&&t==cb.settings.hintTip&&1==noHints&&cb.chatNotice("Thank you for your tip, but there are no hints remaining. "+kiss,e.from_user,"",bcp.black,"bold"),"Yes"==cb.settings.giveHint&&t==cb.settings.hintTip&&0!=hints.length&&(hintBonus++,cb.chatNotice(e.from_user+" has tipped for a HINT to find the LUCKY number!"),getHint(),hint>lucky?cb.chatNotice("Your PERSONAL hint is: The Lucky Number is LESS than "+hint,e.from_user,"",bcp.black,"bold"):cb.chatNotice("Your PERSONAL hint is: The Lucky Number is GREATER than "+hint,e.from_user,"",bcp.black,"bold"),givenHints.push(hint)),1!=picked[t])if(t!=lucky&&0!=count&&t>=cb.settings.lowlimit&&t<=cb.settings.highlimit){cb.chatNotice("That's not the LUCKY number. Guess Again!","","",bcp.red,"bold"),reset_numbers(),count--;var n=hints.indexOf(t);hints.splice(n,1),1==picked[t]&&(bonus+=t),picked[t]=1,--remaining,BuildRemaining()}else bonus+=t}),cb.onMessage(function(e){if("/reset"==e.m&&("Yes"==cb.settings.allowReset&&1==gameOver&&(e.user==cb.room_slug?(resetNumbers(),cb.chatNotice("If you are happy with these numbers, you or your mods type '/yes' in thet chat to reset. If not, use '/reset' again.",cb.room_slug,"",bcp.red,"bold"),resetControl=!0):e.is_mod?(resetNumbers(),cb.chatNotice("If "+cb.room_slug+" is happy with these numbers, type '/yes' in thet chat to reset. If not, use '/reset' again.",e.user,"",bcp.red,"bold"),cb.chatNotice("If you are happy with these numbers, you or your mods type '/yes' in thet chat to reset. If not, use '/reset' again.",cb.room_slug,"",bcp.red,"bold"),resetControl=!0):cb.chatNotice("This command is only for the model and moderators",e.user,"",bcp.red,"bold")),e["X-Spam"]=!0),"/reset"==e.m&&("Yes"==cb.settings.allowReset&&0==gameOver&&(e.user==cb.room_slug?cb.chatNotice("The game has not finished. If you would like to reset the game, please deactive the app and start again.",cb.room_slug,"",bcp.red,"bold"):e.is_mod?cb.chatNotice("Only "+cb.room_slug+" can reset until the game has finished.",e.user,"",bcp.red,"bold"):cb.chatNotice("This command is only for the model and moderators",e.user,"",bcp.red,"bold")),e["X-Spam"]=!0),"/yes"==e.m&&(1==resetControl&&"Yes"==cb.settings.allowReset&&(e.user==cb.room_slug||e.is_mod?(InitReset(),cb.chatNotice("The Game has been reset. Good luck and have fun!","","",bcp.red,"bold"),gameOver=!1,resetControl=!1,resets++):cb.chatNotice("This command is only for the model and thier moderators",e.user,"",bcp.red,"bold")),e["X-Spam"]=!0),("/numbers"==e.m||"/number"==e.m||"/n"==e.m)&&(e.user==cb.room_slug||e.is_mod?(e.m=e.m+" (Remainging numbers sent to everyone.)",cb.chatNotice("The Remaining Numbers are:\n"+ostr,"","",bcp.purple,"bold")):cb.chatNotice("The Remaining Numbers are:\n"+ostr,e.user,"",bcp.purple,"bold"),e["X-Spam"]=!0),"/rules"==e.m&&(e["X-Spam"]=!0,ShowRules(e.user)),e.m)for(var i=e.m.toString(),t=0;t<=givenHints.length;t++)if(i.includes(givenHints[t]))return e["X-Spam"]=!0,e.m="You shouldn't cheat!",e;return e}),cb.onEnter(function(e){"Yes"==cb.settings.entrance&&(e["X-Spam"]=!0,ShowRules(e.user))}),Init();
© Copyright Freesexcam 2011- 2024. All Rights Reserved.