Apps Home
|
Create an App
Poisoned Honey's Lucky Number
Author:
erik913
Description
Source Code
Launch App
Current Users
Created by:
Erik913
function getNumbers(){for(var e=cb.settings.low;e<=cb.settings.high;e++)numbers.push(e),tempNumbers.push(e),hints.push(e);range=numbers.join(" ").toString(),hints.splice(lucky,1)}function getPrizeValues(){var e=cb.settings.prizeList;prizes=e.split(","),prizeTips=shuffle(tempNumbers),prizeTips=prizeTips.splice(0,cb.settings.prizeCount),"Yes"==cb.settings.clear&&(prizeTips.shift(),prizeTips.push(lucky)),prizeTips.sort(function(e,t){return e-t})}function getHint(){hint=hints[Math.floor(Math.random()*hints.length)],hints=hints.filter(function(e){return hint>lucky?hint>=e:e>=hint}),hints.splice(hints.indexOf(hint),1),0==hints.length&&(cb.chatNotice("There are no hints remaining!","","",bcp.black,"bold"),noHint=!0)}function shuffle(e){e.splice(e.indexOf(lucky),1);for(var t,n,i=e.length;0!==i;)n=Math.floor(Math.random()*i),i-=1,t=e[i],e[i]=e[n],e[n]=t;return e}function prizeWin(e,t){if(numbers.splice(numbers.indexOf(e),1),range=numbers.join(" ").toString(),cb.drawPanel(),prizeTips.includes(e)){var n=Math.floor(Math.random()*prizes.length),i=prizes[n];prizeTips.splice(prizeTips.indexOf(e),1),cb.chatNotice("Congratulations, "+t+", you have won "+i+"!","","",bcp.green,"bold"),0==prizeTips.length&&numbers.length>0&&("Yes"==cb.settings.clear?cb.chatNotice("All hidden prizes have been found.\nClear the remaining numbers to reach the Goal!","","","","bold"):cb.chatNotice("All hidden prizes have been found.\nFind the LUCKY NUMBER for the Grand Prize!","","","","bold"))}0==numbers.length&&"Yes"==cb.settings.clear&&(cb.chatNotice("Thanks to everyone for playing! All numbers have been cleared.\n"+cb.settings.celebrationGIF,"","",bcp.green,"bold"),cb.changeRoomSubject(cb.settings.hashtags+" "+cb.settings.topic),endGame(),cb.drawPanel())}function endGame(){gameOver=!0,cb.chatNotice("Total tokens: "+net+". Average Tokens per round: "+Math.ceil(net/resets)+". Total dollars: $"+parseFloat(.05*net).toFixed(2),cb.room_slug,"","","bold"),tempNumbers=[],hints=[],givenHints=[],"Yes"==cb.settings.allowReset&&cb.setTimeout(showResetRules,1e3)}function modNotify(){for(var e=0;e<mods.length;e++)cb.chatNotice("The lucky number was reset. The new lucky number is "+(0==lucky?"Random.":lucky),mods[e],"","","bold")}function gameReset(e,t,n){newGrndPrz(e),lucky="No"==rando?t:0;for(var i=0;i<mods.length;i++)cb.chatNotice(n+" has reset the game. The new lucky number is "+(0==lucky?"random":lucky)+" and the new goal is "+grandPrize,mods[i],"","","bold");resets++,init()}function showNumbers(){numbers.length>51&&(cb.chatNotice("\nThe Remaining Numbers are:\n"+range,"","",bcp.purple,"bold","","",bcp.blue,"bold"),cb.setTimeout(showNumbers,42e4))}function showPrize(){prizeTips.length>0&&0==gameOver&&("No"==cb.settings.clear?cb.chatNotice("\nThere are "+prizeTips.length+" prizes hidden along with the LUCKY number.","","",bcp.maroon,"bold"):cb.chatNotice("\nThere are "+prizeTips.length+" prizes hidden among all the numbers.","","",bcp.maroon,"bold"),cb.setTimeout(showPrize,36e4))}function showPrizes(e){var t=prizes.join(" "+heart+" ").toString();"Yes"==cb.settings.prize&&prizeTips.length>0?cb.chatNotice("The possible prizes are: "+heart+" "+t+" "+heart,e,"",bcp.maroon,"bold"):"Yes"==cb.settings.prize&&0==prizeTips.length?cb.chatNotice("All of the prizes have been found this round.",e,"",bcp.maroon,"bold"):"No"==cb.settings.prize&&cb.chatNotice("There are no extra prizes to find this round.",e,"",bcp.maroon,"bold")}function showHint(){hints.length>0&&"Yes"==hintSetting&&0==gameOver&&"No"==cb.settings.clear&&"No"==rando&&(cb.chatNotice("\nTip "+cb.settings.hintTip+" tokens for a HINT just for YOU to find the LUCKY number.","","",bcp.maroon,"bold"),cb.setTimeout(showHint,39e4))}function resetRules(e){"Yes"==cb.settings.allowReset&&cb.chatNotice("\nThe reset feature allows models or mods to reset the game once finished. This will reset the LUCKY number, Prize tip values, and the goal. The model will receive a message in the chat containing the new numbers and goal. Simply type '/reset x xxxx' where x is the new lucky number and xxxx is the new goal in the chat to reset the game. If you want to change the number of prizes, prizes won, or upper and lower limits you will need to deactivate the game and start again.",e,"",bcp.red,"bold")}function showResetRules(){for(i=0;i<mods.length;i++)cb.chatNotice("The reset feature is on. Type '/reset x xxxx' where x is the new number and xxxx is the new goal in the chat to reset the game. To keep the goal the same omit 'xxxx' from the reset command.",mods[i],"",bcp.red,"bold")}function ShowIntro(){if(0==gameOver){var e=getGif();"No"==cb.settings.clear?cb.chatNotice("\nTip to guess the LUCKY number from "+cb.settings.low+" to "+cb.settings.high+". Grand Prize: "+grandPrize+". "+e+"\nType /numbers to see the remaining numbers"+("Yes"==cb.settings.prize?", /prizes for available prizes,":"")+" or /rules for complete details.","","",bcp.blue,"bold"):"Yes"==cb.settings.clear&&cb.chatNotice("Clear all the numbers from "+cb.settings.low+" to "+cb.settings.high+" to reach the goal! Grand Prize for clearing all numbers: "+grandPrize+". "+e+"\nType /numbers to see the remaining numbers"+("Yes"==cb.settings.prize?", /prizes for available prizes,":"")+" or /rules for complete details.","","",bcp.blue,"bold"),cb.setTimeout(ShowIntro,48e4)}}function ShowRules(e){var t="Your job is to FIND the LUCKY number. Make your GUESS by TIPPING!\nIf you GUESS the LUCKY number your prize is: "+grandPrize,n="The Object is to CLEAR ALL numbers by tipping to reach the GRAND PRIZE! The Prize is: "+cb.settings.luckyPrize,i="\nNumbers that have NOT been tipped are shown in the panel below the video feed or by typing /numbers in the chat if there are too many to display. "+("Yes"==cb.settings.prize?"Type /prizes to see available prizes. ":"")+"Good Luck and Enjoy the Show!\n";"No"==cb.settings.clear?cb.chatNotice("The Your Lucky Guess Game:\n"+t+i,e,"",bcp.blue,"bold"):cb.chatNotice("The Your Lucky Guess Game:\n"+n+i,e,"",bcp.blue,"bold")}function newGrndPrz(e){var t=e.toString();t=t.split(" "),t=t.splice(2,t.length),grandPrize=""==t?cb.settings.luckyPrize:t.join(" ")}function getGif(){var e=parseInt(cb.settings.topicGif);switch(e){case 1:return":soppboobs1";case 2:return":soppboobs2";case 3:return":soppboobs3";case 4:return":soppboobs4";case 5:return":dkmboobs1";case 6:return""}}function init(){function e(){cb.chatNotice("I'm sorry, but this version of the game was designed for another model. If you would like to use the unrestricted version of this app, please search for 'Your Lucky Guess' in apps.",cb.room_slug,"",bcp.red,"bold"),cb.setTimeout(e,6e4)}cb.room_slug==model||cb.room_slug==dev?(gameOver=!1,getNumbers(),1==resets&&("No"==rando?lucky=cb.settings.luckyNumber:(lng=numbers.length,hintSetting="No"),grandPrize=cb.settings.luckyPrize,mods.push(cb.room_slug)),cb.changeRoomSubject(cb.settings.hashtags+" "+cb.settings.topic),"Yes"==cb.settings.prize&&(getPrizeValues(),cb.chatNotice("The prize(s) lucky numbers are: "+prizeTips+".",cb.room_slug,"","","bold")),cb.drawPanel(),cb.setTimeout(ShowIntro,1e3),cb.setTimeout(showPrize,2e3),cb.setTimeout(showHint,3e3),cb.setTimeout(showNumbers,4e3)):e()}var lucky,winner,hint,grandPrize,range,gameOver=!1,noHint=!1,rando=cb.settings.randomLucky,hintSetting=cb.settings.giveHint,net=0,resets=1,lng,numbers=[],tempNumbers=[],hints=[],givenHints=[],prizeTips=[],prizes=[],mods=[],heart="♥",kiss=":kiss",model=String.fromCharCode(112,111,105,115,111,110,101,100,95,95,104,111,110,101,121),dev=String.fromCharCode(101,114,105,107,57,49,51),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:"low",type:"int",minValue:5,maxValue:499,defaultValue:11,label:"Lower Limit"},{name:"high",type:"int",minValue:10,maxValue:500,defaultValue:45,label:"Upper Limit"},{name:"randomLucky",type:"choice",label:"Be given a random number? If 'No' you must pick the Lucky Number. You CANNOT use hints when this is 'Yes'",choice1:"Yes",choice2:"No",defaultValue:"Yes"},{name:"luckyNumber",type:"int",minValue:5,maxValue:500,label:"Lucky Number",defaultValue:22},{name:"luckyPrize",type:"str",minLength:1,maxLength:255,defaultValue:"Dress Off",label:"Grand Prize/Goal"},{name:"clear",label:"Clear all numbers for Grand Prize?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No"},{name:"giveHint",label:"Give Hints? (Only the person tipping for the hint will see and ONLY works if 'Clear all Numbers' is 'No')",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No"},{name:"hintTip",type:"int",required:!1,defaultValue:501,label:"Tip amount for hint"},{name:"topic",type:"str",minLength:1,maxLength:255,required:!1,label:"Room Topic",defaultValue:"❤ use it with intelligence and give me a happy end!!!!"},{name:"topicGif",type:"choice",label:"GIF to go with description",choice1:"1 - White Shirt",choice2:"2 - Black Jacket",choice3:"3 - Corset",choice4:"4 - Purple Shirt",choice5:"5 - Lace",choice6:"6 - None",defaultValue:"1 - White Shirt"},{name:"hashtags",type:"str",minLength:1,maxLength:255,required:!1,label:"Hashtags for your topic",defaultValue:"#lovense # lush #ohmibod"},{name:"celebrationGIF",type:"str",minLength:1,maxLength:255,required:!1,label:"GIF For Winner/Cleared Numbers",defaultValue:":congratulationslove"},{name:"prize",label:"Play with extra prizes?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No"},{name:"prizeCount",type:"int",minValue:0,maxValue:20,required:!1,label:"How many prizes not including Grand Prize? (Max of 20)",defaultValue:0},{name:"prizeList",type:"str",minLength:0,maxLength:255,required:!1,label:"Prizes to be found? (Seperate each with a ',' and no spaces. Can be as many as you desire)",defaultValue:"a kiss,boob flash,a smile,my finger"},{name:"allowReset",label:"Allow Game to be Reset (use '/reset' in chat)?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No"}],cb.onDrawPanel(function(e){if(1==gameOver){if("Yes"==cb.settings.clear)return{template:"3_rows_11_21_31",row1_value:"All Numbers have been CLEARED!",row2_value:"Your prize is: "+grandPrize,row3_value:heart+" Thank you all for playing! "+heart};if("No"==cb.settings.clear)return{template:"3_rows_11_21_31",row1_value:winner+" has guessed the LUCKY number!",row2_value:"Your Grand Prize is: "+grandPrize,row3_value:heart+" Thank you all for playing! "+heart}}else if(0==gameOver){if("No"==cb.settings.clear)var t="GUESS The LUCKY Number From Below:";else if("Yes"==cb.settings.clear)var t="CLEAR all the numbers Below:";return numbers.length<=51?{template:"3_rows_11_21_31",row1_value:t,row2_value:range,row3_value:""}:{template:"3_rows_11_21_31",row1_value:t,row2_value:"Numbers Remaining: "+numbers.length,row3_value:"Type /numbers to see the remaining numbers."}}}),cb.onTip(function(e){var t=parseInt(e.amount),n=e.from_user;net+=t,0==gameOver&&("Yes"!=rando||0!=lucky&&!isNaN(lucky)||numbers.length<=.2*lng&&(lucky=numbers[Math.floor(Math.random()*numbers.length)]),t==lucky&&numbers.includes(lucky)&&("No"==cb.settings.clear?(cb.changeRoomSubject(cb.settings.hashtags+" "+cb.settings.topic),winner=n,cb.chatNotice("Congratulations, "+winner+", you have found the LUCKY number!\nYour Grand Prize is "+grandPrize+".\n"+cb.settings.celebrationGIF,"","",bcp.green,"bold"),endGame(),numbers=[],cb.drawPanel()):"Yes"==cb.settings.clear&&prizeWin(t,n)),numbers.includes(t)&&numbers.length>=1&&("Yes"==cb.settings.prize&&prizeTips.includes(t)?prizeWin(t,n):("No"==cb.settings.prize?"No"==cb.settings.clear&&cb.chatNotice("That's not the LUCKY number. Guess Again!","","",bcp.red,"bold"):"Yes"==cb.settings.prize&&(prizeTips.length>0?cb.chatNotice("That's not a LUCKY number. Guess Again!","","",bcp.red,"bold"):numbers.length-1>1?cb.chatNotice("Only "+(numbers.length-1)+" more numbers left to clear!","","","","bold"):numbers.length-1==1&&cb.chatNotice("Only "+(numbers.length-1)+" more number left to clear!","","","","bold")),prizeWin(t,n))),t==cb.settings.hintTip&&"Yes"==hintSetting&&"No"==cb.settings.clear&&(0==noHint?(getHint(),givenHints.push(hint),cb.chatNotice(n+" has tipped for a HINT to find the LUCKY number!"),hint>lucky?cb.chatNotice("Your PERSONAL hint is: The Lucky Number is LESS than "+hint,n,"",bcp.black,"bold"):cb.chatNotice("Your PERSONAL hint is: The Lucky Number is GREATER than "+hint,n,"",bcp.black,"bold")):cb.chatNotice("Thank you for your tip, but there are no hints remaining. "+kiss,n,"",bcp.black,"bold")))}),cb.onMessage(function(e){var t=e.user,n=e.m.split(" ");if("/"==e.m.substring(0,1)){if(e["X-Spam"]=!0,"/resethelp"==e.m&&(t==cb.room_slug||e.is_mod||t==dev)&&resetRules(t),"/reset"==e.m.substring(0,6)&&(t==cb.room_slug||e.is_mod||t==dev)){"Yes"==cb.settings.allowReset&&(cb.settings.low>n[1]||cb.settings.high<n[1])&&cb.chatNotice("You must pick a new Lucky Number that is between "+cb.settings.low+" and "+cb.settings.high+".\nPlease try again using the '/reset x xxxx' command where x is the new Lucky Number and xxxx is the new goal.",t,"",bcp.red,"bold");for(var i=cb.settings.low;i<=cb.settings.high;i++)n[1]==i&&(0==gameOver?"No"==rando?-1==numbers.indexOf(i)||lucky==i?cb.chatNotice("You must pick a new Lucky Number that has not been guessed already!",t,"",bcp.red,"bold"):(lucky=i,modNotify()):cb.chatNotice("The game cannot be reset while random number is active.",t,"",bcp.red,"bold"):1==gameOver&&("No"==cb.settings.clear?gameReset(e.m,i,t):"Yes"==cb.settings.clear&&(cb.chatNotice("The game has been reset.",cb.room_slug,"",bcp.red,"bold"),lucky=i,resets++,init())))}if("/random"==e.m.substring(0,7)&&(t==cb.room_slug||e.is_mod||t==dev)){e["X-Spam"]=!0;var n=e.m.split(" ");n=n[1].toLowerCase(),"on"==n?"Yes"==rando?cb.chatNotice("Random number is already active.",t,"",bcp.red,"bold"):(rando="Yes",lucky=0,cb.chatNotice("Random number is active.",t,"",bcp.red,"bold"),hintSetting="No",cb.chatNotice("I'm sorry, but there are no more hints.","","",bcp.maroon,"bold")):"No"==rando?cb.chatNotice("Random number is not active.",t,"",bcp.red,"bold"):(rando="No",lucky=numbers[Math.floor(Math.random()*numbers.length)],modNotify(),hintSetting="Yes",showHint())}("/numbers"==e.m||"/number"==e.m||"/n"==e.m)&&(t==cb.room_slug||e.is_mod||t==dev?(e.m=e.m+" (Remainging numbers sent to everyone.)",cb.chatNotice("The Remaining Numbers are:\n"+range,"","",bcp.purple,"bold")):cb.chatNotice("The Remaining Numbers are:\n"+range,t,"",bcp.purple,"bold")),"/prizes"==e.m&&showPrizes(t),"/rules"==e.m&&ShowRules(t)}else if("/"!=e.m.substring(0,1))for(var r=0;r<n.length;r++)if(-1==n[r].indexOf(":"))if(0!=n[r]&&n[r]==lucky)e.c=bcp.red,e.m="I was caught cheating! :sopp10";else for(var i=0;i<=givenHints.length;i++)n[r]==givenHints[i]&&(e.c=bcp.red,e.m="I was caught cheating! :sopp10");return e}),cb.onEnter(function(e){if(e.is_mod||e.user==cb.room_slug){var t="";mods.push(e.user),"Yes"==cb.settings.allowReset?t="The reset feature is active. Type /resethelp for instructions. The Current Lucky Number is: "+(isNaN(lucky)||0==lucky?"Random":lucky)+".":"",t+=("Yes"==cb.settings.allowReset?"\n":"")+("Yes"==rando?"The random number function is active. Type '/random off' to disable.":"The random number function is not active. Type '/random on' to enable."),cb.chatNotice(t,e.user,"",bcp.red,"bold")}}),cb.onLeave(function(e){(e.is_mod||e.user==cb.room_slug)&&mods.includes(e.user)&&mods.splice(mods.indexOf(e.user),1)}),init();
© Copyright Freesexcam 2011- 2024. All Rights Reserved.