lotoinna
Author: inna666
Description Source Code Launch Bot Current Users

Short Description:

inna

Full Description

// startof CBSv2 module - not for re-compilation
(function(a,k){function h(a){this.message=a}h.prototype=Error();h.prototype.name="InvalidCharacterError";a.btoa||(a.btoa=function(a){a=String(a);for(var g,b,p=0,c=k,r="";a.charAt(p|0)||(c="=",p%1);r+=c.charAt(63&g>>8-p%1*8)){b=a.charCodeAt(p+=.75);if(255>(-2*g&6)):0)p=k.indexOf(p);return r})})("undefined"===typeof exports?this:exports,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");
(function(a){var k=cb.onMessage,h=null,r=null,g,b="#"+(cb.settings.hasOwnProperty("slot")?cb.settings.slot:"")+"CBSv2",p=/^\/#[0-3]CBSv2\//;cb.log("CBS::v2::CB app/bot data Save/restore::20170118.008::Release");cb.onMessage=function(c){if("function"!==typeof c)throw new TypeError(c+" is not a function");k(function(k){var d=k.m.replace(/\s*/g,"").split("/"),n,t;312){return false}for(var b=0,a=aCombinacion.length;b0){b=[]}f=combinacion(c,b);a.push(f)}return a}function parseCombinacion(c){var e="",b=[];var d,a=c.indexOf("[");if(a>-1){d=c.indexOf("]",a+7);if(d>-1){e=c.substring(a+1,d);b=e.split(",")}}return b}function sortear(){reparto();var a="";do{a=combGana()}while(!checkBoletos());nfoLast.push("Winning luck numbers: "+a);nfoLast.push("Bets of hits "+modo+": "+nPrimera+" to "+reparto1+" \xa0 of "+(modo-1)+": "+nSegunda+" to "+reparto2+" "+simbV+" Quinarii");innPurses();lstAfortunados()}function reparto(){var a=Math.floor(aBoletos.length*perprizes/100);tpremios=a+nBote;premios1=Math.floor(tpremios*per1stcat/100);premios2=Math.floor(tpremios*(100-per1stcat)/100);var b=nBote?" + Bote: "+nBote:"";nfoLast.push("Draw "+(new Date()).toLocaleString());nfoLast.push("Bets sold: "+aBoletos.length+" \xa0 For prizes "+perprizes+"%: "+a+b+" Total: "+tpremios);nfoLast.push("For full hit "+per1stcat+"%: "+premios1+" \xa0 for 2nd cat. "+(100-per1stcat)+"%: "+premios2)}function combGana(){combGanadora=[];var a=[],b;for(var c=0;c9){noticePlayBets(d,a,true)}else{noticePlayBets(d,a)}});cb.onMessage(function(c){var g=c.user;var e=c.m.trim().split(/\s+/g);if(e[0].charAt(0)=="/"){c["X-Spam"]=true;if(e[0]==="/handshake"){var p='"loto" bot';if(g!=cb.room_slug&&!c.is_mod){return c}if(e.length>1){e.splice(0,1);var f=e.join(" ");if(f==p){return c}if(f.substr(0,19)=="Dice Roll Game nice"){pricedrgn=parseInt(f.substr(19),10);var n=" >>price "+pricedrgn;cb.log(p+" ACK handshake from "+f.substr(0,19)+n);c.m=">> Dice game"+n;return c}else{if(f=="Rotating Notifier n Tip Menu"){isRNTM=true;cb.log(p+" ACK handshake from "+f);c.m=">> Rotating n Tip Menu >>present";return c}}cb.log(p+" ACK handshake from "+f+" but does nothing.")}return c}if(g==cb.room_slug||c.is_mod){switch(e[0]){case"/adgame":noticeGame();break;case"/notice":if(e.length<2){break}e.splice(0,1);var h=e.join(" ").replace(/\\n/g,"\n").replace(//g,"\n");cb.sendNotice(h,"","",colnotice,"bold");c.m="notice =>";break;case"/betsold":if(estado==="closed"){noticeClosed(g);break}noticeBetsSold(g);break;case"/chmode":if(g===cb.room_slug&&estado==="closed"){if(e.length<2){break}var d=parseInt(e[1],10);if(d!=5&&d!=4){break}modo=d;c.m+=" Ok"}break;case"/chperprzs":if(g===cb.room_slug&&estado==="closed"){if(e.length<2){break}var d=parseInt(e[1],10);if(isNaN(d)||d<50||d>100){break}perprizes=d;c.m+=" Ok"}break;case"/chper1cat":if(g===cb.room_slug&&estado==="closed"){if(e.length<2){break}var d=parseInt(e[1],10);if(isNaN(d)||d<35||d>50){break}per1stcat=d;c.m+=" Ok"}break;case"/open":if(g===cb.room_slug&&estado==="closed"){aBoletos=[];estado="open";noticeOpen()}break;case"/raffle":if(g===cb.room_slug&&estado==="open"){if(aBoletos.length> for "+l+' error play "loto" '+m+" bets.","",fluorlima,colnotice,bold);if(b.length>9){noticePlayBets(l,b,true)}else{noticePlayBets(l,b)}break;case"/ver":if(g==cb.room_slug||g=="cacho_gordo"){cb.sendNotice(version.join("\n"),g,"",micolor)}break;default:}}switch(e[0]){case"/loto":cb.setTimeout(function(){lotoHead(g);lotoGame(g)},1000);break;case"/lhelp":var k=(g==cb.room_slug||c.is_mod);if(e.length<2){cb.sendNotice(helpNotice(k),g,"",micolor)}else{cb.sendNotice(helpNotice(k,e[1]),g,"",micolor)}break;case"/status":noticeStatus(g);break;case"/buybets":if(e.length<2){break}if(estado==="closed"){noticeClosed(g);break}var m=purseBuy(g,e[1]);if(!m){break}var a=[];if(e.length>2){a=parseCombinacion(e[2])}var b=crearApuestas(g,m,a);cb.sendNotice(g+' spend for play "loto" '+m+" bets.","",fluorlima,colnotice,bold);if(b.length>9){noticePlayBets(g,b,true)}else{noticePlayBets(g,b)}break;case"/mybets":if(estado==="closed"){noticeClosed(g);break}var b=misBoletos(g);if(!b.length){cb.sendNotice("You do not even have a bet!",g,"",micolor,"bold");noticeBuyBets(g)}else{noticePlayBets(g,b)}break;case"/lastraffle":if(nfoLast.length){var i=g;if(g==cb.room_slug){i=""}cb.sendNotice(nfoLast.join("\n"),i,"",micolor,bold)}break;case"/myluck":if(!myLuck(g)){cb.sendNotice("You have not had any luck. Did you bet?",g,"",micolor,"bold")}break;case"/mypurse":if(!myPurse(g)){cb.sendNotice("You do not even have a "+simbV+" Quinarius!",g,"",micolor,"bold")}break;case"/spend":if(e.length<2){break}var j=purseSpend(g,e[1]);if(!j){break}cb.sendNotice("Have been subtracted from purse "+simbV+" "+j+" Quinarii!",g,"",micolor,"bold");break;case"/menu":noticeMenu(g);break;default:}return c}return c});cb.onEnter(function(a){if(a.user==cb.room_slug||!a.has_tokens){return}cb.sendNotice("Welcome, "+a.user+'! Try luck in the "loto" game,\nit\'s simple, buy bets!',a.user,"",micolor,"bolder");myPurse(a.user);noticeGame(a.user)});function misBoletos(d){var a=[],c=[],f="";for(var e=0,b=aBoletos.length;ed){cb.sendNotice("Sorry, you only have "+simbV+" "+d+" Quinarii!",b,"",micolor,"bold");return 0}aPurses[c][1]-=a;if(a==d){aPurses.splice(c,1)}return a}function purseSpend(c,g){var b=parseInt(g);if(isNaN(b)||!b){return 0}var e=getIndPurse(c);if(e<0){cb.sendNotice("You do not even have a "+simbV+" Quinarius!",c,"",micolor,"bold");return 0}var f=aPurses[e][1];if(b>f){cb.sendNotice("Sorry, you only have "+simbV+" "+f+" Quinarii!",c,"",micolor,bold);return 0}if(bb){break}}d--;cb.sendNotice(c+" /spend for "+aOffers[d][1],"",colhast,colnotice,bold);b=aOffers[d][0];aPurses[e][1]-=b;if(b==f){aPurses.splice(e,1)}return b}function cargaSettings(){modo=parseInt(cb.settings.selmodo);perprizes=parseInt(cb.settings.perprizes);per1stcat=parseInt(cb.settings.per1stcat);adTimer=cb.settings.adTimer;menuTimer=cb.settings.menuTimer;cargaOffers()}function cargaOffers(){var a="",c=[];var e,b;for(var d=0;d0.6){lotoGame(a);e=true}var c="",b="";var d="";if(estado==="open"&&aBoletos.length){c=". Sold "+aBoletos.length+" bets"}if(nBote){b=". Bote: "+simbV+" "+nBote+" Quinarii"}d+=eloto+" Hit the "+modo+" numbers (1-12) from the draw.\nThe state is "+estado+c+b;if(estado==="open"){d+="\nFor prizes "+perprizes+"% \xa0 For full hit "+per1stcat+"%"}cb.sendNotice(d,a,"",colslug,"bolder");if(!e&&(estado==="open"||Math.random()>0.7)){if(a==""){cb.setTimeout(noticeBuyBets,3000)}else{noticeBuyBets(a)}}}function lotoGame(a){if(!a||a==cb.room_slug){a=""}cb.sendNotice(eloto+" Hit the "+modo+" numbers (1-12) from the draw. One less also has prize.\nPrice of 'bet' 1 Quinarius = 5 tokens. The prizes are in quinarii, and the lucky ones will receive them in their 'purses'.\nSee commands with /lhelp to get detailed information.",a,"",micolor,"bolder");if(a==""){cb.setTimeout(noticeBuyBets,3000)}else{noticeBuyBets(a)}}function noticeMenu(b){if(!b||b==cb.room_slug){b=""}var d='Menu "loto" '+aquinario+" Quinarius offers\n";for(var c=0,a=aOffers.length;c0?(" \xa0"+BAR_TOT+" \xa0"):"")+aOffers[c][1]+" "+simbV+" "+aOffers[c][0]}d+="\n Use /spend num ,, num available in your 'purse', for price offer equal or less.";cb.sendNotice(d,b,"",colnotice,bolder)}function adSpam(){cb.setTimeout(adSpamTimer,adTimer*60000)}function adSpamTimer(){noticeGame();adSpam()}function menuSpam(){cb.setTimeout(menuSpamTimer,menuTimer*60000)}function menuSpamTimer(){noticeMenu();menuSpam()}function noticeClosed(a){if(!a){a=""}cb.sendNotice("The game is still not open. Sorry.\nStay tuned to Notices or check with command /status",a,"",colslug,"bold")}function noticePlayBets(b,a,c){var e="["+a.join("] [")+"]";var d="You play with the following "+a.length+" bet(s), good luck!\n";if(c){d+=e.substr(0,125)+" ...\nType /mybets to see all, these and the previous ones."}else{d+=e}d+="\nYou do not need to copy them, the app will check your successes after the raffle and you will be notified.\n Later you can consult /myluck and /lastraffle also and /mypurse.";cb.sendNotice(d,b,"",micolor,bolder)}function noticeBuyBets(a){cb.sendNotice("Tip multiple of 5 to buy 'bets' with \"loto\" (typed quotes included) in the tip note,\noptional numbers list for one or first 'bet' (rest, or if error, random) [1, 2, 3, 4], 5] (square brackets included), or type in chat /tip qty \"loto\" [1, 2, 3, 4], 5]\nIf you have "+simbV+" Quinarii in your 'purse' you can then also use the /buybets command.",a,"",colslug,"bold");noticeStatus(a)}function noticeOpen(){noticeStatus();cb.sendNotice('Starts the game of "loto" '+efvjeux+"\nLet luck be with you.\nBegin to make their combinations.","","",colnotice,bold);noticeBuyBets()}function noticeBetsSold(b){var c=modo==5?400:250;var a=modo==5?800:500;cb.sendNotice("Bets sold: "+aBoletos.length+" \xa0 - Minimun for raffle: "+c+"\nRecommended: "+a,b,"",micolor,bold);return c}function noticeStatus(a){if(!a||a==cb.room_slug){a=""}cb.sendNotice('The state of "loto" game is '+estado,a,"",micolor,bold)}var ahelp0=[' * * * "loto" · H E L P · * * *'," * * * ·created by cacho_gordo * * *","Hit the 5/4 numbers (1-12) from the draw. One less also has prize.","Price of 'bet' 1 Quinarius = 5 tokens.","Tip multiple of 5 to buy 'bets' with \"loto\" (typed quotes included) in the tip note,","optional combination for one or first bet (rest random) [1, 2, 3, 4], 5] (square brackets included)"," Commands you can use:"];var ahelp1=["/status - show state of game - private","/loto - game description - private","/buybets num [1,2,3,4],5] - buy num bets purse pay, optional combination - private","/mybets - show your bets - private","/lastraffle - info of latest raffle - private","/myluck - show your recent prizes won - private","/mypurse - how many Quinarii you have - private",'/spend num - spend num Quinarii for a "loto" menu offer - private','/menu - show "loto" menu - private',"/lhelp [command] - this commands list [info of one of them] - private",""];var ahelp2=["/adgame - ad notice game, bets sold and bote - broadcaster and mods","/notice notice text - allows more than 3 graphics and multiline, new line - broadcaster and mods","/betsold - how many bets sold and minimum to raffle - broadcaster and mods","/chmode 5/4 - change the way bet if 'closed' - broadcaster only","/chperprzs num - change percent for prizes if 'closed' - broadcaster only","/chper1cat num - change percent for max. hits, if 'closed' - broadcaster only","/open - start game betting opens, if 'closed' - broadcaster only","/raffle - throw the draw, if 'open' - broadcaster only","/forerror user num - num tokens for user error, if 'open' - broadcaster only","/ver - current version - private - use broadcaster and developer ( if mod ).",""];function helpNotice(a,b){var c="";if(!b||b==""){c=ahelp0.join("\n")+"\n";if(a){c+=ahelp2.join("\n")+"\n"}c+=ahelp1.join("\n")}else{switch(b){case"status":return[" * Help status command *","/status - show state of game - private","Show private Notice of te state of de game: open, closed o in draw."].join("\n");break;case"loto":return[" * Help loto commad *","/loto - game description - private","Show private Notice: Way game play."].join("\n");break;case"buybets":return[" * Help buybets command *","/buybets num [1,2,3,4],5] - buy num bets with 'purse' pay, optional combination numbers ","list from 1 to 12, for one or first bet (rest random) [1, 2, 3, 4], 5] (square brackets included)."].join("\n");break;case"mybets":return[" * Help mybets command *","/mybets - show your bets - private","Show the list, private Notice:, of bets you play."].join("\n");break;case"lastraffle":return[" * Help lastraffle command *","/lastraffle - info of latest raffle - private","Show all info of de last raffle released."].join("\n");break;case"myluck":return[" * Help myluck command *","/myluck - show your recent prizes won - private","Show you have won in the last raffle."].join("\n");break;case"mypurse":return[" * Help mypurse command *","/mypurse - how many Quinarii you have - private","Sow how many Quinarii in your purse.","See the Menu Quinarius /menu command for /spend.","also /buybets to buy bets again for next raffle."].join("\n");break;case"spend":return[" * Help spend command *",'/spend num - spend num Quinarii for a "loto" menu offer',"num available in your 'purse', for price offer equal or less."].join("\n");break;case"menu":return[" * Help menu command *",'/menu - show "loto" menu - private','Show the Menu "loto" Quinarius offers same as the ad.'].join("\n");break;case"adgame":if(a){return[" * Help adgame command *","/adgame - ad notice game, bets sold and bote",'Show "loto" game same as the ad.',"Only use of the broadcaster and mods."].join("\n")}break;case"notice":if(a){return[" * Help notice command *","/notice notice text - Show Notice: text and graphics","As notice allows more than 3 graphics and multiline,","Multiline separator - new line","Only use of the broadcaster and mods."].join("\n")}break;case"betsold":if(a){return[" * Help betsold command *","/betsold - how many bets sold and minimum to raffle","Minimum and recommended to raffle.","Only use of the broadcaster and mods."].join("\n")}break;case"chmode":if(a){return[" * Help chmode command *","/chmode 5/4 - change the way bet, if 'closed'","Mode to play with bets of 5 or 4 numbers draw.","Only use of the broadcaster."].join("\n")}break;case"chperprzs":if(a){return[" * Help chperprzs command *","/chperprzs num - change the percent for prizes, if 'closed'","Percentage for prizes (50-100),","if 100% you only get the rounds of the deal.","Only use of the broadcaster."].join("\n")}break;case"chper1cat":if(a){return[" * Help chper1cat command *","/chper1cat num - change the percent for max. hits, if 'closed'","Percentage for the maximum category (35-50).","Only use of the broadcaster."].join("\n")}break;case"open":if(a){return[" * Help open command *","/open - start game betting opens, if 'closed'","Faites vos jeux. Make game gentlemen.","Only use of the broadcaster."].join("\n")}break;case"raffle":if(a){return[" * Help raffle command *","/raffle - throw the draw, if 'open'","Winning numbers. Deposit prizes for the lucky ones.","And show all information of the raffle.","Only use of the broadcaster."].join("\n")}break;case"forerror":if(a){return[" * Help forerror command *","/forerror user num - num tokens for user error, if 'open'",'For user error on tip for "loto". num same tip tokens.',"Check before that tip to see the tokens.","Only use of the broadcaster."].join("\n")}break;case"ver":if(a){return[" * Help ver command *","/ver - Show software current version for developer info.","Only use of the broadcaster and developer (if mod) - private."].join("\n")}break;default:}}return c}init();

© Copyright Chaturbate 2011- 2026. All Rights Reserved.