slither.io 战个痛

《注意》

这玩意是用来给slither.io玩家们一个一起游玩的小代码。

↓把它放入Console后回车,就可以发现Play变成了Group!,于是大家就可以在同一个服务器理high了!(默认31.204.145.98)

当然还请事先约好,不然伶仃孤苦终至与此,没人陪概不负责。

 var SosMes = function(){
resetGame();
 ws = new WebSocket("ws://" + "31.204.145.98" + ":" + 444 + "/slither");
 ws.binaryType = "arraybuffer";
 window.ws = ws;
 ws.onmessage = function (b) {
 if (ws == this) {
 b = new Uint8Array(b.data);
 rdps += b.length;
 if (testing) {
 omcps++;
 var c = Date.now();
 1E3 < c - lomcpstm && (lomcpstm = c, console.log("omcps: " + omcps + " frames: " + omfps), omfps = omcps = 0)
 }
 if (2 <= b.length) {
 lptm = cptm;
 cptm = Date.now();
 var c = b[0] << 8 | b[1],
 e = cptm - lptm;
 0 == lptm && (e = 0);
 etm += Math.max(-180, Math.min(180, e - c));
 testing && (rdpspc[b[2]] += b.length);
 var h = String.fromCharCode(b[2]),
 c = 3,
 e = b.length,
 f = b.length - 2,
 q = b.length - 3;
 if ("a" == h) connecting = !1,
 playing = connected = !0,
 play_btn_click_mtm = -1,
 grd = b[c] << 16 | b[c + 1] << 8 | b[c + 2],
 c += 3,
 f = b[c] << 8 | b[c + 1],
 c += 2,
 sector_size = b[c] << 8 | b[c + 1],
 c += 2,
 sector_count_along_edge =
 b[c] << 8 | b[c + 1],
 c += 2,
 spangdv = b[c] / 10,
 c++,
 nsp1 = (b[c] << 8 | b[c + 1]) / 100,
 c += 2,
 nsp2 = (b[c] << 8 | b[c + 1]) / 100,
 c += 2,
 nsp3 = (b[c] << 8 | b[c + 1]) / 100,
 c += 2,
 mamu = (b[c] << 8 | b[c + 1]) / 1E3,
 c += 2,
 mamu2 = (b[c] << 8 | b[c + 1]) / 1E3,
 c += 2,
 cst = (b[c] << 8 | b[c + 1]) / 1E3,
 c += 2,
 c < e && (protocol_version = b[c]),
 setMscps(f),
 lbh.style.display = "inline",
 lbs.style.display = "inline",
 lbn.style.display = "inline",
 lbp.style.display = "inline",
 lbf.style.display = "inline",
 vcm.style.display = "inline",
 loch.style.display = "inline",
 startShowGame();
 else if ("e" == h || "E" == h || "3" == h || "4" == h || "5" == h) {
 var t = b[c] << 8 | b[c + 1],
 c = c + 2,
 u = -1,
 w = -1,
 I = -1,
 M = -1;
 if (6 <= protocol_version) 6 == f ? (u = "e" == h ? 1 : 2, w = 2 * b[c] * Math.PI / 256, c++, I = 2 * b[c] * Math.PI / 256, c++, M = b[c] / 18) : 5 == f ? "e" == h ? (w = 2 * b[c] * Math.PI / 256, c++, M = b[c] / 18) : "E" == h ? (u = 1, I = 2 * b[c] * Math.PI / 256, c++, M = b[c] / 18) : "4" == h ? (u = 2, I = 2 * b[c] * Math.PI / 256, c++, M = b[c] / 18) : "3" == h ? (u = 1, w = 2 * b[c] * Math.PI / 256, c++, I = 2 * b[c] * Math.PI / 256) : "5" == h && (u = 2, w = 2 * b[c] * Math.PI / 256, c++, I = 2 * b[c] * Math.PI / 256) : 4 == f && ("e" == h ? w = 2 * b[c] * Math.PI / 256 : "E" == h ? (u = 1, I = 2 * b[c] * Math.PI / 256) : "4" == h ? (u = 2, I = 2 * b[c] * Math.PI / 256) : "3" == h && (M = b[c] / 18));
 else if (3 <= protocol_version) {
 "3" != h && (8 == f || 7 == f || 6 == f && "3" != h || 5 == f && "3" != h) && (u = "e" == h ? 1 : 2);
 if (8 == f || 7 == f || 5 == f && "3" == h || 6 == f && "3" == h) w = 2 * (b[c] << 8 | b[c + 1]) * Math.PI / 65535,
 c += 2;
 if (8 == f || 7 == f || 5 == f && "3" != h || 6 == f && "3" != h) I = 2 * (b[c] << 8 | b[c + 1]) * Math.PI / 65535,
 c += 2;
 if (8 == f || 6 == f || 4 == f) M = b[c] / 18
 } else {
 if (11 == q || 8 == q || 9 == q || 6 == q) u = b[c] - 48,
 c++;
 if (11 == q || 7 == q || 9 == q || 5 == q) w = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215,
 c += 3;
 if (11 == q || 8 == q || 9 == q || 6 == q) I = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215,
 c += 3;
 if (11 == q || 7 == q || 8 == q || 4 == q) M = (b[c] << 8 | b[c + 1]) / 1E3
 }
 if (e = os["s" + t]) {
 -1 != u && (e.dir = u);
 anguc++;
 if (-1 != w) {
 e.ang == w && angnuc++;
 b = (w - e.ang) % pi2;
 0 > b && (b += pi2);
 b > Math.PI && (b -= pi2);
 t = e.fapos;
 for (q = 0; q < afc; q++) e.fas[t] -= b * afas[q],
 t++,
 t >= afc && (t = 0);
 e.fatg = afc;
 e.ang = w
 } - 1 != I && (e.wang == I && wangnuc++, e.wang = I, e != snake && (e.eang = I)); - 1 != M && (e.sp = M, e.spang = e.sp / spangdv, 1 < e.spang && (e.spang = 1))
 }
 } else if ("6" == h) {
 for (f = ""; c < e;) f += String.fromCharCode(b[c]),
 c++;
 gotServerVersion(f)
 } else if ("h" == h) {
 if (t = b[c] << 8 | b[c + 1], c += 2, u = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 16777215, e = os["s" + t]) e.fam = u,
 snl(e)
 } else if ("r" == h) {
 if (t = b[c] << 8 | b[c + 1], c += 2, e = os["s" + t]) {
 4 <= q && (e.fam = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 16777215);
 for (q = 0; q < e.pts.length; q++) if (!e.pts[q].dying) {
 e.pts[q].dying = !0;
 e.sct--;
 e.sc = Math.min(6, 1 + (e.sct - 2) / 106);
 e.scang = .13 + .87 * Math.pow((7 - e.sc) / 6, 2);
 e.ssp = nsp1 + nsp2 * e.sc;
 e.fsp = e.ssp + .1;
 e.wsep = 6 * e.sc;
 b = nsep / gsc;
 e.wsep < b && (e.wsep = b);
 break
 }
 snl(e)
 }
 } else if ("g" == h || "n" == h || "G" == h || "N" == h) {
 if (playing) {
 var y = "n" == h || "N" == h,
 t = b[c] << 8 | b[c + 1],
 c = c + 2;
 if (e = os["s" + t]) {
 if (y) e.sct++;
 else for (q = 0; q < e.pts.length; q++) if (!e.pts[q].dying) {
 e.pts[q].dying = !0;
 break
 }
 var F = e.pts[e.pts.length - 1],
 q = F;
 3 <= protocol_version ? "g" == h || "n" == h ? (f = b[c] << 8 | b[c + 1], c += 2, E = b[c] << 8 | b[c + 1], c += 2) : (f = q.xx + b[c] - 128, c++, E = q.yy + b[c] - 128, c++) : (f = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 5, c += 3, E = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 5, c += 3);
 y && (e.fam = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 16777215);
 (F = points_dp.get()) || (F = {
 exs: [],
 eys: [],
 efs: [],
 ems: []
 });
 F.eiu = 0;
 F.xx = f;
 F.yy = E;
 F.fx = 0;
 F.fy = 0;
 F.da = 0;
 F.ebx = F.xx - q.xx;
 F.eby = F.yy - q.yy;
 e.pts.push(F);
 e.iiv && (b = e.xx + e.fx - F.xx, c = e.yy + e.fy - F.yy, F.fx += b, F.fy += c, F.exs[F.eiu] = b, F.eys[F.eiu] = c, F.efs[F.eiu] = 0, F.ems[F.eiu] = 1, F.eiu++);
 t = e.pts.length - 3;
 if (1 <= t) for (u = e.pts[t], h = n = 0, q = t - 1; 0 <= q; q--) t = e.pts[q],
 n++,
 b = t.xx,
 c = t.yy,
 4 >= n && (h = cst * n / 4),
 t.xx += (u.xx - t.xx) * h,
 t.yy += (u.yy - t.yy) * h,
 e.iiv && (b -= t.xx, c -= t.yy, t.fx += b, t.fy += c, t.exs[t.eiu] = b, t.eys[t.eiu] = c, t.efs[t.eiu] = 0, t.ems[t.eiu] = 2, t.eiu++),
 u = t;
 e.sc = Math.min(6, 1 + (e.sct - 2) / 106);
 e.scang = .13 + .87 * Math.pow((7 - e.sc) / 6, 2);
 e.ssp = nsp1 + nsp2 * e.sc;
 e.fsp = e.ssp + .1;
 e.wsep = 6 * e.sc;
 b = nsep / gsc;
 e.wsep < b && (e.wsep = b);
 y && snl(e);
 e.lnp = F;
 e == snake && (ovxx = snake.xx + snake.fx, ovyy = snake.yy + snake.fy);
 t = etm / 8 * e.sp / 4;
 t *= lag_mult;
 q = e.chl - 1;
 e.chl = t / e.msl;
 h = e.xx;
 y = e.yy;
 e.xx = f + Math.cos(e.ang) * t;
 e.yy = E + Math.sin(e.ang) * t;
 b = e.xx - h;
 c = e.yy - y;
 f = e.chl - q;
 t = e.fpos;
 for (q = 0; q < rfc; q++) e.fxs[t] -= b * rfas[q],
 e.fys[t] -= c * rfas[q],
 e.fchls[t] -= f * rfas[q],
 t++,
 t >= rfc && (t = 0);
 e.fx = e.fxs[e.fpos];
 e.fy = e.fys[e.fpos];
 e.fchl = e.fchls[e.fpos];
 e.ftg = rfc;
 e.ehl = 0;
 if (e == snake) {
 b = view_xx;
 c = view_yy;
 view_xx = snake.xx + snake.fx;
 view_yy = snake.yy + snake.fy;
 bgx -= view_xx - b;
 bgy -= view_yy - c;
 b = view_xx - ovxx;
 c = view_yy - ovyy;
 t = fvpos;
 for (q = 0; q < vfc; q++) fvxs[t] -= b * vfas[q],
 fvys[t] -= c * vfas[q],
 t++,
 t >= vfc && (t = 0);
 fvtg = vfc
 }
 }
 }
 } else if ("l" == h) {
 if (playing) {
 wumsts = !0;
 w = F = E = "";
 M = I = 0; - 1 == lb_fr && -1 == dead_mtm && (lb_fr = 0);
 var H = b[c];
 c++;
 rank = b[c] << 8 | b[c + 1];
 rank < best_rank && (best_rank = rank);
 c += 2;
 snake_count = b[c] << 8 | b[c + 1];
 snake_count > biggest_snake_count && (biggest_snake_count = snake_count);
 for (c += 2; c < e;) {
 var K =
 b[c] << 8 | b[c + 1],
 c = c + 2,
 u = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 16777215,
 c = c + 3,
 y = b[c] % 9;
 c++;
 f = b[c];
 c++;
 M++;
 h = "";
 for (q = 0; q < f; q++) t = b[c],
 h += String.fromCharCode(t),
 c++;
 M == H ? (h = my_nick, f = h.length) : gdnm(h) || (h = "");
 for (var N = "", q = 0; q < f; q++) t = h.charCodeAt(q),
 N = 38 == t ? N + "&amp;" : 60 == t ? N + "&lt;" : 62 == t ? N + "&gt;" : 32 == t ? N + "&nbsp;" : N + String.fromCharCode(t);
 h = N;
 I++;
 score = Math.floor(15 * (fpsls[K] + u / fmlts[K] - 1) - 5) / 1;
 t = M == H ? 1 : .7 * (.3 + .7 * (1 - I / 10));
 E += '<span style="opacity:' + t + "; color:" + per_color_imgs[y].cs + ';">' + score + "</span><BR>";
 F += '<span style="opacity:' + t + "; color:" + per_color_imgs[y].cs + ";" + (M == H ? "font-weight:bold;" : "") + '">' + h + "</span><BR>";
 w += '<span style="opacity:' + t + "; color:" + per_color_imgs[y].cs + ';">#' + I + "</span><BR>"
 }
 lbs.innerHTML = E;
 lbn.innerHTML = F;
 lbp.innerHTML = w
 }
 } else if ("v" == h) 2 == b[c] ? (want_close_socket = !0, want_victory_message = !1, want_hide_victory = 1, hvfr = 0) : (dead_mtm = Date.now(), play_btn.setEnabled(!0), e = Math.floor(15 * (fpsls[snake.sct] + snake.fam / fmlts[snake.sct] - 1) - 5) / 1, twt.href = "http://twitter.com/intent/tweet?status=" + encodeURIComponent("I got a length of " + e + " in http://slither.io! Can you beat that? #slitherio"), f = "Your final length was", "de" == lang ? f = "Deine endg\u00fcltige L\u00e4nge war" : "fr" == lang ? f = "Votre longueur finale \u00e9tait de" : "pt" == lang && (f = "Seu comprimento final foi de"), E = "", 1E3 < e && (E = "!"), lastscore.innerHTML = '<span style="opacity: .45;">' + f + " </span><b>" + e + "</b>" + E, e = "Play Again", "fr" == lang ? e = "Jouer" : "pt" == lang && (e = "Joga"), play_btn.setText(String.fromCharCode(160) + e + String.fromCharCode(160)), 1 == b[c] ? (nick_holder.style.display = "none", playh.style.display = "none", smh.style.display = "none", victory_holder.style.display = "inline", saveh.style.display = "block", want_victory_focus = want_victory_message = !0, victory.disabled = !1, save_btn.setEnabled(!0)) : want_close_socket = !0);
 else if ("W" == h) f = b[c],
 c++,
 E = b[c],
 e = {},
 e.xx = f,
 e.yy = E,
 sectors.push(e);
 else if ("w" == h) if (8 <= protocol_version ? (e = 2, f = b[c], c++, E = b[c]) : (e = b[c], c++, f = b[c] << 8 | b[c + 1], c += 2, E = b[c] << 8 | b[c + 1]), 1 == e) e = {},
 e.xx = f,
 e.yy = E,
 sectors.push(e);
 else {
 for (y =
 cm1 = foods_c - 1; 0 <= y; y--) q = foods[y],
 q.sx == f && q.sy == E && (y == cm1 ? foods[y] = null : (foods[y] = foods[cm1], foods[cm1] = null), foods_c--, cm1--);
 for (y = sectors.length - 1; 0 <= y; y--) e = sectors[y],
 e.xx == f && e.yy == E && sectors.splice(y, 1)
 } else if ("m" == h) {
 K = b[c] << 16 | b[c + 1] << 8 | b[c + 2];
 c += 3;
 u = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 16777215;
 c += 3;
 E = Math.floor(15 * (fpsls[K] + u / fmlts[K] - 1) - 5) / 1;
 f = b[c];
 c++;
 q = "";
 for (y = 0; y < f; y++) q += String.fromCharCode(b[c]),
 c++;
 gdnm(q) || (q = "");
 for (f = ""; c < e;) f += String.fromCharCode(b[c]),
 c++;
 gdnm(f) || (f = "");
 q = q.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");
 f = f.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");
 0 < E && (b = "", 0 < f.length && (b += "<span style='font-size:17px;'><b><i><span style='opacity: .5;'>&quot;</span>" + f + "<span style='opacity: .5;'>&quot;</span></i></b></span><BR><div style='height: 5px;'></div>"), 0 < q.length ? (b = 0 < f.length ? b + ("<i><span style='opacity: .5;'>- </span><span style='opacity: .75;'><b>" + q + "</b></span><span style='opacity: .5;'>, today's longest</span></i>") : "<i><span style='opacity: .5;'>Today's longest was </span><span style='opacity: .75;'><b>" + q + "</b></span></i>", b += "<br><i><span style='opacity: .5;'>with a length of </span><span style='opacity: .65;'><b>" + E + "</b></span></i>") : b = 0 < f.length ? b + "<i><span style='opacity: .5;'>- </span><span style='opacity: .5;'>today's longest</span></i>" + ("<br><i><span style='opacity: .5;'>with a length of </span><span style='opacity: .65;'><b>" + E + "</b></span></i>") : b + ("<i><span style='opacity: .5;'>Today's longest: </span><span style='opacity: .75;'><b>" + E + "</b></span></i>"), vcm.innerHTML = b)
 } else if ("p" == h) wfpr = !1,
 lagging && (etm *= lag_mult, lagging = !1);
 else if ("u" == h) {
 q = asmc.getContext("2d");
 q.clearRect(0, 0, 80, 80);
 q.fillStyle = "#FFFFFF";
 for (var E = f = 0; c < e && !(80 <= E);) if (t = b[c++], 128 <= t) for (t -= 128, y = 0; y < t && !(f++, 80 <= f && (f = 0, E++, 80 <= E)); y++);
 else for (y = 0; 7 > y && !(0 < (t & u_m[y]) && q.fillRect(f, E, 1, 1), f++, 80 <= f && (f = 0, E++, 80 <= E)); y++);
 } else if ("i" == h) {
 if (adm = !0, t = b[c] << 8 | b[c + 1], c += 2, e = os["s" + t]) if (f = b[c], c++, E = b[c], c++, q = b[c], c++, b = b[c], 0 < f || 0 < E || 0 < q || 0 < b) e.nk += " - " + (f + "." + E + "." + q + "." + b),
 console.log(e.nk)
 } else if ("s" == h) {
 if (playing) if (t = b[c] << 8 | b[c + 1], c += 2, 6 < q) {
 w = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215;
 c += 3;
 c++;
 I = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215;
 c += 3;
 M = (b[c] << 8 | b[c + 1]) / 1E3;
 c += 2;
 u = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 16777215;
 c += 3;
 y = b[c];
 c++;
 H = [];
 K = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 5;
 c += 3;
 N = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 5;
 c += 3;
 f = b[c];
 c++;
 h = "";
 for (q = 0; q < f; q++) h += String.fromCharCode(b[c]),
 c++;
 for (var E = f = 0, O, L = !1; c < e;) q = f,
 O = E,
 L ? (f += (b[c] - 127) / 2, c++, E += (b[c] - 127) / 2, c++) : (f = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 5, c += 3, E = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 5, c += 3, q = f, O = E, L = !0),
 (F = points_dp.get()) || (F = {
 exs: [],
 eys: [],
 efs: [],
 ems: []
 }),
 F.eiu = 0,
 F.xx = f,
 F.yy = E,
 F.fx = 0,
 F.fy = 0,
 F.da = 0,
 F.ebx = f - q,
 F.eby = E - O,
 H.push(F);
 e = newSnake(t, K, N, y, w, H);
 null == snake ? (view_xx = f, view_yy = E, snake = e, snake.md = !1, snake.wmd = !1, e.nk = my_nick) : (e.nk = h, gdnm(h) || (e.nk = ""));
 e.eang = e.wang = I;
 e.sp = M;
 e.spang = e.sp / spangdv;
 1 < e.spang && (e.spang = 1);
 e.fam = u;
 e.sc = Math.min(6, 1 + (e.sct - 2) / 106);
 e.scang = .13 + .87 * Math.pow((7 - e.sc) / 6, 2);
 e.ssp = nsp1 + nsp2 * e.sc;
 e.fsp = e.ssp + .1;
 e.wsep = 6 * e.sc;
 b = nsep / gsc;
 e.wsep < b && (e.wsep = b);
 e.sep = e.wsep;
 snl(e)
 } else for (b = 1 == b[c], y = snakes.length - 1; 0 <= y; y--) if (snakes[y].id == t) {
 snakes[y].id = -1234;
 b ? (snakes[y].dead = !0, snakes[y].dead_amt = 0, snakes[y].edir = 0) : snakes.splice(y, 1);
 delete os["s" + t];
 break
 }
 } else if ("F" == h) if (4 <= protocol_version) for (h = !1; c < e;) y = b[c],
 c++,
 f = b[c] << 8 | b[c + 1],
 c += 2,
 E = b[c] << 8 | b[c + 1],
 c += 2,
 q = b[c] / 5,
 c++,
 t = E * grd * 3 + f,
 q = newFood(t, f, E, q, !0, y),
 h || (h = !0, u = Math.floor(f / sector_size), F = Math.floor(E / sector_size)),
 q.sx = u,
 q.sy = F;
 else for (u = b[c] << 8 | b[c + 1], c += 2, F = b[c] << 8 | b[c + 1], c += 2; c < e;) t = b[c] << 16 | b[c + 1] << 8 | b[c + 2],
 c += 3,
 y = b[c],
 c++,
 f = sector_size * (u + b[c] / 255),
 c++,
 E = sector_size * (F + b[c] / 255),
 c++,
 q = b[c] / 5,
 c++,
 q = newFood(t, f, E, q, !0, y),
 q.sx = u,
 q.sy = F;
 else if ("b" == h || "f" == h) 4 <= protocol_version ? (y = b[c], c++, 4 < q && (f = b[c] << 8 | b[c + 1], c += 2, E = b[c] << 8 | b[c + 1], t = E * grd * 3 + f, q = b[c + 2] / 5, q = newFood(t, f, E, q, "b" == h, y), q.sx = Math.floor(f / sector_size), q.sy = Math.floor(E / sector_size))) : (t = b[c] << 16 | b[c + 1] << 8 | b[c + 2], c += 3, 4 < q && (y = b[c], c++, u = b[c] << 8 | b[c + 1], c += 2, F = b[c] << 8 | b[c + 1], c += 2, f = sector_size * (u + b[c] / 255), c++, E = sector_size * (F + b[c] / 255), c++, q = b[c] / 5, q = newFood(t, f, E, q, "b" == h, y), q.sx = u, q.sy = F));
 else if ("c" == h) {
 4 <= protocol_version ? (f = b[c] << 8 | b[c + 1], c += 2, E = b[c] << 8 | b[c + 1], c += 2, t = E * grd * 3 + f) : (t = b[c] << 16 | b[c + 1] << 8 | b[c + 2], c += 3);
 for (y = cm1 = foods_c - 1; 0 <= y; y--) if (q = foods[y], q.id == t) {
 q.eaten = !0;
 c + 2 <= e ? (b = b[c] << 8 | b[c + 1], q.eaten_by = os["s" + b], q.eaten_fr = 0) : (y == cm1 ? foods[y] = null : (foods[y] = foods[cm1], foods[cm1] = null), foods_c--, cm1--);
 t = -1;
 break
 }
 testing && -1 != t && console.log("wtf")
 } else if ("j" == h) {
 t = b[c] << 8 | b[c + 1];
 c += 2;
 f = 1 + 3 * (b[c] << 8 | b[c + 1]);
 c += 2;
 E = 1 + 3 * (b[c] << 8 | b[c + 1]);
 c += 2;
 e = null;
 for (y = preys.length - 1; 0 <= y; y--) if (preys[y].id == t) {
 e = preys[y];
 break
 }
 if (e) {
 t = etm / 8 * e.sp / 4;
 t *= lag_mult;
 h = e.xx;
 y = e.yy;
 15 == q ? (e.dir = b[c] - 48, c++, e.ang = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215, c += 3, e.wang = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215, c += 3, e.sp = (b[c] << 8 | b[c + 1]) / 1E3) : 11 == q ? (e.ang = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215, c += 3, e.sp = (b[c] << 8 | b[c + 1]) / 1E3) : 12 == q ? (e.dir = b[c] - 48, c++, e.wang = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215, c += 3, e.sp = (b[c] << 8 | b[c + 1]) / 1E3) : 13 == q ? (e.dir = b[c] - 48, c++, e.ang = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215, c += 3, e.wang = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215) : 9 == q ? e.ang = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215 : 10 == q ? (e.dir = b[c] - 48, c++, e.wang = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215) : 8 == q && (e.sp = (b[c] << 8 | b[c + 1]) / 1E3);
 e.xx = f + Math.cos(e.ang) * t;
 e.yy = E + Math.sin(e.ang) * t;
 b = e.xx - h;
 c = e.yy - y;
 t = e.fpos;
 for (q = 0; q < rfc; q++) e.fxs[t] -= b * rfas[q],
 e.fys[t] -= c * rfas[q],
 t++,
 t >= rfc && (t = 0);
 e.fx = e.fxs[e.fpos];
 e.fy = e.fys[e.fpos];
 e.ftg = rfc
 }
 } else if ("y" == h) if (t = b[c] << 8 | b[c + 1], c += 2, 2 == q) for (y = preys.length - 1; 0 <= y; y--) {
 if (e = preys[y], e.id == t) {
 preys.splice(y, 1);
 break
 }
 } else if (4 == q) for (b = b[c] << 8 | b[c + 1], y = preys.length - 1; 0 <= y; y--) {
 if (e = preys[y], e.id == t) {
 e.eaten = !0;
 e.eaten_by = os["s" + b];
 e.eaten_by ? e.eaten_fr = 0 : preys.splice(y, 1);
 break
 }
 } else y = b[c],
 c++,
 f = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 5,
 c += 3,
 E = (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) / 5,
 c += 3,
 q = b[c] / 5,
 c++,
 u = b[c] - 48,
 c++,
 I = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215,
 c += 3,
 w = 2 * (b[c] << 16 | b[c + 1] << 8 | b[c + 2]) * Math.PI / 16777215,
 c += 3,
 M = (b[c] << 8 | b[c + 1]) / 1E3,
 newPrey(t, f, E, q, y, u, I, w, M)
 }
 }
 };
 ws.onerror = function (b) {};
 ws.onclose = function (b) {
 ws == this && (playing = connected = !1)
 };
 ws.onopen = function (b) {
 if (ws == this) {
 b = asciize(nick.value);
 24 < b.length && (b = b.substr(0, 24));
 if ("gameweek2016" == b.toLowerCase()) {
 b = "";
 try {
 localStorage.gw2k16 = "1",
 gw2k16 = !0
 } catch (B) {}
 }
 my_nick = b;
 gdnm(b) || (b = "");
 var c = Math.floor(9 * Math.random());
 try {
 var e = localStorage.snakercv;
 e == "" + Number(e) && (c = Number(e))
 } catch (B) {}
 e = new Uint8Array(3 + b.length);
 e[0] = 115;
 e[1] = 9;
 e[2] = c;
 for (c = 0; c < b.length; c++) e[c + 3] = b.charCodeAt(c);
 startLogin(e);
 high_quality = !0;
 gla = 1;
 wdfg = 0;
 qsm = 1;
 0 == want_quality && (high_quality = !1, gla = 0, qsm = 1.7);
 1 == render_mode && (high_quality = !1, gla = 0);
 lpstm = Date.now()
 }
 }
}
document.getElementById("playh").innerHTML = '<div class="btnt nsi sadg1" style="position: relative; width: 87px; color: rgb(255, 255, 255); font-weight: bold; text-align: center; font-family: Arial, \'Helvetica Neue\', Helvetica, sans-serif; font-size: 20px; cursor: pointer; height: 47px; line-height: 47px; box-shadow: rgba(0, 0, 0, 0.74902) 0px 3px 20px; border-radius: 34px; display: inline-block; margin-top: 20px; margin-bottom: 50px;"><div style="position: absolute; opacity: 1; left: 0px; top: 0px;"><div class="sadu1" style="position: absolute; top: 0px; left: 0px; width: 87px; height: 47px; border-radius: 35px; opacity: 0;"></div><div class="sadd1" style="position: absolute; top: -1px; left: -1px; width: 89px; height: 49px; border-radius: 34px; opacity: 0;"></div><div class="nsi" style="position: absolute; top: 0px; left: 0px; width: 87px; height: 47px; border-radius: 34px; color: rgb(255, 255, 255); opacity: 0.9;">&nbsp;Group!&nbsp;</div></div></div>';

document.getElementById("playh").addEventListener("click",function(){
 SosMes();
});

发表评论