Bots Home
|
Create an App
"loto" bot
Author:
cacho_gordo
Description
Source Code
Launch Bot
Current Users
Created by:
Cacho_Gordo
// 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<b)throw new h('"btoa" failed: The string to be encoded contains characters outside of the Latin1 range.');g=g<<8|b}return r});a.atob||(a.atob=function(a){a=String(a).replace(/=+$/,"");if(1==a.length%4)throw new h('"atob" failed: The string to be decoded is not correctly encoded.'); for(var g=0,b,p,c=0,r="";p=a.charAt(c++);~p&&(b=g%4?64*b+p:p,g++%4)?r+=String.fromCharCode(255&b>>(-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;3<d.length&&""===d[0]&&d[1]===b?(h&&r&&k.user===cb.room_slug&&(n=d[2],4===d.length?(d[3]="?",k.m=d.join("/")):6===d.length?((g||{}).hasOwnProperty(n)|| (t=h(),g={},g[n]=a.btoa(a.unescape(a.encodeURIComponent(t))),t||cb.log("onSave returned no data.")),g.hasOwnProperty(n)&&(t=parseInt(d[3],10),n=g[n].slice(t,t+512),d[4]=n,d[5]=n.length,k.m=d.join("/"))):7===d.length&&("0"===d[3]&&(g={},g[n]=""),g.hasOwnProperty(n)&&(d[3]=g[n].length,d[6]=d[4].length,k.m=d.join("/"),d[4]?g[n]+=d[4]:(t=a.decodeURIComponent(a.escape(a.atob(g[n]))),r(t),cb.chatNotice("Previously Saved Data Restored.",cb.room_slug))))),k["X-Spam"]=!0):p.test(k.m)&&(k["X-Spam"]=!0);return c(k)}); return c};cb.onRestore=function(a){if("function"!==typeof a)throw new TypeError(a+" is not a function");return r=a};cb.onSave=function(a){if("function"!==typeof a)throw new TypeError(a+" is not a function");return h=a};cb.onMessage(function(a){return a})})("undefined"===typeof exports?this:exports); // endof CBSv2 module - not for re-compilation /*****************************\ loto bot (c)2017 (15/07/17) Author: cacho_gordo Version: v1.1 (5/08/2017) \*****************************/ "use strict";const version=['"loto" bot (c)2017 (15/07/17)',"Version: v1.1 (5/08/2017)","Author: cacho_gordo (cachotest)"];cb.settings_choices=[{name:"selmodo",label:"Way bet, how many numbers:",type:"choice",choice1:"5",choice2:"4",defaultValue:"5"},{name:"perprizes",label:"Percent for prizes (50-100):",type:"int",minValue:50,maxValue:100,defaultValue:60},{name:"per1stcat",label:"Percent to hit all (35-50):",type:"int",minValue:35,maxValue:50,defaultValue:50},{name:"adTimer",label:"Ad of Game for interval (mins):",type:"int",minValue:1,maxValue:20,defaultValue:6},{name:"menuTimer",label:"Menu Quinarius interval (mins):",type:"int",minValue:1,maxValue:30,defaultValue:9},{name:"menu_1",label:"Offer 1 in Quinarii price (eg: 5-Flash Tits)",type:"str",minLength:4,maxLength:50,required:true},{name:"menu_2",label:"Offer 2",type:"str",minLength:4,maxLength:50,required:true},{name:"menu_3",label:"Offer 3",type:"str",minLength:4,maxLength:50,required:false},{name:"menu_4",label:"Offer 4",type:"str",minLength:4,maxLength:50,required:false},{name:"menu_5",label:"Offer 5",type:"str",minLength:4,maxLength:50,required:false},{name:"menu_6",label:"Offer 6",type:"str",minLength:4,maxLength:50,required:false},{name:"menu_7",label:"Offer 7",type:"str",minLength:4,maxLength:50,required:false},{name:"menu_8",label:"Offer 8",type:"str",minLength:4,maxLength:50,required:false},{name:"menu_9",label:"Offer 9",type:"str",minLength:4,maxLength:50,required:false}];const MAX_TOP=50,NUM_OFFERS=9;const quinarioV=":emoM-quinariov-cacho",emoSimbV=":icon-quinariov-cacho",simbV=":icomin-quinariov-cacho",aquinario=":aniM-quinario-cacho",eloto=":emo-loto-cacho",alotoquin=":ani-lotoquinario-cacho",eraffle=":emo-raffle-cacho",ernvplus=":rnvplus-cacho",efvjeux=":fvjeux-cacho";var PIKE="\u2660",CLOVER="\u2663",HEART="\u2665",DIAMOND="\u2666",BSTAR="\u2605",BULLET="\u2022";var bullets=" \u2022 \u2022 \u2022 ",nbsp="\xa0";var BAR_TOT="\u2502";const purple="#B369B3",navy="#000080",red="#F00",green="#0F0",blue="#00F",yellow="#FFFF00",fluorlima="#CCFF00",white="#FFFFFF",backg="#89CFEF",colhast="#00FFFF",coltrec="#0000FF",colalot="#DDBBCC",coltons="#993377",colfan="#008000",colmods="#DC5500",colslug="#F04500",colnotice="#B22222",micolor="#2991f8";const bold="bold",bolder="bolder";var initialize=false,adTimer=6,menuTimer=9,aOffers=[],aCombinacion=[],combGanadora=[],tpremios=0,premios1=0,premios2=0,nPrimera=0,nSegunda=0,reparto1=0,reparto2=0,aFortunados=[];var perprizes=60,per1stcat=50,nBote=0,modo=5,estado="closed",aPurses=[],aBoletos=[],nfoLast=[],pricedrgn=0,isRNTM=false;cb.onSave(function(){var a={modo:modo,perprizes:perprizes,per1stcat:per1stcat,nBote:nBote,aBoletos:aBoletos,aPurses:aPurses,nfoLast:nfoLast,estado:estado,pricedrgn:pricedrgn,isRNTM:isRNTM};return JSON.stringify(a)});cb.onRestore(function(b){var a=JSON.parse(b);Object.keys(a).forEach(function(c){if(this.hasOwnProperty(c)){this[c]=a[c]}});if(!a||a===""||estado==="closed"){cargaSettings()}});function combinacion(c,b){aCombinacion=[];if(b&&b.length===modo){for(var a=0,d=0;a<modo;a++){d=parseInt(b[a],10);if(isNaN(d)){break}if(!noRepeValido(d)){break}aCombinacion.push(d)}if(a<modo){aCombinacion=[]}}if(!aCombinacion.length){combAzar()}aCombinacion.sort(function(f,e){return f-e});aBoletos.push([c,aCombinacion,0]);return aCombinacion.join(", ")}function noRepeValido(c){if(c<1||c>12){return false}for(var b=0,a=aCombinacion.length;b<a;b++){if(aCombinacion[b]===c){return false}}return true}function combAzar(){var c;for(var d=0;d<modo;d++){c=Math.floor(Math.random()*12)+1;for(var b=0,a=aCombinacion.length;b<a;b++){if(aCombinacion[b]===c){break}}if(b==a){aCombinacion.push(c)}else{--d}}}function crearApuestas(c,e,b){var a=[],f="";for(var d=0;d<e;d++){if(d>0){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;c<modo;c++){b=Math.floor(Math.random()*12)+1;if(combGanadora[b]!=b){combGanadora[b]=b;a.push(b)}else{--c}}return a.join(", ")}function checkBoletos(){nPrimera=0;nSegunda=0;var a,d,f=[];for(var e=0,b=aBoletos.length;e<b;e++){f=aBoletos[e][1];a=0;for(var c=0;c<modo;c++){d=f[c];if(d==combGanadora[d]){a++}}aBoletos[e][2]=a;if(a==modo){nPrimera++}else{if(a==modo-1){nSegunda++}}}reparto1=nPrimera?Math.floor(premios1/nPrimera):"bote";reparto2=nSegunda?Math.floor(premios2/nSegunda):"bote";if(!nSegunda){cb.log("Caso raro, se repite sorteo!");return false}nBote=0;if(!nPrimera){nBote=premios1}return true}function innPurses(){for(var b=0,a=aBoletos.length;b<a;b++){if(aBoletos[b][2]==modo){addPurse(aBoletos[b][0],reparto1);addAfortunado(aBoletos[b][0],reparto1)}else{if(aBoletos[b][2]==modo-1){addPurse(aBoletos[b][0],reparto2);addAfortunado(aBoletos[b][0],reparto2)}}}}function addPurse(c,b){for(var d=0,a=aPurses.length;d<a;d++){if(aPurses[d][0]===c){aPurses[d][1]+=b;return}}aPurses.push([c,b])}function addAfortunado(c,b){for(var d=0,a=aFortunados.length;d<a;d++){if(aFortunados[d][0]===c){aFortunados[d][1]+=b;return}}aFortunados.push([c,b])}function lstAfortunados(){var c;for(var b=0,a=aFortunados.length;b<a;b++){name=aFortunados[b][0];c=hasPurse(name);cb.sendNotice(name+", you've won "+simbV+" "+aFortunados[b][1]+"\n you have total in your purse "+c+" Quinarii",name,fluorlima,coltons,"bold")}}cb.onTip(function(f){var d=f.from_user,c=parseInt(f.amount),g=f.message;if(c<5||g.indexOf('"loto"')<0&&g.indexOf("'loto'")<0&&g.indexOf("`loto`")<0){return}if(estado==="closed"){cb.sendNotice('Thanks! "loto" is still not open.',cb.room_slug,colslug,yellow,bold);noticeClosed(d);cb.sendNotice("Thanks for tipping!",d,colslug,white,bold);return}if(c==pricedrgn){cb.sendNotice(d+" tipped same price Dices game, should not give the prize.",cb.room_slug,colslug,yellow,bold)}if(isRNTM){cb.sendNotice(d+" tipped with Tip Menu, check no offer.",cb.room_slug,colslug,yellow,bold)}var b=parseCombinacion(g);var e=Math.floor(c/5);var a=0;if(e){a=crearApuestas(d,e,b)}else{return}cb.sendNotice(d+' tip for play "loto" '+e+" bets.","",yellow,colnotice,bold);if(a.length>9){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(/<cr>/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<noticeBetsSold(g)){break}headSorteo();aFortunados=[];nfoLast=[];estado="in draw";cb.setTimeout(function(){sortear();cb.sendNotice(nfoLast.join("\n"),"","",micolor,bold);estado="closed";noticeStatus()},3000)}break;case"/forerror":if(g!==cb.room_slug||e.length<3){break}if(estado==="closed"){noticeClosed(g);break}var o=parseInt(e[2],10);if(isNaN(o)||!o){break}var l=e[1].trim();var m=Math.floor(o/5);var b=[];if(m){b=crearApuestas(l,m,[])}else{break}cb.sendNotice(">> 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;e<b;e++){if(aBoletos[e][0]===d){c=aBoletos[e][1];f=c.join(", ");a.push(f)}}return a}function myLuck(a){var b=hasLuck(a);if(b){cb.sendNotice("You have won "+simbV+" "+b+" Quinarii in the last raffle. See your purse Quinarii /mypurse command.",a,"",micolor,"bold")}return b}function hasLuck(b){for(var c=0,a=aFortunados.length;c<a;c++){if(aFortunados[c][0]===b){return aFortunados[c][1]}}return 0}function hasPurse(b){for(var c=0,a=aPurses.length;c<a;c++){if(aPurses[c][0]===b){return aPurses[c][1]}}return 0}function getIndPurse(b){for(var c=0,a=aPurses.length;c<a;c++){if(aPurses[c][0]===b){return c}}return -1}function myPurse(a){var b=hasPurse(a);if(b){cb.sendNotice("You have "+simbV+" "+b+" Quinarii in your purse. See the Menu Quinarius /menu command.",a,"",micolor,"bold")}return b}function purseBuy(b,e){var a=parseInt(e);if(isNaN(a)||!a){return 0}var c=getIndPurse(b);if(c<0){cb.sendNotice("You do not even have a "+simbV+" Quinarius!",b,"",micolor,"bold");return 0}var d=aPurses[c][1];if(a>d){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(b<aOffers[0][0]){cb.sendNotice("Are not enough "+simbV+" Quinarii to opt for something",c,"",micolor,bold);return 0}for(var d=1,a=aOffers.length;d<a;d++){if(aOffers[d][0]>b){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;d<NUM_OFFERS;d++){a=cb.settings["menu_"+(1+d)];if(!a||a==""){continue}c=a.split("-");if(c.length<2){continue}e=parseInt(c[0],10);if(isNaN(e)||!e){continue}c.splice(0,1);b=c.join("-").trim();aOffers.push([e,b])}aOffers.sort(function(g,f){return g[0]-f[0]})}function init(){cargaSettings();cb.sendNotice();cb.sendNotice("********************************","","",navy,"bold");cb.sendNotice(nbsp+" "+version[0],"","",navy,"bold");cb.sendNotice(nbsp+" "+version[1],"","",navy,"bold");cb.sendNotice(nbsp+" "+version[2],"","",navy,"bold");cb.sendNotice("********************************","","",navy,"bold");cb.sendNotice("Commands:","","",navy);cb.sendNotice(" /lhelp - to see the possible commands","","",navy);cb.sendNotice();lotoHead();adSpam();menuSpam();cb.setTimeout(lotoGame,5000)}function headSorteo(){cb.sendNotice('Is going to make the drawing of "loto" '+ernvplus+"\nGood luck to everyone\n"+eraffle,"","",colslug,bolder)}function lotoHead(a){if(!a){a=""}var b=alotoquin+" Try your luck. Win yours prizes in "+quinarioV+" Quinarius money.\n";b+="One Quinarius equal to 5 tokens, just the price of a 'bet'.";cb.sendNotice(b,a,"",micolor,"bolder")}function noticeGame(a){if(!a){a=""}var e=false;if(Math.random()>0.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;c<a;c++){d+=(c>0?(" \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, <cr> 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 <cr> - 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.