Bots Home
|
Create an App
SM2.1.3
Author:
like69xxx
Description
Source Code
Launch Bot
Current Users
Created by:
Like69xxx
/** * Bot: Slot Machine Bot V.2.1.3 * Version: 2.1.3 * Original Bot: zingknaat * Author: like69x * Date: 02.16.18 * New objects: :sm2_cb, :sm2_crown, :sm2_nora, :sm2_seven, sm2_lush, :sm2_rainbow, :sm2_whip, :sm2_daymod, :sm2_weekmod, :sm2_xxx, :sm2_kiss, :sm2_hug, :sm2_condom, :sm2_flashy, :sm2_cherry, :sm2_follow, :sm2_sat, :sm2_running, :sm2_69, :sm2_bed, :sm2_ice, :sm2_lingerie */ cb.settings_choices = [ {name: 'tokens', type: 'int', label: 'Cost per spin (in tokens)', defaultValue: 3}, {name: 'notice_wait_time', type: 'choice', label: 'Notification Time (in minutes)', choice1: 1, choice2: 2, choice3: 3, choice4: 4, choice5: 5, choice6: 10, choice7: 15, choice8: 20, choice9: 25, choice10: 30, choice11: 45, choice12: 60, defaultValue: 3}, {name: 'jackpot_minimum', type:'int', label:'Minimum number tokens before jackpot', defaultValue:5000}, {name: 'prize_1', type: 'str', label: 'Jackpot prize (3 cb_logos)', defaultValue:'cum.. after jackpot-minimum reached'}, {name: 'prize_2', type: 'str', label: '2nd place prize (3 crowns)'}, {name: 'prize_3', type: 'str', label: '3rd place prize (3 lush)'}, {name: 'prize_4', type: 'str', label: '4th place prize (3 sevens)'}, {name: 'prize_5', type: 'str', label: '5th place prize (3 noras)'}, {name: 'prize_6', type: 'str', label: '6th place prize (3 rainbows)'}, {name: 'prize_7', type: 'str', label: '7th place prize (3 whips)'}, {name: 'prize_8', type: 'str', label: '8th place prize (3 daymods)', defaultValue:'be mod for a day..'}, {name: 'prize_9', type: 'str', label: '9th place prize (3 weekmods)', defaultValue:'be mod for a week..'}, {name: 'prize_10', type: 'str', label: '10th place prize (any combination of 3 mods)', defaultValue:'be mod for 2 days..'}, {name: 'prize_11', type: 'str', label: '11th place prize (3 xxx)'}, {name: 'prize_12', type: 'str', label: '12th place prize (3 kisses)', defaultValue:'blow kiss..'}, {name: 'prize_13', type: 'str', label: '13th place prize (3 hugs)', defaultValue:'hug me..'}, {name: 'prize_14', type: 'str', label: '14th place prize (any combination of condom/flashy)', defaultValue:'flash boobs..'}, {name: 'prize_15', type: 'str', label: '15th place prize (3 cherries)', defaultValue:'8 extra spin..'}, {name: 'prize_16', type: 'str', label: '16th place prize (2 cherries and any object)', defaultValue:'1 extra spin..'}, {name: 'prize_17', type: 'str', label: '17th place prize (1 cherry and any combination)', defaultValue:'1 extra spin..'}, {name: 'prize_18', type: 'str', label: '18th place prize (3 follows)', defaultValue:'I will follow You..'} ]; var langTokens = (cb.settings.tokens > 1) ? 'tokens' : 'token'; var lastPlayer = '--'; var lastPrizeWon = '--'; var spinCounter = 0; var tipCounter = 0; var prizesWon = Array(); var cb_logo = ' :sm2_cb '; var crown = ' :sm2_crown '; var lush = ' :sm2_lush '; var seven = ' :sm2_seven '; var nora = ' :sm2_nora '; var rainbow = ' :sm2_rainbow '; var whip = ' :sm2_whip '; var daymod = ' :sm2_daymod '; var weekmod = ' :sm2_weekmod '; var xxx = ' :sm2_xxx '; var kiss = ' :sm2_kiss '; var hug = ' :sm2_hug '; var condom = ' :sm_condom '; var flashy = ' :sm2_flashy '; var cherry = ' :sm2_cherry '; var sn = ' :sm2_69 '; var follow = ' :sm2_follow '; var sat = ' :sm2_sat '; var running = ' :sm2_running '; var bed = ' :sm2_bed '; var ice = ' :sm2_ice '; var lingerie = ' :sm2_lingerie '; var slotPieces1 = Array(cb_logo, crown, crown, lush, lush, lush, lush, seven, seven, seven, seven, seven, nora, nora, nora, nora, nora, nora, nora, nora, nora, rainbow, rainbow, rainbow, rainbow, rainbow, rainbow, rainbow, rainbow, rainbow, whip, whip, whip, whip, whip, whip, whip, whip, whip, whip, whip, whip, whip, whip, daymod, daymod, weekmod, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, condom, flashy, flashy, cherry, cherry, cherry, cherry, cherry, cherry, cherry, follow, follow, follow, follow, follow, follow, sat, running, sn, sn, sn, sn, sn, sn, bed, ice, lingerie, lingerie); var slotPieces2 = Array(cb_logo, crown, crown, lush, lush, lush, lush, lush, seven, seven, seven, seven, nora, nora, nora, nora, nora, rainbow, rainbow, rainbow, rainbow, rainbow, rainbow, whip, whip, whip, whip, whip, whip, whip, daymod, weekmod, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, hug, condom, flashy, cherry, cherry, cherry, cherry, cherry, cherry, follow, follow, follow, follow, follow, follow, follow, sat, running, sn, sn, sn, sn, bed, ice, lingerie); var slotPieces3 = Array(cb_logo, crown, lush, lush, lush, seven, seven, seven, seven, seven, seven, seven, seven, nora, nora, nora, nora, nora, nora, nora, nora, rainbow, rainbow, rainbow, rainbow, rainbow, rainbow, rainbow, rainbow, rainbow, whip, whip, whip, whip, whip, whip, whip, daymod, daymod, daymod, weekmod, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, kiss, hug, hug, hug, hug, hug, hug, hug, hug, condom, flashy, flashy, cherry, cherry, cherry, cherry, cherry, cherry, follow, sat, running, sn, sn, sn, sn, sn, bed, ice, lingerie); cb.onTip(function (tip) { tipCounter += parseInt(tip['amount']); if (parseInt(tip['amount']) >= cb.settings.tokens) { var numberOfSpins = Math.floor(parseInt(tip['amount'])/cb.settings.tokens); for(var i=1;i<=numberOfSpins;i++) { cb.setTimeout(function() { spin(tip['from_user']); }, 400*i); } } }); cb.onEnter(function (user) { var notices = "Welcome to my room, " + user['user'] + ". We are playing the slot machine.\n"; notices += 'Tip ' + cb.settings.tokens + ' ' + langTokens + ' to spin the reels.\n'; notices += 'Only the highest prize wins, if there is more than one prize.\n'; notices += 'Type "/p" to see the 18 possible prizes.\n'; notices += 'Type "/w" to see a list of the last 99 winners.\n'; notices += 'Type "/j" to see level and status of jackpot-minimum.'; cb.sendNotice(notices, user['user'], '', '#FF0066', 'bold'); }); cb.onMessage(function(msg) { if(msg['m'].match(/\/w/i)) { msg['X-Spam'] = true; showPrizesWon(msg['user']); } else if(msg['m'].match(/\/p/i)) { msg['X-Spam'] = true; showPrizes(msg['user']); } else if(msg['m'].match(/\/j/i)) { msg['X-Spam'] = true; showJackpot(msg['user']); } return msg; }); function getSlotPiece1() { var piece1 = slotPieces1[Math.floor(Math.random() * slotPieces1.length)]; if((piece1 == cb_logo) && (spinCounter%2 != 0)) { return cherry; } return piece1; } function getSlotPiece2() { var piece2 = slotPieces2[Math.floor(Math.random() * slotPieces2.length)]; if((piece2 == cb_logo) && (spinCounter%2 != 0)) { return follow; } return piece2; } function getSlotPiece3() { var piece3 = slotPieces3[Math.floor(Math.random() * slotPieces3.length)]; if((piece3 == cb_logo) && (spinCounter%2 != 0)) { return follow; } return piece3; } function getRow1() { var row = getSlotPiece1() + ' ' + getSlotPiece2() + ' ' + getSlotPiece3(); var cb_logoMatches = row.match(/cb_logo/g); if(cb_logoMatches != null) { var numberOfCb_logos = cb_logoMatches.length; } if((numberOfCb_logos == 3) && (cb.settings.jackpot_minimum > tipCounter)) { getRow1(); } return row; } function getRow2() { var row = getSlotPiece1() + ' ' + getSlotPiece2() + ' ' + getSlotPiece3(); var cb_logoMatches = row.match(/cb_logo/g); if(cb_logoMatches != null) { var numberOfCb_logos = cb_logoMatches.length; } if((numberOfCb_logos == 3) && (cb.settings.jackpot_minimum > tipCounter)) { getRow2(); } return row; } function getRow3() { var row = getSlotPiece1() + ' ' + getSlotPiece2() + ' ' + getSlotPiece3(); var cb_logoMatches = row.match(/cb_logo/g); if(cb_logoMatches != null) { var numberOfCb_logos = cb_logoMatches.length; } if((numberOfCb_logos == 3) && (cb.settings.jackpot_minimum > tipCounter)) { getRow3(); } return row; } function spin(username) { spinCounter++; var prize = '--'; var row1 = getRow1(); var row2 = getRow2(); var row3 = getRow3(); var cb_logoMatches = row2.match(/cb_logo/g); if(cb_logoMatches != null) { var numberOfCb_logos = cb_logoMatches.length; } var crownMatches = row2.match(/crown/g); if(crownMatches != null) { var numberOfCrowns = crownMatches.length; } var lushMatches = row2.match(/lush/g); if (lushMatches != null) { var numberOfLushs = lushMatches.length; } var sevenMatches = row2.match(/seven/g); if(sevenMatches != null) { var numberOfSevens = sevenMatches.length; } var noraMatches = row2.match(/nora/g); if(noraMatches != null) { var numberOfNoras = noraMatches.length; } var rainbowMatches = row2.match(/rainbow/g); if (rainbowMatches != null) { var numberOfRainbows = rainbowMatches.length; } var whipMatches = row2.match(/whip/g); if (whipMatches != null) { var numberOfWhips = whipMatches.length; } var daymodMatches = row2.match(/daymod/g); if (daymodMatches != null) { var numberOfDaymods = daymodMatches.length; } var weekmodMatches = row2.match(/weekmod/g); if (weekmodMatches != null) { var numberOfWeekmods = weekmodMatches.length; } var xxxMatches = row2.match(/xxx/g); if (xxxMatches != null) { var numberOfXxxs = xxxMatches.length; } var kissMatches = row2.match(/kiss/g); if (kissMatches != null) { var numberOfKisses = kissMatches.length; } var hugMatches = row2.match(/hug/g); if (hugMatches != null) { var numberOfHugs = hugMatches.length; } var condomMatches = row2.match(/condom/g); if (condomMatches != null) { var numberOfCondoms = condomMatches.length; } var flashyMatches = row2.match(/flashy/g); if (flashyMatches != null) { var numberOfFlashys = flashyMatches.length; } var cherryMatches = row2.match(/cherry/g); if (cherryMatches != null) { var numberOfCherries = cherryMatches.length; } var followMatches = row2.match(/follow/g); if (followMatches != null) { var numberOfFollows = followMatches.length; } var notices = " -------- Wheel 1---Wheel 2---Wheel 3 ------ \n"; notices += " Line 1: " + row1 + "\n"; notices += " Line 2: " + row2 + " <-- pay line \n"; notices += " Line 3: " + row3; cb.sendNotice(notices); if (numberOfCb_logos == 3) { prize = cb.settings.prize_1; } else if (numberOfCrowns == 3) { prize = cb.settings.prize_2; } else if (numberOfLushs == 3) { prize = cb.settings.prize_3; } else if (numberOfSevens == 3) { prize = cb.settings.prize_4; } else if (numberOfNoras == 3) { prize = cb.settings.prize_5; } else if (numberOfRainbows == 3) { prize = cb.settings.prize_6; } else if (numberOfWhips == 3) { prize = cb.settings.prize_7; } else if (numberOfDaymods == 3) { prize = cb.settings.prize_8; } else if (numberOfWeekmods == 3) { prize = cb.settings.prize_9; } else if ((numberOfDaymods == 1 && numberOfWeekmods == 2) || (numberOfDaymods == 2 && numberOfWeekmods == 1)) { prize = cb.settings.prize_10; } else if (numberOfXxxs == 3) { prize = cb.settings.prize_11; } else if (numberOfKisses == 3) { prize = cb.settings.prize_12; } else if (numberOfHugs == 3) { prize = cb.settings.prize_13; } else if ((numberOfCondoms == 1 && numberOfFlashys == 2) || (numberOfCondoms == 2 && numberOfFlashys == 1)) { prize = cb.settings.prize_14; } else if (numberOfCherries == 3) { prize = cb.settings.prize_15; } else if (numberOfCherries == 2) { prize = cb.settings.prize_16; } else if (numberOfCherries == 1) { prize = cb.settings.prize_17; } else if (numberOfFollows == 3) { prize = cb.settings.prize_18; } lastPlayer = username; if(prize != '--') { lastPlayer = username; lastPrizeWon = prize; prizesWon.push(prize + ' - ' + username); cb.sendNotice(username + ' won a prize! Prize: ' + prize, '', '#EBAAEB', '', 'bold'); } else { cb.sendNotice(username + ' did not win this time.. Try again.. :cry', '', '', '#550055', 'bold'); } if(prize == cb.settings.prize_17) { cb.sendNotice(username + ' won an extra spin! ', '', '#EBAAEB', '', 'bold'); spin(username); prize = '--'; } if(prize == cb.settings.prize_16) { cb.sendNotice(username + ' won 3 extra spin! ', '', '#EBAAEB', '', 'bold'); spin(username); prize = '--'; spin(username); prize = '--'; spin(username); prize = '--'; } if(prize == cb.settings.prize_15) { cb.sendNotice(username + ' won 8 extra spin! ', '', '#EBAAEB', '', 'bold'); spin(username); prize = '--'; spin(username); prize = '--'; spin(username); prize = '--'; spin(username); prize = '--'; spin(username); prize = '--'; spin(username); prize = '--'; spin(username); prize = '--'; spin(username); prize = '--'; spin(username); prize = '--'; } if(prize == cb.settings.prize_13) { cb.sendNotice(username + ' lower jackpot-minimum with 3 tokens! ', '', '#EBAAEB', '', 'bold'); cb.settings.jackpot_minimum = (cb.settings.jackpot_minimum - 3); showJackpot(username); prize = '--'; } if(prize == cb.settings.prize_12) { cb.sendNotice(username + ' lower jackpot-minimum with 3 tokens!', '', '#EBAAEB', '', 'bold'); cb.settings.jackpot_minimum = (cb.settings.jackpot_minimum - 3); showJackpot(username); prize = '--'; } return prize; } function showPrizes(username) { var notices = '**** Possible Prizes ****\n'; notices += '1st) 3 cb_logos (jackpot) = ' + cb.settings.prize_1 + '\n'; notices += '2nd) 3 crowns = ' + cb.settings.prize_2 + '\n'; notices += '3rd) 3 lush = ' + cb.settings.prize_3 + '\n'; notices += '4th) 3 sevens = ' + cb.settings.prize_4 + '\n'; notices += '5th) 3 noras = ' + cb.settings.prize_5 + '\n'; notices += '6th) 3 rainbow = ' + cb.settings.prize_6 + '\n'; notices += '7th) 3 whips = ' + cb.settings.prize_7 + '\n'; notices += '8th) 3 daymods = ' + cb.settings.prize_8 + '\n'; notices += '9th) 3 weekmods = ' + cb.settings.prize_9 + '\n'; notices += '10th) Any combination of 3 mods = ' + cb.settings.prize_10 + '\n'; notices += '11th) 3 xxx = ' + cb.settings.prize_11 + '\n'; notices += '12th) 3 kisses = ' + cb.settings.prize_12 + '\n'; notices += '13th) 3 hugs = ' + cb.settings.prize_13 + '\n'; notices += '14th) Any combination of 3 condoms/flashys = ' + cb.settings.prize_14 + '\n'; notices += '15th) 3 cherries = ' + cb.settings.prize_15 + '\n'; notices += '16th) 2 cherries + any piece = ' + cb.settings.prize_16 + '\n'; notices += '17th) 1 cherry + any combination = ' + cb.settings.prize_17 + '\n'; notices += '18th) 3 follows = ' + cb.settings.prize_18; cb.sendNotice(notices, username, '#EBAAEB', '', 'bold'); } function showPrizesWon(username) { prizesWon.reverse(); if(prizesWon.length == 0) { cb.sendNotice('No one has won anything yet. Play the slot machine to win a prize!', username, '', '#CC0055', 'bold'); } else { prizesWon.slice(0,99); var notices = "**** Last 99 Winners ****"; var prizeNum = 1; var totalWon = prizesWon.length; if(prizesWon.length >= 99) totalWon = 99; for(var i=0; i<totalWon;i++) { notices += "\n" + prizeNum + ") " + prizesWon[i]; prizeNum++; } cb.sendNotice(notices, username, '#EBAAEB', '', 'bold'); } } function showJackpot(username) { var notices = '****Jackpot-Status****\n'; notices += 'jackpot-minimum = ' + cb.settings.jackpot_minimum + '\n'; notices += 'tip-level = ' + tipCounter ; cb.sendNotice(notices, username, '#EBAAEB', '', 'bold'); } function SM2advertise() { var notices = "Slot Machine V.2.1.3 by like69x\n"; notices += 'Tip ' + cb.settings.tokens + ' ' + langTokens + ' to spin the reels.\n'; notices += 'Only the highest prize wins, if there is more than one prize.\n'; notices += 'Type "/p" to see the 18 possible prizes.\n'; notices += 'Type "/w" to see a list of the last 99 winners.\n'; notices += 'Type "/j" to see level and status of jackpot-minimum.'; cb.sendNotice(notices, '', '', '#FF0066', 'bold'); cb.setTimeout(SM2advertise, cb.settings.notice_wait_time * 60000); } function SM2init() { SM2advertise(); } SM2init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.