Bots Home
|
Create an App
bingo/loteria bot
Author:
yolo
Description
Source Code
Launch Bot
Current Users
Created by:
Yolo
cb.settings_choices = [ {name:'tokens_for_number', type:'int', minValue:1, maxValue:999, label: "Tokens para un numero"}, {name:'prizes', type:'str', minLength:1, maxLength:1000, label:"Lista de premios (Separar cada uno con un guion)"}, {name:'size', type:'choice', choice1:'4x4', choice2:'5x5', choice3:'6x6', defaultValue: '4x4', label:"Tamano/size"}, {name:'broadcaster', type:'str', minLength:1, maxLength:1000, label:"Tu usuario de Chaturbate"} ]; tokensLeft = cb.settings.tokens_for_number; total = 0; bandera1 = false; bandera2 = false; bandera3 = false; bandera4 = false; bandera5 = false; bandera6 = false; bandera7 = false; bandera8 = false; bandera9 = false; bandera10 = false; bandera11 = false; bandera12 = false; bandera13 = false; bandera14 = false; if(cb.settings.size == "4x4"){ tarjetas = [0,1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]; for(i = 1; i<tarjetas.length; i++){ aux = tarjetas[i]; aux2= Math.floor((Math.random() * 35) + 1); tarjetas[i] = tarjetas[aux2]; tarjetas[aux2] = aux; } board = [[tarjetas[1], tarjetas[2], tarjetas[3], tarjetas[4]], [tarjetas[5], tarjetas[6], tarjetas[7], tarjetas[8]], [tarjetas[9], tarjetas[10], tarjetas[11], tarjetas[12]], [tarjetas[13], tarjetas[14], tarjetas[15], tarjetas[16]]]; }else{ if(cb.settings.size == "5x5"){ tarjetas = [0,1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55]; for(i = 1; i<tarjetas.length; i++){ aux = tarjetas[i]; aux2= Math.floor((Math.random() * 55) + 1); tarjetas[i] = tarjetas[aux2]; tarjetas[aux2] = aux; } board = [[tarjetas[1], tarjetas[2], tarjetas[3], tarjetas[4], tarjetas[5]], [tarjetas[6], tarjetas[7], tarjetas[8], tarjetas[9], tarjetas[10]], [tarjetas[11], tarjetas[12], tarjetas[13], tarjetas[14], tarjetas[15]], [tarjetas[16],tarjetas[17], tarjetas[18], tarjetas[19], tarjetas[20]], [tarjetas[21],tarjetas[22],tarjetas[23],tarjetas[24],tarjetas[25]]]; }else{ if(cb.settings.size == "6x6"){ tarjetas = [0,1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75]; for(i = 1; i<tarjetas.length; i++){ aux = tarjetas[i]; aux2= Math.floor((Math.random() * 75) + 1); tarjetas[i] = tarjetas[aux2]; tarjetas[aux2] = aux; } board = [[tarjetas[1], tarjetas[2], tarjetas[3], tarjetas[4], tarjetas[5],tarjetas[6]], [tarjetas[7], tarjetas[8], tarjetas[9], tarjetas[10], tarjetas[11], tarjetas[12]], [tarjetas[13], tarjetas[14], tarjetas[15], tarjetas[16], tarjetas[17], tarjetas[18]], [tarjetas[19],tarjetas[20], tarjetas[21], tarjetas[22], tarjetas[23], tarjetas[24]], [tarjetas[25],tarjetas[26],tarjetas[27],tarjetas[28],tarjetas[29], tarjetas[30]], [tarjetas[31],tarjetas[32],tarjetas[33],tarjetas[34],tarjetas[35],tarjetas[36]]]; } } } string_to_array3 = function (str) { return str.trim().split(","); }; function reset (){ tokensLeft = cb.settings.tokens_for_number; total = 0; bandera1 = false; bandera2 = false; bandera3 = false; bandera4 = false; bandera5 = false; bandera6 = false; bandera7 = false; bandera8 = false; bandera9 = false; bandera10 = false; bandera11 = false; bandera12 = false; bandera13 = false; bandera14 = false; if(cb.settings.size == "4x4"){ tarjetas = [0,1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]; for(i = 1; i<tarjetas.length; i++){ aux = tarjetas[i]; aux2= Math.floor((Math.random() * 35) + 1); tarjetas[i] = tarjetas[aux2]; tarjetas[aux2] = aux; } board = [[tarjetas[1], tarjetas[2], tarjetas[3], tarjetas[4]], [tarjetas[5], tarjetas[6], tarjetas[7], tarjetas[8]], [tarjetas[9], tarjetas[10], tarjetas[11], tarjetas[12]], [tarjetas[13], tarjetas[14], tarjetas[15], tarjetas[16]]]; }else{ if(cb.settings.size == "5x5"){ tarjetas = [0,1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55]; for(i = 1; i<tarjetas.length; i++){ aux = tarjetas[i]; aux2= Math.floor((Math.random() * 55) + 1); tarjetas[i] = tarjetas[aux2]; tarjetas[aux2] = aux; } board = [[tarjetas[1], tarjetas[2], tarjetas[3], tarjetas[4], tarjetas[5]], [tarjetas[6], tarjetas[7], tarjetas[8], tarjetas[9], tarjetas[10]], [tarjetas[11], tarjetas[12], tarjetas[13], tarjetas[14], tarjetas[15]], [tarjetas[16],tarjetas[17], tarjetas[18], tarjetas[19], tarjetas[20]], [tarjetas[21],tarjetas[22],tarjetas[23],tarjetas[24],tarjetas[25]]]; }else{ if(cb.settings.size == "6x6"){ tarjetas = [0,1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75]; for(i = 1; i<tarjetas.length; i++){ aux = tarjetas[i]; aux2= Math.floor((Math.random() * 75) + 1); tarjetas[i] = tarjetas[aux2]; tarjetas[aux2] = aux; } board = [[tarjetas[1], tarjetas[2], tarjetas[3], tarjetas[4], tarjetas[5],tarjetas[6]], [tarjetas[7], tarjetas[8], tarjetas[9], tarjetas[10], tarjetas[11], tarjetas[12]], [tarjetas[13], tarjetas[14], tarjetas[15], tarjetas[16], tarjetas[17], tarjetas[18]], [tarjetas[19],tarjetas[20], tarjetas[21], tarjetas[22], tarjetas[23], tarjetas[24]], [tarjetas[25],tarjetas[26],tarjetas[27],tarjetas[28],tarjetas[29], tarjetas[30]], [tarjetas[31],tarjetas[32],tarjetas[33],tarjetas[34],tarjetas[35],tarjetas[36]]]; } } } string_to_array3 = function (str) { return str.trim().split(","); } cb.chatNotice("El board ha sido reiniciado!"); } function showBoard (){ string_to_array = function (str) { return str.trim().split("]"); }; boards = string_to_array(board.toString()); finalBoard = " "; for(i = 0; i<boards.length; i++){ finalBoard = finalBoard + boards[i]+"\n"; } string_to_array3 = function (str) { return str.trim().split(","); }; if(cb.settings.size == "4x4"){ finalBoard = string_to_array3(finalBoard); cb.chatNotice(finalBoard[0] +" "+ finalBoard[1]+" "+ finalBoard[2]+" "+ finalBoard[3]); cb.chatNotice(finalBoard[4] +" "+ finalBoard[5]+" "+ finalBoard[6]+" "+ finalBoard[7]); cb.chatNotice(finalBoard[8] +" "+ finalBoard[9]+" "+ finalBoard[10]+" "+ finalBoard[11]); cb.chatNotice(finalBoard[12] +" "+ finalBoard[13]+" "+ finalBoard[14]+" "+ finalBoard[15]); } if(cb.settings.size == "5x5"){ finalBoard = string_to_array3(finalBoard); cb.chatNotice(finalBoard[0] +" "+ finalBoard[1]+" "+ finalBoard[2]+" "+ finalBoard[3]+" "+finalBoard[4]); cb.chatNotice(finalBoard[5] +" "+ finalBoard[6]+" "+ finalBoard[7]+" "+ finalBoard[8]+" "+finalBoard[9]); cb.chatNotice(finalBoard[10] +" "+ finalBoard[11]+" "+ finalBoard[12]+" "+ finalBoard[13]+" "+finalBoard[14]); cb.chatNotice(finalBoard[15] +" "+ finalBoard[16]+" "+ finalBoard[17]+" "+ finalBoard[18]+" "+finalBoard[19]); cb.chatNotice(finalBoard[20] +" "+ finalBoard[21]+" "+ finalBoard[22]+" "+ finalBoard[23]+" "+finalBoard[24]); } if(cb.settings.size == "6x6"){ finalBoard = string_to_array3(finalBoard); cb.chatNotice(finalBoard[0] +" "+ finalBoard[1]+" "+ finalBoard[2]+" "+ finalBoard[3]+" "+finalBoard[4]+" "+finalBoard[5]); cb.chatNotice(finalBoard[6] +" "+ finalBoard[7]+" "+ finalBoard[8]+" "+ finalBoard[9]+" "+finalBoard[10]+" "+finalBoard[11]); cb.chatNotice(finalBoard[12] +" "+ finalBoard[13]+" "+ finalBoard[14]+" "+ finalBoard[15]+" "+finalBoard[16]+" "+finalBoard[17]); cb.chatNotice(finalBoard[18] +" "+ finalBoard[19]+" "+ finalBoard[20]+" "+ finalBoard[21]+" "+finalBoard[22]+" "+finalBoard[23]); cb.chatNotice(finalBoard[24] +" "+ finalBoard[25]+" "+ finalBoard[26]+" "+ finalBoard[27]+" "+finalBoard[28]+" "+finalBoard[29]); cb.chatNotice(finalBoard[30] +" "+ finalBoard[31]+" "+ finalBoard[32]+" "+ finalBoard[33]+" "+finalBoard[34]+" "+finalBoard[35]); } } cb.onMessage(function (message) { if(message.m == "/board"){ showBoard(); } /* if(message.m == "prueba"){ cb.chatNotice(message); } */ string_to_array2 = function (str) { return str.trim().split("-"); }; premios = string_to_array2(cb.settings.prizes); if(message.m == "/prizes"){ for(i = 0; i<premios.length; i++){ cb.chatNotice(premios[i]); } } if(message.m == "/reset" && message.user == cb.settings.broadcaster){ reset(); } }); cb.onTip(function (tip) { total = total + parseInt(tip['amount']); if(total >= cb.settings.tokens_for_number*(tarjetas.length-1)){ reset(); } if(tokensLeft - parseInt(tip['amount']) < 0){ sobrante = tokensLeft - parseInt(tip['amount']); win(); while(sobrante < 0){ if(sobrante + cb.settings.tokens_for_number > 0){ sobrante2 = sobrante + cb.settings.tokens_for_number; sobrante = 0; }else{ sobrante2 = sobrante + cb.settings.tokens_for_number; sobrante = sobrante + cb.settings.tokens_for_number; win(); } } if(sobrante2 == 0){ tokensLeft = cb.settings.tokens_for_number; }else{ tokensLeft = sobrante2; } cb.chatNotice("Faltan " + tokensLeft + " tokens"); }else{ if(tokensLeft - parseInt(tip['amount']) == 0){ tokensLeft = cb.settings.tokens_for_number; win(); }else{ tokensLeft -= parseInt(tip['amount']); cb.chatNotice("Faltan " + tokensLeft + " tokens"); } } }); function win (){ cb.chatNotice("win win win"); if(cb.settings.size == "4x4"){ resultado = Math.floor((Math.random() * 35) + 1); while(tarjetas[resultado] == "x"){ resultado = Math.floor((Math.random() * 35) + 1); } resulta2 = tarjetas[resultado]; r = 0; while(r<4){ for(i = 0; i<4; i++){ if(board[i][r] == resulta2){ board[i][r] = "x"; } } r++; } if((board[0][0] == "x" && board[0][1] == "x" && board[0][2] == "x" && board[0][3] == "x") && bandera1 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera1 = true; } if((board[1][0] == "x" && board[1][1] == "x" && board[1][2] == "x" && board[1][3] == "x") && bandera2 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera2 = true; } if((board[2][0] == "x" && board[2][1] == "x" && board[2][2] == "x" && board[2][3] == "x") && bandera3 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera3 = true; } if((board[3][0] == "x" && board[3][1] == "x" && board[3][2] == "x" && board[3][3] == "x") && bandera4 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera4 = true; } if((board[0][0] == "x" && board[1][0] == "x" && board[2][0] == "x" && board[3][0] == "x") && bandera5 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera5 = true; } if((board[0][1] == "x" && board[1][1] == "x" && board[2][1] == "x" && board[3][1] == "x") && bandera6 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera6 = true; } if((board[0][2] == "x" && board[1][2] == "x" && board[2][2] == "x" && board[3][2] == "x") && bandera7 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera7 = true; } if((board[0][3] == "x" && board[1][3] == "x" && board[2][3] == "x" && board[3][3] == "x") && bandera8 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera8 = true; } if((board[0][0] == "x" && board[1][1] == "x" && board[2][2] == "x" && board[3][3] == "x") && bandera9 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera9 = true; } if((board[0][3] == "x" && board[1][2] == "x" && board[2][1] == "x" && board[3][0] == "x") && bandera10 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera10 = true; } } if(cb.settings.size == "5x5"){ resultado = Math.floor((Math.random() * 55) + 1); while(tarjetas[resultado] == "x"){ resultado = Math.floor((Math.random() * 55) + 1); } resulta2 = tarjetas[resultado]; r = 0; while(r<5){ for(i = 0; i<5; i++){ if(board[i][r] == resulta2){ board[i][r] = "x"; } } r++; } if((board[0][0] == "x" && board[0][1] == "x" && board[0][2] == "x" && board[0][3] == "x" && board[0][4] == "x") && bandera1 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera1 = true; } if((board[1][0] == "x" && board[1][1] == "x" && board[1][2] == "x" && board[1][3] == "x" && board[1][4] == "x") && bandera2 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera2 = true; } if((board[2][0] == "x" && board[2][1] == "x" && board[2][2] == "x" && board[2][3] == "x" && board[2][4] == "x") && bandera3 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera3 = true; } if((board[3][0] == "x" && board[3][1] == "x" && board[3][2] == "x" && board[3][3] == "x" && board[3][4] == "x") && bandera4 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera4 = true; } if((board[4][0] == "x" && board[4][1] == "x" && board[4][2] == "x" && board[4][3] == "x" && board[4][4] == "x") && bandera11 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera11 = true; } if((board[0][0] == "x" && board[1][0] == "x" && board[2][0] == "x" && board[3][0] == "x" && board[4][0] == "x") && bandera5 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera5 = true; } if((board[0][1] == "x" && board[1][1] == "x" && board[2][1] == "x" && board[3][1] == "x" && board[4][1] == "x") && bandera6 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera6 = true; } if((board[0][2] == "x" && board[1][2] == "x" && board[2][2] == "x" && board[3][2] == "x" && board[4][2] == "x") && bandera7 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera7 = true; } if((board[0][3] == "x" && board[1][3] == "x" && board[2][3] == "x" && board[3][3] == "x" && board[4][3] == "x") && bandera8 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera8 = true; } if((board[0][4] == "x" && board[1][4] == "x" && board[2][4] == "x" && board[3][4] == "x" && board[4][4] == "x") && bandera12 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera12 = true; } if((board[0][0] == "x" && board[1][1] == "x" && board[2][2] == "x" && board[3][3] == "x" && board[4][4] == "x") && bandera9 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera9 = true; } if((board[0][4] == "x" && board[1][3] == "x" && board[2][2] == "x" && board[3][1] == "x" && board[4][0] == "x") && bandera10 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera10 = true; } } if(cb.settings.size == "6x6"){ resultado = Math.floor((Math.random() * 75) + 1); while(tarjetas[resultado] == "x"){ resultado = Math.floor((Math.random() * 75) + 1); } resulta2 = tarjetas[resultado]; r = 0; while(r<6){ for(i = 0; i<6; i++){ if(board[i][r] == resulta2){ board[i][r] = "x"; } } r++; } if((board[0][0] == "x" && board[0][1] == "x" && board[0][2] == "x" && board[0][3] == "x" && board[0][4] == "x" && board[0][5] == "x") && bandera1 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera1 = true; } if((board[1][0] == "x" && board[1][1] == "x" && board[1][2] == "x" && board[1][3] == "x" && board[1][4] == "x" && board[1][5] == "x") && bandera2 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera2 = true; } if((board[2][0] == "x" && board[2][1] == "x" && board[2][2] == "x" && board[2][3] == "x" && board[2][4] == "x" && board[2][5] == "x") && bandera3 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera3 = true; } if((board[3][0] == "x" && board[3][1] == "x" && board[3][2] == "x" && board[3][3] == "x" && board[3][4] == "x" && board[3][5] == "x") && bandera4 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera4 = true; } if((board[4][0] == "x" && board[4][1] == "x" && board[4][2] == "x" && board[4][3] == "x" && board[4][4] == "x" && board[4][5] == "x") && bandera11 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera11 = true; } if((board[5][0] == "x" && board[5][1] == "x" && board[5][2] == "x" && board[5][3] == "x" && board[5][4] == "x" && board[5][5] == "x") && bandera13 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera13 = true; } if((board[0][0] == "x" && board[1][0] == "x" && board[2][0] == "x" && board[3][0] == "x" && board[4][0] == "x" && board[5][0] == "x") && bandera5 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera5 = true; } if((board[0][1] == "x" && board[1][1] == "x" && board[2][1] == "x" && board[3][1] == "x" && board[4][1] == "x" && board[5][1] == "x") && bandera6 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera6 = true; } if((board[0][2] == "x" && board[1][2] == "x" && board[2][2] == "x" && board[3][2] == "x" && board[4][2] == "x" && board[5][2] == "x") && bandera7 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera7 = true; } if((board[0][3] == "x" && board[1][3] == "x" && board[2][3] == "x" && board[3][3] == "x" && board[4][3] == "x" && board[5][3] == "x") && bandera8 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera8 = true; } if((board[0][4] == "x" && board[1][4] == "x" && board[2][4] == "x" && board[3][4] == "x" && board[4][4] == "x" && board[5][4] == "x") && bandera12 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera12 = true; } if((board[0][5] == "x" && board[1][5] == "x" && board[2][5] == "x" && board[3][5] == "x" && board[4][5] == "x" && board[5][5] == "x") && bandera14 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera14 = true; } if((board[0][0] == "x" && board[1][1] == "x" && board[2][2] == "x" && board[3][3] == "x" && board[4][4] == "x" && board[5][5] == "x") && bandera9 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera9 = true; } if((board[0][5] == "x" && board[1][4] == "x" && board[2][3] == "x" && board[3][2] == "x" && board[4][1] == "x" && board[5][0] == "x") && bandera10 == false){ fiesta = Math.floor((Math.random() * premios.length)); cb.chatNotice("****************************"); cb.chatNotice(premios[fiesta]); cb.chatNotice("****************************"); bandera10 = true; } } for(i = 0; i<tarjetas.length; i++){ if(tarjetas[i] == resulta2){ tarjetas[i] = "x"; } } cb.chatNotice("El numero que salio fue: "+resulta2); cb.chatNotice(tarjetas); showBoard(); }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.