Bots Home
|
Create an App
highOrLow
Author:
nutakk
Description
Source Code
Launch Bot
Current Users
Created by:
Nutakk
var deckCards = [ ["c1","c2","c3","c4","c5","c6","c7","c8","c9","c10","cJ","cQ","cK"], ["s1","s2","s3","s4","s5","s6","s7","s8","s9","s10","sJ","sQ","sK"], ["d1","d2","d3","d4","d5","d6","d7","d8","d9","d10","dJ","dQ","dK"], ["h1","h2","h3","h4","h5","h6","h7","h8","h9","h10","hJ","hQ","hK"] ]; function init(){ function drawCard(one, two){ var card = deckCards[one][two]; return card; }; var arr0 = Math.round(Math.random()*4); var arr1 = Math.round(Math.random()*13); var cardOne = drawCard(arr0,arr1); var arr2 = Math.round(Math.random()*4); var arr3 = Math.round(Math.random()*13); var cardTwo = drawCard(arr2,arr3); cb.sendNotice(cardOne + "is your card!\n higher or lower?\n tip 33 for higher or 23 for lower",'',"#c3f9ff","#000001",'bold'); cb.onTip(tip => { if(tip['amount'] == 33 && arr1 < arr3) { cb.sendNotice(cardTwo + "is higher!",'',"#c3f9ff","#000001",'bold'); if(tip['amount'] == 33 && arr1 > arr3) { cb.sendNotice(cardTwo + "is lower!",'',"#c3f9ff","#000001",'bold'); } } else if(tip['amount'] == 23 && arr1 > arr3) { cb.sendNotice(cardTwo + "is lower!",'',"#c3f9ff","#000001",'bold'); if(tip['amount'] == 23 && arr1 < arr3) { cb.sendNotice(cardTwo + "is higher!",'',"#c3f9ff","#000001",'bold'); } } return tip; }); return 0; }; cb.onMessage(msg => { if(msg['msg'] == '/highOrLow'){ init(); return msg; }; });
© Copyright Chaturbate 2011- 2026. All Rights Reserved.