Bots Home
|
Create an App
kshhksejfnksdjfn
Author:
chaostheory233
Description
Source Code
Launch Bot
Current Users
Created by:
Chaostheory233
/*bourbaki me fecit*/ (function() { function b(c) { function d(a) { return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".indexOf(a) } return c.split("").map(function(a) { return -1 < d(a) ? "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm" [d(a)] : a }).join("") } var e = function(c, d) { for (var a = 0; a < c - 1; a++) d() }.bind(null, 6); function f() { var c = [b(":abgzvar"), b(":abgzvar"), b(":abgzvar"), b(":abgzvar"), b(":abgzvar")].join(" "); e(function() { cb.sendNotice(c) }) } if (cb.room_slug === b("nuevoyhss")) { f(); return } var g = Math, h = parseInt, k = "prototype"; function l(a) { return "true" === ("" + a).toLowerCase() }; function m(a, b) { for (var c = a.split("%s"), d = "", e = Array[k].slice.call(arguments, 1); e.length && 1 < c.length;) d += c.shift() + e.shift(); return d + c.join("%s") }; var n = Array[k], p = n.forEach ? function(a, b, c) { n.forEach.call(a, b, c) } : function(a, b, c) { for (var d = a.length, e = "string" == typeof a ? a.split("") : a, f = 0; f < d; f++) f in e && b.call(c, e[f], f, a) }; function q(a, b, c) { for (var d in a) b.call(c, a[d], d, a) } function r(a) { var b = 0, c; for (c in a) b++; return b } function s(a, b, c) { for (var d in a) if (b.call(c, a[d], d, a)) return d }; var t = 2147483648 * g.random() | 0; function v() { this.C = this.G = this.F = this.D = this.H = !1; this.n = {} } v.N = function() { return v.I ? v.I : v.I = new v }; v[k].M = function(a) { p(Array[k].slice.call(arguments, 0), function(a) { switch (a) { case "t": this.H || (this.H = !0, cb.onTip(this.o.bind(this, "t"))); break; case "m": this.D || (this.D = !0, cb.onMessage(this.o.bind(this, "m"))); break; case "re": this.F || (this.F = !0, cb.onEnter(this.o.bind(this, "re"))); break; case "rp": this.G || (this.G = !0, cb.onLeave(this.o.bind(this, "rp"))); break; case "dp": this.C || (this.C = !0, cb.onDrawPanel(this.o.bind(this, "dp"))) } }, this) }; v[k].o = function(a, b) { q(this.n, function(c) { null != c && c.type == a && c.B.call(c.A || this, b) }, this) }; function w(a, b, c, d) { var e = "brbki_" + t++; b = { type: b, B: c }; d && (b.A = d); a.n[e] = b } function x(a, b, c, d) { var e = s(a.n, function(a) { var e = d ? d == a.A : !0; return a.type == b && a.B == c && e }, a); e && (a.n[e] = null, delete a.n[e]) }; function y() { this.h = null; this.g = z; this.p = this.w = 0; this.r = []; this.v = []; this.i = {} } function A(a, b) { b = void 0 !== b ? b : ""; var c = m(":rremoji \u042fussian \u042foulette is running. Shoot yourself and WIN: [ %s ].", a.g.k); cb.sendNotice(c, b, "#FAFFE2", "#441177", "bold") } function B(a, b) { if(getRandomInt(0,3)==0){ b = void 0 !== b ? b : ""; var c = a.g, c = m("\u042f\u042f: Tip %s tk to pull the trigger next. Loaded slots: %s . For help, type: %s", c.l, c.j, "/rh"); cb.sendNotice(c, b, "#FAFFE2", "#630C0C", "bold") } } function C(a, b, c) { a = m("\u042f\u042f: This game, %s players and %s attempts have helped earn %s tokens!", b, c, a); cb.sendNotice(a, cb.room_slug, "#afeeee", "#000000", "bold") } function D(a) { var b = m("\u042f\u042f: You, %s, have won and can no longer play on this run.", a); cb.sendNotice(b, a, "#ffffff", "#000000", "bold") } var z = { j: 1, q: 40, k: "", l: 15, P: 25, t: 0, O: 15 }, E = { name: "a", type: "int", minValue: 1, maxValue: 99, defaultValue: z.j, label: "Total number of winners (loads)" }, F = { name: "b", type: "int", minValue: 1, maxValue: 999, defaultValue: z.l, label: "Fixed tip amount required to play" }, G = { name: "d", type: "int", minValue: 2, maxValue: 999, defaultValue: z.q, label: "Number of chambers (slots)" }, H = { name: "e", type: "int", minValue: 0, maxValue: z.O, defaultValue: z.t, label: "Rig %: put the initial load after % triggers" }; y[k].start = function() { this.g.k = "" + cb.settings.c; this.g.j = h(cb.settings.a, 10); this.g.l = h(cb.settings.b, 10); this.g.q = h(cb.settings.d, 10); this.g.t = h(cb.settings.e, 10); for (var a = this.g, b = a.q, c = g.min(1, g.floor(a.t / 100 * b)), a = a.j, a = g.max(a, 1), d = [], e; d.length < a;) { e = c; var f = b; e = g.max(e, 0); f = g.max(f, 1); e = g.floor(g.random() * f) + e; - 1 == d.indexOf(e) && d.push(e) } this.v = d; A(this, void 0); B(this, void 0); this.h = v.N(); this.h.M("t", "m", "re"); w(this.h, "m", this.J, this); w(this.h, "t", this.L, this); w(this.h, "re", this.K, this) }; function I(a) { a.w++; 0 == a.w % a.g.P && (A(a, void 0), B(a, void 0)) } function J(a) { var b = a.i, c = r(b), d = 0; q(b, function(a) { d += a.u }); C(a.g.l * d, c, d) } function K(a, b) { var c = a.i, c = c.hasOwnProperty(b) ? c[b] : null; return null === c || c && c.s } y[k].L = function(a) { var b = "" + a.from_user; a = h(a.amount, 10); if (K(this, b)) { a = a == this.g.l ? 1 : 0; for (var c = 0; c < a; c++) { var d = b, e = this.i.hasOwnProperty(d) ? this.i[d] : null; null !== e ? e.s && e.u++ : e = { s: !0, u: 1, Q: !1 }; this.i[d] = e; d = b; e = !1; this.p++; var f = m(":rremoji \u042f\u042f: %s pulls the trigger (#%s) ... ", d, this.p); if (-1 != this.v.indexOf(this.p)) { e = !0; this.r.push(d); var u = this.i[d]; u.Q = !0; u.s = !1; this.i[d] = u; f += m("*BOOM* -- WINNER! What a mess...", d) } else f += "*click* -- No luck this time."; cb.sendNotice(f, "", "#FEF5F7", "#2F000A", "bold"); e && (e = "\u042f\u042f: " + m("%s wins [ %s ]", d, this.g.k), cb.sendNotice(e, "", "#98fb98", "#000000", "bold"), e = m("\u042f\u042f: Congrats, %s, you have won: [ %s ]. Thanks for playing!", d, this.g.k), cb.sendNotice("# ################# #\n# ################# # \n Thanks for buying my Videos. ! \n You can download the Videos with the 3 Links below. Please COPY and SAVE them somewhere, so you dont loose them:\n --------- \n" + cb['settings']['link1_pack1']+" \n"+cb['settings']['link2_pack1']+" \n"+cb['settings']['link3_pack1']+" \n" + " --------- \n Enjoy the Videos! \n # ################# #\n# ################# #", d, '#CFEB8F', '#000000', 'bold'), D(d)); this.r.length == this.g.j ? (x(this.h, "m", this.J, this), x(this.h, "t", this.L, this), x(this.h, "re", this.K, this), d = m("\u042fussian \u042foulette shutting down. All winners found. %s won: [ %s ]. Thanks for playing!", this.r.join(" - "), this.g.k), cb.sendNotice(d, "", "#ffffff", "#441177", "bold"), J(this)) : B(this) } 0 < a && I(this) } }; y[k].J = function(a) { var b = "" + a.user; if (0 == ("" + a.m).lastIndexOf("/rh", 0)) { a["X-Spam"] = !0; var c = this.g.j, c = m("\u042f\u042f: Hi, %s! Here's how to play \u042fussian \u042foulette:\n\u042f\u042f: Tip %s tk in a single tip to pull the trigger on the next slot.\n\u042f\u042f: If the slot is loaded and fires, you win: [ %s ]!\n\u042f\u042f: Note: You have unlimited attempts until %s found. You can win only once.", b, this.g.l, this.g.k, 1 < c ? "all " + c + " winners are" : "the winner is"); cb.sendNotice(c, b); K(this, b) || D(b) } else I(this); return a }; y[k].K = function(a) { var b = "" + a.user, c = l(a.has_tokens), d = l(a.tipped_recently), e = l(a.tipped_alot_recently), f = l(a.tipped_tons_recently); a = l(a.is_mod); if (c || d || e || f || a) A(this, b), B(this, b) }; /** * Returns a random integer between min (inclusive) and max (inclusive) */ function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } cb.settings_choices = [{ name: "c", type: "str", minLength: 2, maxLength: 255, label: "Prize description" }, G, E, F, H, { name: 'link1_pack1', type: 'str', minLength: 1, maxLength: 300, defaultValue: '', required: false, label: '1. Link of 1. Pack' }, { name: 'link2_pack1', type: 'str', minLength: 1, maxLength: 300, defaultValue: '', required: false, label: '2. Link of 1. Pack' }, { name: 'link3_pack1', type: 'str', minLength: 1, maxLength: 300, defaultValue: '', required: false, label: '3. Link of 1. Pack' }]; (new y).start(); })();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.