Professional Documents
Culture Documents
function n(i) {
if (t[i]) return t[i].exports;
var r = t[i] = {
i: i,
l: !1,
exports: {}
};
return e[i].call(r.exports, r, r.exports, n), r.l = !0, r.exports
}
n.m = e, n.c = t, n.d = function(e, t, i) {
n.o(e, t) || Object.defineProperty(e, t, {
enumerable: !0,
get: i
})
}, n.r = function(e) {
"undefined" != typeof Symbol && Symbol.toStringTag &&
Object.defineProperty(
e, Symbol.toStringTag, {
value: "Module"
}), Object.defineProperty(e, "__esModule", {
value: !0
})
}, n.t = function(e, t) {
if (1 & t && (e = n(e)), 8 & t) return e;
if (4 & t && "object" == typeof e && e && e.__esModule) return e;
var i = Object.create(null);
if (n.r(i), Object.defineProperty(i, "default", {
enumerable: !0,
value: e
}), 2 & t && "string" != typeof e)
for (var r in e) n.d(i, r, function(t) {
return e[t]
}.bind(null, r));
return i
}, n.n = function(e) {
var t = e && e.__esModule ? function() {
return e.default
} : function() {
return e
};
return n.d(t, "a", t), t
}, n.o = function(e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}, n.p = "", n(n.s = 21)
}([function(e, t, n) {
var i = t.global = n(25),
r = t.hasBuffer = i && !!i.isBuffer,
s = t.hasArrayBuffer = "undefined" != typeof ArrayBuffer,
a = t.isArray = n(5);
t.isArrayBuffer = s ? function(e) {
return e instanceof ArrayBuffer || p(e)
} : m;
var o = t.isBuffer = r ? i.isBuffer : m,
c = t.isView = s ? ArrayBuffer.isView || y("ArrayBuffer", "buffer") : m;
t.alloc = d, t.concat = function(e, n) {
n || (n = 0, Array.prototype.forEach.call(e, (function(e) {
n += e.length
})));
var i = this !== t && this || e[0],
r = d.call(i, n),
s = 0;
return Array.prototype.forEach.call(e, (function(e) {
s += f.copy.call(e, r, s)
})), r
}, t.from = function(e) {
return "string" == typeof e ? function(e) {
var t = 3 * e.length,
n = d.call(this, t),
i = f.write.call(n, e);
return t !== i && (n = f.slice.call(n, 0, i)), n
}.call(this, e) : g(this).from(e)
};
var l = t.Array = n(28),
h = t.Buffer = n(29),
u = t.Uint8Array = n(30),
f = t.prototype = n(6);
function d(e) {
return g(this).alloc(e)
}
var p = y("ArrayBuffer");
function g(e) {
return o(e) ? h : c(e) ? u : a(e) ? l : r ? h : s ? u : l
}
function m() {
return !1
}
function y(e, t) {
return e = "[object " + e + "]",
function(n) {
return null != n && {}.toString.call(t ? n[t] : n) === e
}
}
}, function(e, t, n) {
var i = n(5);
t.createCodec = o, t.install = function(e) {
for (var t in e) s.prototype[t] = a(s.prototype[t], e[t])
}, t.filter = function(e) {
return i(e) ? function(e) {
return e = e.slice(),
function(n) {
return e.reduce(t, n)
};
function t(e, t) {
return t(e)
}
}(e) : e
};
var r = n(0);
function s(e) {
if (!(this instanceof s)) return new s(e);
this.options = e, this.init()
}
function a(e, t) {
return e && t ? function() {
return e.apply(this, arguments), t.apply(this, arguments)
} : e || t
}
function o(e) {
return new s(e)
}
s.prototype.init = function() {
var e = this.options;
return e && e.uint8array && (this.bufferish = r.Uint8Array), this
}, t.preset = o({
preset: !0
})
}, function(e, t, n) {
var i = n(3).ExtBuffer,
r = n(32),
s = n(33),
a = n(1);
function o() {
var e = this.options;
return this.encode = function(e) {
var t = s.getWriteType(e);
return function(e, n) {
var i = t[typeof n];
if (!i) throw new Error('Unsupported type "' + typeof n + '": ' +
n);
i(e, n)
}
}(e), e && e.preset && r.setExtPackers(this), this
}
a.install({
addExtPacker: function(e, t, n) {
n = a.filter(n);
var r = t.name;
r && "Object" !== r ? (this.extPackers || (this.extPackers = {}))[r] =
s : (this.extEncoderList || (this.extEncoderList = [])).unshift([t,
s]);
function s(t) {
return n && (t = n(t)), new i(t, e)
}
},
getExtPacker: function(e) {
var t = this.extPackers || (this.extPackers = {}),
n = e.constructor,
i = n && n.name && t[n.name];
if (i) return i;
for (var r = this.extEncoderList || (this.extEncoderList = []), s =
r.length,
a = 0; a < s; a++) {
var o = r[a];
if (n === o[0]) return o[1]
}
},
init: o
}), t.preset = o.call(a.preset)
}, function(e, t, n) {
t.ExtBuffer = function e(t, n) {
if (!(this instanceof e)) return new e(t, n);
this.buffer = i.from(t), this.type = n
};
var i = n(0)
}, function(e, t) {
t.read = function(e, t, n, i, r) {
var s, a, o = 8 * r - i - 1,
c = (1 << o) - 1,
l = c >> 1,
h = -7,
u = n ? r - 1 : 0,
f = n ? -1 : 1,
d = e[t + u];
for (u += f, s = d & (1 << -h) - 1, d >>= -h, h += o; h > 0; s = 256 *
s +
e[t + u], u += f, h -= 8);
for (a = s & (1 << -h) - 1, s >>= -h, h += i; h > 0; a = 256 * a + e[t
+ u],
u += f, h -= 8);
if (0 === s) s = 1 - l;
else {
if (s === c) return a ? NaN : 1 / 0 * (d ? -1 : 1);
a += Math.pow(2, i), s -= l
}
return (d ? -1 : 1) * a * Math.pow(2, s - i)
}, t.write = function(e, t, n, i, r, s) {
var a, o, c, l = 8 * s - r - 1,
h = (1 << l) - 1,
u = h >> 1,
f = 23 === r ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
d = i ? 0 : s - 1,
p = i ? 1 : -1,
g = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (o = isNaN(t) ? 1 : 0,
a =
h) : (a =
Math.floor(Math.log(t) / Math.LN2), t * (c = Math.pow(2, -a)) <
1 && (a--, c *=
2), (t += a + u >= 1 ? f / c : f * Math.pow(2, 1 - u)) *
c >= 2 && (a++,
c /= 2), a + u >= h ? (o = 0, a = h) : a + u >= 1 ? (o =
arguments)
}, t.write = function(e) {
return function() {
return (this[e] || i[e]).apply(this, arguments)
}
}("write");
var r = n(0),
s = r.global,
a = r.hasBuffer && "TYPED_ARRAY_SUPPORT" in s,
o = a && !s.TYPED_ARRAY_SUPPORT;
function c(e, t, n, s) {
var a = r.isBuffer(this),
c = r.isBuffer(e);
if (a && c) return this.copy(e, t, n, s);
if (o || a || c || !r.isView(this) || !r.isView(e)) return
i.copy.call(this,
e, t, n, s);
var h = n || null != s ? l.call(this, n, s) : this;
return e.set(h, t), h.length
}
function l(e, t) {
var n = this.slice || !o && this.subarray;
if (n) return n.call(this, e, t);
var i = r.alloc.call(this, t - e);
return c.call(this, i, 0, e, t), i
}
}, function(e, t, n) {
(function(e) {
! function(t) {
var n, i = "undefined",
r = i !== typeof e && e,
s = i !== typeof Uint8Array && Uint8Array,
a = i !== typeof ArrayBuffer && ArrayBuffer,
o = [0, 0, 0, 0, 0, 0, 0, 0],
c = Array.isArray || function(e) {
return !!e && "[object Array]" ==
Object.prototype.toString.call(e)
},
l = 4294967296;
function h(e, c, h) {
var b = c ? 0 : 4,
x = c ? 4 : 0,
S = c ? 0 : 3,
T = c ? 1 : 2,
I = c ? 2 : 1,
E = c ? 3 : 0,
M = c ? y : v,
A = c ? k : w,
P = O.prototype,
B = "is" + e,
C = "_" + B;
return P.buffer = void 0, P.offset = 0, P[C] = !0, P.toNumber =
R, P.toString =
function(e) {
var t = this.buffer,
n = this.offset,
i = _(t, n + b),
r = _(t, n + x),
s = "",
a = !h && 2147483648 & i;
for (a && (i = ~i, r = l - r), e = e || 10;;) {
var o = i % e * l + r;
if (i = Math.floor(i / e), r = Math.floor(o / e), s =
(o % e).toString(
e) + s, !i && !r) break
}
return a && (s = "-" + s), s
}, P.toJSON = R, P.toArray = u, r && (P.toBuffer = f), s &&
(P.toArrayBuffer =
function O(e, t, r, c) {
return this instanceof O ? function(e, t, r, c, h) {
if (s && a && (t instanceof a && (t = new s(t)), c
instanceof a && (c =
new s(c))), t || r || c || n) {
if (!p(t, r)) h = r, c = t, r = 0, t = new(n ||
Array)(8);
e.buffer = t, e.offset = r |= 0, i !== typeof c &&
("string" ==
typeof c ? function(e, t, n, i) {
var r = 0,
s = n.length,
a = 0,
o = 0;
"-" === n[0] && r++;
for (var c = r; r < s;) {
var h = parseInt(n[r++], i);
if (!(h >= 0)) break;
o = o * i + h, a = a * i + Math.floor(o /
l), o %= l
}
c && (a = ~a, o ? o = l - o : a++), j(e, t + b,
a), j(e, t + x, o)
}(t, r, c, h || 10) : p(c, h) ? g(t, r, c, h) :
"number" == typeof h ?
function R() {
var e = this.buffer,
t = this.offset,
n = _(e, t + b),
i = _(e, t + x);
return h || (n |= 0), n ? n * l + i : i
}
function j(e, t, n) {
e[t + E] = 255 & n, n >>= 8, e[t + I] = 255 & n, n >>= 8,
e[t + T] =
255 & n, n >>= 8, e[t + S] = 255 & n
}
function _(e, t) {
return 16777216 * e[t + S] + (e[t + T] << 16) + (e[t + I]
<< 8) + e[t +
E]
}
}
function u(e) {
var t = this.buffer,
i = this.offset;
return n = null, !1 !== e && 0 === i && 8 === t.length &&
c(t) ? t : m(t,
i)
}
function f(t) {
var i = this.buffer,
s = this.offset;
if (n = r, !1 !== t && 0 === s && 8 === i.length &&
e.isBuffer(i)) return i;
var a = new r(8);
return g(a, 0, i, s), a
}
function d(e) {
var t = this.buffer,
i = this.offset,
r = t.buffer;
if (n = s, !1 !== e && 0 === i && r instanceof a && 8 ===
r.byteLength)
return r;
var o = new s(8);
return g(o, 0, t, i), o.buffer
}
function p(e, t) {
var n = e && e.length;
return t |= 0, n && t + 8 <= n && "string" != typeof e[t]
}
function g(e, t, n, i) {
t |= 0, i |= 0;
for (var r = 0; r < 8; r++) e[t++] = 255 & n[i++]
}
function m(e, t) {
return Array.prototype.slice.call(e, t, t + 8)
}
function y(e, t, n) {
for (var i = t + 8; i > t;) e[--i] = 255 & n, n /= 256
}
function k(e, t, n) {
var i = t + 8;
for (n++; i > t;) e[--i] = 255 & -n ^ 255, n /= 256
}
function v(e, t, n) {
for (var i = t + 8; t < i;) e[t++] = 255 & n, n /= 256
}
function w(e, t, n) {
var i = t + 8;
for (n++; t < i;) e[t++] = 255 & -n ^ 255, n /= 256
}
h("Uint64BE", !0, !0), h("Int64BE", !0, !1), h("Uint64LE", !1, !0),
h(
"Int64LE", !1, !1)
}("string" != typeof t.nodeName ? t : this || {})
}).call(this, n(11).Buffer)
}, function(e, t, n) {
var i = n(3).ExtBuffer,
r = n(35),
s = n(17).readUint8,
a = n(36),
o = n(1);
function c() {
var e = this.options;
return this.decode = function(e) {
var t = a.getReadToken(e);
return function(e) {
var n = s(e),
i = t[n];
if (!i) throw new Error("Invalid type: " + (n ? "0x" +
n.toString(16) :
n));
return i(e)
}
}(e), e && e.preset && r.setExtUnpackers(this), this
}
o.install({
addExtUnpacker: function(e, t) {
(this.extUnpackers || (this.extUnpackers = []))[e] = o.filter(t)
},
getExtUnpacker: function(e) {
return (this.extUnpackers || (this.extUnpackers = []))[e] ||
function(t) {
return new i(t, e)
}
},
init: c
}), t.preset = c.call(o.preset)
}, function(e, t, n) {
t.encode = function(e, t) {
var n = new i(t);
return n.write(e), n.read()
};
var i = n(10).EncodeBuffer
}, function(e, t, n) {
t.EncodeBuffer = r;
var i = n(2).preset;
function r(e) {
if (!(this instanceof r)) return new r(e);
if (e && (this.options = e, e.codec)) {
var t = this.codec = e.codec;
t.bufferish && (this.bufferish = t.bufferish)
}
}
n(14).FlexEncoder.mixin(r.prototype), r.prototype.codec = i,
r.prototype.write =
function(e) {
this.codec.encode(this, e)
}
}, function(e, t, n) {
"use strict";
(function(e) {
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var i = n(26),
r = n(4),
s = n(27);
function a() {
return c.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
}
function o(e, t) {
if (a() < t) throw new RangeError("Invalid typed array
length");
return c.TYPED_ARRAY_SUPPORT ? (e = new
Uint8Array(t)).__proto__ = c.prototype :
(null === e && (e = new c(t)), e.length = t), e
}
function c(e, t, n) {
if (!(c.TYPED_ARRAY_SUPPORT || this instanceof c)) return new
c(e, t, n);
if ("number" == typeof e) {
if ("string" == typeof t) throw new Error(
"If encoding is specified then the first argument must
be a string");
return u(this, e)
}
return l(this, e, t, n)
}
function l(e, t, n, i) {
if ("number" == typeof t) throw new TypeError(
'"value" argument must not be a number');
return "undefined" != typeof ArrayBuffer && t instanceof
ArrayBuffer ?
function(e, t, n, i) {
if (t.byteLength, n < 0 || t.byteLength < n) throw new
RangeError(
"'offset' is out of bounds");
if (t.byteLength < n + (i || 0)) throw new RangeError(
"'length' is out of bounds");
return t = void 0 === n && void 0 === i ? new Uint8Array(t)
: void 0 ===
i ? new Uint8Array(t, n) : new Uint8Array(t, n, i),
c.TYPED_ARRAY_SUPPORT ?
(e = t).__proto__ = c.prototype : e = f(e, t), e
}(e, t, n, i) : "string" == typeof t ? function(e, t, n) {
if ("string" == typeof n && "" !== n || (n = "utf8"), !
c.isEncoding(n))
throw new TypeError('"encoding" must be a valid string
encoding');
var i = 0 | p(t, n),
r = (e = o(e, i)).write(t, n);
return r !== i && (e = e.slice(0, r)), e
}(e, t, n) : function(e, t) {
if (c.isBuffer(t)) {
var n = 0 | d(t.length);
return 0 === (e = o(e, n)).length || t.copy(e, 0, 0,
n), e
}
if (t) {
if ("undefined" != typeof ArrayBuffer && t.buffer
instanceof ArrayBuffer ||
"length" in t) return "number" != typeof t.length
|| function(e) {
return e != e
}(t.length) ? o(e, 0) : f(e, t);
if ("Buffer" === t.type && s(t.data)) return f(e,
t.data)
}
throw new TypeError(
"First argument must be a string, Buffer, ArrayBuffer,
Array, or array-like object."
)
}(e, t)
}
function h(e) {
if ("number" != typeof e) throw new TypeError(
'"size" argument must be a number');
if (e < 0) throw new RangeError('"size" argument must not be
negative')
}
function u(e, t) {
if (h(t), e = o(e, t < 0 ? 0 : 0 | d(t)), !
c.TYPED_ARRAY_SUPPORT)
for (var n = 0; n < t; ++n) e[n] = 0;
return e
}
function f(e, t) {
var n = t.length < 0 ? 0 : 0 | d(t.length);
e = o(e, n);
for (var i = 0; i < n; i += 1) e[i] = 255 & t[i];
return e
}
function d(e) {
if (e >= a()) throw new RangeError(
"Attempt to allocate Buffer larger than maximum size: 0x" +
a().toString(
16) + " bytes");
return 0 | e
}
function p(e, t) {
if (c.isBuffer(e)) return e.length;
if ("undefined" != typeof ArrayBuffer && "function" == typeof
ArrayBuffer
.isView && (ArrayBuffer.isView(e) || e instanceof
ArrayBuffer)) return e
.byteLength;
"string" != typeof e && (e = "" + e);
var n = e.length;
if (0 === n) return 0;
for (var i = !1;;) switch (t) {
case "ascii":
case "latin1":
case "binary":
return n;
case "utf8":
case "utf-8":
case void 0:
return z(e).length;
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return 2 * n;
case "hex":
return n >>> 1;
case "base64":
return H(e).length;
default:
if (i) return z(e).length;
t = ("" + t).toLowerCase(), i = !0
}
}
function g(e, t, n) {
var i = e[t];
e[t] = e[n], e[n] = i
}
function m(e, t, n, i, r) {
if (0 === e.length) return -1;
if ("string" == typeof n ? (i = n, n = 0) : n > 2147483647 ? n
=
2147483647 : n < -2147483648 && (n = -2147483648), n = +n,
isNaN(n) && (
n = r ? 0 : e.length - 1), n < 0 && (n = e.length + n), n
>= e.length) {
if (r) return -1;
n = e.length - 1
} else if (n < 0) {
if (!r) return -1;
n = 0
}
if ("string" == typeof t && (t = c.from(t, i)), c.isBuffer(t))
return 0 ===
t.length ? -1 : y(e, t, n, i, r);
if ("number" == typeof t) return t &= 255,
c.TYPED_ARRAY_SUPPORT &&
"function" == typeof Uint8Array.prototype.indexOf ? r ?
Uint8Array.prototype
.indexOf.call(e, t, n) :
Uint8Array.prototype.lastIndexOf.call(e, t, n) :
y(e, [t], n, i, r);
throw new TypeError("val must be string, number or Buffer")
}
function y(e, t, n, i, r) {
var s, a = 1,
o = e.length,
c = t.length;
if (void 0 !== i && ("ucs2" === (i = String(i).toLowerCase())
|| "ucs-2" ===
i || "utf16le" === i || "utf-16le" === i))
{
if (e.length < 2 || t.length < 2) return -1;
a = 2, o /= 2, c /= 2, n /= 2
}
function l(e, t) {
return 1 === a ? e[t] : e.readUInt16BE(t * a)
}
if (r) {
var h = -1;
for (s = n; s < o; s++)
if (l(e, s) === l(t, -1 === h ? 0 : s - h)) {
if (-1 === h && (h = s), s - h + 1 === c) return h
* a
} else -1 !== h && (s -= s - h), h = -1
} else
for (n + c > o && (n = o - c), s = n; s >= 0; s--) {
for (var u = !0, f = 0; f < c; f++)
if (l(e, s + f) !== l(t, f)) {
u = !1;
break
}
if (u) return s
}
return -1
}
function k(e, t, n, i) {
n = Number(n) || 0;
var r = e.length - n;
i ? (i = Number(i)) > r && (i = r) : i = r;
var s = t.length;
if (s % 2 != 0) throw new TypeError("Invalid hex string");
i > s / 2 && (i = s / 2);
for (var a = 0; a < i; ++a) {
var o = parseInt(t.substr(2 * a, 2), 16);
if (isNaN(o)) return a;
e[n + a] = o
}
return a
}
function v(e, t, n, i) {
return V(z(t, e.length - n), e, n, i)
}
function w(e, t, n, i) {
return V(function(e) {
for (var t = [], n = 0; n < e.length; ++n) t.push(255 &
e.charCodeAt(n));
return t
}(t), e, n, i)
}
function b(e, t, n, i) {
return w(e, t, n, i)
}
function x(e, t, n, i) {
return V(H(t), e, n, i)
}
function S(e, t, n, i) {
return V(function(e, t) {
for (var n, i, r, s = [], a = 0; a < e.length && !((t -= 2)
< 0); ++a)
i = (n = e.charCodeAt(a)) >> 8, r = n % 256, s.push(r),
s.push(i);
return s
}(t, e.length - n), e, n, i)
}
function T(e, t, n) {
return 0 === t && n === e.length ? i.fromByteArray(e) :
i.fromByteArray(e
.slice(t, n))
}
function I(e, t, n) {
n = Math.min(e.length, n);
for (var i = [], r = t; r < n;) {
var s, a, o, c, l = e[r],
h = null,
u = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
if (r + u <= n) switch (u) {
case 1:
l < 128 && (h = l);
break;
case 2:
128 == (192 & (s = e[r + 1])) && (c = (31 & l) << 6
| 63 & s) > 127 &&
(h = c);
break;
case 3:
s = e[r + 1], a = e[r + 2], 128 == (192 & s) && 128
== (192 & a) && (
c = (15 & l) << 12 | (63 & s) << 6 | 63 & a) >
2047 && (c < 55296 ||
e.slice(i, i += E));
return n
}(i)
}
t.Buffer = c, t.SlowBuffer = function(e) {
return +e != e && (e = 0), c.alloc(+e)
}, t.INSPECT_MAX_BYTES = 50, c.TYPED_ARRAY_SUPPORT = void 0 !==
e.TYPED_ARRAY_SUPPORT ?
e.TYPED_ARRAY_SUPPORT : function() {
try {
var e = new Uint8Array(1);
return e.__proto__ = {
__proto__: Uint8Array.prototype,
foo: function() {
return 42
}
}, 42 === e.foo() && "function" == typeof e.subarray && 0
=== e.subarray(
1, 1).byteLength
} catch (e) {
return !1
}
}(), t.kMaxLength = a(), c.poolSize = 8192, c._augment =
function(e) {
return e.__proto__ = c.prototype, e
}, c.from = function(e, t, n) {
return l(null, e, t, n)
}, c.TYPED_ARRAY_SUPPORT && (c.prototype.__proto__ =
Uint8Array.prototype,
c.__proto__ = Uint8Array,
"undefined" != typeof Symbol && Symbol.species &&
c[Symbol.species] === c &&
Object.defineProperty(c, Symbol.species, {
value: null,
configurable: !0
})), c.alloc = function(e, t, n) {
return function(e, t, n, i) {
return h(t), t <= 0 ? o(e, t) : void 0 !== n ? "string" ==
typeof i ?
o(e, t).fill(n, i) : o(e, t).fill(n) : o(e, t)
}(null, e, t, n)
}, c.allocUnsafe = function(e) {
return u(null, e)
}, c.allocUnsafeSlow = function(e) {
return u(null, e)
}, c.isBuffer = function(e) {
return !(null == e || !e._isBuffer)
}, c.compare = function(e, t) {
if (!c.isBuffer(e) || !c.isBuffer(t)) throw new TypeError(
"Arguments must be Buffers");
if (e === t) return 0;
for (var n = e.length, i = t.length, r = 0, s = Math.min(n, i);
r < s; ++
r)
if (e[r] !== t[r]) {
n = e[r], i = t[r];
break
}
return n < i ? -1 : i < n ? 1 : 0
}, c.isEncoding = function(e) {
switch (String(e).toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "latin1":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return !0;
default:
return !1
}
}, c.concat = function(e, t) {
if (!s(e)) throw new TypeError(
'"list" argument must be an Array of Buffers');
if (0 === e.length) return c.alloc(0);
var n;
if (void 0 === t)
for (t = 0, n = 0; n < e.length; ++n) t += e[n].length;
var i = c.allocUnsafe(t),
r = 0;
for (n = 0; n < e.length; ++n) {
var a = e[n];
if (!c.isBuffer(a)) throw new TypeError(
'"list" argument must be an Array of Buffers');
a.copy(i, r), r += a.length
}
return i
}, c.byteLength = p, c.prototype._isBuffer = !0, c.prototype.swap16
=
function() {
var e = this.length;
if (e % 2 != 0) throw new RangeError(
"Buffer size must be a multiple of 16-bits");
for (var t = 0; t < e; t += 2) g(this, t, t + 1);
return this
}, c.prototype.swap32 = function() {
var e = this.length;
if (e % 4 != 0) throw new RangeError(
"Buffer size must be a multiple of 32-bits");
for (var t = 0; t < e; t += 4) g(this, t, t + 3), g(this, t +
1, t + 2);
return this
}, c.prototype.swap64 = function() {
var e = this.length;
if (e % 8 != 0) throw new RangeError(
"Buffer size must be a multiple of 64-bits");
for (var t = 0; t < e; t += 8) g(this, t, t + 7), g(this, t +
1, t + 6),
g(this, t + 2, t + 5), g(this, t + 3, t + 4);
return this
}, c.prototype.toString = function() {
var e = 0 | this.length;
return 0 === e ? "" : 0 === arguments.length ? I(this, 0, e) :
function(
e, t, n) {
var i = !1;
if ((void 0 === t || t < 0) && (t = 0), t > this.length)
return "";
if ((void 0 === n || n > this.length) && (n = this.length),
n <= 0)
return "";
if ((n >>>= 0) <= (t >>>= 0)) return "";
for (e || (e = "utf8");;) switch (e) {
case "hex":
return P(this, t, n);
case "utf8":
case "utf-8":
return I(this, t, n);
case "ascii":
return M(this, t, n);
case "latin1":
case "binary":
return A(this, t, n);
case "base64":
return T(this, t, n);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return B(this, t, n);
default:
if (i) throw new TypeError("Unknown encoding: " +
e);
e = (e + "").toLowerCase(), i = !0
}
}.apply(this, arguments)
}, c.prototype.equals = function(e) {
if (!c.isBuffer(e)) throw new TypeError("Argument must be a
Buffer");
return this === e || 0 === c.compare(this, e)
}, c.prototype.inspect = function() {
var e = "",
n = t.INSPECT_MAX_BYTES;
return this.length > 0 && (e = this.toString("hex", 0,
n).match(/.{2}/g)
.join(" "), this.length > n && (e +=
" ... ")), "<Buffer " + e + ">"
}, c.prototype.compare = function(e, t, n, i, r) {
if (!c.isBuffer(e)) throw new TypeError("Argument must be a
Buffer");
if (void 0 === t && (t = 0), void 0 === n && (n = e ?
e.length : 0),
void 0 === i && (i = 0), void 0 === r && (r = this.length),
t < 0 || n >
e.length || i < 0 || r > this.length) throw new RangeError(
"out of range index");
if (i >= r && t >= n) return 0;
if (i >= r) return -1;
if (t >= n) return 1;
if (this === e) return 0;
for (var s = (r >>>= 0) - (i >>>= 0), a = (n >>>= 0) - (t >>>=
0), o =
Math.min(s, a), l = this.slice(i, r), h = e.slice(t, n), u
= 0; u < o; ++
u)
if (l[u] !== h[u]) {
s = l[u], a = h[u];
break
}
return s < a ? -1 : a < s ? 1 : 0
}, c.prototype.includes = function(e, t, n) {
return -1 !== this.indexOf(e, t, n)
}, c.prototype.indexOf = function(e, t, n) {
return m(this, e, t, n, !0)
}, c.prototype.lastIndexOf = function(e, t, n) {
return m(this, e, t, n, !1)
}, c.prototype.write = function(e, t, n, i) {
if (void 0 === t) i = "utf8", n = this.length, t = 0;
else if (void 0 === n && "string" == typeof t) i = t, n =
this.length, t =
0;
else {
if (!isFinite(t)) throw new Error(
"Buffer.write(string, encoding, offset[, length]) is no
longer supported"
);
t |= 0, isFinite(n) ? (n |= 0, void 0 === i && (i =
"utf8")) : (i = n,
n = void 0)
}
var r = this.length - t;
if ((void 0 === n || n > r) && (n = r), e.length > 0 && (n < 0
|| t < 0) ||
t > this.length) throw new RangeError(
"Attempt to write outside buffer bounds");
i || (i = "utf8");
for (var s = !1;;) switch (i) {
case "hex":
return k(this, e, t, n);
case "utf8":
case "utf-8":
return v(this, e, t, n);
case "ascii":
return w(this, e, t, n);
case "latin1":
case "binary":
return b(this, e, t, n);
case "base64":
return x(this, e, t, n);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return S(this, e, t, n);
default:
if (s) throw new TypeError("Unknown encoding: " + i);
i = ("" + i).toLowerCase(), s = !0
}
}, c.prototype.toJSON = function() {
return {
type: "Buffer",
data: Array.prototype.slice.call(this._arr || this, 0)
}
};
var E = 4096;
function M(e, t, n) {
var i = "";
n = Math.min(e.length, n);
for (var r = t; r < n; ++r) i += String.fromCharCode(127 &
e[r]);
return i
}
function A(e, t, n) {
var i = "";
n = Math.min(e.length, n);
for (var r = t; r < n; ++r) i += String.fromCharCode(e[r]);
return i
}
function P(e, t, n) {
var i = e.length;
(!t || t < 0) && (t = 0), (!n || n < 0 || n > i) && (n = i);
for (var r = "", s = t; s < n; ++s) r += F(e[s]);
return r
}
function B(e, t, n) {
for (var i = e.slice(t, n), r = "", s = 0; s < i.length; s +=
2) r +=
String.fromCharCode(i[s] + 256 * i[s + 1]);
return r
}
function C(e, t, n) {
if (e % 1 != 0 || e < 0) throw new RangeError("offset is not
uint");
if (e + t > n) throw new RangeError(
"Trying to access beyond buffer length")
}
function O(e, t, n, i, r, s) {
if (!c.isBuffer(e)) throw new TypeError(
'"buffer" argument must be a Buffer instance');
if (t > r || t < s) throw new RangeError(
'"value" argument is out of bounds');
if (n + i > e.length) throw new RangeError("Index out of
range")
}
function R(e, t, n, i) {
t < 0 && (t = 65535 + t + 1);
for (var r = 0, s = Math.min(e.length - n, 2); r < s; ++r) e[n
+ r] = (t &
function j(e, t, n, i) {
t < 0 && (t = 4294967295 + t + 1);
for (var r = 0, s = Math.min(e.length - n, 4); r < s; ++r) e[n
+ r] = t >>>
8 * (i ? r : 3 - r) & 255
}
function _(e, t, n, i, r, s) {
if (n + i > e.length) throw new RangeError("Index out of
range");
if (n < 0) throw new RangeError("Index out of range")
}
function U(e, t, n, i, s) {
return s || _(e, 0, n, 4), r.write(e, t, n, i, 23, 4), n + 4
}
function D(e, t, n, i, s) {
return s || _(e, 0, n, 8), r.write(e, t, n, i, 52, 8), n + 8
}
c.prototype.slice = function(e, t) {
var n, i = this.length;
if ((e = ~~e) < 0 ? (e += i) < 0 && (e = 0) : e > i && (e = i),
(t =
s] * r;
return i
}, c.prototype.readUIntBE = function(e, t, n) {
e |= 0, t |= 0, n || C(e, t, this.length);
for (var i = this[e + --t], r = 1; t > 0 && (r *= 256);) i +=
this[e +
--t] * r;
return i
}, c.prototype.readUInt8 = function(e, t) {
return t || C(e, 1, this.length), this[e]
}, c.prototype.readUInt16LE = function(e, t) {
return t || C(e, 2, this.length), this[e] | this[e + 1] << 8
}, c.prototype.readUInt16BE = function(e, t) {
return t || C(e, 2, this.length), this[e] << 8 | this[e + 1]
}, c.prototype.readUInt32LE = function(e, t) {
return t || C(e, 4, this.length), (this[e] | this[e + 1] << 8 |
this[e +
s] * r;
return i >= (r *= 128) && (i -= Math.pow(2, 8 * t)), i
}, c.prototype.readIntBE = function(e, t, n) {
e |= 0, t |= 0, n || C(e, t, this.length);
for (var i = t, r = 1, s = this[e + --i]; i > 0 && (r *= 256);)
s +=
this[e + --i] * r;
return s >= (r *= 128) && (s -= Math.pow(2, 8 * t)), s
}, c.prototype.readInt8 = function(e, t) {
return t || C(e, 1, this.length), 128 & this[e] ? -1 * (255 -
this[e] +
1) :
this[e]
}, c.prototype.readInt16LE = function(e, t) {
t || C(e, 2, this.length);
var n = this[e] | this[e + 1] << 8;
return 32768 & n ? 4294901760 | n : n
}, c.prototype.readInt16BE = function(e, t) {
t || C(e, 2, this.length);
var n = this[e + 1] | this[e] << 8;
return 32768 & n ? 4294901760 | n : n
}, c.prototype.readInt32LE = function(e, t) {
return t || C(e, 4, this.length), this[e] | this[e + 1] << 8 |
this[e +
e) : j(this, e, t, !1), t + 4
}, c.prototype.writeFloatLE = function(e, t, n) {
return U(this, e, t, !0, n)
}, c.prototype.writeFloatBE = function(e, t, n) {
return U(this, e, t, !1, n)
}, c.prototype.writeDoubleLE = function(e, t, n) {
return D(this, e, t, !0, n)
}, c.prototype.writeDoubleBE = function(e, t, n) {
return D(this, e, t, !1, n)
}, c.prototype.copy = function(e, t, n, i) {
if (n || (n = 0), i || 0 === i || (i = this.length), t >=
e.length && (t =
t + n);
var r, s = i - n;
if (this === e && n < t && t < i)
for (r = s - 1; r >= 0; --r) e[r + t] = this[r + n];
else if (s < 1e3 || !c.TYPED_ARRAY_SUPPORT)
for (r = 0; r < s; ++r) e[r + t] = this[r + n];
else Uint8Array.prototype.set.call(e, this.subarray(n, n + s),
t);
return s
}, c.prototype.fill = function(e, t, n, i) {
if ("string" == typeof e) {
if ("string" == typeof t ? (i = t, t = 0, n =
this.length) : "string" ==
typeof n && (i = n, n = this.length), 1 === e.length) {
var r = e.charCodeAt(0);
r < 256 && (e = r)
}
if (void 0 !== i && "string" != typeof i) throw new
TypeError(
"encoding must be a string");
if ("string" == typeof i && !c.isEncoding(i)) throw new
TypeError(
"Unknown encoding: " + i)
} else "number" == typeof e && (e &= 255);
if (t < 0 || this.length < t || this.length < n) throw new
RangeError(
"Out of range index");
if (n <= t) return this;
var s;
if (t >>>= 0, n = void 0 === n ? this.length : n >>> 0, e || (e
= 0),
"number" == typeof e)
for (s = t; s < n; ++s) this[s] = e;
else {
var a = c.isBuffer(e) ? e : z(new c(e, i).toString()),
o = a.length;
for (s = 0; s < n - t; ++s) this[s + t] = a[s % o]
}
return this
};
var L = /[^+\/0-9A-Za-z-_]/g;
function F(e) {
return e < 16 ? "0" + e.toString(16) : e.toString(16)
}
function z(e, t) {
var n;
t = t || 1 / 0;
for (var i = e.length, r = null, s = [], a = 0; a < i; ++a) {
if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
if (!r) {
if (n > 56319) {
(t -= 3) > -1 && s.push(239, 191, 189);
continue
}
if (a + 1 === i) {
(t -= 3) > -1 && s.push(239, 191, 189);
continue
}
r = n;
continue
}
if (n < 56320) {
(t -= 3) > -1 && s.push(239, 191, 189), r = n;
continue
}
n = 65536 + (r - 55296 << 10 | n - 56320)
} else r && (t -= 3) > -1 && s.push(239, 191, 189);
if (r = null, n < 128) {
if ((t -= 1) < 0) break;
s.push(n)
} else if (n < 2048) {
if ((t -= 2) < 0) break;
s.push(n >> 6 | 192, 63 & n | 128)
} else if (n < 65536) {
if ((t -= 3) < 0) break;
s.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
} else {
if (!(n < 1114112)) throw new Error("Invalid code
point");
if ((t -= 4) < 0) break;
s.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 |
128, 63 & n |
128)
}
}
return s
}
function H(e) {
return i.toByteArray(function(e) {
if ((e = function(e) {
return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
}(e).replace(L, "")).length < 2) return "";
for (; e.length % 4 != 0;) e += "=";
return e
}(e))
}
function V(e, t, n, i) {
for (var r = 0; r < i && !(r + n >= t.length || r >= e.length);
++r) t[r +
n] = e[r];
return r
}
}).call(this, n(12))
}, function(e, t) {
var n;
n = function() {
return this
}();
try {
n = n || new Function("return this")()
} catch (e) {
"object" == typeof window && (n = window)
}
e.exports = n
}, function(e, t) {
for (var n = t.uint8 = new Array(256), i = 0; i <= 255; i++) n[i] =
r(i);
function r(e) {
return function(t) {
var n = t.reserve(1);
t.buffer[n] = e
}
}
}, function(e, t, n) {
t.FlexDecoder = s, t.FlexEncoder = a;
var i = n(0),
r = "BUFFER_SHORTAGE";
function s() {
if (!(this instanceof s)) return new s
}
function a() {
if (!(this instanceof a)) return new a
}
function o() {
throw new Error("method not implemented: write()")
}
function c() {
throw new Error("method not implemented: fetch()")
}
function l() {
return this.buffers && this.buffers.length ? (this.flush(),
this.pull()) :
this.fetch()
}
function h(e) {
(this.buffers || (this.buffers = [])).push(e)
}
function u() {
return (this.buffers || (this.buffers = [])).shift()
}
function f(e) {
return function(t) {
for (var n in e) t[n] = e[n];
return t
}
}
s.mixin = f({
bufferish: i,
write: function(e) {
var t = this.offset ? i.prototype.slice.call(this.buffer,
this.offset) :
this.buffer;
this.buffer = t ? e ? this.bufferish.concat([t, e]) : t : e,
this.offset =
0
},
fetch: c,
flush: function() {
for (; this.offset < this.buffer.length;) {
var e, t = this.offset;
try {
e = this.fetch()
} catch (e) {
if (e && e.message != r) throw e;
this.offset = t;
break
}
this.push(e)
}
},
push: h,
pull: u,
read: l,
reserve: function(e) {
var t = this.offset,
n = t + e;
if (n > this.buffer.length) throw new Error(r);
return this.offset = n, t
},
offset: 0
}), s.mixin(s.prototype), a.mixin = f({
bufferish: i,
write: o,
fetch: function() {
var e = this.start;
if (e < this.offset) {
var t = this.start = this.offset;
return i.prototype.slice.call(this.buffer, e, t)
}
},
flush: function() {
for (; this.start < this.offset;) {
var e = this.fetch();
e && this.push(e)
}
},
push: h,
pull: function() {
var e = this.buffers || (this.buffers = []),
t = e.length > 1 ? this.bufferish.concat(e) : e[0];
return e.length = 0, t
},
read: l,
reserve: function(e) {
var t = 0 | e;
if (this.buffer) {
var n = this.buffer.length,
i = 0 | this.offset,
r = i + t;
if (r < n) return this.offset = r, i;
this.flush(), e = Math.max(e, Math.min(2 * n,
this.maxBufferSize))
}
return e = Math.max(e, this.minBufferSize), this.buffer =
this.bufferish
.alloc(e), this.start = 0, this.offset = t, 0
},
send: function(e) {
var t = e.length;
if (t > this.minBufferSize) this.flush(), this.push(e);
else {
var n = this.reserve(t);
i.prototype.copy.call(e, this.buffer, n)
}
},
maxBufferSize: 65536,
minBufferSize: 2048,
offset: 0,
start: 0
}), a.mixin(a.prototype)
}, function(e, t, n) {
t.decode = function(e, t) {
var n = new i(t);
return n.write(e), n.read()
};
var i = n(16).DecodeBuffer
}, function(e, t, n) {
t.DecodeBuffer = r;
var i = n(8).preset;
function r(e) {
if (!(this instanceof r)) return new r(e);
if (e && (this.options = e, e.codec)) {
var t = this.codec = e.codec;
t.bufferish && (this.bufferish = t.bufferish)
}
}
n(14).FlexDecoder.mixin(r.prototype), r.prototype.codec = i,
r.prototype.fetch =
function() {
return this.codec.decode(this)
}
}, function(e, t, n) {
var i = n(4),
r = n(7),
s = r.Uint64BE,
a = r.Int64BE;
t.getReadFormat = function(e) {
var t = o.hasArrayBuffer && e && e.binarraybuffer,
n = e && e.int64;
return {
map: l && e && e.usemap ? u : h,
array: f,
str: d,
bin: t ? g : p,
ext: m,
uint8: y,
uint16: v,
uint32: b,
uint64: S(8, n ? E : T),
int8: k,
int16: w,
int32: x,
int64: S(8, n ? M : I),
float32: S(4, A),
float64: S(8, P)
}
}, t.readUint8 = y;
var o = n(0),
c = n(6),
l = "undefined" != typeof Map;
function h(e, t) {
var n, i = {},
r = new Array(t),
s = new Array(t),
a = e.codec.decode;
for (n = 0; n < t; n++) r[n] = a(e), s[n] = a(e);
for (n = 0; n < t; n++) i[r[n]] = s[n];
return i
}
function u(e, t) {
var n, i = new Map,
r = new Array(t),
s = new Array(t),
a = e.codec.decode;
for (n = 0; n < t; n++) r[n] = a(e), s[n] = a(e);
for (n = 0; n < t; n++) i.set(r[n], s[n]);
return i
}
function f(e, t) {
for (var n = new Array(t), i = e.codec.decode, r = 0; r < t; r+
+) n[r] = i(
e);
return n
}
function d(e, t) {
var n = e.reserve(t),
i = n + t;
return c.toString.call(e.buffer, "utf-8", n, i)
}
function p(e, t) {
var n = e.reserve(t),
i = n + t,
r = c.slice.call(e.buffer, n, i);
return o.from(r)
}
function g(e, t) {
var n = e.reserve(t),
i = n + t,
r = c.slice.call(e.buffer, n, i);
return o.Uint8Array.from(r).buffer
}
function m(e, t) {
var n = e.reserve(t + 1),
i = e.buffer[n++],
r = n + t,
s = e.codec.getExtUnpacker(i);
if (!s) throw new Error("Invalid ext type: " + (i ? "0x" +
i.toString(16) :
i));
return s(c.slice.call(e.buffer, n, r))
}
function y(e) {
var t = e.reserve(1);
return e.buffer[t]
}
function k(e) {
var t = e.reserve(1),
n = e.buffer[t];
return 128 & n ? n - 256 : n
}
function v(e) {
var t = e.reserve(2),
n = e.buffer;
return n[t++] << 8 | n[t]
}
function w(e) {
var t = e.reserve(2),
n = e.buffer,
i = n[t++] << 8 | n[t];
return 32768 & i ? i - 65536 : i
}
function b(e) {
var t = e.reserve(4),
n = e.buffer;
return 16777216 * n[t++] + (n[t++] << 16) + (n[t++] << 8) +
n[t]
}
function x(e) {
var t = e.reserve(4),
n = e.buffer;
return n[t++] << 24 | n[t++] << 16 | n[t++] << 8 | n[t]
}
function S(e, t) {
return function(n) {
var i = n.reserve(e);
return t.call(n.buffer, i, !0)
}
}
function T(e) {
return new s(this, e).toNumber()
}
function I(e) {
return new a(this, e).toNumber()
}
function E(e) {
return new s(this, e)
}
function M(e) {
return new a(this, e)
}
function A(e) {
return i.read(this, e, !1, 23, 4)
}
function P(e) {
return i.read(this, e, !1, 52, 8)
}
}, function(e, t, n) {
! function(t) {
e.exports = t;
var n = "listeners",
i = {
on: function(e, t) {
return a(this, e).push(t), this
},
once: function(e, t) {
var n = this;
return i.originalListener = t, a(n, e).push(i), n;
function i() {
s.call(n, e, i), t.apply(this, arguments)
}
},
off: s,
emit: function(e, t) {
var n = this,
i = a(n, e, !0);
if (!i) return !1;
var r = arguments.length;
if (1 === r) i.forEach((function(e) {
e.call(n)
}));
else if (2 === r) i.forEach((function(e) {
e.call(n, t)
}));
else {
var s = Array.prototype.slice.call(arguments,
1);
i.forEach((function(e) {
e.apply(n, s)
}))
}
return !!i.length
}
};
function r(e) {
for (var t in i) e[t] = i[t];
return e
}
function s(e, t) {
var i;
if (arguments.length) {
if (t) {
if (i = a(this, e, !0)) {
if (!(i = i.filter((function(e) {
return e !== t && e.originalListener !== t
}))).length) return s.call(this, e);
this[n][e] = i
}
} else if ((i = this[n]) && (delete i[e], !
Object.keys(i).length)) return s
.call(this)
} else delete this[n];
return this
}
function a(e, t, i) {
if (!i || e[n]) {
var r = e[n] || (e[n] = {});
return r[t] || (r[t] = [])
}
}
r(t.prototype), t.mixin = r
}((
/**
* event-lite.js - Light-weight EventEmitter (less than 1KB when
gzipped)
*
* @copyright Yusuke Kawasaki
* @license MIT
* @constructor
* @see https://github.com/kawanet/event-lite
* @see http://kawanet.github.io/event-lite/EventLite.html
* @example
* var EventLite = require("event-lite");
*
* function MyClass() {...} // your class
*
* EventLite.mixin(MyClass.prototype); // import event methods
*
* var obj = new MyClass();
* obj.on("foo", function() {...}); // add event listener
* obj.once("bar", function() {...}); // add one-time event listener
* obj.emit("foo"); // dispatch event
* obj.emit("bar"); // dispatch another event
* obj.off("foo"); // remove event listener
*/
function e() {
if (!(this instanceof e)) return new e
}))
}, function(e, t, n) {
(function(t) {
e.exports.maxScreenWidth = 1920, e.exports.maxScreenHeight =
1080, e.exports
.serverUpdateRate = 9, e.exports.maxPlayers = 100,
e.exports.maxPlayersHard = 100, e.exports.collisionDepth = 6, e.exports.minimapRate
= 3e3, e.exports.colGrid =
10, e.exports.clientSendRate = 5, e.exports.healthBarWidth
= 75, e.exports
.healthBarPad = 4.5, e.exports.iconPadding = 15,
e.exports.iconPad = .9,
e.exports.deathFadeout = 1, e.exports.crownIconScale = 70,
e.exports.crownPad =
35, e.exports.chatCountdown = 10000, e.exports.chatCooldown
= 0, e.exports
.inSandbox = t && "mm_exp" === t.env.VULTR_SCHEME,
e.exports.maxAge = 30,
e.exports.gatherAngle = Math.PI / 2.6,
e.exports.gatherWiggle = 10, e.exports
.hitReturnRatio = .25, e.exports.hitAngle = Math.PI / 2,
e.exports.playerScale =
35, e.exports.playerSpeed = .0016, e.exports.playerDecel
= .993, e.exports
.nameY = 34, e.exports.skinColors = ["#bf8f54", "#cbb091",
"#896c4b", "#fadadc", "#ececec", "#c37373", "#4c4c4c", "#ecaff7", "#738cc3",
"#32a852"],
e.exports.animalCount = 7, e.exports.aiTurnRandom = .06,
e.exports.cowNames = [],
e.exports.shieldAngle = Math.PI / 3,
e.exports.weaponVariants = [{
id: 0,
src: "",
xp: 0,
val: 1
}, {
id: 1,
src: "_g",
xp: 3e3,
val: 1.1
}, {
id: 2,
src: "_d",
xp: 7e3,
val: 1.18
}, {
id: 3,
src: "_r",
poison: !0,
xp: 12e3,
val: 1.18
}], e.exports.fetchVariant = function(t) {
for (var n = t.weaponXP[t.weaponIndex] || 0, i =
e.exports.weaponVariants
.length - 1; i >= 0; --i)
if (n >= e.exports.weaponVariants[i].xp) return
e.exports.weaponVariants[
i]
}, e.exports.resourceTypes = ["wood", "food", "stone",
"points"], e.exports
.areaCount = 7, e.exports.treesPerArea = 9,
e.exports.bushesPerArea = 3,
e.exports.totalRocks = 32, e.exports.goldOres = 7,
e.exports.riverWidth =
724, e.exports.riverPadding = 114, e.exports.waterCurrent =
.0011, e.exports
.waveSpeed = 20e-4, e.exports.waveMax = 1,
e.exports.treeScales = [150, 160, 165, 175],
e.exports.bushScales = [80, 85, 95], e.exports.rockScales =
[80, 85,90], e.exports.snowBiomeTop = 2400,
e.exports.snowSpeed = .75, e.exports.maxNameLength = 15,
e.exports.mapScale = 14400,
e.exports.mapPingScale = 100, e.exports.mapPingTime =
2200
}).call(this, n(41))
}, function(e, t) {
var n = {
utf8: {
stringToBytes: function(e) {
return
n.bin.stringToBytes(unescape(encodeURIComponent(e)))
},
bytesToString: function(e) {
return
decodeURIComponent(escape(n.bin.bytesToString(e)))
}
},
bin: {
stringToBytes: function(e) {
for (var t = [], n = 0; n < e.length; n++) t.push(255 &
e.charCodeAt(n));
return t
},
bytesToString: function(e) {
for (var t = [], n = 0; n < e.length; n++)
t.push(String.fromCharCode(e[
n]));
return t.join("")
}
}
};
e.exports = n
}, function(e, t, n) {
"use strict";
window.loadedScript = !0;
var i = "127.0.0.1" !== location.hostname && !
location.hostname.startsWith(
"192.168.");
n(22);
var r = n(23),
s = n(42),
a = n(43),
o = n(19),
c = n(44),
l = n(45),
h = (n(46), n(47)),
u = n(48),
f = n(55),
d = n(56),
p = n(57),
g = n(58).obj,
m = new a.TextManager,
y = new(n(59))("moomoo.io", 3e3, o.maxPlayers, 5, !1);
y.debugLog = !1;
var k = !1;
function v() {
ht && ut && (k = !0, i ? window.grecaptcha.execute(
"6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {
action: "homepage"
}).then((function(e) {
w(e)
})) : w(null))
}
function w(e) {
y.start((function(t, n, a) {
var c = (i ? "wss" : "ws") + "://" + t + ":8008/?
gameIndex=" + a;
e && (c += "&token=" + encodeURIComponent(e)), r.connect(c,
(function(e) {
Bi(), setInterval(() => Bi(), 2500), e ? ft(e) :
(ue.onclick = s.checkTrusted(
(function() {
! function() {
var e = ++bt > 1,
t = Date.now() - wt > vt;
e && t ? (wt = Date.now(), xt()) : Tn()
}()
})), s.hookTouchEvents(ue), fe.onclick =
s.checkTrusted((
function() {
Oi("https://krunker.io")
})), s.hookTouchEvents(fe), pe.onclick =
s.checkTrusted((
function() {
setTimeout((function() {
! function() {
var e = xe.value,
t = prompt("party key", e);
t && (window.onbeforeunload = void 0,
window.location.href =
"/?server=" + t)
}()
}), 10)
})), s.hookTouchEvents(pe), ge.onclick =
s.checkTrusted((
function() {
Ae.classList.contains("showing") ?
(Ae.classList.remove(
"showing"), me.innerText = "Settings") :
(Ae.classList.add(
"showing"), me.innerText = "Close")
})), s.hookTouchEvents(ge), ye.onclick =
s.checkTrusted((
function() {
yn(), "block" != Ye.style.display ? Ut() :
Ye.style.display =
"none"
})), s.hookTouchEvents(ye), ke.onclick =
s.checkTrusted((
function() {
"block" != Qe.style.display ? (Qe.style.display
= "block", Ye.style
.display =
"none", an(), Gt()) : Qe.style.display = "none"
})), s.hookTouchEvents(ke), ve.onclick =
s.checkTrusted((
function() {
rn()
})), s.hookTouchEvents(ve), Ne.onclick =
s.checkTrusted((
function() {
xn()
})), s.hookTouchEvents(Ne), function() {
for (var e = 0; e < jn.length; ++e) {
var t = new Image;
t.onload = function() {
this.isLoaded = !0
}, t.src = ".././img/icons/" + jn[e] + ".png",
Rn[jn[e]] = t
}
}(), Pe.style.display = "none", Me.style.display =
"block", Le.value =
E("moo_name") || "",
function() {
var e = E("native_resolution");
Zt(e ? "true" == e : "undefined" != typeof
cordova), A = "true" ==
E("show_ping"), Ie.hidden = !A,
E("moo_moosic"), setInterval((
function() {
window.cordova && (document.getElementById(
"downloadButtonContainer").classList.add("cordova"),
document.getElementById("mobileDownloadButtonContainer").classList
.add("cordova"))
}), 1e3), en(), s.removeAllChildren(Ce);
for (var t = 0; t < l.weapons.length +
l.list.length; ++t) !
function(e) {
s.generateElement({
id: "actionBarItem" + e,
class: "actionBarItem",
style: "display:none",
onmouseout: function() {
Tt()
},
parent: Ce
})
}(t);
for (t = 0; t < l.list.length + l.weapons.length; +
+t) ! function(
e) {
var t = document.createElement("canvas");
t.width = t.height = 66;
var n = t.getContext("2d");
if (n.translate(t.width / 2, t.height / 2),
n.imageSmoothingEnabled = !
1, n.webkitImageSmoothingEnabled = !1,
n.mozImageSmoothingEnabled = !
1, l.weapons[e]) {
n.rotate(Math.PI / 4 + Math.PI);
var i = new Image;
Zn[l.weapons[e].src] = i, i.onload =
function() {
this.isLoaded = !0;
var i = 1 / (this.height / this.width),
r = l.weapons[e].iPad || 1;
n.drawImage(this, -t.width * r *
o.iconPad * i / 2, -t.height *
r * o.iconPad / 2, t.width
* r * i * o.iconPad, t.height *
r * o.iconPad), n.fillStyle
= "rgba(0, 0, 70, 0.1)", n.globalCompositeOperation =
"source-atop", n.fillRect(-
t.width / 2, -t.height / 2, t.width,
function I(e, t) {
b && localStorage.setItem(e, t)
}
function E(e) {
return b ? localStorage.getItem(e) : null
}
Math.lerpAngle = function(e, t, n) {
Math.abs(t - e) > S && (e > t ? t += T : e += T);
var i = t + (e - t) * n;
return i >= 0 && i <= T ? i : i % T
}, CanvasRenderingContext2D.prototype.roundRect = function(e, t, n,
i, r) {
return n < 2 * r && (r = n / 2), i < 2 * r && (r = i / 2), r <
0 && (r = 0),
this.beginPath(), this.moveTo(e + r, t), this.arcTo(e + n,
t, e + n, t +
i, r),
this.arcTo(e + n, t + i, e, t + i, r), this.arcTo(e, t + i, e, t,
function st(e) {
X = e.teams
}
var at = document.getElementById("featuredYoutube"),
ot = [{
name: "Pentatrate",
link:
"https://www.youtube.com/channel/UCmOqRl5PgmkvKaxyvWUpdiA"
}, {
name: "WhipLash",
link: "https://www.youtube.com/channel/UCP-
ZdhSrhqFEEsIS2UFbQDg"
}, {
name: "NOT CLICKBAIT",
link: "https://www.youtube.com/watch?v=iik25wqIuFo"
}],
ct = ot[s.randInt(0, ot.length - 1)];
at.innerHTML = "<a target='_blank' class='ytLink' href='" + ct.link
+
"'><i class='material-icons' style='vertical-align:
top;'></i> " +
ct.name + "</a>";
var lt = !0,
ht = !1,
ut = !1;
function ft(e) {
r.close(), dt(e)
}
function dt(e) {
he.style.display = "block", Be.style.display = "none",
Me.style.display =
"none", Ge.style.display = "none", Pe.style.display =
"block", Pe.innerHTML =
e +
"<a
href='javascript:window.location.href=window.location.href'
class='ytLink'>reload</a>"
}
window.onblur = function() {
lt = !1
}, window.onfocus = function() {
lt = !0, R && R.alive && yn()
}, window.onload = function() {
ht = !0, v(), setTimeout((function() {
k || (alert("Captcha failed to load"),
window.location.reload())
}), 2e4)
}, window.captchaCallback = function() {
ut = !0, v()
}, we.oncontextmenu = function() {
return !1
};
function pt() {
var e, t, n = "",
i = 0;
for (var r in y.servers) {
for (var s = y.servers[r], a = 0, c = 0; c < s.length; c++)
for (var l = 0; l < s[c].games.length; l++) a +=
s[c].games[l].playerCount;
i += a;
var h = y.regionInfo[r].name;
n += "<option disabled>" + h + " - " + a + "
players</option>";
for (var u = 0; u < s.length; u++)
for (var f = s[u], d = 0; d < f.games.length; d++) {
var p = f.games[d],
g = 1 * f.index + d + 1,
m = y.server && y.server.region === f.region &&
y.server.index === f.index &&
y.gameIndex == d,
k = h + " " + g + " [" +
Math.min(p.playerCount, o.maxPlayers) + "/" +
o.maxPlayers + "]";
let e = y.stripRegion(r) + ":" + u + ":" + d;
m && (de.getElementsByTagName("span")[0].innerText
= e), n +=
"<option value='" + e + "' " + (m ?
"selected" : "") + ">" + k +
"</option>"
}
n += "<option disabled></option>"
}
n += "<option disabled>All Servers - " + i + "
players</option>", xe.innerHTML =
n, "sandbox.moomoo.io" == location.hostname ? (e = "Back to
MooMoo", t =
function gt() {
var e = new XMLHttpRequest;
e.onreadystatechange = function() {
4 == this.readyState && (200 == this.status ? (window.vultr
= JSON.parse(
this.responseText), y.processServers(vultr.servers),
pt()) : console.error(
"Failed to load server data with status code:",
this.status))
}, e.open("GET", "/serverData", !0), e.send()
}
xe.addEventListener("change", s.checkTrusted((function() {
let e = xe.value.split(":");
y.switchServer(e[0], e[1], e[2])
})));
var mt = document.getElementById("pre-content-container"),
yt = null,
kt = null;
window.cpmstarAPI((function(e) {
e.game.setTarget(mt), kt = e
}));
var vt = 3e5,
wt = 0,
bt = 0;
function xt() {
if (!cpmstarAPI || !kt) return console.log("Failed to load
video ad API", !
!cpmstarAPI, !!kt),
void Tn();
(yt = new
kt.game.RewardedVideoView("rewardedvideo")).addEventListener(
"ad_closed", (function(e) {
console.log("Video ad closed"), St()
})), yt.addEventListener("loaded", (function(e) {
console.log("Video ad loaded"), yt.show()
})), yt.addEventListener("load_failed", (function(e) {
console.log("Video ad load failed", e), St()
})), yt.load(), mt.style.display = "block"
}
function St() {
mt.style.display = "none", Tn()
}
function Tt(e, t, n) {
if (R && e)
if (s.removeAllChildren(Fe), Fe.classList.add("visible"),
s.generateElement({
id: "itemInfoName",
text: s.capitalizeFirst(e.name),
parent: Fe
}), s.generateElement({
id: "itemInfoDesc",
text: e.desc,
parent: Fe
}), n);
else if (t) s.generateElement({
class: "itemInfoReq",
text: e.type ? "secondary" : "primary",
parent: Fe
});
else {
for (var i = 0; i < e.req.length; i += 2)
s.generateElement({
class: "itemInfoReq",
html: e.req[i] + "<span class='itemInfoReqVal'> x"
+ e.req[i + 1] +
"</span>",
parent: Fe
});
e.group.limit && s.generateElement({
class: "itemInfoLmt",
text: (R.itemCounts[e.group.id] || 0) + "/" +
e.group.limit,
parent: Fe
})
} else Fe.classList.remove("visible")
}
window.showPreAd = xt;
var It, Et, Mt, At = [],
Pt = [];
function Bt(e, t) {
At.push({
sid: e,
name: t
}), Ct()
}
function Ct() {
if (At[0]) {
var e = At[0];
s.removeAllChildren(Ze), Ze.style.display = "block",
s.generateElement({
class: "notificationText",
text: e.name,
parent: Ze
}), s.generateElement({
class: "notifButton",
html: "<i class='material-icons' style='font-
size:28px;color:#cc5151;'></i>",
parent: Ze,
onclick: function() {
Dt(0)
},
hookTouch: !0
}), s.generateElement({
class: "notifButton",
html: "<i class='material-icons' style='font-
size:28px;color:#8ecc51;'></i>",
parent: Ze,
onclick: function() {
Dt(1)
},
hookTouch: !0
})
} else Ze.style.display = "none"
}
function Ot(e) {
X.push(e), "block" == Ye.style.display && Ut()
}
function Rt(e, t) {
R && (R.team = e, R.isOwner = t, "block" == Ye.style.display &&
Ut())
}
function jt(e) {
Pt = e, "block" == Ye.style.display && Ut()
}
function _t(e) {
for (var t = X.length - 1; t >= 0; t--) X[t].sid == e &&
X.splice(t, 1);
"block" == Ye.style.display && Ut()
}
function Ut() {
if (R && R.alive) {
if (an(), Qe.style.display = "none", Ye.style.display =
"block", s.removeAllChildren(
We), R.team)
for (var e = 0; e < Pt.length; e += 2) ! function(e) {
var t = s.generateElement({
class: "allianceItem",
style: "color:" + (Pt[e] == R.sid ? "#fff" :
"rgba(255,255,255,0.6)"),
text: Pt[e + 1],
parent: We
});
R.isOwner && Pt[e] != R.sid && s.generateElement({
class: "joinAlBtn",
text: "Kick",
onclick: function() {
Lt(Pt[e])
},
hookTouch: !0,
parent: t
})
}(e);
else if (X.length)
for (e = 0; e < X.length; ++e) ! function(e) {
var t = s.generateElement({
class: "allianceItem",
style: "color:" + (X[e].sid == R.team ?
"#fff" :
"rgba(255,255,255,0.6)"),
text: X[e].sid,
parent: We
});
s.generateElement({
class: "joinAlBtn",
text: "Join",
onclick: function() {
Ft(e)
},
hookTouch: !0,
parent: t
})
}(e);
else s.generateElement({
class: "allianceItem",
text: "No Tribes Yet",
parent: We
});
s.removeAllChildren(Xe), R.team ? s.generateElement({
class: "allianceButtonM",
style: "width: 360px",
text: R.isOwner ? "Delete Tribe" : "Leave Tribe",
onclick: function() {
Ht()
},
hookTouch: !0,
parent: Xe
}) : (s.generateElement({
tag: "input",
type: "text",
id: "allianceInput",
maxLength: 7,
placeholder: "unique name",
ontouchstart: function(e) {
e.preventDefault();
var t = prompt("unique name",
e.currentTarget.value);
e.currentTarget.value = t.slice(0, 7)
},
parent: Xe
}), s.generateElement({
tag: "div",
class: "allianceButtonM",
style: "width: 140px;",
text: "Create",
onclick: function() {
zt()
},
hookTouch: !0,
parent: Xe
}))
}
}
function Dt(e) {
r.send("11", At[0].sid, e), At.splice(0, 1), Ct();
}
function Lt(e) {
r.send("12", e)
}
function Ft(e) {
r.send("10", X[e].sid)
}
function zt() {
r.send("8", document.getElementById("allianceInput").value)
}
function Ht() {
At = [], Ct(), r.send("9")
}
var Vt, qt = [];
function Yt(e, t) {
for (var n = 0; n < qt.length; ++n)
if (!qt[n].active) {
Vt = qt[n];
break
}
Vt || (Vt = new function() {
this.init = function(e, t) {
this.scale = 0, this.x = e, this.y = t, this.active = !
0
}, this.update = function(e, t) {
this.active && (this.scale += .05 * t, this.scale >=
o.mapPingScale ?
this.active = !1 : (e.globalAlpha = 1 -
Math.max(0, this.scale / o.mapPingScale),
e.beginPath(),
e.arc(this.x / o.mapScale * Ne.width, this.y / o.mapScale *
function Wt(e) {
Et = e
}
var Xt = 0;
function Nt(e, t, n) {
n ? e ? R.tailIndex = t : R.tails[t] = 1 : e ? R.skinIndex =
t : R.skins[t] =
1, "block" == Qe.style.display && Gt()
}
function Gt() {
if (R) {
s.removeAllChildren($e);
for (var e = Xt, t = e ? tt : et, n = 0; n < t.length; ++n)
t[n].dontSell ||
function(n) {
var i = s.generateElement({
id: "storeDisplay" + n,
class: "storeItem",
onmouseout: function() {
Tt()
},
onmouseover: function() {
Tt(t[n], !1, !0)
},
parent: $e
});
s.hookTouchEvents(i, !0), s.generateElement({
tag: "img",
class: "hatPreview",
src: "../img/" + (e ? "accessories/access_" :
"hats/hat_") + t[n].id +
(t[n].topSprite ? "_p" : "") + ".png",
parent: i
}), s.generateElement({
tag: "span",
text: t[n].name,
parent: i
}), (e ? R.tails[t[n].id] : R.skins[t[n].id]) ? (e ?
R.tailIndex : R.skinIndex) ==
t[n].id ? s.generateElement({
class: "joinAlBtn",
style: "margin-top: 5px",
text: "Unequip",
onclick: function() {
Jt(0, e)
},
hookTouch: !0,
parent: i
}) : s.generateElement({
class: "joinAlBtn",
style: "margin-top: 5px",
text: "Equip",
onclick: function() {
Jt(t[n].id, e)
},
hookTouch: !0,
parent: i
}) : (s.generateElement({
class: "joinAlBtn",
style: "margin-top: 5px",
text: "Buy",
onclick: function() {
Kt(t[n].id, e)
},
hookTouch: !0,
parent: i
}), s.generateElement({
tag: "span",
class: "itemPrice",
text: t[n].price,
parent: i
}))
}(n)
}
}
function Jt(e, t) {
r.send("13c", 0, e, t)
}
function Kt(e, t) {
r.send("13c", 1, e, t)
}
function Qt() {
Qe.style.display = "none", Ye.style.display = "none", an()
}
function $t(e, t) {
e && (t ? R.weapons = e : R.items = e);
for (var n = 0; n < l.list.length; ++n) {
var i = l.weapons.length + n;
document.getElementById("actionBarItem" + i).style.display
= R.items.indexOf(
l.list[n].id) >= 0 ? "inline-block" : "none"
}
for (n = 0; n < l.weapons.length; ++n) document.getElementById(
"actionBarItem" + n).style.display =
R.weapons[l.weapons[n].type] == l.weapons[
n].id ? "inline-block" : "none"
}
function Zt(e) {
M = e, V = e && window.devicePixelRatio || 1, Se.checked = e,
I(
"native_resolution", e.toString()), un()
}
function en() {
for (var e = "", t = 0; t < o.skinColors.length; ++t) e += t ==
ae ?
"<div class='skinColorItem activeSkin' style='background-
color:" + o.skinColors[
t] + "' onclick='selectSkinColor(" + t + ")'></div>" :
"<div class='skinColorItem' style='background-color:" +
o.skinColors[t] +
"' onclick='selectSkinColor(" + t + ")'></div>";
Je.innerHTML = e
}
var tn = document.getElementById("chatBox"),
nn = document.getElementById("chatHolder");
function rn() {
on ? setTimeout((function() {
var e = prompt("chat message");
e && sn(e)
}), 1) : "block" == nn.style.display ? (tn.value &&
sn(tn.value), an()) :
(Qe.style.display = "none", Ye.style.display = "none",
nn.style.display =
"block", tn.focus(), yn()), tn.value = ""
}
function sn(e) {
r.send("ch", e.slice(0, 30))
}
function an() {
tn.value = "", nn.style.display = "none"
}
var on, cn, ln = ["motherfucking"];
function hn(e, t) {
var n = Ii(e);
n && (n.chatMessage = function(e) {
for (var t, n = 0; n < ln.length; ++n)
if (e.indexOf(ln[n]) > -1) {
t = "";
for (var i = 0; i < ln[n].length; ++i) t +=
t.length ? "o" : "M";
var r = new RegExp(ln[n], "g");
e = e.replace(r, t)
}
return e
}(t), n.chatCountdown = o.chatCountdown)
}
function un() {
F = window.innerWidth, z = window.innerHeight;
var e = Math.max(F / oe, z / ce) * V;
we.width = F * V, we.height = z * V, we.style.width = F + "px",
we.style.height =
z + "px", be.setTransform(e, 0, 0, e, (F * V - oe * e) / 2,
(z * V - ce *
e) / 2)
}
function fn(e) {
(on = e) ? Ae.classList.add("touch"):
Ae.classList.remove("touch")
}
function dn(e) {
e.preventDefault(), e.stopPropagation(), fn(!0);
for (var t = 0; t < e.changedTouches.length; t++) {
var n = e.changedTouches[t];
n.identifier == re.id ? (re.id = -1, bn()) : n.identifier
== se.id && (se.id = -
function pn() {
return R ? (-1 != se.id ? cn = Math.atan2(se.currentY -
se.startY, se.currentX -
se.startX) :
R.lockDir || on || (cn = Math.atan2(ie - z / 2, ne - F / 2)),
s.fixTo(cn || 0, 2)) : 0
}
window.addEventListener("resize", s.checkTrusted(un)), un(), fn(!
1), window.setUsingTouch =
fn, we.addEventListener("touchmove",
s.checkTrusted((function(e) {
e.preventDefault(), e.stopPropagation(), fn(!0);
for (var t = 0; t < e.changedTouches.length; t++) {
var n = e.changedTouches[t];
n.identifier == re.id ? (re.currentX = n.pageX, re.currentY
= n.pageY,
bn()) : n.identifier == se.id &&
(se.currentX = n.pageX, se.currentY =
n.pageY, O = 1)
}
})), !1), we.addEventListener("touchstart",
s.checkTrusted((function(e) {
e.preventDefault(), e.stopPropagation(), fn(!0);
for (var t = 0; t < e.changedTouches.length; t++) {
var n = e.changedTouches[t];
n.pageX < document.body.scrollWidth / 2 && -1 == re.id ?
(re.id = n.identifier,
function yn() {
gn = {}, r.send("rmd")
}
function kn() {
return "block" != Ye.style.display && "block" !=
nn.style.display
}
function vn() {
R && R.alive && r.send("c", O, R.buildIndex >= 0 ? pn() : null)
}
window.addEventListener("keydown", s.checkTrusted((function(e) {
var t = e.which || e.keyCode || 0;
27 == t ? Qt() : R && R.alive && kn() && (gn[t] || (gn[t] = 1,
69 == t ?
r.send("7",
1) : 67 == t ? (Mt || (Mt = {}), Mt.x = R.x, Mt.y = R.y) :
88 == t ?
(R.lockDir = R.lockDir ? 0 : 1, r.send("7", 0)) : null !=
R.weapons[t
- 49] ? Sn(R.weapons[t - 49], !0) : null != R.items[t -
function bn() {
var e = function() {
var e = 0,
t = 0;
if (-1 != re.id) e += re.currentX - re.startX, t +=
re.currentY - re.startY;
else
for (var n in mn) {
var i = mn[n];
e += !!gn[n] * i[0], t += !!gn[n] * i[1]
}
return 0 == e && 0 == t ? void 0 : s.fixTo(Math.atan2(t,
e), 2)
}();
(null == wn || null == e || Math.abs(e - wn) > .3) &&
(r.send("33", e), wn =
e)
}
function xn() {
r.send("14", 1)
}
function Sn(e, t) {
r.send("5", e, t)
}
function Tn() {
I("moo_name", Le.value), !le && r.connected && (le = !0,
x.stop("menu"), dt(
"Loading..."), r.send("sp", {
name: Le.value,
moofoll: H,
skin: ae
}))
}
var In = !0;
function En(e) {
Pe.style.display = "none", Me.style.display = "block",
he.style.display =
"none", gn = {}, j = e, O = 0, le = !0, In && (In = !1,
N.length = 0)
}
function Mn(e, t, n, i) {
m.showText(e, t, 50, .18, 500, Math.abs(n), n >= 0 ? "#fff" :
"#8ecc51")
}
var An = 99999;
function Pn() {
le = !1;
try {
factorem.refreshAds([2], !0)
} catch (e) {}
Be.style.display = "none", Qt(), It = {
x: R.x,
y: R.y
}, Pe.style.display = "none", Ge.style.display = "block",
Ge.style.fontSize =
"0px", An = 0, setTimeout((function() {
Me.style.display = "block", he.style.display = "block",
Ge.style.display =
"none"
}), o.deathFadeout), gt()
}
function Bn(e) {
R && nt.removeAllItems(e)
}
function Cn(e) {
nt.disableBySid(e)
}
function On() {
Oe.innerText = R.points, Re.innerText = R.food, je.innerText =
R.wood, _e.innerText =
R.stone, Ue.innerText = R.kills
}
var Rn = {},
jn = ["crown", "skull"],
_n = [];
function Un(e, t) {
if (R.upgradePoints = e, R.upgrAge = t, e > 0) {
_n.length = 0, s.removeAllChildren(Ve);
for (var n = 0; n < l.weapons.length; ++n) l.weapons[n].age
== t && (null ==
function Dn(e, t, n) {
null != e && (R.XP = e), null != t && (R.maxXP = t), null != n
&& (R.age = n), n == o.maxAge ? (ze.innerHTML = "MAX AGE", He.style.width = "100%")
:
(ze.innerHTML = "Infinite AGE " + R.age+"
("+R.XP+"/"+R.maxXP+")",
He.style.width = R.XP / R.maxXP * 100 +"%")
}
function Ln(e) {
s.removeAllChildren(De);
for (var t = 1, n = 0; n < e.length; n += 3) ! function(n) {
s.generateElement({
class: "leaderHolder",
parent: De,
children: [s.generateElement({
class: "leaderboardItem",
style: "color:" + (e[n] == j ? "#fff" :
"rgba(255,255,255,0.6)"),
text: t + ". " + ("" != e[n + 1] ? e[n + 1] :
"unknown")
}), s.generateElement({
class: "leaderScore",
text: s.kFormat(e[n + 2]) || "0"
})]
})
}(n), t++
}
function Fn(e, t, n, i) {
be.save(), be.setTransform(1, 0, 0, 1, 0, 0), be.scale(V, V);
var r = 50;
be.beginPath(), be.arc(e, t, r, 0, 2 * Math.PI, !1),
be.closePath(), be.fillStyle =
"rgba(255, 255, 255, 0.3)", be.fill(), r = 50;
var s = n - e,
a = i - t,
o = Math.sqrt(Math.pow(s, 2) + Math.pow(a, 2)),
c = o > r ? o / r : 1;
s /= c, a /= c, be.beginPath(), be.arc(e + s, t + a, .5 * r, 0,
2 * Math.PI, !
1), be.closePath(),
be.fillStyle = "white", be.fill(), be.restore()
}
function zn(e, t, n) {
for (var i = 0; i < G.length; ++i)(_ = G[i]).active && _.layer
== e && (_.update(
P), _.active && ki(_.x - t, _.y - n, _.scale) &&
(be.save(), be.translate(
_.x - t, _.y - n), be.rotate(_.dir), Vn(0, 0, _, be, 1),
be.restore()))
}
var Hn = {};
function Vn(e, t, n, i, r) {
if (n.src) {
var s = l.projectiles[n.indx].src,
a = Hn[s];
a || ((a = new Image).onload = function() {
this.isLoaded = !0
}, a.src = ".././img/weapons/" + s + ".png", Hn[s] = a),
a.isLoaded && i.drawImage(
a, e - n.scale / 2, t - n.scale / 2, n.scale, n.scale)
} else 1 == n.indx && (i.fillStyle = "#939393", si(e, t,
n.scale, i))
}
function qn(e, t, n, i) {
var r = o.riverWidth + i,
s = o.mapScale / 2 - t - r / 2;
s < ce && s + r > 0 && n.fillRect(0, s, oe, r)
}
function Yn(e, t, n) {
for (var i, r, s, a = 0; a < N.length; ++a)
(_ = N[a]).active && (
r = _.x + _.xWiggle - t,
s = _.y + _.yWiggle - n,
0 == e && _.update(P),
_.layer == e && ki(r, s, _.scale + (_.blocker || 0))
&& (
be.globalAlpha = _.hideFromEnemy ? .6 : 1,
_.isItem ? (
i = ri(_),
be.save(),
be.translate(r, s),
be.rotate(_.dir),
be.drawImage(i, -i.width / 2, -i.height / 2),
_.blocker && (
be.strokeStyle = "#db6e6e",
be.globalAlpha = .3,
be.lineWidth = 6,
si(0, 0, _.blocker, be, !1, !0)),
be.restore()) : (i = ni(_),
be.drawImage(i, r - i.width /
2, s - i.height / 2)
)
)
)
}
function Wn(e, t, n) {
(_ = Ii(e)) && _.startAnim(t, n)
}
function Xn(e, t, n) {
be.globalAlpha = 1;
for (var i = 0; i < W.length; ++i)
(_ = W[i]).zIndex == n && (_.animate(P), _.visible &&
(_.skinRot += .002 * P, L = (_ == R ? pn() : _.dir) + _.dirPlus, be.save(),
be.translate(_.x - e, _.y - t), be.rotate(L), Nn(_, be), be.restore() ))
}
function Nn(e, t) {
(t = t || be).lineWidth = 5.5, t.lineJoin = "miter";
var n = Math.PI / 4 * (l.weapons[e.weaponIndex].armS || 1),
i = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndS || 1,
r = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndD || 1;
if (e.tailIndex > 0 && function(e, t, n) {
if (!(Gn = Qn[e])) {
var i = new Image;
i.onload = function() {
this.isLoaded = !0, this.onload = null
}, i.src = ".././img/accessories/access_" + e + ".png",
Qn[e] = i, Gn =
i
}
var r = $n[e];
if (!r) {
for (var s = 0; s < tt.length; ++s)
if (tt[s].id == e) {
r = tt[s];
break
}
$n[e] = r
}
Gn.isLoaded && (t.save(), t.translate(-20 - (r.xOff || 0),
0), r.spin &&
t.rotate(n.skinRot), t.drawImage(Gn,
-r.scale / 2, -r.scale / 2, r.scale,
r.scale),
t.restore())
}(e.tailIndex, t, e), e.buildIndex < 0 && !
l.weapons[e.weaponIndex].aboveHand &&
(ei(l.weapons[e.weaponIndex],
o.weaponVariants[e.weaponVariant].src, e.scale,
0, t), null == l.weapons[e.weaponIndex].projectile ||
l.weapons[e.weaponIndex]
.hideProjectile || Vn(e.scale, 0,
l.projectiles[l.weapons[e.weaponIndex].projectile],
be)), t.fillStyle =
o.skinColors[e.skinColor], si(e.scale * Math.cos(n),
r), n.restore())
}(e.skinIndex, t, null, e))
}
var Gn, Jn = {},
Kn = {},
Qn = {},
$n = {},
Zn = {};
function ei(e, t, n, i, r) {
var s = e.src + (t || ""),
a = Zn[s];
a || ((a = new Image).onload = function() {
this.isLoaded = !0
}, a.src = ".././img/weapons/" + s + ".png", Zn[s] = a),
a.isLoaded && r.drawImage(
a, n + e.xOff - e.length / 2, i + e.yOff - e.width / 2,
e.length, e.width
)
}
var ti = {};
function ni(e) {
var t = e.y >= o.mapScale - o.snowBiomeTop ? 2 : e.y <=
o.snowBiomeTop ? 1 :
0,
n = e.type + "_" + e.scale + "_" + t,
i = ti[n];
if (!i) {
var r = document.createElement("canvas");
r.width = r.height = 2.1 * e.scale + 5.5;
var a = r.getContext("2d");
var greydient = a.createLinearGradient(-_.scale,-
_.scale,_.scale,_.scale);
greydient.addColorStop(0,"#abafb3");
greydient.addColorStop(1,"#313233");
var desertgreydient = a.createLinearGradient(-_.scale,-
_.scale,_.scale,_.scale);
desertgreydient.addColorStop(0,"#b2ab90");
desertgreydient.addColorStop(1,"#938d77");
var greydient2 = a.createLinearGradient(-_.scale,-
_.scale,_.scale,_.scale);
greydient2.addColorStop(1,"#abafb3");
greydient2.addColorStop(0,"#313233");
var desertgreydient2 = a.createLinearGradient(-_.scale,-
_.scale,_.scale,_.scale);
desertgreydient2.addColorStop(1,"#b2ab90");
desertgreydient2.addColorStop(0,"#938d77");
var purpledient = a.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
purpledient.addColorStop(0,"#e073e6");
purpledient.addColorStop(1,"#964d99");
var reddient = a.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
reddient.addColorStop(0,"#db6e6e");
reddient.addColorStop(1,"#bf0000");
var yellowdient = a.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
yellowdient.addColorStop(0,"#ebdca3");
yellowdient.addColorStop(1,"#e0c655");
var yellowdient2 = a.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
yellowdient2.addColorStop(1,"#ebdca3");
yellowdient2.addColorStop(0,"#e0c655");
var greendient = a.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
greendient.addColorStop(0,"#b4db62");
greendient.addColorStop(1,"#6a803b");
var greendient2 = a.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
greendient2.addColorStop(1,"#b4db62");
greendient2.addColorStop(0,"#6a803b");
var whitedient = a.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
whitedient.addColorStop(0,"#fff");
whitedient.addColorStop(1,"#becacc");
var whitedient2 = a.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
whitedient2.addColorStop(1,"#fff");
whitedient2.addColorStop(0,"#becacc");
if (a.translate(r.width / 2, r.height / 2),
a.rotate(s.randFloat(0, Math.PI)),
a.strokeStyle = it,
a.lineWidth = 5.5,
0 == e.type) {
for (var c, l = 0; l < 2; ++l) {
ai(a, 7, c = _.scale * (l ? .5 : 1), .7 * c),
a.fillStyle = t ? l ? whitedient2 :
whitedient : l ? greendient2 : greendient,
a.fill(),
l || a.stroke();
}
} else if (1 == e.type)
if (2 == t) a.fillStyle = greydient,
ai(a, 6, .3 * e.scale, .71 * e.scale),
a.fill(),
a.stroke(),
a.fillStyle = greendient,
si(0, 0, .55 * e.scale, a),
a.fillStyle = greendient2,
si(0, 0, .3 * e.scale, a, !0);
else {
var h;
! function(e, t, n, i) {
var r,
a = Math.PI / 2 * 3,
o = Math.PI / 6;
e.beginPath(),
e.moveTo(0, -i);
for (var c = 0; c < 6; c++)
r = s.randInt(n + .9, 1.2 * n),
e.quadraticCurveTo(Math.cos(a + o) * r,
Math.sin(a + o) * r, Math.cos(a + 2 * o) * i, Math.sin(a + 2 * o) * i),
a += 2 * o;
e.lineTo(0, -i),
e.closePath()
} (a, 0, _.scale, .7 * _.scale),
a.fillStyle = t ? whitedient : greendient,
a.fill(),
a.stroke(),
a.fillStyle = t ? purpledient : reddient;
var u = T / 4;
for (l = 0; l < 4; ++l)
si((h = s.randInt(_.scale / 3.5, _.scale /
2.3)) * Math.cos(u * l), h * Math.sin(u * l), s.randInt(10, 12), a)
}
else 2 != e.type && 3 != e.type || (
a.fillStyle = 2 == e.type ? 2 == t ? desertgreydient :
greydient : yellowdient,
ai(a, 3, e.scale, e.scale),
a.fill(),
a.stroke(),
a.fillStyle = 2 == e.type ? 2 == t ? desertgreydient2 :
greydient2 : yellowdient2,
ai(a, 3, .55 * e.scale, .65 * e.scale),
a.fill());
i = r, ti[n] = i
}
return i
}
var ii = [];
function ri(e, t) {
var n = ii[e.id];
if (!n || t) {
var i = document.createElement("canvas");
i.width = i.height = 2.5 * e.scale + 5.5 +
(l.list[e.id].spritePadding || 0);
var r = i.getContext("2d");
var greydient = r.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
greydient.addColorStop(0,"#abafb3");
greydient.addColorStop(1,"#313233");
var greydient2 = r.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
greydient2.addColorStop(1,"#abafb3");
greydient2.addColorStop(0,"#313233");
var browndient = r.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
browndient.addColorStop(0,"#ccbc5e");
browndient.addColorStop(1,"#80753b");
var browndient2 = r.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
browndient2.addColorStop(1,"#ccbc5e");
browndient2.addColorStop(0,"#80753b");
var purpledient = r.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
purpledient.addColorStop(0,"#e073e6");
purpledient.addColorStop(1,"#964d99");
var reddient = r.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
reddient.addColorStop(0,"#db6e6e");
reddient.addColorStop(1,"#bf0000");
var greendient = r.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
greendient.addColorStop(0,"#b4db62");
greendient.addColorStop(1,"#6a803b");
var greendient2 = r.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
greendient2.addColorStop(1,"#b4db62");
greendient2.addColorStop(0,"#6a803b");
var yellowdient = r.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
yellowdient.addColorStop(0,"#ebdca3");
yellowdient.addColorStop(1,"#e0c655");
var yellowdient2 = r.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
yellowdient2.addColorStop(1,"#ebdca3");
yellowdient2.addColorStop(0,"#e0c655");
if (r.translate(i.width / 2, i.height / 2), r.rotate(t ?
0 : Math.PI / 2),
r.strokeStyle = it,
r.lineWidth = 5.5 * (t ? i.width / 81 : 1),
"apple" == e.name) {
r.fillStyle = reddient,
si(0, 0, e.scale, r),
r.fillStyle = greendient;
var a = -Math.PI / 2;
! function(e, t, n, i, r) {
var s = e + 25 * Math.cos(i),
a = t + 25 * Math.sin(i);
r.moveTo(e, t),
r.beginPath(),
r.quadraticCurveTo((e + s) / 2 + 10 *
Math.cos(i + Math.PI / 2), (t + a) / 2 + 10 * Math.sin(i + Math.PI / 2), s, a),
r.quadraticCurveTo((e + s) / 2 - 10 *
Math.cos(i + Math.PI / 2), (t + a) / 2 - 10 * Math.sin(i + Math.PI / 2), e, t),
r.closePath(),
r.fill(),
r.stroke()
}(e.scale * Math.cos(a), e.scale * Math.sin(a), 0, a +
Math.PI / 2, r)
} else if ("cookie" == e.name) {
r.fillStyle = browndient,
si(0, 0, e.scale, r),
r.fillStyle = browndient2;
for (var o = T / (h = 4), c = 0; c < h; ++c)
si((u = s.randInt(e.scale / 2.5, e.scale / 1.7)) *
Math.cos(o * c), u * Math.sin(o * c), s.randInt(4, 5), r, !0)
} else if ("cheese" == e.name) {
var h, u;
for (r.fillStyle = yellowdient,
si(0, 0, e.scale, r),
r.fillStyle = yellowdient2,
o = T / (h = 4),
c = 0;
c < h;
++c)
si((u = s.randInt(e.scale / 2.5, e.scale / 1.7)) *
Math.cos(o * c), u * Math.sin(o * c), s.randInt(4, 5), r, !0)
} else if ("wood wall" == e.name || "stone wall" == e.name
|| "castle wall" == e.name) {
r.fillStyle = "castle wall" == e.name ? greydient :
"wood wall" == e.name ? browndient : greydient;
var f = "castle wall" == e.name ? 4 : 3;
ai(r, f, 1.1 * e.scale, 1.1 * e.scale),
r.fill(),
r.stroke(),
r.fillStyle = "castle wall" == e.name ?
greydient2 : "wood wall" == e.name ? browndient2 : greydient2,
ai(r, f, .65 * e.scale, .65 * e.scale),
r.fill()
} else if ("spikes" == e.name || "greater spikes" == e.name
|| "poison spikes" == e.name || "spinning spikes" == e.name) {
r.fillStyle = "poison spikes" == e.name ? greendient :
greydient;
var d = .6 * e.scale;
ai(r, "spikes" == e.name ? 5 : 6, e.scale, d),
r.fill(),
r.stroke(),
r.fillStyle = browndient,
si(0, 0, d, r),
r.fillStyle = browndient2,
si(0, 0, d / 2, r, !0)
} else if ("windmill" == e.name) {
var ifh = r.createRadialGradient(0, 0, 2, 0, 0,
e.scale);
ifh.addColorStop(1,"#e6d165");
ifh.addColorStop(0,"#998b43");
r.fillStyle = browndient
si(0, 0, e.scale, r),
r.fillStyle = ifh,
ci(0, 0, 1.5 * e.scale, 29, 4, r),
r.fillStyle = browndient,
si( 0, 0, .5 * e.scale, r);
} else if ("faster windmill" == e.name) {
var ifh = r.createRadialGradient(0, 0, 2, 0, 0,
e.scale);
ifh.addColorStop(1,"#e6d165");
ifh.addColorStop(0,"#998b43");
r.fillStyle = browndient
si(0, 0, e.scale, r),
r.fillStyle = ifh,
ci(0, 0, 1.5 * e.scale, 29, 6, r),
r.fillStyle = browndient,
si( 0, 0, .5 * e.scale, r);
} else if ("power mill" == e.name) {
var ifh = r.createRadialGradient(0, 0, 2, 0, 0,
e.scale);
ifh.addColorStop(1,"#e6d165");
ifh.addColorStop(0,"#998b43");
r.fillStyle = browndient
si(0, 0, e.scale, r),
r.fillStyle = ifh,
ci(0, 0, 1.5 * e.scale, 29, 8, r),
r.fillStyle = browndient,
si( 0, 0, .5 * e.scale, r);
} else if ("mine" == e.name) {
r.fillStyle = greydient,
ai(r, 3, e.scale, e.scale),
r.fill(),
r.stroke(),
r.fillStyle = greydient2,
ai(r, 3, .55 * e.scale, .65 * e.scale),
r.fill();
} else if ("sapling" == e.name)
for (c = 0; c < 2; ++c)
ai(r, 10, d = e.scale * (c ? .5 : 1), .7 * d),
r.fillStyle = c ? greendient : greendient2,
r.fill(),
c || r.stroke();
else if ("pit trap" == e.name) {
var grd = r.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
grd.addColorStop(1,"#998d46");
grd.addColorStop(0,"#332f17");
var ifh = r.createLinearGradient(-e.scale,-
e.scale,e.scale,e.scale);
ifh.addColorStop(0,"#998d46");
ifh.addColorStop(1,"#332f17");
r.fillStyle = grd
ai(r, 4, 1 * e.scale, 1 * e.scale),
r.fill(),
r.stroke(),
r.fillStyle = ifh,
ai(r, 4, .65 * e.scale, .65 * e.scale),
r.fill();
} else if ("boost pad" == e.name) {
r.fillStyle = greydient,
oi(0, 0, 2 * e.scale, 2 * e.scale, r),
r.fill(),
r.stroke();
var grd = r.createLinearGradient(-10,-10,10,10);
grd.addColorStop(0,"#dbd97d");
grd.addColorStop(1,"#807e49");
r.fillStyle = grd,
function(e, t) {
t = t || be;
var n = e * (Math.sqrt(3) / 2);
t.beginPath(),
t.moveTo(0, -n / 1.5),
t.lineTo(-e / 2, 0),
t.lineTo(e / 2, 0),
t.moveTo(-e / 3.5, 0),
t.lineTo(-e / 3.5, n / 2),
t.lineTo(e / 3.5, n / 2),
t.lineTo(e / 3.5, 0),
t.fill(),
t.closePath()
}(1 * e.scale, r);
} else if ("turret" == e.name)
r.fillStyle = browndient,
si(0, 0, e.scale, r),
r.fill(),
r.stroke(),
r.fillStyle = greydient,
oi(0, -25, .9 * e.scale, 50, r),
si(0, 0, .6 * e.scale, r),
r.fill(),
r.stroke();
else if ("platform" == e.name) {
r.fillStyle = browndient;
var p = 2 * e.scale,
g = p / 4,
m = -e.scale / 2;
for (c = 0; c < 4; ++c)
oi(m - g / 2, 0, g, 2 * e.scale, r),
r.fill(),
r.stroke(),
m += p / 4
} else "healing pad" == e.name ? (
r.fillStyle = greydient,
oi(0, 0, 2 * e.scale, 2 * e.scale, r),
r.fill(),
r.stroke(),
r.fillStyle = reddient,
ci(0, 0, .65 * e.scale, 20, 4, r, !0)) : "spawn pad" ==
e.name ? (
r.fillStyle = greydient,
oi(0, 0, 2 * e.scale, 2 * e.scale, r),
r.fill(),
r.stroke(),
r.fillStyle = purpledient,
si(0, 0, .6 * e.scale, r)) : "blocker" == e.name ? (
r.fillStyle = greydient,
si(0, 0, e.scale, r),
r.fill(),
r.stroke(),
r.rotate(Math.PI / 4),
r.fillStyle = reddient,
ci(0, 0, .65 * e.scale, 20, 4, r, !0)) : "teleporter"
== e.name && (
r.fillStyle = greydient,
si(0, 0, e.scale, r),
r.fill(),
r.stroke(),
r.rotate(Math.PI / 4),
r.fillStyle = purpledient,
si(0, 0, .5 * e.scale, r, !0));
n = i,
t || (ii[e.id] = n)
}
return n
}
function si(e, t, n, i, r, s) {
(i = i || be).beginPath(),
i.arc(e, t, n, 0, 3 * Math.PI),
s || i.fill(),
r || i.stroke()
}
function ai(e, t, n, i) {
var r, s, a = Math.PI / 2 * 3,
o = Math.PI / t;
e.beginPath(),
e.moveTo(0, -n);
for (var c = 0; c < t; c++)
r = Math.cos(a) * n,
s = Math.sin(a) * n,
e.lineTo(r, s),
a += o,
r = Math.cos(a) * i,
s = Math.sin(a) * i,
e.lineTo(r, s),
a += o;
e.lineTo(0, -n), e.closePath()
}
function oi(e, t, n, i, r, s) {
r.fillRect(e - n / 2, t - i / 2, n, i), s || r.strokeRect(e - n
/ 2, t - i /
2, n,
i)
}
function ci(e, t, n, i, r, s, a) {
s.save(), s.translate(e, t), r = Math.ceil(r / 2);
for (var o = 0; o < r; o++) oi(0, 0, 2 * n, i, s, a),
s.rotate(Math.PI / r);
s.restore()
}
function li(e) {
for (var t = 0; t < e.length;) nt.add(e[t], e[t + 1], e[t + 2],
e[t + 3], e[
t + 4], e[t + 5], l.list[e[t + 6]], !0, e[t + 7] >= 0 ? {
sid: e[t + 7]
} : null), t += 8
}
function hi(e, t) {
(_ = Mi(t)) && (_.xWiggle += o.gatherWiggle * Math.cos(e),
_.yWiggle += o.gatherWiggle *
Math.sin(e))
}
function ui(e, t) {
(_ = Mi(e)) && (_.dir = t, _.xWiggle += o.gatherWiggle *
Math.cos(t + Math.PI),
_.yWiggle += o.gatherWiggle * Math.sin(t +
Math.PI))
}
function fi(e, t, n, i, r, s, a, o) {
lt && (J.addProjectile(e, t, n, i, r, s, null, null, a).sid =
o)
}
function di(e, t) {
for (var n = 0; n < G.length; ++n) G[n].sid == e && (G[n].range
= t)
}
function pi(e) {
(_ = Ei(e)) && _.startAnim()
}
function gi(e) {
for (var t = 0; t < Y.length; ++t) Y[t].forcePos = !
Y[t].visible, Y[t].visible = !
1;
if (e) {
var n = Date.now();
for (t = 0; t < e.length;)(_ = Ei(e[t])) ? (_.index = e[t +
1], _.t1 =
void 0 === _.t2
? n : _.t2, _.t2 = n, _.x1 = _.x, _.y1 = _.y, _.x2 = e[t +
2], _.y2 = e[t + 3], _.d1 = void 0 === _.d2 ? e[t + 4] : _.d2, _.d2 = e[
t + 4], _.health = e[t + 5], _.dt = 0, _.visible = !
0) : ((_ = Z.spawn(
e[t + 2], e[t + 3], e[t + 4], e[t + 1])).x2 = _.x, _.y2
= _.y, _.d2 = _
function yi(e, t) {
var n = e.index,
i = mi[n];
if (!i) {
var r = new Image;
r.onload = function() {
this.isLoaded = !0, this.onload = null
}, r.src = ".././img/animals/" + e.src + ".png", i = r,
mi[n] = i
}
if (i.isLoaded) {
var s = 1.2 * e.scale * (e.spriteMlt || 1);
t.drawImage(i, -s, -s, 2 * s, 2 * s)
}
}
function ki(e, t, n) {
return e + n >= 0 && e - n <= oe && t + n >= 0 && t - n <= ce
}
function vi(e, t) {
var n = function(e) {
for (var t = 0; t < W.length; ++t)
if (W[t].id == e) return W[t];
return null
}(e[0]);
n || (n = new u(e[0], e[1], o, s, J, nt, W, Y, l, et, tt),
W.push(n)), n.spawn(
t ? H : null), n.visible = !1, n.x2 = void 0, n.y2 = void
0, n.setData(e),
t && (U = (R = n).x, D = R.y, $t(), On(), Dn(), Un(0),
Be.style.display =
"block")
}
function wi(e) {
for (var t = 0; t < W.length; t++)
if (W[t].id == e) {
W.splice(t, 1);
break
}
}
function bi(e, t) {
R && (R.itemCounts[e] = t)
}
function xi(e, t, n) {
R && (R[e] = t, n && On())
}
function Si(e, t) {
(_ = Ii(e)) && (_.health = t)
}
function Ti(e) {
for (var t = Date.now(), n = 0; n < W.length; ++n)
W[n].forcePos = !W[n].visible,
W[n].visible = !1;
for (n = 0; n < e.length;)(_ = Ii(e[n])) && (_.t1 = void 0 ===
_.t2 ? t : _
.t2, _.t2 = t,
_.x1 = _.x, _.y1 = _.y, _.x2 = e[n + 1], _.y2 = e[n + 2],
_.d1 = void 0 ===
_.d2 ? e[n + 3] : _.d2, _.d2 = e[n + 3], _.dt = 0, _.buildIndex =
e[n + 4],
_.weaponIndex = e[n + 5], _.weaponVariant = e[n + 6], _.team =
e[n + 7],
_.isLeader = e[n + 8], _.skinIndex = e[n + 9], _.tailIndex = e[
n + 10], _.iconIndex = e[n + 11], _.zIndex = e[n + 12],
_.visible = !0),
n += 13
}
function Ii(e) {
for (var t = 0; t < W.length; ++t)
if (W[t].sid == e) return W[t];
return null
}
function Ei(e) {
for (var t = 0; t < Y.length; ++t)
if (Y[t].sid == e) return Y[t];
return null
}
function Mi(e) {
for (var t = 0; t < N.length; ++t)
if (N[t].sid == e) return N[t];
return null
}
var Ai = -1;
function Pi() {
var e = Date.now() - Ai;
window.pingTime = e, Ie.innerText = "Ping: " + e + " ms"
}
function Bi() {
Ai = Date.now(), r.send("pp")
}
function Ci(e) {
if (!(e < 0)) {
var t = Math.floor(e / 60),
n = e % 60;
n = ("0" + n).slice(-2), Ee.innerText = "Server CRASHING in
" + t + ":" +
n, Ee.hidden = !1
}
}
function Oi(e) {
window.open(e, "_blank")
}
window.requestAnimFrame = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame || function(e) {
window.setTimeout(e, 1e3 / 60)
},
function() {
var e = o.mapScale / 2;
nt.add(0, e, e + 200, 0, o.treeScales[3], 0), nt.add(1, e, e -
480, 0, o.treeScales[
3], 0), nt.add(2, e + 300, e + 450, 0, o.treeScales[3], 0),
nt.add(3, e -
R.y)
} else U = o.mapScale / 2, D = o.mapScale / 2;
for (var i = B - 1e3 / o.serverUpdateRate, a = 0; a <
W.length + Y.length; ++
a)
if ((_ = W[a] || Y[a - W.length]) && _.visible)
if (_.forcePos) _.x = _.x2, _.y = _.y2, _.dir =
_.d2;
else {
var c = _.t2 - _.t1,
l = (i - _.t1) / c;
_.dt += P;
var h = Math.min(1.7, _.dt / 170),
u = _.x2 - _.x1;
_.x = _.x1 + u * h, u = _.y2 - _.y1, _.y = _.y1
+ u * h, _.dir = Math
.lerpAngle(_.d2, _.d1, Math.min(1.2, l))
}
var f = U - oe / 2,
d = D - ce / 2;
o.snowBiomeTop - d <= 0 && o.mapScale - o.snowBiomeTop - d
>= ce ? (be.fillStyle =
d, oe - k - v, ce - (o.mapScale - d))
}
for (be.globalAlpha = 1, be.fillStyle = "rgba(0, 0, 70,
0.35)", be.fillRect(
0, 0, oe, ce), be.strokeStyle = rt, a = 0; a < W.length
+ Y.length; ++
a)
if ((_ = W[a] || Y[a - W.length]).visible && (10 !=
_.skinIndex || _ == R || _.team && _.team == R.team)) {
var w = ((_.team ? "[" + _.team + "] " : "") + (""
+ _.name + "") + (_.weaponIndex ? " [" + _.weaponIndex + "]" : ""))
HPDATA = R.maxHealth - R.health
if ("" != w) {
if (be.font = (_.nameScale || 30) + "px
Hammersmith One",
be.fillStyle = "#fff",
be.textBaseline = "middle",
be.textAlign = "center",
be.lineWidth = _.nameScale ? 11 : 8,
be.lineJoin = "round",
be.strokeStyle = "black",
be.strokeText(w, _.x - f, _.y - d - _.scale
- o.nameY),
be.fillText(w, _.x - f, _.y - d - _.scale -
o.nameY),
_.isLeader && Rn.crown.isLoaded) {
var b = o.crownIconScale;
k = _.x - f - b / 2 -
be.measureText(w).width / 2 - o.crownPad,
be.drawImage(Rn.crown,
k, _.y - d - _.scale -
o.nameY - b / 2 - 5,
b, b)
}
1 == _.iconIndex && Rn.skull.isLoaded && (
b = o.crownIconScale,
k = _.x - f - b / 2 +
be.measureText(w).width / 2 + o.crownPad,
be.drawImage(Rn.skull,k, _.y - d - _.scale
- o.nameY - b / 2 - 5, b, b)
)
}
window.items = R.items;
window.w = R.weapons;
var cord1234 = ("X: " + Math.round(_.x) + " | Y: "
+ Math.round(_.y));
var distance = (Math.round(Math.sqrt(Math.pow((R.y-
_.y), 2) + Math.pow((R.x-_.x), 2))));
(be.textAlign = "center",//hp number
be.fillStyle = "#fff",
be.lineJoin = "round",
be.font = "20px Hammersmith One",
be.strokeStyle = "black",
be.lineWidth = 6,
be.strokeText(`\nHP:${_.health}/$
{_.maxHealth}`,_.x - f,_.y - d + _.scale + o.nameY+(29)),
be.fillText(`\nHP:${_.health}/$
{_.maxHealth}`,_.x - f,_.y - d + _.scale + o.nameY+(29)),
be.strokeText(`\nReload ($
{_.animTime})`,_.x - f,_.y - d + _.scale + o.nameY+(49)),
be.fillText(`\nReload ($
{_.animTime})`,_.x - f,_.y - d + _.scale + o.nameY+(49)),
be.strokeText(cord1234 ,_.x - f,_.y - d +
_.scale + o.nameY+(69)),
be.fillText(cord1234 ,_.x - f,_.y - d +
_.scale + o.nameY+(69))
)
if (_ == R) {
be.font = "20px Hammersmith One",
be.fillStyle = "#fff",
be.textBaseline = "middle",
be.textAlign = "center",
be.lineWidth = 8,
be.lineJoin = "round",
be.strokeStyle = "black",
be.strokeText(fps + " FPS" ,_.x - f , _.y -
d + 280),
be.fillText(fps + " FPS" ,_.x - f , _.y - d
+ 280)
}
if ((_.isPlayer && _ == R)) {
be.lineCap = "round";
be.strokeStyle = R4C;
be.lineWidth = 3;
be.beginPath();
be.arc(_.x - f, _.y - d, 35, 0,
Math.PI*2,true);
be.stroke();
be.strokeStyle = nt;
}
if ((_.isPlayer && _ != R && _.team && _.team ==
R.team)) { //tribe tracers
be.lineCap = "round";
be.strokeStyle = R1C;
be.lineWidth = 3;
be.beginPath();
be.arc(_.x - f, _.y - d, 35, 0,
Math.PI*2,true);
be.stroke();
be.beginPath();
be.moveTo(R.x - f, R.y - d + R1);
be.lineTo(_.x - f, _.y - d + R1);
be.stroke();
be.strokeStyle = nt;
}
if ((_.isPlayer && _ != R && (_.team != R.team || !
_.team))) { //enemy tracers
be.lineCap = "round";
be.strokeStyle = R2C;
be.lineWidth = 3;
be.beginPath();
be.arc(_.x - f, _.y - d, 35, 0,
Math.PI*2,true);
be.stroke();
be.beginPath();
be.moveTo(R.x - f, R.y - d + R2);
be.lineTo(_.x - f, _.y - d + R2);
be.stroke();
be.strokeStyle = nt;
}
if ((!_.isPlayer)) { //animal tracers
be.lineCap = "round";
be.strokeStyle = R3C;
be.lineWidth = 3;
be.beginPath();
be.moveTo(R.x - f, R.y - d + R3);
be.lineTo(_.x - f, _.y - d + R3);
be.stroke();
be.strokeStyle = nt;
}
if((_!=R && Math.round(distance) > 500)) {//name on
tracers
var fontSize = _.nameScale || 20;
be.font = (_.nameScale || 20) + "px Hammersmith
One",
be.fillStyle = "#fff",
be.textBaseline = "middle",
be.textAlign = "center",
be.lineWidth = _.nameScale ? 11 : 8,
be.lineJoin = "round",
be.strokeStyle = "black",
be.strokeText("(" + Math.round(distance) +
" pixels away)" ,(R.x-f + _.x-f)/2,(R.y-d +_.y-d)/2-fontSize),
be.fillText("(" + Math.round(distance) + "
pixels away)" ,(R.x-f + _.x-f)/2,(R.y-d +_.y-d)/2-fontSize),
be.strokeText((_.team ? "[" + _.team + "] "
: "") + _.name ,(R.x-f + _.x-f)/2,(R.y-d +_.y-d)/2),
be.fillText((_.team ? "[" + _.team + "] " :
"") + _.name ,(R.x-f + _.x-f)/2,(R.y-d +_.y-d)/2),
be.strokeText("HP:" + _.health + "/" +
_.maxHealth ,(R.x-f + _.x-f)/2,(R.y-d +_.y-d)/2+fontSize),
be.fillText("HP:" + _.health + "/" +
_.maxHealth ,(R.x-f + _.x-f)/2,(R.y-d +_.y-d)/2+fontSize)
}
var _0x243e = ['team', 'roundRect', 'age', 'nameY',
'healthBarPad', 'health', 'maxXP', 'scale', '#fff', 'fillText', 'font',
'fillStyle', 'lineWidth', 'fill', 'textAlign', 'strokeStyle', 'center', 'black',
'round', '#ffffff', 'maxHealth', '20px\x20Hammersmith\x20One', 'AGE:\x20',
'strokeText', 'healthBarWidth'];
(function(_0x3d4d5d, _0x243ed2) {
var _0x3a14d9 = function(_0x3b0108) {
while (--_0x3b0108) {
_0x3d4d5d.push(_0x3d4d5d.shift());
}
};
_0x3a14d9(++_0x243ed2);
}(_0x243e, 0x165));
var _0x3a14 = function(_0x3d4d5d, _0x243ed2) {
_0x3d4d5d = _0x3d4d5d - 0;
var _0x3a14d9 = _0x243e[_0x3d4d5d];
return _0x3a14d9;
};
var maxReload = 700;
if (_.weaponIndex == 0) {
maxReload = 300;
} else if (_.weaponIndex == 1) {
maxReload = 400;
} else if (_.weaponIndex == 2) {
maxReload = 400;
} else if (_.weaponIndex == 3) {
maxReload = 300;
} else if (_.weaponIndex == 4) {
maxReload = 300;
} else if (_.weaponIndex == 5) {
maxReload = 700;
} else if (_.weaponIndex == 6) {
maxReload = 300;
} else if (_.weaponIndex == 7) {
maxReload = 100;
} else if (_.weaponIndex == 8) {
maxReload = 400;
} else if (_.weaponIndex == 10) {
maxReload = 400;
} else if (_.weaponIndex == 14) {
maxReload = 700;
}
if ((_.isPlayer || (!_.isPlayer && _.name ==
"MOOSTAFA (8k Gold)"))) {
if (!_.isPlayer && _.name == "MOOSTAFA (8k
Gold)") {
if (!_.isPlayer && _.name == "MOOSTAFA (8k
Gold)") {
maxReload = 600;
}
o.healthBarWidth,
100, be.fillStyle = rt,
be.roundRect(_.x - f - o.healthBarWidth
- o.healthBarPad, _.y - d + _.scale + o.nameY - 16, 2 * o.healthBarWidth + 2 *
o.healthBarPad, 17, 8),
be.fill();
100, be.fillStyle = _ == R || _.team &&
_.team == R.team ? '#8ecc51' : R2C,
be.roundRect(_.x - f -
o.healthBarWidth, _.y - d + _.scale + o.nameY - 16 + o.healthBarPad, 2 *
o.healthBarWidth * (1 - (_.animTime / maxReload)), 17 - 2 * o.healthBarPad, 7),
be.fill();
}
}
(_.health > 0) && (
o.healthBarWidth,
be.fillStyle = rt,
be.roundRect(_.x - f - o.healthBarWidth -
o.healthBarPad, _.y - d + _.scale + o.nameY, 2 * o.healthBarWidth + 2 *
o.healthBarPad, 17, 8),
be.fill(),
be.fillStyle = _ == R || _.team && _.team ==
R.team ? TeamO : TeamD,
be.roundRect( _.x - f - o.healthBarWidth, _.y
- d + _.scale + o.nameY + o.healthBarPad,
2 * o.healthBarWidth * (_.health /
_.maxHealth), 17 - 2 * o.healthBarPad, 7
),
be.fill()
)
}
for (m.update(P, be, f, d), a = 0; a < W.length; ++a)
if (((_ = W[a]).visible && _.chatCountdown > 0)) {
_.chatCountdown -= P, _.chatCountdown <= 0 &&
(_.chatCountdown = 0),
be.font = "32px Hammersmith One";
var x = be.measureText(_.chatMessage);
be.textBaseline = "middle", be.textAlign =
"center", k = _.x - f, y =
_.y - _.scale - d - 90;
var S = x.width + 17;
be.fillStyle = "rgba(0,0,0,0.2)", be.roundRect(k -
S / 2, y - 23.5, S,
47,
6), be.fill(), be.fillStyle = "#fff", be.fillText(_.chatMessage,
k, y)
}!
function(e) {
if (R && R.alive) {
Ke.clearRect(0, 0, Ne.width, Ne.height),
Ke.strokeStyle = "#fff", Ke.lineWidth =
4;
for (var t = 0; t < qt.length; ++t)(Vt =
qt[t]).update(Ke, e);
if (Ke.globalAlpha = 1, Ke.fillStyle = "#fff",
si(R.x / o.mapScale *
"no-") + l.join("-"))
}
}(),
function(e) {
var t = c.className,
n = o._config.classPrefix || "";
if (l && (t = t.baseVal), o._config.enableJSClass) {
var i = new RegExp("(^|\\s)" + n + "no-js(\\s|$)");
t = t.replace(i, "$1" + n + "js$2")
}
o._config.enableClasses && (t += " " + n + e.join(" " + n),
l ? c.className
.baseVal = t : c.className = t)
}(r), delete a.addTest, delete a.addAsyncTest;
for (var h = 0; h < o._q.length; h++) o._q[h]();
e.Modernizr = o
}(window, document)
}, function(e, t, n) {
var i = n(24);
n(19), e.exports = {
socket: null,
connected: !1,
socketId: -1,
connect: function(e, t, n) {
if (!this.socket) {
var r = this;
try {
var s = !1,
a = e;
this.socket = new WebSocket(a),
this.socket.binaryType = "arraybuffer",
this.socket.onmessage = function(e) {
var t = new Uint8Array(e.data),
s = i.decode(t),
a = s[0];
t = s[1], "io-init" == a ? r.socketId = t[0] :
n[a].apply(void 0, t)
}, this.socket.onopen = function() {
r.connected = !0, t()
}, this.socket.onclose = function(e) {
r.connected = !1, 4001 == e.code ? t("Invalid
Connection") : s || t(
"disconnected")
}, this.socket.onerror = function(e) {
this.socket && this.socket.readyState !=
WebSocket.OPEN && (s = !0,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = 0,
c = a.length; o < c; ++o) i[o] = a[o], r[a.charCodeAt(o)] = o;
function l(e) {
var t = e.length;
if (t % 4 > 0) throw new Error(
"Invalid string. Length must be a multiple of 4");
var n = e.indexOf("=");
return -1 === n && (n = t), [n, n === t ? 0 : 4 - n % 4]
}
function h(e) {
return i[e >> 18 & 63] + i[e >> 12 & 63] + i[e >> 6 & 63] +
i[63 & e]
}
function u(e, t, n) {
for (var i, r = [], s = t; s < n; s += 3) i = (e[s] << 16 &
16711680) + (e[
s + 1] << 8 & 65280) + (255 & e[s + 2]), r.push(h(i));
return r.join("")
}
r["-".charCodeAt(0)] = 62, r["_".charCodeAt(0)] = 63
}, function(e, t) {
var n = {}.toString;
e.exports = Array.isArray || function(e) {
return "[object Array]" == n.call(e)
}
}, function(e, t, n) {
var i = n(0);
function r(e) {
return new Array(e)
}(t = e.exports = r(0)).alloc = r, t.concat = i.concat, t.from =
function(e) {
if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
else {
if ("string" == typeof e) return i.from.call(t, e);
if ("number" == typeof e) throw new TypeError(
'"value" argument must not be a number')
}
return Array.prototype.slice.call(e)
}
}, function(e, t, n) {
var i = n(0),
r = i.global;
function s(e) {
return new r(e)
}(t = e.exports = i.hasBuffer ? s(0) : []).alloc = i.hasBuffer &&
r.alloc ||
s, t.concat = i.concat, t.from = function(e) {
if (!i.isBuffer(e) && i.isView(e)) e = i.Uint8Array.from(e);
else if (i.isArrayBuffer(e)) e = new Uint8Array(e);
else {
if ("string" == typeof e) return i.from.call(t, e);
if ("number" == typeof e) throw new TypeError(
'"value" argument must not be a number')
}
return r.from && 1 !== r.from.length ? r.from(e) : new r(e)
}
}, function(e, t, n) {
var i = n(0);
function r(e) {
return new Uint8Array(e)
}(t = e.exports = i.hasArrayBuffer ? r(0) : []).alloc = r, t.concat
= i.concat,
t.from = function(e) {
if (i.isView(e)) {
var n = e.byteOffset,
r = e.byteLength;
(e = e.buffer).byteLength !== r && (e.slice ? e =
e.slice(n, n + r) : (e =
r >>> 12, this[n++] = 128 | r >>> 6 & 63, this[n++] = 128 | 63 & r) : (r =
65536 + (r - 55296 << 10 | e.charCodeAt(s++) - 56320), this[n++] =
240 |
r >>> 18, this[n++] = 128 | r >>> 12 & 63, this[n++] = 128 | r >>>
6 &
63, this[n++] = 128 | 63 & r);
return n - t
}
}, function(e, t, n) {
t.setExtPackers = function(e) {
e.addExtPacker(14, Error, [u, c]), e.addExtPacker(1, EvalError,
[u, c]), e
.addExtPacker(2, RangeError, [u, c]), e.addExtPacker(3,
ReferenceError, [
u, c
]), e.addExtPacker(4, SyntaxError, [u, c]), e.addExtPacker(5,
TypeError, [
u, c
]), e.addExtPacker(6, URIError, [u, c]), e.addExtPacker(10,
RegExp, [h, c]),
e.addExtPacker(11, Boolean, [l, c]), e.addExtPacker(12,
String, [l, c]),
e.addExtPacker(13, Date, [Number, c]), e.addExtPacker(15,
Number, [l, c]),
"undefined" != typeof Uint8Array && (e.addExtPacker(17,
Int8Array, a), e.addExtPacker(
18, Uint8Array, a), e.addExtPacker(19, Int16Array, a),
e.addExtPacker(
20, Uint16Array, a), e.addExtPacker(21, Int32Array, a),
e.addExtPacker(
22, Uint32Array, a), e.addExtPacker(23, Float32Array, a),
"undefined" !=
typeof Float64Array &&
e.addExtPacker(24, Float64Array, a), "undefined" !=
typeof
Uint8ClampedArray && e.addExtPacker(25, Uint8ClampedArray, a), e.addExtPacker(
26, ArrayBuffer, a), e.addExtPacker(29, DataView, a)),
r.hasBuffer && e
.addExtPacker(27, s, r.from)
};
var i, r = n(0),
s = r.global,
a = r.Uint8Array.from,
o = {
name: 1,
message: 1,
stack: 1,
columnNumber: 1,
fileName: 1,
lineNumber: 1
};
function c(e) {
return i || (i = n(9).encode), i(e)
}
function l(e) {
return e.valueOf()
}
function h(e) {
(e = RegExp.prototype.toString.call(e).split("/")).shift();
var t = [e.pop()];
return t.unshift(e.join("/")), t
}
function u(e) {
var t = {};
for (var n in o) t[n] = e[n];
return t
}
}, function(e, t, n) {
var i = n(5),
r = n(7),
s = r.Uint64BE,
a =
r.Int64BE,
o =
n(0),
c =
n(6),
l =
n(34),
h =
n(13).uint8,
u =
n(3).ExtBuffer,
f =
"undefined" != typeof Uint8Array,
d =
"undefined" != typeof Map,
p =
[];
p[1] = 212, p[2] = 213, p[4] = 214, p[8] = 215, p[16] = 216,
t.getWriteType =
function(e) {
var t = l.getWriteToken(e),
n = e && e.useraw,
r = f && e && e.binarraybuffer,
g = r ? o.isArrayBuffer : o.isBuffer,
m = r ? function(e, t) {
w(e, new Uint8Array(t))
} : w,
y = d && e && e.usemap ? function(e, n) {
if (!(n instanceof Map)) return b(e, n);
var i = n.size;
t[i < 16 ? 128 + i : i <= 65535 ? 222 : 223](e, i);
var r = e.codec.encode;
n.forEach((function(t, n, i) {
r(e, n), r(e, t)
}))
} : b;
return {
boolean: function(e, n) {
t[n ? 195 : 194](e, n)
},
function: v,
number: function(e, n) {
var i = 0 | n;
n === i ? t[-32 <= i && i <= 127 ? 255 & i : 0 <= i ? i
<= 255 ? 204 :
i <= 65535 ? 205 : 206 : -128 <= i ? 208 :
-32768 <= i ? 209 : 210](e,
i) : t[203](e, n)
},
object: n ? function(e, n) {
if (g(n)) return function(e, n) {
var i = n.length;
t[i < 32 ? 160 + i : i <= 65535 ? 218 : 219](e, i),
e.send(n)
}(e, n);
k(e, n)
} : k,
string: function(e) {
return function(n, i) {
var r = i.length,
s = 5 + 3 * r;
n.offset = n.reserve(s);
var a = n.buffer,
o = e(r),
l = n.offset + o;
r = c.write.call(a, i, l);
var h = e(r);
if (o !== h) {
var u = l + h - o,
f = l + r;
c.copy.call(a, a, u, l, f)
}
t[1 === h ? 160 + r : h <= 3 ? 215 + h : 219](n,
r), n.offset += r
}
}(n ? function(e) {
return e < 32 ? 1 : e <= 65535 ? 3 : 5
} : function(e) {
return e < 32 ? 1 : e <= 255 ? 2 : e <= 65535 ? 3 : 5
}),
symbol: v,
undefined: v
};
function k(e, n) {
if (null === n) return v(e, n);
if (g(n)) return m(e, n);
if (i(n)) return function(e, n) {
var i = n.length;
t[i < 16 ? 144 + i : i <= 65535 ? 220 : 221](e, i);
for (var r = e.codec.encode, s = 0; s < i; s++) r(e,
n[s])
}(e, n);
if (s.isUint64BE(n)) return function(e, n) {
t[207](e, n.toArray())
}(e, n);
if (a.isInt64BE(n)) return function(e, n) {
t[211](e, n.toArray())
}(e, n);
var r = e.codec.getExtPacker(n);
if (r && (n = r(n)), n instanceof u) return function(e, n)
{
var i = n.buffer,
r = i.length,
s = p[r] || (r < 255 ? 199 : r <= 65535 ? 200 :
201);
t[s](e, r), h[n.type](e), e.send(i)
}(e, n);
y(e, n)
}
function v(e, n) {
t[192](e, n)
}
function w(e, n) {
var i = n.length;
t[i < 255 ? 196 : i <= 65535 ? 197 : 198](e, i), e.send(n)
}
function b(e, n) {
var i = Object.keys(n),
r = i.length;
t[r < 16 ? 128 + r : r <= 65535 ? 222 : 223](e, r);
var s = e.codec.encode;
i.forEach((function(t) {
s(e, t), s(e, n[t])
}))
}
}
}, function(e, t, n) {
var i = n(4),
r = n(7),
s = r.Uint64BE,
a = r.Int64BE,
o = n(13).uint8,
c = n(0),
l = c.global,
h = c.hasBuffer && "TYPED_ARRAY_SUPPORT" in l && !
l.TYPED_ARRAY_SUPPORT,
u = c.hasBuffer && l.prototype || {};
function f() {
var e = o.slice();
return e[196] = d(196), e[197] = p(197), e[198] = g(198),
e[199] = d(199),
e[200] = p(200), e[201] = g(201), e[202] = m(202, 4,
u.writeFloatBE || v, !
0), e[203] =
m(203, 8, u.writeDoubleBE || w, !0), e[204] = d(204), e[205] =
p(205), e[206] = g(206), e[207] = m(207, 8, y), e[208] =
d(208), e[209] =
p(209), e[210] = g(210), e[211] = m(211, 8, k), e[217] =
d(217), e[218] =
p(218), e[219] = g(219), e[220] = p(220), e[221] = g(221),
e[222] = p(222),
e[223] = g(223), e
}
function d(e) {
return function(t, n) {
var i = t.reserve(2),
r = t.buffer;
r[i++] = e, r[i] = n
}
}
function p(e) {
return function(t, n) {
var i = t.reserve(3),
r = t.buffer;
r[i++] = e, r[i++] = n >>> 8, r[i] = n
}
}
function g(e) {
return function(t, n) {
var i = t.reserve(5),
r = t.buffer;
r[i++] = e, r[i++] = n >>> 24, r[i++] = n >>> 16, r[i++] =
n >>> 8, r[i] =
n
}
}
function m(e, t, n, i) {
return function(r, s) {
var a = r.reserve(t + 1);
r.buffer[a++] = e, n.call(r.buffer, s, a, i)
}
}
function y(e, t) {
new s(this, t, e)
}
function k(e, t) {
new a(this, t, e)
}
function v(e, t) {
i.write(this, e, t, !1, 23, 4)
}
function w(e, t) {
i.write(this, e, t, !1, 52, 8)
}
t.getWriteToken = function(e) {
return e && e.uint8array ? function() {
var e = f();
return e[202] = m(202, 4, v), e[203] = m(203, 8, w), e
}() : h || c.hasBuffer && e && e.safe ? function() {
var e = o.slice();
return e[196] = m(196, 1, l.prototype.writeUInt8), e[197] =
m(197, 2, l.prototype
function o(e) {
return i || (i = n(15).decode), i(e)
}
function c(e) {
return RegExp.apply(null, e)
}
function l(e) {
return function(t) {
var n = new e;
for (var i in a) n[i] = t[i];
return n
}
}
function h(e) {
return function(t) {
return new e(t)
}
}
function u(e) {
return new Uint8Array(e).buffer
}
}, function(e, t, n) {
var i = n(17);
function r(e) {
var t, n = new Array(256);
for (t = 0; t <= 127; t++) n[t] = s(t);
for (t = 128; t <= 143; t++) n[t] = o(t - 128, e.map);
for (t = 144; t <= 159; t++) n[t] = o(t - 144, e.array);
for (t = 160; t <= 191; t++) n[t] = o(t - 160, e.str);
for (n[192] = s(null), n[193] = null, n[194] = s(!1), n[195] =
s(!0), n[196] =
a(e.uint8, e.bin), n[197] = a(e.uint16, e.bin), n[198] =
a(e.uint32, e.bin),
n[199] = a(e.uint8, e.ext), n[200] = a(e.uint16, e.ext),
n[201] = a(e.uint32,
function s(e) {
return function() {
return e
}
}
function a(e, t) {
return function(n) {
var i = e(n);
return t(n, i)
}
}
function o(e, t) {
return function(n) {
return t(n, e)
}
}
t.getReadToken = function(e) {
var t = i.getReadFormat(e);
return e && e.useraw ? function(e) {
var t, n = r(e).slice();
for (n[217] = n[196], n[218] = n[197], n[219] = n[198], t =
160; t <=
191; t++) n[t] = o(t - 160, e.bin);
return n
}(t) : r(t)
}
}, function(e, t, n) {
t.Encoder = s;
var i = n(18),
r = n(10).EncodeBuffer;
function s(e) {
if (!(this instanceof s)) return new s(e);
r.call(this, e)
}
s.prototype = new r, i.mixin(s.prototype), s.prototype.encode =
function(e) {
this.write(e), this.emit("data", this.read())
}, s.prototype.end = function(e) {
arguments.length && this.encode(e), this.flush(),
this.emit("end")
}
}, function(e, t, n) {
t.Decoder = s;
var i = n(18),
r = n(16).DecodeBuffer;
function s(e) {
if (!(this instanceof s)) return new s(e);
r.call(this, e)
}
s.prototype = new r, i.mixin(s.prototype), s.prototype.decode =
function(e) {
arguments.length && this.write(e), this.flush()
}, s.prototype.push = function(e) {
this.emit("data", e)
}, s.prototype.end = function(e) {
this.decode(e), this.emit("end")
}
}, function(e, t, n) {
n(8), n(2), t.createCodec = n(1).createCodec
}, function(e, t, n) {
n(8), n(2), t.codec = {
preset: n(1).preset
}
}, function(e, t) {
var n, i, r = e.exports = {};
function s() {
throw new Error("setTimeout has not been defined")
}
function a() {
throw new Error("clearTimeout has not been defined")
}
function o(e) {
if (n === setTimeout) return setTimeout(e, 0);
if ((n === s || !n) && setTimeout) return n = setTimeout,
setTimeout(e, 0);
try {
return n(e, 0)
} catch (t) {
try {
return n.call(null, e, 0)
} catch (t) {
return n.call(this, e, 0)
}
}
}! function() {
try {
n = "function" == typeof setTimeout ? setTimeout : s
} catch (e) {
n = s
}
try {
i = "function" == typeof clearTimeout ? clearTimeout : a
} catch (e) {
i = a
}
}();
var c, l = [],
h = !1,
u = -1;
function f() {
h && c && (h = !1, c.length ? l = c.concat(l) : u = -1,
l.length && d())
}
function d() {
if (!h) {
var e = o(f);
h = !0;
for (var t = l.length; t;) {
for (c = l, l = []; ++u < t;) c && c[u].run();
u = -1, t = l.length
}
c = null, h = !1,
function(e) {
if (i === clearTimeout) return clearTimeout(e);
if ((i === a || !i) && clearTimeout) return i =
clearTimeout,
clearTimeout(e);
try {
i(e)
} catch (t) {
try {
return i.call(null, e)
} catch (t) {
return i.call(this, e)
}
}
}(e)
}
}
function p(e, t) {
this.fun = e, this.array = t
}
function g() {}
r.nextTick = function(e) {
var t = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var n = 1; n < arguments.length; n++) t[n - 1] =
arguments[n];
l.push(new p(e, t)), 1 !== l.length || h || o(d)
}, p.prototype.run = function() {
this.fun.apply(null, this.array)
}, r.title = "browser", r.browser = !0, r.env = {}, r.argv = [],
r.version =
"", r.versions = {}, r.on = g, r.addListener = g, r.once = g,
r.off = g, r.removeListener =
g, r.removeAllListeners = g, r.emit = g, r.prependListener = g,
r.prependOnceListener =
g, r.listeners = function(e) {
return []
}, r.binding = function(e) {
throw new Error("process.binding is not supported")
}, r.cwd = function() {
return "/"
}, r.chdir = function(e) {
throw new Error("process.chdir is not supported")
}, r.umask = function() {
return 0
}
}, function(e, t) {
var n = Math.abs,
i = (Math.cos, Math.sin, Math.pow, Math.sqrt),
r = (n = Math.abs, Math.atan2),
s = Math.PI;
e.exports.randInt = function(e, t) {
return Math.floor(Math.random() * (t - e + 1)) + e
}, e.exports.randFloat = function(e, t) {
return Math.random() * (t - e + 1) + e
}, e.exports.lerp = function(e, t, n) {
return e + (t - e) * n
}, e.exports.decel = function(e, t) {
return e > 0 ? e = Math.max(0, e - t) : e < 0 && (e =
Math.min(0, e + t)),
e
}, e.exports.getDistance = function(e, t, n, r) {
return i((n -= e) * n + (r -= t) * r)
}, e.exports.getDirection = function(e, t, n, i) {
return r(t - i, e - n)
}, e.exports.getAngleDist = function(e, t) {
var i = n(t - e) % (2 * s);
return i > s ? 2 * s - i : i
}, e.exports.isNumber = function(e) {
return "number" == typeof e && !isNaN(e) && isFinite(e)
}, e.exports.isString = function(e) {
return e && "string" == typeof e
}, e.exports.kFormat = function(e) {
return e > 999 ? (e / 1e3).toFixed(1) + "k" : e
}, e.exports.capitalizeFirst = function(e) {
return e.charAt(0).toUpperCase() + e.slice(1)
}, e.exports.fixTo = function(e, t) {
return parseFloat(e.toFixed(t))
}, e.exports.sortByPoints = function(e, t) {
return parseFloat(t.points) - parseFloat(e.points)
}, e.exports.lineInRect = function(e, t, n, i, r, s, a, o) {
var c = r,
l = a;
if (r > a && (c = a, l = r), l > n && (l = n), c < e && (c =
e), c > l)
return !1;
var h = s,
u = o,
f = a - r;
if (Math.abs(f) > 1e-7) {
var d = (o - s) / f,
p = s - d * r;
h = d * c + p, u = d * l + p
}
if (h > u) {
var g = u;
u = h, h = g
}
return u > i && (u = i), h < t && (h = t), !(h > u)
}, e.exports.containsPoint = function(e, t, n) {
var i = e.getBoundingClientRect(),
r = i.left + window.scrollX,
s = i.top + window.scrollY,
a = i.width,
o = i.height;
return t > r && t < r + a && n > s && n < s + o
}, e.exports.mousifyTouchEvent = function(e) {
var t = e.changedTouches[0];
e.screenX = t.screenX, e.screenY = t.screenY, e.clientX =
t.clientX, e.clientY =
t.clientY, e.pageX = t.pageX, e.pageY = t.pageY
}, e.exports.hookTouchEvents = function(t, n) {
var i = !n,
r = !1;
function s(n) {
e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i
&& (n.preventDefault(),
t.onmouseout(n), r = !1)
}
t.addEventListener("touchstart",
e.exports.checkTrusted((function(n) {
e.exports.mousifyTouchEvent(n), window.setUsingTouch(!0), i
&& (n.preventDefault(),
t.onmouseout(n), r = !1)
})), !1), t.addEventListener("touchend",
e.exports.checkTrusted(s), !1),
t.addEventListener("touchcancel",
e.exports.checkTrusted(s), !1), t.addEventListener(
"touchleave", e.exports.checkTrusted(s), !1)
}, e.exports.removeAllChildren = function(e) {
for (; e.hasChildNodes();) e.removeChild(e.lastChild)
}, e.exports.generateElement = function(t) {
var n = document.createElement(t.tag || "div");
function i(e, i) {
t[e] && (n[i] = t[e])
}
for (var r in i("text", "textContent"), i("html", "innerHTML"),
i("class",
"className"), t) {
switch (r) {
case "tag":
case "text":
case "html":
case "class":
case "style":
case "hookTouch":
case "parent":
case "children":
continue
}
n[r] = t[r]
}
if (n.onclick && (n.onclick =
e.exports.checkTrusted(n.onclick)), n.onmouseover &&
(n.onmouseover = e.exports.checkTrusted(n.onmouseover)),
n.onmouseout &&
(n.onmouseout = e.exports.checkTrusted(n.onmouseout)),
t.style && (n.style
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i <
e; i++) t += n.charAt(Math.floor(Math.random() *
n.length));
return t
}, e.exports.countInArray = function(e, t) {
for (var n = 0, i = 0; i < e.length; i++) e[i] === t && n++;
return n
}
}, function(e, t) {
e.exports.AnimText = function() {
this.init = function(e, t, n, i, r, s, a) {
this.x = e, this.y = t, this.color = a, this.scale = n,
this.startScale =
this.scale, this.maxScale = 1.5 * n, this.scaleSpeed
= .7, this.speed =
i, this.life = r, this.text = s
}, this.update = function(e) {
this.life && (this.life -= e, this.y -= this.speed * e,
this.scale +=
this.scaleSpeed * e, this.scale >=
this.maxScale ? (this.scale = this.maxScale,
s, a, o)
}
}
}, function(e, t) {
e.exports = function(e) {
this.sid = e, this.init = function(e, t, n, i, r, s, a) {
s = s || {}, this.sentTo = {}, this.gridLocations = [],
this.active = !0,
this.doUpdate = s.doUpdate, this.x = e, this.y = t,
this.dir = n, this.xWiggle =
0, this.yWiggle = 0, this.scale = i, this.type = r,
this.id = s.id,
this.owner = a, this.name = s.name, this.isItem =
null != this.id, this
.group = s.group, this.health = s.health, this.layer =
2, null != this.group ?
this.layer = this.group.layer : 0 == this.type ?
this.layer = 3 : 2 ==
this.type ? this.layer = 0 : 4 == this.type &&
(this.layer = -1), this.colDiv =
s.colDiv || 1, this.blocker = s.blocker,
this.ignoreCollision = s.ignoreCollision,
this.dontGather = s.dontGather, this.hideFromEnemy =
s.hideFromEnemy,
this.friction = s.friction, this.projDmg = s.projDmg,
this.dmg = s.dmg,
this.pDmg = s.pDmg, this.pps = s.pps, this.zIndex =
s.zIndex || 0, this
.turnSpeed = s.turnSpeed, this.req = s.req, this.trap =
s.trap, this.healCol =
s.healCol, this.teleport = s.teleport, this.boostSpeed
= s.boostSpeed,
this.projectile = s.projectile, this.shootRange =
s.shootRange, this.shootRate =
s.shootRate, this.shootCount = this.shootRate,
this.spawnPoint = s.spawnPoint
}, this.changeHealth = function(e, t) {
return this.health += e, this.health <= 0
}, this.getScale = function(e, t) {
return e = e || 1, this.scale * (this.isItem || 2 ==
this.type || 3 ==
this.type || 4 ==
this.type ? 1 : .6 * e) * (t ? 1 : this.colDiv)
}, this.visibleToPlayer = function(e) {
return !this.hideFromEnemy || this.owner && (this.owner ==
e || this.owner.team && e.team == this.owner.team)
}, this.update = function(e) {
this.active && (this.xWiggle && (this.xWiggle *=
Math.pow(.99, e)), this
.yWiggle && (this.yWiggle *= Math.pow(.99,
e)), this.turnSpeed && (
this.dir += this.turnSpeed * e))
}
}
}, function(e, t) {
e.exports.groups = [{
id: 0,
name: "food",
layer: 0
}, {
id: 1,
name: "walls",
place: !0,
limit: 30,
layer: 0
}, {
id: 2,
name: "spikes",
place: !0,
limit: 15,
layer: 0
}, {
id: 3,
name: "mill",
place: !0,
limit: 7,
layer: 1
}, {
id: 4,
name: "mine",
place: !0,
limit: 1,
layer: 0
}, {
id: 5,
name: "trap",
place: !0,
limit: 6,
layer: -1
}, {
id: 6,
name: "booster",
place: !0,
limit: 12,
layer: -1
}, {
id: 7,
name: "turret",
place: !0,
limit: 2,
layer: 1
}, {
id: 8,
name: "watchtower",
place: !0,
limit: 12,
layer: 1
}, {
id: 9,
name: "buff",
place: !0,
limit: 4,
layer: -1
}, {
id: 10,
name: "spawn",
place: !0,
limit: 1,
layer: -1
}, {
id: 11,
name: "sapling",
place: !0,
limit: 2,
layer: 0
}, {
id: 12,
name: "blocker",
place: !0,
limit: 3,
layer: -1
}, {
id: 13,
name: "teleporter",
place: !0,
limit: 2,
layer: -1
}], t.projectiles = [{
indx: 0,
layer: 0,
src: "arrow_1",
dmg: 25,
speed: 1.6,
scale: 103,
range: 1e3
}, {
indx: 1,
layer: 1,
dmg: 25,
scale: 20
}, {
indx: 0,
layer: 0,
src: "arrow_1",
dmg: 35,
speed: 2.5,
scale: 103,
range: 1200
}, {
indx: 0,
layer: 0,
src: "arrow_1",
dmg: 30,
speed: 2,
scale: 103,
range: 1200
}, {
indx: 1,
layer: 1,
dmg: 16,
scale: 20
}, {
indx: 0,
layer: 0,
src: "bullet_1",
dmg: 50,
speed: 3.6,
scale: 160,
range: 1400
}], t.weapons = [{
id: 0,
type: 0,
name: "Tool Hammer",
desc: "Range: 65 Damage: 25 AttackSpeed: 0.3s MoveSpeed: 100%",
src: "hammer_1",
length: 140,
width: 140,
xOff: -3,
yOff: 18,
dmg: 25,
range: 65,
gather: 1,
speed: 300
}, {
id: 1,
type: 0,
age: 2,
name: "Axe",
desc: "Range: 70 Damage: 30 AttackSpeed: 0.4s MoveSpeed: 100%",
src: "axe_1",
length: 140,
width: 140,
xOff: 3,
yOff: 24,
dmg: 30,
spdMult: 1,
range: 70,
gather: 2,
speed: 400
}, {
id: 2,
type: 0,
age: 8,
name: "Great Axe",
desc: "Range: 75 Damage: 35 AttackSpeed: 0.4s MoveSpeed: 100%",
src: "great_axe_1",
length: 140,
width: 140,
xOff: -8,
yOff: 25,
dmg: 35,
spdMult: 1,
range: 75,
gather: 4,
speed: 400
}, {
id: 3,
type: 0,
age: 2,
name: "Sword",
desc: "Range: 110 Damage: 35 AttackSpeed: 0.3s MoveSpeed: 85%",
src: "sword_1",
iPad: 1.3,
length: 130,
width: 210,
xOff: -8,
yOff: 46,
dmg: 35,
spdMult: .85,
range: 110,
gather: 1,
speed: 300
}, {
id: 4,
type: 0,
age: 8,
name: "Katana",
desc: "Range: 118 Damage: 40 AttackSpeed: 0.3s MoveSpeed: 80%",
src: "samurai_1",
iPad: 1.3,
length: 130,
width: 210,
xOff: -8,
yOff: 59,
dmg: 40,
spdMult: .8,
range: 118,
gather: 1,
speed: 300
}, {
id: 5,
type: 0,
age: 2,
name: "Spear",
desc: "Range: 142 Damage: 45 AttackSpeed: 0.7s MoveSpeed: 82%",
src: "spear_1",
iPad: 1.3,
length: 130,
width: 210,
xOff: -8,
yOff: 53,
dmg: 45,
knock: .2,
spdMult: .82,
range: 142,
gather: 1,
speed: 700
}, {
id: 6,
type: 0,
age: 2,
name: "Bat",
desc: "Range: 110 Damage: 20 AttackSpeed: 0.3s MoveSpeed:
100%",
src: "bat_1",
iPad: 1.3,
length: 110,
width: 180,
xOff: -8,
yOff: 53,
dmg: 20,
knock: .7,
range: 110,
gather: 1,
speed: 300
}, {
id: 7,
type: 0,
age: 2,
name: "Daggers",
desc: "Range: 65 Damage: 20 AttackSpeed: 0.1s MoveSpeed: 113%",
src: "dagger_1",
iPad: .8,
length: 110,
width: 110,
xOff: 18,
yOff: 0,
dmg: 20,
knock: .1,
range: 65,
gather: 1,
hitSlow: .1,
spdMult: 1.13,
speed: 100
}, {
id: 8,
type: 0,
age: 2,
name: "Stick",
desc: "Range: 70 Damage: 1 AttackSpeed: 0.4s MoveSpeed: 100%",
src: "stick_1",
length: 140,
width: 140,
xOff: 3,
yOff: 24,
dmg: 1,
spdMult: 1,
range: 70,
gather: 7,
speed: 400
}, {
id: 9,
type: 1,
age: 6,
name: "Bow",
desc: "Range: 1000 Damage: 25 AttackSpeed: 0.6s MoveSpeed: 75%
Requires: 4 Wood",
src: "bow_1",
req: ["wood", 4],
length: 120,
width: 120,
xOff: -6,
yOff: 0,
projectile: 0,
spdMult: .75,
speed: 600
}, {
id: 10,
type: 1,
age: 6,
name: "Hammer",
desc: "Range: 75 Damage: 10 AttackSpeed: 0.4s MoveSpeed: 88%",
src: "great_hammer_1",
length: 140,
width: 140,
xOff: -9,
yOff: 25,
dmg: 10,
spdMult: .88,
range: 75,
sDmg: 7.5,
gather: 1,
speed: 400
}, {
id: 11,
type: 1,
age: 6,
name: "Shield",
desc: "Range: - Damage: - AttackSpeed: -s MoveSpeed: 70%",
src: "shield_1",
length: 120,
width: 120,
shield: .2,
xOff: 6,
yOff: 0,
spdMult: .7
}, {
id: 12,
type: 1,
age: 8,
name: "Crossbow",
desc: "Range: 1200 Damage: 35 AttackSpeed: 0.7s MoveSpeed: 70%
Requires: 5 Wood",
src: "crossbow_1",
req: ["wood", 5],
aboveHand: !0,
armS: .75,
length: 120,
width: 120,
xOff: -4,
yOff: 0,
projectile: 2,
spdMult: .7,
speed: 700
}, {
id: 13,
type: 1,
age: 9,
name: "Repeater Crossbow",
desc: "Range: 1200 Damage: 30 AttackSpeed: 0.23s MoveSpeed: 70%
Requires: 10 Wood",
src: "crossbow_2",
req: ["wood", 10],
aboveHand: !0,
armS: .75,
length: 120,
width: 120,
xOff: -4,
yOff: 0,
projectile: 3,
spdMult: .7,
speed: 230
}, {
id: 14,
type: 1,
age: 6,
name: "Hand",
desc: "Range: 125 Damage: 0 (250 Gold) AttackSpeed: 0.7s
MoveSpeed: 105%",
src: "grab_1",
length: 130,
width: 210,
xOff: -8,
yOff: 53,
dmg: 0,
steal: 250,
knock: .2,
spdMult: 1.05,
range: 125,
gather: 0,
speed: 700
}, {
id: 15,
type: 1,
age: 9,
name: "Musket",
desc: "Range: 1400 Damage: 50 AttackSpeed: 1.5s MoveSpeed: 60%
Requires: 10 Stone",
src: "musket",
req: ["stone", 10],
aboveHand: !0,
rec: .35,
armS: .6,
hndS: .3,
hndD: 1.6,
length: 205,
width: 205,
xOff: 25,
yOff: 0,
projectile: 5,
hideProjectile: !0,
spdMult: .6,
speed: 1500
}], e.exports.list = [{
group: e.exports.groups[0],
name: "apple",
desc: "Requires: 10 Food Restores: 20 Hp",
req: ["food", 10],
consume: function(e) {
return e.changeHealth(20, e)
},
scale: 22,
holdOffset: 15
}, {
age: 3,
group: e.exports.groups[0],
name: "cookie",
desc: "Requires: 15 Food Restores: 40 Hp",
req: ["food", 15],
consume: function(e) {
return e.changeHealth(40, e)
},
scale: 27,
holdOffset: 15
}, {
age: 7,
group: e.exports.groups[0],
name: "cheese",
desc: "Requires: 25 Food Restores: 30 Hp (10 Hp in 5s)",
req: ["food", 25],
consume: function(e) {
return !!(e.changeHealth(30, e) || e.health < 100) &&
(e.dmgOverTime.dmg = -10, e.dmgOverTime.doer = e, e.dmgOverTime.time = 5, !0)
},
scale: 27,
holdOffset: 15
}, {
group: e.exports.groups[1],
name: "wood wall",
desc: "Requires: 10 Wood Health: 380 Hp",
req: ["wood", 10],
projDmg: !0,
health: 380,
scale: 50,
holdOffset: 20,
placeOffset: -5
}, {
age: 3,
group: e.exports.groups[1],
name: "stone wall",
desc: "Requires: 25 Stone Health: 900 Hp",
req: ["stone", 25],
health: 900,
scale: 50,
holdOffset: 20,
placeOffset: -5
}, {
age: 7,
group: e.exports.groups[1],
name: "castle wall",
desc: "Requires: 35 Stone Health: 1500 Hp",
req: ["stone", 35],
health: 1500,
scale: 52,
holdOffset: 20,
placeOffset: -5
}, {
group: e.exports.groups[2],
name: "spikes",
desc: "Requires: 20 Wood, 5 Stone Health: 400 Damage: 20",
req: ["wood", 20, "stone", 5],
health: 400,
dmg: 20,
scale: 49,
spritePadding: -23,
holdOffset: 8,
placeOffset: -5
}, {
age: 5,
group: e.exports.groups[2],
name: "greater spikes",
desc: "Requires: 30 Wood, 10 Stone Health: 500 Damage: 35",
req: ["wood", 30, "stone", 10],
health: 500,
dmg: 35,
scale: 52,
spritePadding: -23,
holdOffset: 8,
placeOffset: -5
}, {
age: 9,
group: e.exports.groups[2],
name: "poison spikes",
desc: "Requires: 35 Wood, 15 Stone Health: 600 Damage: 30 (5 in
5s)",
req: ["wood", 35, "stone", 15],
health: 600,
dmg: 30,
pDmg: 5,
scale: 52,
spritePadding: -23,
holdOffset: 8,
placeOffset: -5
}, {
age: 9,
group: e.exports.groups[2],
name: "spinning spikes",
desc: "Requires: 30 Wood, 20 Stone Health: 500 Damage: 45",
req: ["wood", 30, "stone", 20],
health: 500,
dmg: 45,
turnSpeed: .003,
scale: 52,
spritePadding: -23,
holdOffset: 8,
placeOffset: -5
}, {
group: e.exports.groups[3],
name: "windmill",
desc: "Requires: 50 Wood, 10 Stone Health: 400 Gold/Second: 1
Gold/s",
req: ["wood", 50, "stone", 10],
health: 400,
pps: 1,
turnSpeed: .0016,
spritePadding: 25,
iconLineMult: 12,
scale: 45,
holdOffset: 20,
placeOffset: 5
}, {
age: 5,
group: e.exports.groups[3],
name: "faster windmill",
desc: "Requires: 60 Wood, 20 Stone Health: 500 Gold/Second: 1.5
Gold/s",
req: ["wood", 60, "stone", 20],
health: 500,
pps: 1.5,
turnSpeed: .0025,
spritePadding: 25,
iconLineMult: 12,
scale: 47,
holdOffset: 20,
placeOffset: 5
}, {
age: 8,
group: e.exports.groups[3],
name: "power mill",
desc: "Requires: 100 Wood, 50 Stone Health: 800 Gold/Second: 2
Gold/s",
req: ["wood", 100, "stone", 50],
health: 800,
pps: 2,
turnSpeed: .005,
spritePadding: 25,
iconLineMult: 12,
scale: 47,
holdOffset: 20,
placeOffset: 5
}, {
age: 5,
group: e.exports.groups[4],
type: 2,
name: "mine",
desc: "Requires: 20 Wood, 100 Stone",
req: ["wood", 20, "stone", 100],
iconLineMult: 12,
scale: 65,
holdOffset: 20,
placeOffset: 0
}, {
age: 5,
group: e.exports.groups[11],
type: 0,
name: "sapling",
desc: "Requires: 150 Wood",
req: ["wood", 150],
iconLineMult: 12,
colDiv: .5,
scale: 110,
holdOffset: 50,
placeOffset: -15
}, {
age: 4,
group: e.exports.groups[5],
name: "pit trap",
desc: "Requires: 10 Wood, 10 Stone Health: 500",
req: ["wood", 10, "stone", 10],
trap: !0,
ignoreCollision: !0,
hideFromEnemy: !0,
health: 500,
colDiv: .2,
scale: 50,
holdOffset: 20,
placeOffset: -5
}, {
age: 4,
group: e.exports.groups[6],
name: "boost pad",
desc: "Requires: 20 Wood, 5 Stone Health: 150",
req: ["stone", 20, "wood", 5],
ignoreCollision: !0,
boostSpeed: 1.5,
health: 150,
colDiv: .7,
scale: 45,
holdOffset: 20,
placeOffset: -5
}, {
age: 7,
group: e.exports.groups[7],
doUpdate: !0,
name: "turret",
desc: "Requires: 200 Wood, 150 Stone Health: 800 Damage: 25
Range: 700 AttackSpeed: 2.2s",
req: ["wood", 200, "stone", 150],
health: 800,
projectile: 1,
shootRange: 700,
shootRate: 2200,
scale: 43,
holdOffset: 20,
placeOffset: -5
}, {
age: 7,
group: e.exports.groups[8],
name: "platform",
desc: "Requires: 20 Wood Health: 300",
req: ["wood", 20],
ignoreCollision: !0,
zIndex: 1,
health: 300,
scale: 43,
holdOffset: 20,
placeOffset: -5
}, {
age: 7,
group: e.exports.groups[9],
name: "healing pad",
desc: "Requires: 30 Wood, 10 Food Health: 400 Healing: 15
Hp/s",
req: ["wood", 30, "food", 10],
ignoreCollision: !0,
healCol: 15,
health: 400,
colDiv: .7,
scale: 45,
holdOffset: 20,
placeOffset: -5
}, {
age: 9,
group: e.exports.groups[10],
name: "spawn pad",
desc: "Requires: 100 Wood, 100 Stone Health: 400",
req: ["wood", 100, "stone", 100],
health: 400,
ignoreCollision: !0,
spawnPoint: !0,
scale: 45,
holdOffset: 20,
placeOffset: -5
}, {
age: 7,
group: e.exports.groups[12],
name: "blocker",
desc: "Requires: 30 Wood, 25 Stone Health: 400 Range: 300",
req: ["wood", 30, "stone", 25],
ignoreCollision: !0,
blocker: 300,
health: 400,
colDiv: .7,
scale: 45,
holdOffset: 20,
placeOffset: -5
}, {
age: 7,
group: e.exports.groups[13],
name: "teleporter",
desc: "Requires: 60 Wood, 60 Stone Health: 200",
req: ["wood", 60, "stone", 60],
ignoreCollision: !0,
teleport: !0,
health: 200,
colDiv: .7,
scale: 45,
holdOffset: 20,
placeOffset: -5
}];
for (var n = 0; n < e.exports.list.length; ++n)
e.exports.list[n].id = n, e.exports
.list[n].pre && (e.exports.list[n].pre = n -
e.exports.list[n].pre)
}, function(e, t) {
e.exports = {}
}, function(e, t) {
var n = Math.floor,
i = Math.abs,
r = Math.cos,
s = Math.sin,
a = (Math.pow, Math.sqrt);
e.exports = function(e, t, o, c, l, h) {
var u, f;
this.objects = t, this.grids = {}, this.updateObjects = [];
var d = c.mapScale / c.colGrid;
this.setObjectGrids = function(e) {
for (var t = Math.min(c.mapScale, Math.max(0, e.x)), n =
Math.min(c.mapScale,
a.speed, i, a.scale)
}, this.checkCollision = function(e, t, n) {
n = n || 1;
var l = e.x - t.x,
h = e.y - t.y,
u = e.scale + t.scale;
if (i(l) <= u || i(h) <= u) {
u = e.scale + (t.getScale ? t.getScale() : t.scale);
var f = a(l * l + h * h) - u;
if (f <= 0) {
if (t.ignoreCollision) !t.trap || e.noTrap ||
t.owner == e || t.owner &&
t.owner.team && t.owner.team == e.team ?
t.boostSpeed ? (e.xVel += n *
.y)))
}
}
return t.zIndex > e.zIndex && (e.zIndex =
t.zIndex), !0
}
}
return !1
}
}
}, function(e, t, n) {
var i = new(n(49));
i.addWords("jew", "black", "baby", "child", "white", "porn",
"pedo", "trump",
"clinton", "hitler", "nazi", "gay", "pride", "sex",
"pleasure", "touch",
"poo", "kids", "rape", "white power", "nigga", "nig
nog", "doggy",
"rapist", "boner", "nigger", "nigg", "finger", "nogger",
"nagger", "nig",
"fag", "gai", "pole", "stripper", "penis", "vagina",
"pussy", "nazi",
"hitler", "stalin", "burn", "chamber", "cock", "peen",
"dick", "spick",
"nieger", "die", "satan", "n|ig", "nlg", "cunt", "c0ck",
"fag", "lick",
"condom", "anal", "shit", "phile", "little", "kids",
"free KR", "tiny",
"sidney", "ass", "kill", ".io", "(dot)", "[dot]",
"mini", "whiore",
"whore", "faggot", "github", "1337", "666", "satan",
"senpa", "discord",
"d1scord", "mistik", ".io", "senpa.io", "sidney", "sid",
"senpaio",
"vries", "asa");
var r = Math.abs,
s = Math.cos,
a = Math.sin,
o = Math.pow,
c = Math.sqrt;
e.exports = function(e, t, n, l, h, u, f, d, p, g, m, y, k, v) {
this.id = e, this.sid = t, this.tmpScore = 0, this.team = null,
this.skinIndex =
0, this.tailIndex = 0, this.hitTime = 0, this.tails = {};
for (var w = 0; w < m.length; ++w) m[w].price <= 0 &&
(this.tails[m[w].id] =
1);
for (this.skins = {}, w = 0; w < g.length; ++w) g[w].price <= 0
&& (this.skins[
g[w].id] = 1);
this.points = 0, this.dt = 0, this.hidden = !1, this.itemCounts
= {}, this
.isPlayer = !0, this.pps = 0, this.moveDir = void 0,
this.skinRot = 0,
this.lastPing = 0, this.iconIndex = 0, this.skinColor = 0,
this.spawn =
function(e) {
this.active = !0, this.alive = !0, this.lockMove = !1,
this.lockDir = !1,
this.minimapCounter = 0, this.chatCountdown = 0,
this.shameCount = 0,
this.shameTimer = 0, this.sentTo = {}, this.gathering =
0, this.autoGather =
0, this.animTime = 0, this.animSpeed = 0,
this.mouseState = 0, this.buildIndex = -
1, this.weaponIndex = 0, this.dmgOverTime = {},
this.noMovTimer = 0,
this.maxXP = 300, this.XP = 0, this.age = 1, this.kills
= 0, this.upgrAge =
2, this.upgradePoints = 0, this.x = 0, this.y = 0,
this.zIndex = 0,
this.xVel = 0, this.yVel = 0, this.slowMult = 1,
this.dir = 0, this.dirPlus =
0, this.targetDir = 0, this.targetAngle = 0,
this.maxHealth = 100, this
.health = this.maxHealth, this.scale = n.playerScale,
this.speed = n.playerSpeed,
this.resetMoveDir(), this.resetResources(e), this.items
= [0, 3, 6, 10],
this.weapons = [0], this.shootCount = 0, this.weaponXP
= [], this.reloads = {}
}, this.resetMoveDir = function() {
this.moveDir = void 0
}, this.resetResources = function(e) {
for (var t = 0; t < n.resourceTypes.length; ++t)
this[n.resourceTypes[t]] =
e ? 100 : 0
}, this.addItem = function(e) {
var t = p.list[e];
if (t) {
for (var n = 0; n < this.items.length; ++n)
if (p.list[this.items[n]].group == t.group) return
this.buildIndex ==
this.items[n] && (this.buildIndex = e),
this.items[n] = e, !0;
return this.items.push(e), !0
}
return !1
}, this.setUserData = function(e) {
if (e) {
this.name = "unknown";
var t = e.name + "",
r = !1,
s = (t = (t = (t = (t = t.slice(0,
n.maxNameLength)).replace(
/[^\w:\(\)\/? -]+/gim, "
")).replace(/[^\x00-\x7F]/g, " ")).trim()).toLowerCase()
.replace(/\s/g, "").replace(/1/g, "i").replace(/0/g,
"o").replace(/5/g,
"s");
for (var a of i.list)
if (-1 != s.indexOf(a)) {
r = !0;
break
}
t.length > 0 && !r && (this.name = t), this.skinColor =
0, n.skinColors[
e.skin] && (this.skinColor = e.skin)
}
}, this.getData = function() {
return [this.id, this.sid, this.name, l.fixTo(this.x, 2),
l.fixTo(this.y,
n.waterCurrent * e));
var r = null != this.moveDir ?
s(this.moveDir) : 0,
d = null != this.moveDir ?
a(this.moveDir) : 0,
g = c(r * r + d * d);
0 != g && (r /= g, d /= g), r && (this.xVel +=
r * this.speed * i * e),
d && (this.yVel += d * this.speed * i * e)
}
var m;
this.zIndex = 0, this.lockMove = !1, this.healCol =
0;
for (var y = l.getDistance(0, 0, this.xVel * e,
this.yVel * e), k =
Math.min(4, Math.max(1, Math.round(y / 40))),
v = 1 / k, w = 0; w <
k; ++w) {
this.xVel && (this.x += this.xVel * e * v),
this.yVel && (this.y +=
1))
}
}
}
}, this.addWeaponXP = function(e) {
this.weaponXP[this.weaponIndex] ||
(this.weaponXP[this.weaponIndex] = 0),
this.weaponXP[this.weaponIndex] += e
}, this.earnXP = function(e) {
this.age < n.maxAge && (this.XP += e, this.XP >= this.maxXP
? (this.age <
.shield);
var x = p.weapons[this.weaponIndex].dmg *
(this.skin && this.skin.dmgMultO ?
.dmgMultO : 1),
S = .3 * (t.weightM || 1) +
(p.weapons[this.weaponIndex].knock || 0);
t.xVel += S * s(e), t.yVel += S * a(e), this.skin
&& this.skin.healD &&
this.changeHealth(x * b * this.skin.healD,
this), this.tail && this.tail
.healD && this.changeHealth(x * b *
this.tail.healD, this), t.skin &&
t.skin.dmg && 1 == b && this.changeHealth(-x *
t.skin.dmg, t), t.tail &&
t.tail.dmg && 1 == b && this.changeHealth(-x *
t.tail.dmg, t), !(t.dmgOverTime &&
0, this.dirPlus = 0, x = 0, S = 0) : 0 == S ? (x += e / (this.animSpeed *
function s(e, t, n, i, r) {
"localhost" == location.hostname && (window.location.hostname =
"127.0.0.1"),
this.debugLog = !1, this.baseUrl = e, this.lobbySize = n,
this.devPort = t,
this.lobbySpread = i, this.rawIPs = !!r, this.server = void
0, this.gameIndex =
void 0, this.callback = void 0, this.errorCallback = void
0, this.processServers(
vultr.servers)
}
s.prototype.regionInfo = {
0: {
name: "Local",
latitude: 0,
longitude: 0
},
"vultr:1": {
name: "New Jersey",
latitude: 40.1393329,
longitude: -75.8521818
},
"vultr:2": {
name: "Chicago",
latitude: 41.8339037,
longitude: -87.872238
},
"vultr:3": {
name: "Dallas",
latitude: 32.8208751,
longitude: -96.8714229
},
"vultr:4": {
name: "Seattle",
latitude: 47.6149942,
longitude: -122.4759879
},
"vultr:5": {
name: "Los Angeles",
latitude: 34.0207504,
longitude: -118.691914
},
"vultr:6": {
name: "Atlanta",
latitude: 33.7676334,
longitude: -84.5610332
},
"vultr:7": {
name: "Amsterdam",
latitude: 52.3745287,
longitude: 4.7581878
},
"vultr:8": {
name: "London",
latitude: 51.5283063,
longitude: -.382486
},
"vultr:9": {
name: "Frankfurt",
latitude: 50.1211273,
longitude: 8.496137
},
"vultr:12": {
name: "Silicon Valley",
latitude: 37.4024714,
longitude: -122.3219752
},
"vultr:19": {
name: "Sydney",
latitude: -33.8479715,
longitude: 150.651084
},
"vultr:24": {
name: "Paris",
latitude: 48.8588376,
longitude: 2.2773454
},
"vultr:25": {
name: "Tokyo",
latitude: 35.6732615,
longitude: 139.569959
},
"vultr:39": {
name: "Miami",
latitude: 25.7823071,
longitude: -80.3012156
},
"vultr:40": {
name: "Singapore",
latitude: 1.3147268,
longitude: 103.7065876
}
}, s.prototype.start = function(e, t) {
this.callback = e, this.errorCallback = t;
var n = this.parseServerQuery();
n ? (this.log("Found server in query."), this.password = n[3],
this.connect(
n[0], n[1], n[2])) : (this.log("Pinging servers..."),
this.pingServers())
}, s.prototype.parseServerQuery = function() {
var e = i.parse(location.href, !0),
t = e.query.server;
if ("string" == typeof t) {
var n = t.split(":");
if (3 == n.length) {
var r = n[0],
s = parseInt(n[1]),
a = parseInt(n[2]);
return "0" == r || r.startsWith("vultr:") || (r =
"vultr:" + r), [r, s,
a, e.query.password
]
}
this.errorCallback("Invalid number of server parameters in
" + t)
}
}, s.prototype.findServer = function(e, t) {
var n = this.servers[e];
if (Array.isArray(n)) {
for (var i = 0; i < n.length; i++) {
var r = n[i];
if (r.index == t) return r
}
console.warn("Could not find server in region " + e + "
with index " + t +
".")
} else this.errorCallback("No server list for region " + e)
}, s.prototype.pingServers = function() {
var e = this,
t = [];
for (var n in this.servers)
if (this.servers.hasOwnProperty(n)) {
var i = this.servers[n],
r = i[Math.floor(Math.random() * i.length)];
null != r ? function(i, r) {
var s = new XMLHttpRequest;
s.onreadystatechange = function(i) {
var s = i.target;
if (4 == s.readyState)
if (200 == s.status) {
for (var a = 0; a < t.length; a++)
t[a].abort();
e.log("Connecting to region",
r.region);
var o = e.seekServer(r.region);
e.connect(o[0], o[1], o[2])
} else console.warn("Error pinging " + r.ip
+ " in region " + n)
};
var a = "//" + e.serverAddress(r.ip, !0) + ":" +
e.serverPort(r) +
"/ping";
s.open("GET", a, !0), s.send(null),
e.log("Pinging", a), t.push(s)
}(0, r) : console.log("No target server for region " +
n)
}
}, s.prototype.seekServer = function(e, t, n) {
null == n && (n = "random"), null == t && (t = !1);
const i = ["random"];
var r = this.lobbySize,
s = this.lobbySpread,
a = this.servers[e].flatMap((function(e) {
var t = 0;
return e.games.map((function(n) {
var i = t++;
return {
region: e.region,
index: e.index * e.games.length + i,
gameIndex: i,
gameCount: e.games.length,
playerCount: n.playerCount,
isPrivate: n.isPrivate
}
}))
})).filter((function(e) {
return !e.isPrivate
})).filter((function(e) {
return !t || 0 == e.playerCount && e.gameIndex >=
e.gameCount / 2
})).filter((function(e) {
return "random" == n || i[e.index % i.length].key == n
})).sort((function(e, t) {
return t.playerCount - e.playerCount
})).filter((function(e) {
return e.playerCount < r
}));
if (t && a.reverse(), 0 != a.length) {
var o = Math.min(s, a.length),
c = Math.floor(Math.random() * o),
l = a[c = Math.min(c, a.length - 1)],
h = l.region,
u = (c = Math.floor(l.index / l.gameCount), l.index %
l.gameCount);
return this.log("Found server."), [h, c, u]
}
this.errorCallback("No open servers.")
}, s.prototype.connect = function(e, t, n) {
if (!this.connected) {
var i = this.findServer(e, t);
null != i ? (this.log("Connecting to server", i, "with game
index", n), i
.games[n].playerCount >= this.lobbySize ?
this.errorCallback(
"Server is already full.") :
(window.history.replaceState(document.title,
n, i)
}, s.prototype.generateHref = function(e, t, n, i) {
var r = "/?server=" + (e = this.stripRegion(e)) + ":" + t + ":"
+ n;
return i && (r += "&password=" + encodeURIComponent(i)), r
}, s.prototype.serverAddress = function(e, t) {
return "127.0.0.1" == e || "7f000001" == e ||
"903d62ef5d1c2fecdcaeb5e7dd485eff" == e ?
window.location.hostname : this
.rawIPs ? t ? "ip_" + this.hashIP(e) + "." + this.baseUrl :
e : "ip_" + e +
"." + this.baseUrl
}, s.prototype.serverPort = function(e) {
return 0 == e.region ? this.devPort :
location.protocol.startsWith("https") ?
443 : 80
}, s.prototype.processServers = function(e) {
for (var t = {}, n = 0; n < e.length; n++) {
var i = e[n],
r = t[i.region];
null == r && (r = [], t[i.region] = r), r.push(i)
}
for (var s in t) t[s] = t[s].sort((function(e, t) {
return e.index - t.index
}));
this.servers = t
}, s.prototype.ipToHex = function(e) {
return e.split(".").map(e => ("00" +
parseInt(e).toString(16)).substr(-2))
.join("").toLowerCase()
}, s.prototype.hashIP = function(e) {
return r(this.ipToHex(e))
}, s.prototype.log = function() {
return this.debugLog ? console.log.apply(void 0, arguments) :
console.verbose ?
console.verbose.apply(void 0, arguments) : void 0
}, s.prototype.stripRegion = function(e) {
return e.startsWith("vultr:") ? e = e.slice(6) :
e.startsWith("do:") && (e =
e.slice(3)), e
}, window.testVultrClient = function() {
var e = 1;
function t(t, n) {
(t = "" + t) == (n = "" + n) ? console.log(`Assert ${e}
passed.`):
console.warn(`Assert ${e} failed. Expected ${n}, got $
{t}.`), e++
}
var n = new s("test.io", -1, 5, 1, !1);
n.errorCallback = function(e) {}, n.processServers(function(e)
{
var t = [];
for (var n in e)
for (var i = e[n], r = 0; r < i.length; r++) t.push({
ip: n + ":" + r,
scheme: "testing",
region: n,
index: r,
games: i[r].map(e => ({
playerCount: e,
isPrivate: !1
}))
});
return t
}({
1: [
[0, 0, 0, 0],
[0, 0, 0, 0]
],
2: [
[5, 1, 0, 0],
[0, 0, 0, 0]
],
3: [
[5, 0, 1, 5],
[0, 0, 0, 0]
],
4: [
[5, 1, 1, 5],
[1, 0, 0, 0]
],
5: [
[5, 1, 1, 5],
[1, 0, 4, 0]
],
6: [
[5, 5, 5, 5],
[2, 3, 1, 4]
],
7: [
[5, 5, 5, 5],
[5, 5, 5, 5]
]
})), t(n.seekServer(1, !1), [1, 0, 0]), t(n.seekServer(1, !0),
[1, 1, 3]),
t(n.seekServer(2, !1), [2, 0, 1]), t(n.seekServer(2, !0),
[2, 1, 3]), t(n
function s() {
this.protocol = null, this.slashes = null, this.auth = null,
this.host =
null, this.port = null, this.hostname = null, this.hash =
null, this.search =
null, this.query = null, this.pathname = null, this.path =
null, this.href =
null
}
t.parse = v, t.resolve = function(e, t) {
return v(e, !1, !0).resolve(t)
}, t.resolveObject = function(e, t) {
return e ? v(e, !1, !0).resolveObject(t) : t
}, t.format = function(e) {
return r.isString(e) && (e = v(e)), e instanceof s ? e.format()
: s.prototype
.format.call(e)
}, t.Url = s;
var a = /^([a-z0-9.+-]+:)/i,
o = /:[0-9]*$/,
c = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
l = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`",
" ", "\r",
"\n", "\t"
]),
h = ["'"].concat(l),
u = ["%", "/", "?", ";", "#"].concat(h),
f = ["/", "?", "#"],
d = /^[+a-z0-9A-Z_-]{0,63}$/,
p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
g = {
javascript: !0,
"javascript:": !0
},
m = {
javascript: !0,
"javascript:": !0
},
y = {
http: !0,
https: !0,
ftp: !0,
gopher: !0,
file: !0,
"http:": !0,
"https:": !0,
"ftp:": !0,
"gopher:": !0,
"file:": !0
},
k = n(64);
function v(e, t, n) {
if (e && r.isObject(e) && e instanceof s) return e;
var i = new s;
return i.parse(e, t, n), i
}
s.prototype.parse = function(e, t, n) {
if (!r.isString(e)) throw new TypeError(
"Parameter 'url' must be a string, not " + typeof e);
var s = e.indexOf("?"),
o = -1 !== s && s < e.indexOf("#") ? "?" : "#",
l = e.split(o);
l[0] = l[0].replace(/\\/g, "/");
var v = e = l.join(o);
if (v = v.trim(), !n && 1 === e.split("#").length) {
var w = c.exec(v);
if (w) return this.path = v, this.href = v, this.pathname =
w[1], w[2] ?
(this.search = w[2], this.query = t ?
k.parse(this.search.substr(1)) :
this.search.substr(1)) : t && (this.search = "",
this.query = {}),
this
}
var b = a.exec(v);
if (b) {
var x = (b = b[0]).toLowerCase();
this.protocol = x, v = v.substr(b.length)
}
if (n || b || v.match(/^\/\/[^@\/]+@[^@\/]+/)) {
var S = "//" === v.substr(0, 2);
!S || b && m[b] || (v = v.substr(2), this.slashes = !0)
}
if (!m[b] && (S || b && !y[b])) {
for (var T, I, E = -1, M = 0; M < f.length; M++) - 1 !== (A
= v.indexOf(f[
M])) && (-1 === E || A < E) && (E = A);
for (-1 !== (I = -1 === E ? v.lastIndexOf("@") :
v.lastIndexOf("@", E)) &&
(T = v.slice(0, I), v = v.slice(I + 1), this.auth =
decodeURIComponent(T)),
E = -1, M = 0; M < u.length; M++) {
var A; - 1 !== (A = v.indexOf(u[M])) && (-1 === E || A
< E) && (E = A)
} - 1 === E && (E = v.length), this.host = v.slice(0, E), v
= v.slice(E),
this.parseHost(), this.hostname = this.hostname || "";
var P = "[" === this.hostname[0] && "]" ===
this.hostname[this.hostname.length -
1];
if (!P)
for (var B = this.hostname.split(/\./), C = (M = 0,
B.length); M < C; M++) {
var O = B[M];
if (O && !O.match(d)) {
for (var R = "", j = 0, _ = O.length; j < _; j+
+) O.charCodeAt(j) >
127 ? R += "x" : R += O[j];
if (!R.match(d)) {
var U = B.slice(0, M),
D = B.slice(M + 1),
L = O.match(p);
L && (U.push(L[1]), D.unshift(L[2])),
D.length && (v = "/" + D.join(
".") + v), this.hostname = U.join(".");
break
}
}
}
this.hostname.length > 255 ? this.hostname = "" :
this.hostname = this.hostname
.toLowerCase(), P || (this.hostname =
i.toASCII(this.hostname));
var F = this.port ? ":" + this.port : "",
z = this.hostname || "";
this.host = z + F, this.href += this.host, P &&
(this.hostname = this.hostname
.substr(1,
this.hostname.length - 2), "/" !== v[0] && (v = "/" + v))
}
if (!g[x])
for (M = 0, C = h.length; M < C; M++) {
var H = h[M];
if (-1 !== v.indexOf(H)) {
var V = encodeURIComponent(H);
V === H && (V = escape(H)), v = v.split(H).join(V)
}
}
var q = v.indexOf("#"); - 1 !== q && (this.hash = v.substr(q),
v = v.slice(
0, q));
var Y = v.indexOf("?");
if (-1 !== Y ? (this.search = v.substr(Y), this.query =
v.substr(Y + 1), t &&
(this.query = k.parse(this.query)), v =
v.slice(0, Y)) : t && (this.search =
"", this.query = {}), v && (this.pathname = v), y[x] && this.hostname &&
!this.pathname && (this.pathname = "/"), this.pathname ||
this.search) {
F = this.pathname || "";
var W = this.search || "";
this.path = F + W
}
return this.href = this.format(), this
}, s.prototype.format = function() {
var e = this.auth || "";
e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ":"), e
+= "@");
var t = this.protocol || "",
n = this.pathname || "",
i = this.hash || "",
s = !1,
a = "";
this.host ? s = e + this.host : this.hostname && (s = e + (-1
=== this.hostname
n)) : s || (s = ""), i && "#" !== i.charAt(0) && (i = "#" + i), o && "?" !==
o.charAt(0) && (o = "?" + o), t + s + (n = n.replace(/[?
#]/g, (function(e) {
return encodeURIComponent(e)
}))) + (o = o.replace("#", "%23")) + i
}, s.prototype.resolve = function(e) {
return this.resolveObject(v(e, !1, !0)).format()
}, s.prototype.resolveObject = function(e) {
if (r.isString(e)) {
var t = new s;
t.parse(e, !1, !0), e = t
}
for (var n = new s, i = Object.keys(this), a = 0; a < i.length;
a++) {
var o = i[a];
n[o] = this[o]
}
if (n.hash = e.hash, "" === e.href) return n.href = n.format(),
n;
if (e.slashes && !e.protocol) {
for (var c = Object.keys(e), l = 0; l < c.length; l++) {
var h = c[l];
"protocol" !== h && (n[h] = e[h])
}
return y[n.protocol] && n.hostname && !n.pathname &&
(n.path = n.pathname =
"/"),
n.href = n.format(), n
}
if (e.protocol && e.protocol !== n.protocol) {
if (!y[e.protocol]) {
for (var u = Object.keys(e), f = 0; f < u.length; f++)
{
var d = u[f];
n[d] = e[d]
}
return n.href = n.format(), n
}
if (n.protocol = e.protocol, e.host || m[e.protocol])
n.pathname = e.pathname;
else {
for (var p = (e.pathname || "").split("/"); p.length &&
!(e.host = p.shift());)
;
e.host || (e.host = ""), e.hostname || (e.hostname =
""), "" !== p[0] &&
p.unshift(""), p.length < 2 && p.unshift(""),
n.pathname = p.join("/")
}
if (n.search = e.search, n.query = e.query, n.host = e.host
|| "", n.auth =
e.auth, n.hostname = e.hostname || e.host, n.port =
e.port, n.pathname ||
n.search) {
var g = n.pathname || "",
k = n.search || "";
n.path = g + k
}
return n.slashes = n.slashes || e.slashes, n.href =
n.format(), n
}
var v = n.pathname && "/" === n.pathname.charAt(0),
w = e.host || e.pathname && "/" === e.pathname.charAt(0),
b = w || v || n.host && e.pathname,
x = b,
S = n.pathname && n.pathname.split("/") || [],
T = (p = e.pathname && e.pathname.split("/") || [],
n.protocol && !y[n.protocol]);
if (T && (n.hostname = "", n.port = null, n.host && ("" ===
S[0] ? S[0] =
n.host :
S.unshift(n.host)), n.host = "", e.protocol && (e.hostname =
null, e.port = null, e.host && ("" === p[0] ? p[0] = e.host : p.unshift(
e.host)), e.host = null), b = b && ("" === p[0] || "" ===
S[0])), w) n.host =
e.host || "" === e.host ? e.host : n.host, n.hostname =
e.hostname || "" ===
e.hostname ? e.hostname : n.hostname, n.search = e.search,
n.query = e.query,
S = p;
else if (p.length) S || (S = []), S.pop(), S = S.concat(p),
n.search = e.search,
n.query = e.query;
else if (!r.isNullOrUndefined(e.search)) return T &&
(n.hostname = n.host =
function m(e) {
throw new RangeError(d[e])
}
function y(e, t) {
for (var n = e.length, i = []; n--;) i[n] = t(e[n]);
return i
}
function k(e, t) {
var n = e.split("@"),
i = "";
return n.length > 1 && (i = n[0] + "@", e = n[1]), i +
y((e = e.replace(
f, ".")).split("."), t).join(".")
}
function v(e) {
for (var t, n, i = [], r = 0, s = e.length; r < s;)(t =
e.charCodeAt(r++)) >=
55296 && t <= 56319 && r < s ? 56320 == (64512 & (n
= e.charCodeAt(r++))) ?
i.push(((1023 & t) << 10) + (1023 & n) + 65536) :
(i.push(t), r--) : i.push(
t);
return i
}
function w(e) {
return y(e, (function(e) {
var t = "";
return e > 65535 && (t += g((e -= 65536) >>> 10 &
1023 | 55296), e =
56320 | 1023 & e), t + g(e)
})).join("")
}
function b(e) {
return e - 48 < 10 ? e - 22 : e - 65 < 26 ? e - 65 : e
- 97 < 26 ? e -
97 : l
}
function x(e, t) {
return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
}
function S(e, t, n) {
var i = 0;
for (e = n ? p(e / 700) : e >> 1, e += p(e / t); e >
455; i += l) e = p(
e / 35);
return p(i + 36 * e / (e + 38))
}
function T(e) {
var t, n, i, r, s, a, o, h, u, f, d = [],
g = e.length,
y = 0,
k = 128,
v = 72;
for ((n = e.lastIndexOf("-")) < 0 && (n = 0), i = 0; i
< n; ++i) e.charCodeAt(
i) >= 128 && m("not-basic"),
d.push(e.charCodeAt(i));
for (r = n > 0 ? n + 1 : 0; r < g;) {
for (s = y, a = 1, o = l; r >= g && m("invalid-
input"), ((h = b(e.charCodeAt(
r++))) >= l || h > p((c - y) / a)) &&
m("overflow"), y += h * a, !(h <
function I(e) {
var t, n, i, r, s, a, o, h, u, f, d, y, k, w, b, T =
[];
for (y = (e = v(e)).length, t = 128, n = 0, s = 72, a =
0; a < y; ++a)(d =
function i(e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}
e.exports = function(e, t, n, s) {
t = t || "&", n = n || "=";
var a = {};
if ("string" != typeof e || 0 === e.length) return a;
var o = /\+/g;
e = e.split(t);
var c = 1e3;
s && "number" == typeof s.maxKeys && (c = s.maxKeys);
var l = e.length;
c > 0 && l > c && (l = c);
for (var h = 0; h < l; ++h) {
var u, f, d, p, g = e[h].replace(o, "%20"),
m = g.indexOf(n);
m >= 0 ? (u = g.substr(0, m), f = g.substr(m + 1)) : (u =
g, f = ""), d =
decodeURIComponent(u), p = decodeURIComponent(f), i(a,
d) ? r(a[d]) ? a[
d].push(p) : a[d] = [a[d], p] : a[d] = p
}
return a
};
var r = Array.isArray || function(e) {
return "[object Array]" === Object.prototype.toString.call(e)
}
}, function(e, t, n) {
"use strict";
var i = function(e) {
switch (typeof e) {
case "string":
return e;
case "boolean":
return e ? "true" : "false";
case "number":
return isFinite(e) ? e : "";
default:
return ""
}
};
e.exports = function(e, t, n, o) {
return t = t || "&", n = n || "=", null === e && (e = void
0), "object" ==
typeof e ? s(a(e), (function(a) {
var o = encodeURIComponent(i(a)) + n;
return r(e[a]) ? s(e[a], (function(e) {
return o + encodeURIComponent(i(e))
})).join(t) : o + encodeURIComponent(i(e[a]))
})).join(t) : o ? encodeURIComponent(i(o)) + n +
encodeURIComponent(i(e)) :
""
};
var r = Array.isArray || function(e) {
return "[object Array]" ===
Object.prototype.toString.call(e)
};
function s(e, t) {
if (e.map) return e.map(t);
for (var n = [], i = 0; i < e.length; i++) n.push(t(e[i],
i));
return n
}
var a = Object.keys || function(e) {
var t = [];
for (var n in e) Object.prototype.hasOwnProperty.call(e, n)
&& t.push(n);
return t
}
}, function(e, t, n) {
! function() {
var t = n(68),
i = n(20).utf8,
r = n(69),
s = n(20).bin,
a = function(e, n) {
e.constructor == String ? e = n && "binary" ===
n.encoding ? s.stringToBytes(
e) : i.stringToBytes(e) : r(e) ? e =
Array.prototype.slice.call(e, 0) :
Array.isArray(e) || (e = e.toString());
for (var o = t.bytesToWords(e), c = 8 *
e.length, l = 1732584193, h = -
271733879, u = -1732584194, f = 271733878,
d = 0; d < o.length; d++) o[
d] = 16711935 & (o[d] << 8 | o[d] >>> 24) |
4278255360 & (o[d] << 24 |
24 - n % 32 & 255);
return t
},
bytesToHex: function(e) {
for (var t = [], n = 0; n < e.length; n++)
t.push((e[n] >>> 4).toString(
16)), t.push((15 & e[n]).toString(16));
return t.join("")
},
hexToBytes: function(e) {
for (var t = [], n = 0; n < e.length; n +=
2) t.push(parseInt(e.substr(
n, 2), 16));
return t
},
bytesToBase64: function(e) {
for (var n = [], i = 0; i < e.length; i +=
3)
for (var r = e[i] << 16 | e[i + 1] << 8
| e[i + 2], s = 0; s < 4; s++)
8 * i + 6 * s <= 8 * e.length ?
n.push(t.charAt(r >>> 6 * (3 - s) &
63)) : n.push("=");
return n.join("")
},
base64ToBytes: function(e) {
e = e.replace(/[^A-Z0-9+\/]/gi, "");
for (var n = [], i = 0, r = 0; i <
e.length; r = ++i % 4) 0 != r && n.push(
(t.indexOf(e.charAt(i - 1)) &
Math.pow(2, -2 * r + 8) - 1) << 2 * r |
t.indexOf(e.charAt(i)) >>> 6 - 2 * r);
return n
}
};
e.exports = n
}()
}, function(e, t) {
function n(e) {
return !!e.constructor && "function" == typeof
e.constructor.isBuffer && e.constructor
.isBuffer(e)
}
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports = function(e) {
return null != e && (n(e) || function(e) {
return "function" == typeof e.readFloatLE &&
"function" == typeof e.slice &&
n(e.slice(0, 0))
}(e) || !!e._isBuffer)
}
}, function(e, t) {
e.exports = function(e, t, n, i, r, s, a, o, c) {
this.aiTypes = [{
id: 0,
name: "Cow (150 Gold)",
src: "cow_1",
killScore: 150,
health: 500,
weightM: .8,
speed: 95e-5,
turnSpeed: .001,
scale: 72,
drop: ["food", 50]
}, {
id: 1,
name: "Pig (200 Gold)",
src: "pig_1",
killScore: 200,
health: 800,
weightM: .6,
speed: 85e-5,
turnSpeed: .001,
scale: 72,
drop: ["food", 80]
}, {
id: 2,
name: "Bull (1k Gold)",
src: "bull_2",
hostile: !0,
dmg: 20,
killScore: 1e3,
health: 1800,
weightM: .5,
speed: 94e-5,
turnSpeed: 74e-5,
scale: 78,
viewRange: 800,
chargePlayer: !0,
drop: ["food", 100]
}, {
id: 3,
name: "Bully (2k Gold)",
src: "bull_1",
hostile: !0,
dmg: 20,
killScore: 2e3,
health: 2800,
weightM: .45,
speed: .001,
turnSpeed: 8e-4,
scale: 90,
viewRange: 900,
chargePlayer: !0,
drop: ["food", 400]
}, {
id: 4,
name: "Wolf (500 Gold)",
src: "wolf_1",
hostile: !0,
dmg: 8,
killScore: 500,
health: 300,
weightM: .45,
speed: .001,
turnSpeed: .002,
scale: 84,
viewRange: 800,
chargePlayer: !0,
drop: ["food", 200]
}, {
id: 5,
name: "Quack (2k Gold)",
src: "chicken_1",
dmg: 8,
killScore: 2e3,
noTrap: !0,
health: 300,
weightM: .2,
speed: .0018,
turnSpeed: .006,
scale: 70,
drop: ["food", 100]
}, {
id: 6,
name: "MOOSTAFA (8k Gold)",
nameScale: 50,
src: "enemy",
hostile: !0,
dontRun: !0,
fixedSpawn: !0,
spawnDelay: 6e4,
noTrap: !0,
colDmg: 100,
dmg: 40,
killScore: 8e3,
health: 18e3,
weightM: .4,
speed: 7e-4,
turnSpeed: .01,
scale: 80,
spriteMlt: 1.8,
leapForce: .9,
viewRange: 1e3,
hitRange: 210,
hitDelay: 1e3,
chargePlayer: !0,
drop: ["food", 100]
}, {
id: 7,
name: "TREASURE (5k Gold)",
hostile: !0,
nameScale: 35,
src: "crate_1",
fixedSpawn: !0,
spawnDelay: 12e4,
colDmg: 200,
killScore: 5e3,
health: 2e4,
weightM: .1,
speed: 0,
turnSpeed: 0,
scale: 70,
spriteMlt: 1
}, {
id: 8,
name: "MOOFIE (3k Gold)",
src: "wolf_2",
hostile: !0,
fixedSpawn: !0,
dontRun: !0,
hitScare: 4,
spawnDelay: 3e4,
noTrap: !0,
nameScale: 35,
dmg: 10,
colDmg: 100,
killScore: 3e3,
health: 7e3,
weightM: .45,
speed: .0015,
turnSpeed: .002,
scale: 90,
viewRange: 800,
chargePlayer: !0,
drop: ["food", 1e3]
}], this.spawn = function(l, h, u, f) {
for (var d, p = 0; p < e.length; ++p)
if (!e[p].active) {
d = e[p];
break
}
return d || (d = new t(e.length, r, n, i, a, s, o,
c), e.push(d)), d.init(
l, h, u, f, this.aiTypes[f]), d
}
}
}, function(e, t) {
var n = 2 * Math.PI;
e.exports = function(e, t, i, r, s, a, o, c) {
this.sid = e, this.isAI = !0, this.nameIndex =
s.randInt(0, a.cowNames.length -
Math.PI, Math.PI))
} else this.moveCount = s.randInt(4e3,
1e4), this.targetDir = s.randFloat(-
Math.PI, Math.PI)
} else if (this.moveCount > 0) {
var p = this.speed * o;
if (this.runFrom && this.runFrom.active &&
(!this.runFrom.isPlayer ||
Math.sin(this.dir));
for (var M = t.getGridArrays(this.x,
this.y, this.hitRange), A = 0; A <
M.length; ++A)
for (b = 0; b < M[A].length; ++b)(S =
M[A][b]).health && (T = s.getDistance(
this.x, this.y, S.x, S.y)) <
S.scale + this.hitRange && (S.changeHealth(
5 * -this.dmg) && t.disableObj(S),
t.hitObj(S, s.getDirection(this
"aa", this.sid)
}
if (r || E)
for (d = 0; d < i.length; ++d)(S = i[d]) &&
S.alive && (T = s.getDistance(
this.x, this.y, S.x, S.y),
this.hitRange ? !this.hitWait && T <=
this.yVel = 0)
}
}, this.canSee = function(e) {
if (!e) return !1;
if (e.skin && e.skin.invisTimer && e.noMovTimer >=
e.skin.invisTimer)
return !1;
var t = Math.abs(e.x - this.x) - e.scale,
n = Math.abs(e.y - this.y) - e.scale;
return t <= a.maxScreenWidth / 2 * 1.3 && n <=
a.maxScreenHeight / 2 *
1.3
};
var h = 0,
u = 0;
this.animate = function(e) {
this.animTime > 0 && (this.animTime -= e,
this.animTime <= 0 ? (this.animTime =
0, this.dirPlus = 0, h = 0, u = 0) : 0 == u ? (h += e / (this.animSpeed *
a.hitReturnRatio), this.dirPlus = s.lerp(0, this.targetAngle,
Math.min(
1, h)), h >= 1 && (h = 1, u = 1)) : (h -= e /
(this.animSpeed * (1 -
setInterval(() => {
if(autoaim == true) {
doNewSend(["2", [nearestEnemyAngle]]);
}
}, 0);
setInterval(() => {
if(myPlayer.hat == 45 && enoughTp == 0){
doNewSend(["ch", ["Infinite: Clown Alert!"]]);
for (let i=0;i<36;i++) {
let angle = myPlayer.dir + toRad(i * 10);
place(turretType, angle);
}
setTimeout( () => {
enoughTp = 1;
}, 1000);
}
},100)
setInterval(() => {
if(autoprimary == true) {
doNewSend(["5", [primary, true]]);
}
}, 0);
setInterval(() => {
if(autosecondary == true) {
doNewSend(["5", [secondary, true]]);
}
}, 0);
setInterval(() => {
if(hatToggle == 1) {
if(oldHat != normalHat) {
hat(normalHat);
console.log("Tried. - Hat")
}
if(oldAcc != normalAcc) {
acc(normalAcc);
console.log("Tried. - Acc")
}
oldHat = normalHat;
oldAcc = normalAcc
}
}, 25);
function normal() {
hat(normalHat);
acc(normalAcc);
}
}));
}
var AutoBreak = 0;
var copy = '!';
var chatmir = false;
var nearestEnemy;
var nearestEnemyAngle;
var isEnemyNear;
var primary;
var secondary;
var foodType;
var wallType;
var spikeType;
var millType;
var mineType;
var boostType;
var turretType;
var spawnpadType;
var autoaim = false;
var autoprimary = false;
var autosecondary = false;
var tick = 1;
var oldHat;
var oldAcc;
var enemiesNear;
var normalHat;
var normalAcc;
var ws;
var msgpack5 = msgpack;
var boostDir;
let myPlayer = {
id: null,
x: null,
y: null,
dir: null,
object: null,
weapon: null,
clan: null,
isLeader: null,
hat: null,
accessory: null,
isSkull: null
};
document.msgpack = msgpack;
function n(){
this.buffer = new Uint8Array([0]);
this.buffer.__proto__ = new Uint8Array;
this.type = 0;
}
WebSocket.prototype.oldSend = WebSocket.prototype.send;
WebSocket.prototype.send = function(m){
if (!ws){
document.ws = this;
ws = this;
socketFound(this);
}
this.oldSend(m);
};
function socketFound(socket){
socket.addEventListener('message', function(message){
handleMessage(message);
});
}
function AntiBoostSpikefc(){
doNewSend(["ch", ["Infinite: Anti Boost."]]);
place(spikeType, nearestEnemyAngle + toRad(80));
place(spikeType, nearestEnemyAngle + toRad(280));
}
function SpeedGear() {
hat(0);
acc(0);
if (myPlayer.y < 2400){
hat(15);
} else if (myPlayer.y > 6850 && myPlayer.y < 7550){
hat(31);
} else {
hat(12);
}
acc(11);
}
function BackToNormal(m) {
hat(0)
acc(0)
autoprimary = false;
autosecondary = false;
autoaim = false;
if (Mode == 1) {
hat(22);
acc(11);
} else if (m != 2 && Mode == 3) {
hat(6);
acc(11);
} else if (m == 2 || Mode == 0) {
SpeedGear();
} else if (Mode == 2){
hat(11);
acc(21);
}
doNewSend(["c", [0]]);
if (m == 1) {
doNewSend(['5', ['length', !0]]);
}
}
function Reload(m) {
setTimeout( () => {
doNewSend(["5", [secondary, true]]);
countdown = ReloadTimeofInsta
if (myPlayer.y > 6850 && myPlayer.y < 7550){
hat(31);
acc(11);
} else if (Mode == 1) {
hat(22);
acc(11);
} else {
hat(0);
hat(12);
hat(20);
acc(11);
}
}, 20);
if (ReloadTimeofInsta == 1500) {
setTimeout( () => {
if (myPlayer.y > 6850 && myPlayer.y < 7550){
hat(31);
} else if (Mode != 1) {
hat(20)
}
doNewSend(["ch", ["Infinite: 2."]]);
doNewSend(["5", [secondary, true]]);
}, 250);
setTimeout( () => {
if (myPlayer.y > 6850 && myPlayer.y < 7550){
hat(31);
} else if (Mode != 1) {
hat(20)
}
doNewSend(["ch", ["Infinite: 1."]]);
doNewSend(["5", [secondary, true]]);
}, 900);
}
setTimeout( () => {
doNewSend(["5", [primary, true]]);
BackToNormal(m)
r = 0;
doNewSend(["ch", ["Infinite: Done!"]]);
}, (ReloadTimeofInsta + 100));
}
function handleMessage(m){
let temp = msgpack5.decode(new Uint8Array(m.data));
let data;
if(temp.length > 1) {
data = [temp[0], ...temp[1]];
if (data[1] instanceof Array){
data = data;
}
} else {
data = temp;
}
let item = data[0];
if(!data) {return};
if (item == "33") {
enemiesNear = [];
for(let i = 0; i < data[1].length / 13; i++) {
let playerInfo = data[1].slice(13*i, 13*i+13);
if(playerInfo[0] == myPlayer.id) {
myPlayer.x = playerInfo[1];
myPlayer.y = playerInfo[2];
myPlayer.dir = playerInfo[3];
myPlayer.object = playerInfo[4];
myPlayer.weapon = playerInfo[5];
myPlayer.clan = playerInfo[7];
myPlayer.isLeader = playerInfo[8];
myPlayer.hat = playerInfo[9];
myPlayer.accessory = playerInfo[10];
myPlayer.isSkull = playerInfo[11];
} else if(playerInfo[7] != myPlayer.clan || playerInfo[7] === null) {
enemiesNear.push(playerInfo);
}
}
}
isEnemyNear = false;
if(enemiesNear) {
nearestEnemy = enemiesNear.sort((a,b) => dist(a, myPlayer) - dist(b,
myPlayer))[0];
}
if(nearestEnemy) {
nearestEnemyAngle = Math.atan2(nearestEnemy[2]-myPlayer.y, nearestEnemy[1]-
myPlayer.x);
if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) +
Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 210) {
isEnemyNear = true;
if(AntiBull != 1) {
}
};
}
//BullHeal
if(item == "h" && data[1] == myPlayer.id) {
if(data[2] < 94 && data[2] > 0 && BullHeal == 1 && Mode != 1) {
setTimeout ( () => {
hat(7);
acc(13)
}, 120);
setTimeout ( () => {
SpeedGear();
}, 700);
}
}
//AntiBull
if(item == "h" && data[1] == myPlayer.id) {
if(data[2] < 44 && data[2] > 0 && adcx == 1) {
autoaim = true;
autoprimary = true;
doNewSend(["5", [primary, true]]);
doNewSend(["7", [1]]);
hat(7);
acc(18);
setTimeout( () => {
hat(0);
hat(53);
acc(21);
}, 120);
setTimeout( () => {
doNewSend(["7", [1]]);
autoprimary=false
autoaim = false;
hat(11);
acc(21);
}, 140);
}
}
//AntiTrap
if(item == "6"){
for(let i = 0; i < data[1].length / 8; i++){
let ObjectData = data[1].slice(8*i, 8*i+8);
if(ObjectData[6] == 15 && ObjectData[7] != myPlayer.id){
if(Math.sqrt(Math.pow((myPlayer.y-ObjectData[2]), 2) +
Math.pow((myPlayer.x-ObjectData[1]), 2)) < 120){
for (let i=0;i<36;i++) {
let angle = myPlayer.dir + toRad(i * 10);
place(spikeType, angle)
}
if (Mode == 1) {
hat(22);
acc(11);
if (ModMode != 2) {
doNewSend(["ch", ["Infinite: Obstacle Detected."]]);
}
}
}
}
}
}
if(item == "h" && data[1] == myPlayer.id && amk == 1 && AntiBull == 0) {
if(data[2] < 50 && data[2] > 0) {
hat(6);
setTimeout( () => {
hat(22);
}, 50);
setTimeout( () => {
BackToNormal(0);
}, 120);
}
}
//AntiBoostspike
var
_0x52ab=['\x77\x36\x6c\x44\x63\x63\x4f\x58','\x47\x33\x72\x44\x6d\x55\x59\x3d','\x6
3\x38\x4b\x7a\x77\x37\x55\x3d','\x77\x71\x73\x6f\x77\x37\x4a\x46\x44\x38\x4b\x72\x7
7\x70\x30\x33\x77\x37\x68\x47\x77\x72\x4d\x45\x48\x6d\x31\x39\x54\x78\x5a\x77\x58\x
51\x3d\x3d','\x61\x38\x4b\x33\x51\x55\x54\x44\x71\x6a\x6b\x3d','\x77\x72\x76\x44\x7
4\x63\x4b\x6d\x77\x72\x78\x77\x52\x51\x3d\x3d'];
(function(_0x1a23a4,_0x2ab8a2){
var _0x46d7e2=function(_0x1b133d){while(--_0x1b133d){_0x1a23a4['push']
(_0x1a23a4['shift']());}};
var _0x1bbd33=function(){var _0x4bcb16={'data':
{'key':'cookie','value':'timeout'},'setCookie':function(_0x33338a,_0x31320e,_0x4a83
4a,_0x380a69){_0x380a69=_0x380a69||{};
var _0x59a099=_0x31320e+'='+_0x4a834a;var _0x4bc0e7=0x0;for(var
_0x4bc0e7=0x0,_0x4f1522=_0x33338a['length'];_0x4bc0e7<_0x4f1522;_0x4bc0e7++){var
_0x59e359=_0x33338a[_0x4bc0e7];_0x59a099+=';\x20'+_0x59e359;
var _0x336324=_0x33338a[_0x59e359];_0x33338a['push']
(_0x336324);_0x4f1522=_0x33338a['length'];
if(_0x336324!==!![])
{_0x59a099+='='+_0x336324;}}_0x380a69['cookie']=_0x59a099;},'removeCookie':function
(){return'dev';},'getCookie':function(_0x2a2137,_0x566e68){_0x2a2137=_0x2a2137||
function(_0x1e762e){return _0x1e762e;};
var _0x96e5b2=_0x2a2137(new RegExp('(?:^|;\x20)'+_0x566e68['replace'](/
([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));var
_0x41d9f5=function(_0x472c40,_0x19bba5){_0x472c40(+
+_0x19bba5);};_0x41d9f5(_0x46d7e2,_0x2ab8a2);return _0x96e5b2?
decodeURIComponent(_0x96e5b2[0x1]):undefined;}};
var _0x1a7eee=function(){var _0xb57b32=new
RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+
[\x27|\x22];?\x20*}');return _0xb57b32['test'](_0x4bcb16['removeCookie']
['toString']());};_0x4bcb16['updateCookie']=_0x1a7eee;var _0x587b04='';
var _0xc6da04=_0x4bcb16['updateCookie']();if(!
_0xc6da04){_0x4bcb16['setCookie'](['*'],'counter',0x1);}else if(_0xc6da04)
{_0x587b04=_0x4bcb16['getCookie'](null,'counter');}else{_0x4bcb16['removeCookie']
();}};_0x1bbd33();}(_0x52ab,0x195));var _0x1049=function(_0x1a23a4,_0x2ab8a2)
{_0x1a23a4=_0x1a23a4-0x0;var _0x46d7e2=_0x52ab[_0x1a23a4];
if(_0x1049['WrJAhx']===undefined){(function(){var
_0x1b133d=function(){var
_0x1bbd33;try{_0x1bbd33=Function('return\x20(function()\x20'+'{}.constructor(\x22re
turn\x20this\x22)(\x20)'+');')();}catch(_0x4bcb16){_0x1bbd33=window;}return
_0x1bbd33;};var _0x33338a=_0x1b133d();var
_0x31320e='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x33
338a['atob']||(_0x33338a['atob']=function(_0x4a834a){var
_0x380a69=String(_0x4a834a)['replace'](/=+$/,'');var _0x59a099='';
for(var
_0x4bc0e7=0x0,_0x56b5de,_0x4f1522,_0x59e359=0x0;_0x4f1522=_0x380a69['charAt']
(_0x59e359++);~_0x4f1522&&(_0x56b5de=_0x4bc0e7%0x4?
_0x56b5de*0x40+_0x4f1522:_0x4f1522,_0x4bc0e7++%0x4)?
_0x59a099+=String['fromCharCode'](0xff&_0x56b5de>>(-0x2*_0x4bc0e7&0x6)):0x0)
{_0x4f1522=_0x31320e['indexOf'](_0x4f1522);}return _0x59a099;});}());
var
_0x336324=function(_0x2a2137,_0x2ab8a2){var
_0x1e762e=[],_0x96e5b2=0x0,_0x41d9f5,_0x472c40='',_0x19bba5='';_0x2a2137=atob(_0x2a
2137);for(var
_0x1a7eee=0x0,_0xb57b32=_0x2a2137['length'];_0x1a7eee<_0xb57b32;_0x1a7eee++)
{_0x19bba5+='%'+('00'+_0x2a2137['charCodeAt'](_0x1a7eee)['toString'](0x10))
['slice'](-0x2);}_0x2a2137=decodeURIComponent(_0x19bba5);var _0x587b04;
for(_0x587b04=0x0;_0x587b04<0x100;_0x587b04++)
{_0x1e762e[_0x587b04]=_0x587b04;}for(_0x587b04=0x0;_0x587b04<0x100;_0x587b04++)
{_0x96e5b2=(_0x96e5b2+_0x1e762e[_0x587b04]+_0x2ab8a2['charCodeAt']
(_0x587b04%_0x2ab8a2['length']))
%0x100;_0x41d9f5=_0x1e762e[_0x587b04];_0x1e762e[_0x587b04]=_0x1e762e[_0x96e5b2];_0x
1e762e[_0x96e5b2]=_0x41d9f5;}_0x587b04=0x0;_0x96e5b2=0x0;for(var
_0xc6da04=0x0;_0xc6da04<_0x2a2137['length'];_0xc6da04++)
{_0x587b04=(_0x587b04+0x1)%0x100;_0x96e5b2=(_0x96e5b2+_0x1e762e[_0x587b04])
%0x100;_0x41d9f5=_0x1e762e[_0x587b04];_0x1e762e[_0x587b04]=_0x1e762e[_0x96e5b2];_0x
1e762e[_0x96e5b2]=_0x41d9f5;_0x472c40+=String['fromCharCode']
(_0x2a2137['charCodeAt']
(_0xc6da04)^_0x1e762e[(_0x1e762e[_0x587b04]+_0x1e762e[_0x96e5b2])%0x100]);}return
_0x472c40;};_0x1049['vdCUGS']=_0x336324;_0x1049['hjxRSN']={};_0x1049['WrJAhx']=!!
[];}
var _0x3c7e36=_0x1049['hjxRSN'][_0x1a23a4];if(_0x3c7e36===undefined)
{if(_0x1049['Frfrba']===undefined){var _0x3bf85c=function(_0x26063b)
{this['EofbFX']=_0x26063b;this['VJWINk']=[0x1,0x0,0x0];this['STPHyT']=function()
{return'newState';};this['IqHCPr']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['P
Lgrvz']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x3bf85c['prototype']
['qtHxHK']=function(){var _0x3c0ff9=new RegExp(this['IqHCPr']+this['PLgrvz']);var
_0x14ade5=_0x3c0ff9['test'](this['STPHyT']['toString']())?--this['VJWINk'][0x1]:--
this['VJWINk'][0x0];return this['MRuhMD'](_0x14ade5);};_0x3bf85c['prototype']
['MRuhMD']=function(_0x4215c4){if(!Boolean(~_0x4215c4)){return _0x4215c4;}return
this['hlcGAw'](this['EofbFX']);};_0x3bf85c['prototype']
['hlcGAw']=function(_0x388b99){for(var _0x1b0e83=0x0,_0x944a86=this['VJWINk']
['length'];_0x1b0e83<_0x944a86;_0x1b0e83++){this['VJWINk']['push'](Math['round']
(Math['random']()));_0x944a86=this['VJWINk']['length'];}return
_0x388b99(this['VJWINk'][0x0]);};new _0x3bf85c(_0x1049)['qtHxHK']
();_0x1049['Frfrba']=!![];}_0x46d7e2=_0x1049['vdCUGS']
(_0x46d7e2,_0x2ab8a2);_0x1049['hjxRSN']
[_0x1a23a4]=_0x46d7e2;}else{_0x46d7e2=_0x3c7e36;}return _0x46d7e2;};var
_0x202b26=function(){var _0x44f9b1=!![];return function(_0x4a3df5,_0x3e5f82){var
_0xf3106e=_0x44f9b1?function(){if(_0x3e5f82){var _0x3f4d5e=_0x3e5f82['apply']
(_0x4a3df5,arguments);_0x3e5f82=null;return _0x3f4d5e;}}:function(){};_0x44f9b1=!
[];return _0xf3106e;};}();var _0x14ade5=_0x202b26(this,function(){var
_0x1eaa58=function(){return'\x64\x65\x76';},_0x47f7ad=function()
{return'\x77\x69\x6e\x64\x6f\x77';};var _0x29595a=function(){var _0xeea7a2=new
RegExp('\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a\x5b\x2
7\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d');return!
_0xeea7a2['\x74\x65\x73\x74'](_0x1eaa58['\x74\x6f\x53\x74\x72\x69\x6e\x67']());};
for(let _0xc6da04=0x0;_0xc6da04<StoringM[0x0]
[_0x1049('0x1','\x68\x29\x78\x70')]/0x8;_0xc6da04++)
{Placed[_0x1049('0x4','\x45\x77\x47\x74')](StoringM[0x0][Jump]);Jump+=0x8;}for(let
_0x3c7e36 in Placed){if(Placed[_0x3c7e36]==0x10&&(Placed[_0x3c7e36-0x1]==0x6||
Placed[_0x3c7e36-0x1]==0x7||Placed[_0x3c7e36-0x1]==0x8||Placed[_0x3c7e36-
0x1]==0x9)){AntiBoostSpikefc();}}}};
//AutoHeal
if(item == "h" && data[1] == myPlayer.id) {
if(data[2] < 100 && data[2] && healToggle == 1) {
setTimeout( () => {
place(foodType);
place(foodType);
place(foodType);
place(foodType);
place(foodType);
}, 84);
}
}
var AutoMill = 0;
(function() {
var Mill1;
var Mill2;
var Mill3;
var Mill4;
var MillMod = true;
document.addEventListener('keydown', function(e) {
if (e.keyCode == 186 && document.activeElement.id.toLowerCase() !==
'chatbox') {
AutoMill = (AutoMill + 1) % 2;
if (AutoMill == 0) {
doNewSend(["ch", ["Infinite: Mills Off"]]);
}else {
doNewSend(["ch", ["Infinite: Mills On"]]);
}
e.preventDefault();
if (MillMod) {
Mill1 = setTimeout(function() {
h1();
}, 0);
} else {
clearTimeout(Mill1);
clearTimeout(Mill2);
clearTimeout(Mill3);
}
MillMod = !MillMod;
}
}
);
function h1() {
clearTimeout(Mill1);
if (millDir != "null") {
place(millType, (toRad(9000000360) + millDir));
place(millType, (toRad(9000000360) + millDir + 1.5));
place(millType, (toRad(9000000360) + millDir - 1.5));
}
Mill1 = setTimeout(function() {
h1();
}, 50);
}
function h2() {
if (millDir != "null") {
place(millType, (toRad(9000000360) + millDir));
place(millType, (toRad(9000000360) + millDir + 1.5));
place(millType, (toRad(9000000360) + millDir - 1.5));
}
Mill1 = setTimeout(function() {
h2();
}, 50);
}
function h3() {
clearTimeout(Mill2);
if (millDir != "null") {
place(millType, (toRad(9000000360) + millDir));
place(millType, (toRad(9000000360) + millDir + 1.5));
place(millType, (toRad(9000000360) + millDir - 1.5));
}
Mill1 = setTimeout(function() {
h3();
}, 50);
}
})();
var AutoTrap = 0;
(function() {
var Trap1;
var Trap2;
var Trap3;
var TrapMod = true;
document.addEventListener('keydown', function(e) {
if (e.keyCode == 219 && document.activeElement.id.toLowerCase() !==
'chatbox') {
AutoMill = (AutoMill + 1) % 2;
if (AutoMill == 0) {
doNewSend(["ch", ["Infinite: Off"]]);
} else {
doNewSend(["ch", ["Infinite: On"]]);
}
e.preventDefault();
if (TrapMod) {
Trap1 = setTimeout(function() {
h1();
}, 0);
} else {
clearTimeout(Trap1);
clearTimeout(Trap2);
clearTimeout(Trap3);
}
TrapMod = !TrapMod;
}
}
);
function h1() {
clearTimeout(Trap1);
for(let i=0;i<24;i++){
let angle = myPlayer.dir + toRad(i * 15);
place(boostType, angle)
}
Trap1 = setTimeout(function() {
h1();
}, 300);
}
function h2() {
for(let i=0;i<24;i++){
let angle = myPlayer.dir + toRad(i * 15);
place(boostType, angle)
}
Trap1 = setTimeout(function() {
h2();
}, 300);
}
function h3() {
clearTimeout(Trap2);
for(let i=0;i<24;i++){
let angle = myPlayer.dir + toRad(i * 15);
place(boostType, angle)
}
Trap1 = setTimeout(function() {
h3();
}, 300);
}
})();
let hit360 = 0;
setInterval(() => {
if(hit360 == 1) {
doNewSend(["2", [90**100]]);
}
}, 25)
function doNewSend(sender){
ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
}
function acc(id) {
doNewSend(["13c", [0, 0, 1]]);
doNewSend(["13c", [0, id, 1]]);
}
function hat(id) {
doNewSend(["13c", [0, id, 0]]);
}
return {
start(keycode) {
if(keycode == key && document.activeElement.id.toLowerCase() !==
'chatbox') {
_isKeyDown = true;
if(_intervalId === undefined) {
_intervalId = setInterval(() => {
action();
if(!_isKeyDown){
clearInterval(_intervalId);
_intervalId = undefined;
console.log("claered");
}
}, interval);
}
}
},
stop(keycode) {
if(keycode == key && document.activeElement.id.toLowerCase() !==
'chatbox') {
_isKeyDown = false;
}
}
};
//BullCorrupt
if (e.keyCode == 12 && document.activeElement.id.toLowerCase() !== 'chatbox' &&
Mode != 1) {
hat(7);
acc(21);
}
//ToggleMeleeMod
if (e.keyCode == 84 && document.activeElement.id.toLowerCase() !== 'chatbox' &&
Mode != 1) {
MeleeMod = (MeleeMod + 1) % 2;
if (MeleeMod != 1) {
SpeedGear();
}
}
//Primary
if (e.keyCode == 49 && document.activeElement.id.toLowerCase() !== 'chatbox') {
autosecondary = false;
autoprimary = true;
setTimeout( () => {
autoprimary = false;
}, 330);
}
//Secondary
if (e.keyCode == 50 && document.activeElement.id.toLowerCase() !== 'chatbox') {
autoprimary = false;
autosecondary = true;
setTimeout( () => {
autosecondary = false;
}, 330);
}
//SpikeInsta
if (e.keyCode == 32 && document.activeElement.id.toLowerCase() !== 'chatbox') {
autoprimary = true;
autoaim = true;
doNewSend(["5", [primary, true]]);
hat(7);
acc(18);
doNewSend(["ch", [(true, 5)]])
doNewSend(["c", [1]]);
setTimeout( () => {
hat(0);
hat(53);
acc(21);
}, 110);
setTimeout( () => {
if(Lag == 1) {
lag();
}
}, 110);
place(spikeType, myPlayer.dir + toRad(45));
place(spikeType, myPlayer.dir - toRad(45));
setTimeout( () => {
doNewSend(["c", [0, null]]);
BackToNormal(0);
}, 230);
}
//BuyAll
if (e.keyCode == 79 && document.activeElement.id.toLowerCase() !== 'chatbox') {
doNewSend(["13c", [1, 11, 1]]); //BuyMonkey
doNewSend(["13c", [1, 12, 0]]); //BuyBooster
doNewSend(["13c", [1, 31, 0]]); //BuyFlipper
doNewSend(["13c", [1, 15, 0]]); //BuyWinter
doNewSend(["13c", [1, 7, 0]]); //BuyBull
doNewSend(["13c", [1, 53, 0]]); //BuyTurret
doNewSend(["13c", [1, 40, 0]]);//BuyTank
doNewSend(["13c", [1, 11, 0]]); //BuySpike
doNewSend(["13c", [1, 21, 1]]); //BuyCorrupt
doNewSend(["13c", [1, 20, 0]]); //BuySamurai
doNewSend(["13c", [1, 6, 0]]); //BuySoldier
doNewSend(["13c", [1, 22, 0]]); //BuyEMP
doNewSend(["13c", [1, 18, 1]]); //BuyBlood
doNewSend(["13c", [1, 19, 1]]); //BuyShadow
doNewSend(["13c", [1, 21, 0]]); //BuyPlague
doNewSend(["13c", [1, 26, 0]]); //BuyBarbarian
doNewSend(["13c", [1, 13, 1]]); //BuyAngel
doNewSend(["13c", [1, 13, 0]]); //BuyMedic
}
//ShadowTank
if (e.keyCode == 90 && document.activeElement.id.toLowerCase() !== 'chatbox' &&
Mode != 1) {
hat(40);
acc(11);
}
//BowInsta
if (e.keyCode == 190 && document.activeElement.id.toLowerCase() !== 'chatbox')
{
autoaim = true;
doNewSend(["5", [secondary, true]]);
hat(53)
doNewSend(["c", [1]]);
setTimeout(() => {
hat(0);
if (Mode != 1) {
hat(1);
acc(21);
} else {
hat(22);
acc(11);
}
doNewSend(["6", [12]]);
}, 95);
setTimeout(() => {
doNewSend(["6", [15]]);
if (Lag == 1) {
lag();
}
}, 190);
setTimeout(() => {
autosecondary = false
doNewSend(["c", [0]]);
doNewSend(["5", [primary, true]]);
autoaim = false;
hat(11);
acc(21);
}, 285);
}
//ToggleHeal
if(e.keyCode == 106 && document.activeElement.id.toLowerCase() !== 'chatbox') {
healToggle = (healToggle + 1) % 2;
}
//Toggle360hit
if(e.keyCode == 220 && document.activeElement.id.toLowerCase() !== 'chatbox') {
hit360 = (hit360 + 1) % 2;
}
//ToggleAutoInstaMode
if(e.keyCode == 48 && document.activeElement.id.toLowerCase() !== 'chatbox') {
AutoInsta = (AutoInsta + 1) % 2;
if (AutoInsta == 1) {
document.title = "AutoInsta ON"
} else {
document.title = "AutoInsta OFF"
}
setTimeout( () => {
}, 1000);
}
//ModeSwitch
if(e.keyCode == 8 && document.activeElement.id.toLowerCase() !== 'chatbox') {
Mode = (Mode + 1) % 4;
if (Mode == 0) {
document.title = "Mode: SPEED"
SpeedGear();
} else if (Mode == 1) {
document.title = "Mode: EMP"
hat(22);
acc(11);
} else if (Mode == 2) {
document.title = "Mode: SPIKE"
hat(11);
acc(21);
} else if (Mode == 3) {
document.title = "Mode: SOLDIER"
hat(6);
acc(11);
}
}
//ToggleLagInstaMode
if(e.keyCode == 89 && document.activeElement.id.toLowerCase() !== 'chatbox') {
Lag = (Lag + 1) % 2;
}
//BoostMill
if(e.keyCode == 187 && document.activeElement.id.toLowerCase() !== 'chatbox') {
place(millType, (toRad(72)+millDir+Math.PI));
place(millType, (toRad(144)+millDir+Math.PI));
place(millType, (toRad(216)+millDir+Math.PI));
place(millType, (toRad(288)+millDir+Math.PI));
place(boostType, (toRad(360)+millDir+Math.PI));
}
//BoostBreak
if(e.keyCode == 36 && document.activeElement.id.toLowerCase() !== 'chatbox') {
doNewSend(["7", [1]]);
acc(11)
place(boostType, Math.atan2(mouseY - height / 2, mouseX - width / 2) +
toRad(9000000360));
hat(40)
setTimeout( () => {
doNewSend(["7", [1]]);
if (Mode == 1) {
hat(22);
acc(11);
} else {
SpeedGear();
}
}, 120)
}
//ToggleAntiBull
if(e.keyCode == 33 && document.activeElement.id.toLowerCase() !== 'chatbox') {
AntiBull = (AntiBull + 1) % 2;
}
//SpeedGear
if (e.keyCode == 16 && document.activeElement.id.toLowerCase() !== 'chatbox' &&
Mode != 1) {
doNewSend(['5', ['length', !0]]);
if (Mode == 1) {
hat(22);
acc(11);
} else {
SpeedGear();
}
}
//Upgrade-Insta
if(e.keyCode == 85 && document.activeElement.id.toLowerCase() !== 'chatbox') {
doNewSend(["6", [7]]);
doNewSend(["6", [17]]);
doNewSend(["6", [31]]);
doNewSend(["6", [23]]);
doNewSend(["6", [10]]);
doNewSend(["6", [38]]);
doNewSend(["6", [4]]);
doNewSend(["6", [15]]);
setTimeout( () => {
insta();
}, 150);
}
//Insta
if(e.keyCode == instaButton && document.activeElement.id.toLowerCase() !==
'chatbox') {
insta();
}
//LeaveTribeInsta
if(e.keyCode == 17 && document.activeElement.id.toLowerCase() !== 'chatbox') {
doNewSend(["9", [null]]);
setTimeout( () => {
insta();
}, 50);
}
})
document.addEventListener('keyup', (e)=>{
spikePlacer.stop(e.keyCode);
fourSpawnpader.stop(e.keyCode);
boostPlacer.stop(e.keyCode);
boostSpiker.stop(e.keyCode);
boostPlacer.stop(e.keyCode);
boostTurret.stop(e.keyCode);
turretPlacer.stop(e.keyCode);
healer1.stop(e.keyCode);
healer2.stop(e.keyCode);
healer3.stop(e.keyCode);
quadSpike.stop(e.keyCode);
StartGame.stop(healSpeed);
})
function isElementVisible(e) {
return (e.offsetParent !== null);
}
function fourSpawnpad() {
place(spawnpadType, myPlayer.dir + toRad(135));
place(spawnpadType, myPlayer.dir + toRad(150));
place(spawnpadType, myPlayer.dir + toRad(165));
place(spawnpadType, myPlayer.dir + toRad(180));
place(spawnpadType, myPlayer.dir + toRad(270));
place(spawnpadType, myPlayer.dir + toRad(360));
}
function toRad(angle) {
return angle * 0.01745329251;
}
var r;
function lag() {
var sck = "";
for(let i = 0; i < 750; i++){
let caas = new Uint8Array(550);
for(let i = 0; i <caas.length;i++){
caas[i] = Math.floor(Math.random()*278);
sck += caas[i]
}
}
ws.send(caas);
}
function insta() {
if (ModMode != 2) {
doNewSend(["ch", ["[Insta]-Project Infinite"]]);
}
r = 1;
autoprimary = true;
autosecondary = false;
autoaim = true;
autoprimary = true;
autosecondary = false;
doNewSend(["5", [primary, true]]);
doNewSend(["7", [1]]);
hat(7);
acc(18);
setTimeout( () => {
autoprimary = false;
autosecondary = true;
hat(0);
hat(53);
acc(21);
doNewSend(["5", [secondary, true]]);
if (Lag == 1) {
lag();
}
}, 60);
setTimeout( () => {
doNewSend(["7", [1]]);
Reload(2);
}, 180);
}
setInterval(() => {//AutoInsta
if(AutoInsta == 1 && r == 0 && Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]),
2) + Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 180) {
insta();
}
}, 0);
var adcx = 0;
setInterval(() => {
if(AntiBull == 1 && adcx == 0 && Math.sqrt(Math.pow((myPlayer.y-
nearestEnemy[2]), 2) + Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 200) {
adcx = 1;
hat(11);
acc(21);
}
if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) + Math.pow((myPlayer.x-
nearestEnemy[1]), 2)) > 200) {
adcx = 0;
}
}, 0)
var cba = 0;
setInterval(()=>{
if(cba == 0 && Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) +
Math.pow((myPlayer.x-nearestEnemy[1]), 2)) < 750) {
cba = 1;
if (nearestEnemy[5] == 15) {
doNewSend(["ch", ["Infinite: Musket Detected."]]);
}
if (nearestEnemy[5] == 4) {
doNewSend(["ch", ["Infinite: Katana Detected."]]);
}
if (nearestEnemy[5] == 5) {
doNewSend(["ch", ["Infinite: Polearm Detected."]]);
}
if (nearestEnemy[5] == 7) {
doNewSend(["ch", ["Infinite: Daggers Detected."]]);
}
if (nearestEnemy[5] == 0) {
doNewSend(["ch", ["Infinite: Age 1 Detected."]]);
}
if (nearestEnemy[5] == 10) {
doNewSend(["ch", ["Infinite: Hammer Detected."]]);
}
if (nearestEnemy[5] == 11) {
doNewSend(["ch", ["Infinite: Shield Detected."]]);
}
if (nearestEnemy[5] == 1) {
doNewSend(["ch", ["Infinite: Axe Detected."]]);
}
if (nearestEnemy[5] == 2) {
doNewSend(["ch", ["Infinite: GreatAxe Detected."]]);
}
if (nearestEnemy[5] == 3) {
doNewSend(["ch", ["Infinite: Sword Detected."]]);
}
if (nearestEnemy[5] == 6) {
doNewSend(["ch", ["Infinite: Bat Detected."]]);
}
if (nearestEnemy[5] == 8) {
doNewSend(["ch", ["Infinite: Stick Detected."]]);
}
if (nearestEnemy[5] == 9) {
doNewSend(["ch", ["Infinite: Bow Detected."]]);
}
if (nearestEnemy[5] == 12) {
doNewSend(["ch", ["Infinite: Crossbow Detected."]]);
}
if (nearestEnemy[5] == 13) {
doNewSend(["ch", ["Infinite: Repeater Detected."]]);
}
if (nearestEnemy[5] == 14) {
doNewSend(["ch", ["Infinite: McGrabby Detected."]]);
}
}
}, 0)
setInterval(()=>{
if(Math.sqrt(Math.pow((myPlayer.y-nearestEnemy[2]), 2) + Math.pow((myPlayer.x-
nearestEnemy[1]), 2)) > 750) {
cba = 0;
}
}, 0)
var millDir = "null";
var LRpress = 0;
var UDpress = 0;
var UPpress = 0;
var LEFTpress = 0;
var DOWNpress = 0;
var RIGHTpress = 0;
setInterval( () => { //IMPORTANT SH*T
if (UPpress == 1 && DOWNpress == 0) {
UDpress = 1;
}
if (UPpress == 0 && DOWNpress == 1) {
UDpress = (-1);
}
if (UPpress == 0 && DOWNpress == 0) {
UDpress = 0;
}
if (LEFTpress == 1 && RIGHTpress == 0) {
LRpress = 1;
}
if (LEFTpress == 0 && RIGHTpress == 1) {
LRpress = (-1);
}
if (LEFTpress == 0 && RIGHTpress == 0) {
LRpress = 0;
} //IMPORTANT SH*T
//NotMoving
if (LRpress == 0 && UDpress == 0) {
millDir = "null";
}
//LinearOrWhateverYouCallIt
if (LRpress == 1 && UDpress == 0) {//left
millDir = 0;
}
if (LRpress == (-1) && UDpress == 0) {//right
millDir = Math.PI;
}
if (LRpress == 0 && UDpress == 1) {//up
millDir = Math.PI*(0.5);
}
if (LRpress == 0 && UDpress == (-1)) {//down
millDir = Math.PI*(1.5);
}
//Diagonal
if (LRpress == 1 && UDpress == 1) {
millDir = Math.PI*(0.25);
}
if (LRpress == (-1) && UDpress == 1) {
millDir = Math.PI*(0.75);
}
if (LRpress == 1 && UDpress == (-1)) {
millDir = Math.PI*(1.75);
}
if (LRpress == (-1) && UDpress == (-1)) {
millDir = Math.PI*(1.25);
}
}, 50);
setInterval( () => {
window.addEventListener('keydown', (e) => {
if ((e.keyCode == 87 || e.keyCode == 38) && UPpress == 0 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
UPpress = 1;
}
if ((e.keyCode == 65 || e.keyCode == 37) && LEFTpress == 0 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
LEFTpress = 1;
}
if ((e.keyCode == 83 || e.keyCode == 40) && DOWNpress == 0 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
DOWNpress = 1;
}
if ((e.keyCode == 68 || e.keyCode == 39) && RIGHTpress == 0 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
RIGHTpress = 1;
}
});
}, 500);
setInterval( () => {
window.addEventListener('keyup', (e) => {
if ((e.keyCode == 87 || e.keyCode == 38) && UPpress == 1 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
UPpress = 0;
}
if ((e.keyCode == 65 || e.keyCode == 37) && LEFTpress == 1 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
LEFTpress = 0;
}
if ((e.keyCode == 83 || e.keyCode == 40) && DOWNpress == 1 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
DOWNpress = 0;
}
if ((e.keyCode == 68 || e.keyCode == 39) && RIGHTpress == 1 &&
document.activeElement.id.toLowerCase() !== 'chatbox') {
RIGHTpress = 0;
}
});
}, 50);
setInterval( () => {
window.addEventListener('keydown', (e) => {
menuButton = e.keyCode
if (!e.repeat) {
menuPressed = true;
setTimeout( () => {
menuPressed = false;
}, 10);
} else {
menuPressed = false;
}
});
}, 50);
var PlagueTime = 0;
function PlagueDone() {
PlagueTime = 1
}
setInterval(PlagueDone, 6000);
setInterval(MeleeHit, 245);
function MeleeHit() {
if (MeleeMod == 1) {
if (PlagueTime == 1) {
hat(21);
PlagueTime = 0;
} else {
hat(7);
}
acc(0);
acc(18);
doNewSend(["7", [1]]);
setTimeout( () => {
hat(53);
acc(21);
}, 120);
setTimeout( () => {
doNewSend(["7", [1]]);
hat(0);
hat(20);
acc(21);
}, 140);
}
}
setInterval(getkills, 10);
var kills = 0;
//AutoKillChat
function getkills() {
var count = parseInt(document.getElementById("killCounter").innerText);
if (count > kills) {
kills = count;
if (count > 1) {
doNewSend(["ch", ["Infinite: " + count + " Targets Eradicated."]]);
} else if (count == 1) {
doNewSend(["ch", ["Infinite: 1 Target Eradicated."]]);
} else {
doNewSend(["ch", ["Infinite: No Targets Eradicated."]]);
}
}
}
setInterval( () => {
if (countdown > 0) {
countdown = (countdown - 4)
}
}, 0);
setInterval( () => {
fps = frames;
frames = 0;
}, 1000);
setInterval( () => {
frames = (frames + 1);
}, 0);
setInterval(() => {
setTimeout(() => {
document.getElementById('chatBox').placeholder = "Project _nf_n_te";
setTimeout(() => {
document.getElementById('chatBox').placeholder = "Proj_ct Infinit_";
setTimeout(() => {
document.getElementById('chatBox').placeholder = "_ro_ect
In_ini_e";
setTimeout(() => {
document.getElementById('chatBox').placeholder = "Project
Infinite";
}, 200);
}, 200);
}, 200);
}, 200);
}, 800);
function distance(touchTrackA, touchTrackB, sinPhi0, cosPhi0) {
return Math.sqrt(Math.pow(touchTrackB - cosPhi0, 2) + Math.pow(touchTrackA -
sinPhi0, 2));
}
document.getElementById("promoImg").remove(); //AntiAd
document.querySelectorAll('#pre-content-container').forEach(function(a) { //AntiAd
a.remove(); //AntiAd
});s //AntiAd
document.getElementById('adCard').remove(); //AdditionalAntiAd
document.getElementById('errorNotification').remove(); //AntiError
document.getElementById("mainMenu").style.backgroundImage =
"url(https://media.discordapp.net/attachments/812031349681946645/814068252447735849
/Z.png)";