MooMooJS

Fixed version of MooMoo.js

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/499649/1405739/MooMooJS.js

  1. // ==UserScript==
  2. // @name MooMooJS
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0.5
  5. // @description Fixed version of MooMoo.js
  6. // @author Influxes
  7. // @match *://*.moomoo.io/*
  8. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  9. // @grant none
  10. // @connect moomoo.io
  11. // ==/UserScript==
  12. (() => {
  13. var e = {
  14. 6791: e => {
  15. var t;
  16. t = function(e) {
  17. var t;
  18. var r, n, t, M, m;
  19. m = [];
  20. M = 0;
  21. n = 0;
  22. while (n < e.length) {
  23. r = e[n];
  24. if (r === "\n") {
  25. t = e.substring(M, n);
  26. m.push(t);
  27. M = n + 1;
  28. }
  29. n++;
  30. }
  31. if (M < e.length) {
  32. t = e.substring(M);
  33. m.push(t);
  34. }
  35. return m;
  36. };
  37. e.exports = t;
  38. },
  39. 2486: (e, t, r) => {
  40. "use strict";
  41. Object.defineProperty(t, "__esModule", {
  42. value: true
  43. });
  44. t.MooMoo = void 0;
  45. let n = Function.prototype;
  46. t.MooMoo = n[69];
  47. if (!t.MooMoo) {
  48. const e = r(8156).A;
  49. const n = r(8044).updateHookPosition;
  50. const M = r(9137).A;
  51. t.MooMoo = new e;
  52. Object.defineProperty(Function.prototype, 69, {
  53. get() {
  54. return t.MooMoo;
  55. }
  56. });
  57. let m = Symbol();
  58. Object.defineProperty(Object.prototype, "x", {
  59. set(e) {
  60. this[m] = e;
  61. n.call(this, e);
  62. },
  63. get() {
  64. return this[m];
  65. }
  66. });
  67. M();
  68. }
  69. },
  70. 8156: (e, t, r) => {
  71. "use strict";
  72. var n;
  73. n = {
  74. value: true
  75. };
  76. const M = r(5258);
  77. const m = r(4902);
  78. const p = r(2609);
  79. const y = r(2555);
  80. const h = r(227);
  81. const b = r(2093);
  82. const P = r(5106);
  83. const v = r(6832);
  84. const k = r(3407);
  85. const _ = r(6475);
  86. const j = r(4560);
  87. const x = r(2550);
  88. class Game extends M.default {
  89. constructor() {
  90. super();
  91. this.teams = [];
  92. this.myPlayer = {};
  93. this.statistics = {};
  94. this.DidInit = false;
  95. this.GamePlayerManager = new p.default;
  96. this.ActivePlayerManager = new p.default;
  97. this.LeaderboardManager = new y.default;
  98. this.GameObjectManager = new h.default;
  99. this.CommandManager = new b.default;
  100. this.PacketManager = new P.default;
  101. this.PacketInterceptor = new x.default;
  102. this.BotManager = v.default.instance;
  103. this.UTILS = new j.default;
  104. this.vars = {};
  105. this.msgpack = {};
  106. this.msgpack.decode = k.default;
  107. this.msgpack.encode = _.default;
  108. this.vars.gameLoaded = false;
  109. }
  110. debug(e) {
  111. this.emit("debug", e);
  112. }
  113. }
  114. t.A = Game;
  115. (0, m.default)();
  116. },
  117. 2555: (e, t, r) => {
  118. "use strict";
  119. Object.defineProperty(t, "__esModule", {
  120. value: true
  121. });
  122. const n = r(9703);
  123. const M = r(2486);
  124. const m = r(8233);
  125. class Leaderboardmanager {
  126. constructor() {
  127. this.leaderboard = new Map;
  128. }
  129. updateLeaderboard(e) {
  130. let t = (0, n.default)(e, 3);
  131. let r = e.length / 3;
  132. t.forEach(((e, t) => {
  133. let r = M.MooMoo.GamePlayerManager.getPlayerBySid(e[0]);
  134. if (!r) {
  135. r = new m.default(e[0]);
  136. r.sid = e[0];
  137. r.name = e[1];
  138. M.MooMoo.GamePlayerManager.addPlayer(r);
  139. }
  140. this.leaderboard.set(t + 1, {
  141. player: r,
  142. sid: e[0],
  143. name: e[1],
  144. score: e[2]
  145. });
  146. }));
  147. }
  148. clearLeaderboard() {
  149. this.leaderboard = new Map;
  150. }
  151. }
  152. t["default"] = Leaderboardmanager;
  153. },
  154. 227: (e, t, r) => {
  155. "use strict";
  156. Object.defineProperty(t, "__esModule", {
  157. value: true
  158. });
  159. const n = r(2486);
  160. const M = r(1917);
  161. class ObjectManager {
  162. constructor() {
  163. this.objects = new Map;
  164. }
  165. addObject(e) {
  166. let t = n.MooMoo.GameObjectManager.getGameObjectBySid(e.sid);
  167. if (!t) {
  168. t = new M.default(e.sid);
  169. }
  170. t.x = e.x;
  171. t.y = e.y;
  172. t.ownerSid = e.ownerSid;
  173. t.type = e.type;
  174. t.sid = e.sid;
  175. this.objects.set(e.sid, t);
  176. }
  177. getGameObjectBySid(e) {
  178. return this.objects.get(e);
  179. }
  180. getObjectsByOwnerSid(e) {
  181. let t = [];
  182. this.objects.forEach((r => {
  183. if (r.ownerSid == e) {
  184. t.push(r);
  185. }
  186. }));
  187. return t;
  188. }
  189. removeObjectBySid(e) {
  190. this.objects.delete(e);
  191. }
  192. removeObjectsByOwnerSid(e) {
  193. this.objects.forEach((t => {
  194. if (t.ownerSid == e) {
  195. this.objects.delete(t.sid);
  196. }
  197. }));
  198. }
  199. }
  200. t["default"] = ObjectManager;
  201. },
  202. 2550: (e, t, r) => {
  203. "use strict";
  204. Object.defineProperty(t, "__esModule", {
  205. value: true
  206. });
  207. const n = r(4902);
  208. class PacketInterceptor {
  209. constructor() {
  210. this.clientCallbacks = new Map;
  211. this.serverCallbacks = new Map;
  212. this.lastCallbackId = 0;
  213. }
  214. addCallback(e, t) {
  215. let r;
  216. if (e === "client") {
  217. r = this.clientCallbacks;
  218. } else if (e === "server") {
  219. r = this.serverCallbacks;
  220. }
  221. const n = this.lastCallbackId++;
  222. r.set(n, t);
  223. return n;
  224. }
  225. removeCallback(e) {
  226. this.clientCallbacks.delete(e);
  227. this.serverCallbacks.delete(e);
  228. }
  229. applyClientCallbacks(e) {
  230. if (!this.clientCallbacks.size) return e;
  231. for (const [t, r] of this.clientCallbacks) {
  232. e = r(e) || e;
  233. }
  234. return e;
  235. }
  236. applyServerCallbacks(e) {
  237. if (!this.serverCallbacks.size) return e;
  238. for (const [t, r] of this.serverCallbacks) {
  239. e = r(e);
  240. }
  241. return e;
  242. }
  243. getOriginalServerCallback() {
  244. return n.onmessagecallback;
  245. }
  246. }
  247. t["default"] = PacketInterceptor;
  248. },
  249. 5106: (e, t, r) => {
  250. "use strict";
  251. Object.defineProperty(t, "__esModule", {
  252. value: true
  253. });
  254. const n = r(5258);
  255. class PacketManager extends n.default {
  256. constructor() {
  257. super();
  258. this._packetCountPerMinute = 0;
  259. this._packetCountPerSecond = 0;
  260. this._packetTime = 60;
  261. this._packetLimitPerMinute = 5400;
  262. this._packetLimitPerSecond = 120;
  263. }
  264. initialize() {
  265. this._startTimerPerMinute();
  266. this._startTimerPerSecond();
  267. }
  268. addPacket() {
  269. this._packetCountPerSecond++;
  270. this._packetCountPerMinute++;
  271. const e = this.getKickPercentagePerMinute();
  272. const t = this.getKickPercentagePerSecond();
  273. if (e >= 100) {
  274. this.emit("Kick", this);
  275. }
  276. if (t >= 100) {
  277. this.emit("Kick", this);
  278. }
  279. this.emit("update", this);
  280. }
  281. getKickPercentagePerMinute() {
  282. return this._packetCountPerMinute / this._packetLimitPerMinute * 100;
  283. }
  284. getKickPercentagePerSecond() {
  285. return this._packetCountPerSecond / this._packetLimitPerSecond * 100;
  286. }
  287. getPacketCountPerMinute() {
  288. return this._packetCountPerMinute;
  289. }
  290. getPacketCountPerSecond() {
  291. return this._packetCountPerSecond;
  292. }
  293. getPacketTime() {
  294. return this._packetTime;
  295. }
  296. _startTimerPerMinute() {
  297. this._intervalIdPerMinute = setInterval((() => {
  298. this._resetPacketCountPerMinute();
  299. }), 6e4);
  300. }
  301. _startTimerPerSecond() {
  302. this._intervalIdPerSecond = setInterval((() => {
  303. if (this._packetCountPerSecond > this._packetLimitPerSecond) {
  304. this.emit("Kick", this.getKickPercentagePerSecond());
  305. }
  306. this._resetPacketCountPerSecond();
  307. }), 1e3);
  308. }
  309. _resetPacketCountPerMinute() {
  310. this._packetCountPerMinute = 0;
  311. this._packetTime = 60;
  312. }
  313. _resetPacketCountPerSecond() {
  314. this._packetCountPerSecond = 0;
  315. }
  316. }
  317. t["default"] = PacketManager;
  318. },
  319. 2609: (e, t, r) => {
  320. "use strict";
  321. Object.defineProperty(t, "__esModule", {
  322. value: true
  323. });
  324. const n = r(2486);
  325. class PlayerManager {
  326. constructor() {
  327. this.players = [];
  328. }
  329. addPlayer(e) {
  330. this.players.push(e);
  331. }
  332. removePlayer(e) {
  333. this.players.splice(this.players.indexOf(e), 1);
  334. }
  335. removePlayerBySid(e) {
  336. this.players.splice(this.players.findIndex((t => t.sid === e)), 1);
  337. }
  338. removePlayerById(e) {
  339. this.players.splice(this.players.findIndex((t => t.id === e)), 1);
  340. }
  341. getPlayerBySid(e) {
  342. return this.players.find((t => t.sid === e));
  343. }
  344. getPlayerById(e) {
  345. return this.players.find((t => t.id === e));
  346. }
  347. getPlayerByName(e) {
  348. let t = this.players.filter((t => t.name === e));
  349. if (t.length > 1) {
  350. return t;
  351. } else return t[0];
  352. }
  353. clearPlayers() {
  354. this.players = [];
  355. }
  356. updatePlayer(e, t) {
  357. let r = this.getPlayerBySid(e);
  358. if (r) {
  359. Object.assign(r, t);
  360. }
  361. }
  362. getEnemies() {
  363. return this.players.filter((e => {
  364. if (e.id !== n.MooMoo.myPlayer.id) {
  365. if (e.team === null) {
  366. return true;
  367. }
  368. if (e.team !== n.MooMoo.myPlayer.team) {
  369. return true;
  370. }
  371. }
  372. }));
  373. }
  374. getTeammates() {
  375. return this.players.filter((e => {
  376. if (e.id !== n.MooMoo.myPlayer.id) {
  377. if (e.team === n.MooMoo.myPlayer.team) {
  378. return true;
  379. }
  380. }
  381. }));
  382. }
  383. getClosestEnemy() {
  384. let e = this.getEnemies();
  385. let t = e[0];
  386. if (!e) return null;
  387. e.forEach((e => {
  388. if (n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y) < n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, t.x, t.y)) {
  389. t = e;
  390. }
  391. }));
  392. return t;
  393. }
  394. getClosestTeammate() {
  395. let e = this.getTeammates();
  396. let t = e[0];
  397. if (!e) return null;
  398. e.forEach((e => {
  399. if (n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y) < n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, t.x, t.y)) {
  400. t = e;
  401. }
  402. }));
  403. return t;
  404. }
  405. getClosestPlayer() {
  406. let e = this.players[0];
  407. if (!this.players) return null;
  408. this.players.forEach((t => {
  409. if (n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, t.x, t.y) < n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y)) {
  410. e = t;
  411. }
  412. }));
  413. return e;
  414. }
  415. getClosestEnemyToPlayer(e) {
  416. let t = this.getEnemies();
  417. let r = t[0];
  418. if (!t) return null;
  419. t.forEach((t => {
  420. if (n.MooMoo.UTILS.getDistanceBetweenTwoPoints(e.x, e.y, t.x, t.y) < n.MooMoo.UTILS.getDistanceBetweenTwoPoints(e.x, e.y, r.x, r.y)) {
  421. r = t;
  422. }
  423. }));
  424. return r;
  425. }
  426. getClosestEnemyAngle() {
  427. let e = this.getClosestEnemy();
  428. if (!e) return null;
  429. return n.MooMoo.UTILS.getAngleBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y);
  430. }
  431. getClosestEnemyDistance() {
  432. let e = this.getClosestEnemy();
  433. if (!e) return null;
  434. return n.MooMoo.UTILS.getDistanceBetweenTwoPoints(n.MooMoo.myPlayer.x, n.MooMoo.myPlayer.y, e.x, e.y);
  435. }
  436. }
  437. t["default"] = PlayerManager;
  438. },
  439. 4560: (e, t) => {
  440. "use strict";
  441. Object.defineProperty(t, "__esModule", {
  442. value: true
  443. });
  444. class UTILS {
  445. static getDistanceBetweenTwoPoints(e, t, r, n) {
  446. return Math.sqrt(Math.pow(r - e, 2) + Math.pow(n - t, 2));
  447. }
  448. static getAngleBetweenTwoPoints(e, t, r, n) {
  449. return Math.atan2(n - t, r - e);
  450. }
  451. static atan2(e, t, r, n) {
  452. return Math.atan2(n - t, r - e);
  453. }
  454. constructor() {
  455. this.getDistanceBetweenTwoPoints = UTILS.getDistanceBetweenTwoPoints;
  456. this.dist = UTILS.getDistanceBetweenTwoPoints;
  457. this.distance = UTILS.getDistanceBetweenTwoPoints;
  458. this.atan2 = UTILS.atan2;
  459. this.angle = UTILS.atan2;
  460. this.getAngleBetweenTwoPoints = UTILS.getAngleBetweenTwoPoints;
  461. }
  462. }
  463. t["default"] = UTILS;
  464. },
  465. 2093: (e, t, r) => {
  466. "use strict";
  467. Object.defineProperty(t, "__esModule", {
  468. value: true
  469. });
  470. const n = r(1091);
  471. class CommandManager {
  472. constructor() {
  473. this.commands = {};
  474. this.prefix = "/";
  475. }
  476. setPrefix(e) {
  477. this.prefix = e;
  478. }
  479. registerCommand(e, t) {
  480. let r = new n.default(e, t);
  481. this.commands[e] = r;
  482. }
  483. unregisterCommand(e) {
  484. delete this.commands[e];
  485. }
  486. }
  487. t["default"] = CommandManager;
  488. },
  489. 5258: (e, t) => {
  490. "use strict";
  491. Object.defineProperty(t, "__esModule", {
  492. value: true
  493. });
  494. class EventEmitter {
  495. constructor() {
  496. this._listeners = {};
  497. }
  498. on(e, t) {
  499. if (!this._listeners[e]) {
  500. this._listeners[e] = [];
  501. }
  502. this._listeners[e].push(t);
  503. }
  504. once(e, t) {
  505. this.on(e, (function g(...r) {
  506. this.off(e, g);
  507. t(...r);
  508. }));
  509. }
  510. emit(e, ...t) {
  511. if (this._listeners[e]) {
  512. this._listeners[e].forEach((e => e(...t)));
  513. }
  514. }
  515. addEventListener(e, t) {
  516. this.on(e, t);
  517. }
  518. }
  519. t["default"] = EventEmitter;
  520. },
  521. 8730: (e, t, r) => {
  522. "use strict";
  523. Object.defineProperty(t, "__esModule", {
  524. value: true
  525. });
  526. const n = r(2486);
  527. function cacheItems() {
  528. n.MooMoo.myPlayer.inventory = {};
  529. const e = [ {
  530. category: "primary",
  531. start: 0,
  532. end: 9
  533. }, {
  534. category: "secondary",
  535. start: 9,
  536. end: 16
  537. }, {
  538. category: "food",
  539. start: 16,
  540. end: 19,
  541. subtract: true
  542. }, {
  543. category: "wall",
  544. start: 19,
  545. end: 22,
  546. subtract: true
  547. }, {
  548. category: "spike",
  549. start: 22,
  550. end: 26,
  551. subtract: true
  552. }, {
  553. category: "mill",
  554. start: 26,
  555. end: 29,
  556. subtract: true
  557. }, {
  558. category: "mine",
  559. start: 29,
  560. end: 31,
  561. subtract: true
  562. }, {
  563. category: "boostPad",
  564. start: 31,
  565. end: 33,
  566. subtract: true
  567. }, {
  568. category: "trap",
  569. start: 31,
  570. end: 33,
  571. subtract: true
  572. }, {
  573. category: "turret",
  574. start: 33,
  575. end: 39,
  576. subtract: true
  577. }, {
  578. category: "spawnPad",
  579. start: 36,
  580. end: 37,
  581. subtract: true
  582. } ];
  583. for (let t = 0; t < e.length; t++) {
  584. const {category: r, start: M, end: m, subtract: p} = e[t];
  585. for (let e = M; e < m; e++) {
  586. const t = document.getElementById(`actionBarItem${e}`);
  587. if (t && t.offsetParent !== null) {
  588. n.MooMoo.myPlayer.inventory[r] = p ? e - 16 : e;
  589. break;
  590. }
  591. }
  592. }
  593. }
  594. t["default"] = cacheItems;
  595. },
  596. 9703: (e, t) => {
  597. "use strict";
  598. Object.defineProperty(t, "__esModule", {
  599. value: true
  600. });
  601. function chunk(e, t) {
  602. let r = [];
  603. for (let n = 0; n < e.length; n += t) {
  604. r.push(e.slice(n, n + t));
  605. }
  606. return r;
  607. }
  608. t["default"] = chunk;
  609. },
  610. 9371: function(e, t, r) {
  611. "use strict";
  612. var n = this && this.__awaiter || function(e, t, r, n) {
  613. function adopt(e) {
  614. return e instanceof r ? e : new r((function(t) {
  615. t(e);
  616. }));
  617. }
  618. return new (r || (r = Promise))((function(r, M) {
  619. function fulfilled(e) {
  620. try {
  621. step(n.next(e));
  622. } catch (e) {
  623. M(e);
  624. }
  625. }
  626. function rejected(e) {
  627. try {
  628. step(n["throw"](e));
  629. } catch (e) {
  630. M(e);
  631. }
  632. }
  633. function step(e) {
  634. e.done ? r(e.value) : adopt(e.value).then(fulfilled, rejected);
  635. }
  636. step((n = n.apply(e, t || [])).next());
  637. }));
  638. };
  639. Object.defineProperty(t, "__esModule", {
  640. value: true
  641. });
  642. const M = r(5258);
  643. const m = r(3694);
  644. const p = r(8329);
  645. const y = r(2486);
  646. class Bot extends M.default {
  647. constructor(e = false, t) {
  648. super();
  649. this.connected = false;
  650. if (!e) {
  651. this.name = "Bot";
  652. this.skin = 0;
  653. this.moofoll = false;
  654. } else {
  655. this.name = t.name;
  656. this.skin = t.skin;
  657. this.moofoll = t.moofoll;
  658. }
  659. this.gameID = null;
  660. }
  661. generateToken() {
  662. return n(this, void 0, void 0, (function*() {
  663. const e = true;
  664. try {
  665. if (e) {
  666. const e = yield new Promise(((e, t) => {
  667. window.turnstile.render(".cf-turnstile", {
  668. sitekey: "0x4AAAAAAAMYHI96GFiJzMmp",
  669. callback: function(t) {
  670. e(t);
  671. },
  672. errorCallback: function(e) {
  673. t(e);
  674. }
  675. });
  676. }));
  677. return e;
  678. } else {
  679. const e = yield window.grecaptcha.execute("6LfahtgjAAAAAF8SkpjyeYMcxMdxIaQeh-VoPATP", {
  680. action: "homepage"
  681. });
  682. const t = "re:" + e;
  683. return t;
  684. }
  685. } catch (e) {
  686. throw e;
  687. }
  688. }));
  689. }
  690. join(e) {
  691. return n(this, void 0, void 0, (function*() {
  692. switch (typeof e) {
  693. case "string":
  694. {
  695. let {region: t, index: r} = m.default.parseServer(e);
  696. let n = new p.default(t, r);
  697. this.recaptchaToken = yield this.generateToken();
  698. n.joinServer(this);
  699. break;
  700. }
  701.  
  702. case "object":
  703. {
  704. if (Array.isArray(e)) {
  705. let [t, r] = e;
  706. let n = new p.default(t, r);
  707. this.recaptchaToken = yield this.generateToken();
  708. n.joinServer(this);
  709. } else {
  710. let {region: t, index: r} = e;
  711. let n = new p.default(t, r);
  712. this.recaptchaToken = yield this.generateToken();
  713. n.joinServer(this);
  714. }
  715. break;
  716. }
  717. }
  718. }));
  719. }
  720. spawn() {
  721. this.ws.send(y.MooMoo.msgpack.encode([ "M", [ {
  722. name: this.name,
  723. skin: this.skin,
  724. moofoll: this.moofoll
  725. } ] ]));
  726. }
  727. onConnect(e) {
  728. this.emit("connected", e);
  729. this.connected = true;
  730. }
  731. sendChat(e) {
  732. this.ws.send(y.MooMoo.msgpack.encode([ "6", [ e ] ]));
  733. }
  734. move(e) {
  735. this.ws.send(y.MooMoo.msgpack.encode([ "a", [ e ] ]));
  736. }
  737. sendPacket(e) {
  738. let t = Array.prototype.slice.call(arguments, 1);
  739. if (this.ws.readyState !== 2 && this.ws.readyState !== 3) {
  740. this.ws.send(y.MooMoo.msgpack.encode([ e, t ]));
  741. }
  742. }
  743. }
  744. t["default"] = Bot;
  745. },
  746. 6832: (e, t, r) => {
  747. "use strict";
  748. Object.defineProperty(t, "__esModule", {
  749. value: true
  750. });
  751. const n = r(9371);
  752. class BotManager {
  753. constructor() {
  754. this._bots = new Map;
  755. this._botIdCounter = 0;
  756. this.Bot = n.default;
  757. }
  758. static get instance() {
  759. if (!BotManager._instance) {
  760. BotManager._instance = new BotManager;
  761. }
  762. return BotManager._instance;
  763. }
  764. addBot(e) {
  765. const t = this._botIdCounter++;
  766. e.id = t;
  767. this._bots.set(t, e);
  768. return t;
  769. }
  770. removeBot(e) {
  771. this._bots.delete(e);
  772. this._botIdCounter -= 1;
  773. }
  774. getBot(e) {
  775. return this._bots.get(e);
  776. }
  777. }
  778. t["default"] = BotManager;
  779. },
  780. 8329: (e, t, r) => {
  781. "use strict";
  782. Object.defineProperty(t, "__esModule", {
  783. value: true
  784. });
  785. const n = r(2486);
  786. const M = r(9703);
  787. class Server {
  788. constructor(e, t) {
  789. this._region = e;
  790. this._index = t;
  791. this.parseServerData();
  792. }
  793. get region() {
  794. return this._region;
  795. }
  796. set region(e) {
  797. this._region = e;
  798. }
  799. get index() {
  800. return this._index;
  801. }
  802. set index(e) {
  803. this._index = e;
  804. }
  805. parseServerData() {
  806. this.ip = window.io.socket.url.split("://")[1].split(".moomoo.io")[0];
  807. }
  808. getWebSocketUrl(e) {
  809. return "wss://" + this.ip + ".moomoo.io/?token=" + encodeURIComponent(e);
  810. }
  811. joinServer(e) {
  812. let t = this.getWebSocketUrl(e.recaptchaToken);
  813. const r = new WebSocket(t);
  814. r.binaryType = "arraybuffer";
  815. r.onopen = () => {
  816. e.ws = r;
  817. };
  818. r.addEventListener("message", (t => {
  819. let r = new Uint8Array(t.data);
  820. let m = n.MooMoo.msgpack.decode(r);
  821. let [p, [...y]] = m;
  822. e.emit("packet", {
  823. packet: p,
  824. data: y
  825. });
  826. if (p == "io-init") {
  827. e.onConnect(this);
  828. }
  829. if (p == "C") {
  830. if (!e.gameID) {
  831. e.gameID = y[0];
  832. }
  833. }
  834. if (p == "a") {
  835. let t = (0, M.default)(y[0], 13);
  836. t.forEach((t => {
  837. if (t[0] == e.gameID) {
  838. e.x = t[1];
  839. e.y = t[2];
  840. }
  841. }));
  842. }
  843. }));
  844. }
  845. }
  846. t["default"] = Server;
  847. },
  848. 3694: (e, t, r) => {
  849. "use strict";
  850. Object.defineProperty(t, "__esModule", {
  851. value: true
  852. });
  853. const n = r(8329);
  854. const M = r(2486);
  855. class ServerManager {
  856. constructor() {
  857. this.index = 0;
  858. this.region = 0;
  859. this.name = "";
  860. this.ip = "";
  861. this.players = 0;
  862. this.wsurl = "";
  863. }
  864. static get instance() {
  865. if (!ServerManager._instance) {
  866. ServerManager._instance = new ServerManager;
  867. }
  868. return ServerManager._instance;
  869. }
  870. static startInterval() {
  871. setInterval((() => {
  872. let e = M.MooMoo.ServerManager;
  873. if (!e) {
  874. M.MooMoo.ServerManager = ServerManager.instance;
  875. }
  876. e = M.MooMoo.ServerManager;
  877. if (e) {
  878. M.MooMoo.ServerManager.initalize();
  879. }
  880. }), 200);
  881. }
  882. initalize() {
  883. this.calculateServer();
  884. }
  885. getCurrentServer() {
  886. let e = new n.default(this.region, this.index);
  887. return e;
  888. }
  889. calculateServer() {
  890. let e = this.extractRegionAndIndex();
  891. if (e.region && e.index) {
  892. this.region = e.region;
  893. this.index = e.index;
  894. }
  895. }
  896. extractRegionAndIndex() {
  897. const e = window.location.href.match(/server=(\d+):(\d+)/);
  898. if (e) {
  899. const t = parseInt(e[1], 10);
  900. const r = parseInt(e[2], 10);
  901. return {
  902. region: t,
  903. index: r
  904. };
  905. }
  906. return {
  907. region: null,
  908. index: null
  909. };
  910. }
  911. static parseServer(e) {
  912. let t = e.split(":");
  913. let r = parseInt(t[0], 10);
  914. let n = parseInt(t[1], 10);
  915. return {
  916. region: r,
  917. index: n
  918. };
  919. }
  920. }
  921. t["default"] = ServerManager;
  922. },
  923. 1618: (e, t, r) => {
  924. "use strict";
  925. Object.defineProperty(t, "__esModule", {
  926. value: true
  927. });
  928. const n = r(2486);
  929. const M = r(8188);
  930. function buyAccessoryById(e) {
  931. let t = false;
  932. M.default.find((r => {
  933. if (r.id == e) {
  934. t = true;
  935. n.MooMoo.sendPacket("c", 1, e, 1);
  936. }
  937. }));
  938. if (!t) {
  939. try {
  940. throw new Error("Error at buyAccessoryById: Accessory with id " + e + " does not exist");
  941. } catch (e) {
  942. console.log(e);
  943. }
  944. }
  945. }
  946. function buyAccessoryByName(e) {
  947. let t = false;
  948. M.default.find((r => {
  949. if (r.name == e) {
  950. t = true;
  951. n.MooMoo.sendPacket("c", 1, r.id, 1);
  952. }
  953. }));
  954. if (!t) {
  955. try {
  956. throw new Error("Error at buyAccessoryByName: Accessory with name " + e + " does not exist");
  957. } catch (e) {
  958. console.log(e);
  959. }
  960. }
  961. }
  962. function buyAccessory(e) {
  963. if (typeof e == "number") {
  964. buyAccessoryById(e);
  965. } else if (typeof e == "string") {
  966. buyAccessoryByName(e);
  967. } else {
  968. try {
  969. throw new Error("Error at buyAccessory: accessoryData must be a number or string");
  970. } catch (e) {
  971. console.log(e);
  972. }
  973. }
  974. }
  975. t["default"] = buyAccessory;
  976. },
  977. 1901: (e, t, r) => {
  978. "use strict";
  979. Object.defineProperty(t, "__esModule", {
  980. value: true
  981. });
  982. const n = r(2486);
  983. const M = r(6570);
  984. function buyHatById(e) {
  985. let t = false;
  986. M.default.find((r => {
  987. if (r.id == e) {
  988. t = true;
  989. n.MooMoo.sendPacket("c", 1, e, 0);
  990. }
  991. }));
  992. if (!t) {
  993. try {
  994. throw new Error("Error at buyHatById: Hat with id " + e + " does not exist");
  995. } catch (e) {
  996. console.log(e);
  997. }
  998. }
  999. }
  1000. function buyHatByName(e) {
  1001. let t = false;
  1002. M.default.find((r => {
  1003. if (r.name == e) {
  1004. t = true;
  1005. n.MooMoo.sendPacket("c", 1, r.id, 0);
  1006. }
  1007. }));
  1008. if (!t) {
  1009. try {
  1010. throw new Error("Error at buyHatByName: Hat with name " + e + " does not exist");
  1011. } catch (e) {
  1012. console.log(e);
  1013. }
  1014. }
  1015. }
  1016. function buyHat(e) {
  1017. if (typeof e == "number") {
  1018. buyHatById(e);
  1019. } else if (typeof e == "string") {
  1020. buyHatByName(e);
  1021. } else {
  1022. try {
  1023. throw new Error("Error at buyHat: hatData must be a number or string");
  1024. } catch (e) {
  1025. console.log(e);
  1026. }
  1027. }
  1028. }
  1029. t["default"] = buyHat;
  1030. },
  1031. 2938: (e, t, r) => {
  1032. "use strict";
  1033. Object.defineProperty(t, "__esModule", {
  1034. value: true
  1035. });
  1036. const n = r(2486);
  1037. function chat(e) {
  1038. n.MooMoo.sendPacket("6", e);
  1039. }
  1040. t["default"] = chat;
  1041. },
  1042. 5610: (e, t, r) => {
  1043. "use strict";
  1044. Object.defineProperty(t, "__esModule", {
  1045. value: true
  1046. });
  1047. const n = r(2486);
  1048. const M = r(8188);
  1049. function equipAccessoryById(e) {
  1050. let t = false;
  1051. M.default.find((r => {
  1052. if (r.id == e) {
  1053. t = true;
  1054. n.MooMoo.sendPacket("c", 0, e, 1);
  1055. }
  1056. }));
  1057. if (!t) {
  1058. try {
  1059. throw new Error("Error at equipAccessoryById: Accessory with id " + e + " does not exist");
  1060. } catch (e) {
  1061. console.log(e);
  1062. }
  1063. }
  1064. }
  1065. function equipAccessoryByName(e) {
  1066. let t = false;
  1067. M.default.find((r => {
  1068. if (r.name == e) {
  1069. t = true;
  1070. n.MooMoo.sendPacket("c", 0, r.id, 1);
  1071. }
  1072. }));
  1073. if (!t) {
  1074. try {
  1075. throw new Error("Error at equipAccessoryByName: Accessory with name " + e + " does not exist");
  1076. } catch (e) {
  1077. console.log(e);
  1078. }
  1079. }
  1080. }
  1081. function equipAccessory(e) {
  1082. if (typeof e == "number") {
  1083. equipAccessoryById(e);
  1084. } else if (typeof e == "string") {
  1085. equipAccessoryByName(e);
  1086. } else {
  1087. try {
  1088. throw new Error("Error at equipAccessory: accessoryData must be a number or string");
  1089. } catch (e) {
  1090. console.log(e);
  1091. }
  1092. }
  1093. }
  1094. t["default"] = equipAccessory;
  1095. },
  1096. 2533: (e, t, r) => {
  1097. "use strict";
  1098. Object.defineProperty(t, "__esModule", {
  1099. value: true
  1100. });
  1101. const n = r(2486);
  1102. const M = r(6570);
  1103. function equipHatById(e) {
  1104. let t = false;
  1105. M.default.find((r => {
  1106. if (r.id == e) {
  1107. t = true;
  1108. n.MooMoo.sendPacket("c", 0, e, 0);
  1109. }
  1110. }));
  1111. if (!t) {
  1112. try {
  1113. throw new Error("Error at equipHatById: Hat with id " + e + " does not exist");
  1114. } catch (e) {
  1115. console.log(e);
  1116. }
  1117. }
  1118. }
  1119. function equipHatByName(e) {
  1120. let t = false;
  1121. M.default.find((r => {
  1122. if (r.name == e) {
  1123. t = true;
  1124. n.MooMoo.sendPacket("c", 0, r.id, 0);
  1125. }
  1126. }));
  1127. if (!t) {
  1128. try {
  1129. throw new Error("Error at equipHatByName: Hat with name " + e + " does not exist");
  1130. } catch (e) {
  1131. console.log(e);
  1132. }
  1133. }
  1134. }
  1135. function equipHat(e) {
  1136. if (typeof e == "number") {
  1137. equipHatById(e);
  1138. } else if (typeof e == "string") {
  1139. equipHatByName(e);
  1140. } else {
  1141. try {
  1142. throw new Error("Error at equipHat: hatData must be a number or string");
  1143. } catch (e) {
  1144. console.log(e);
  1145. }
  1146. }
  1147. }
  1148. t["default"] = equipHat;
  1149. },
  1150. 2987: (e, t, r) => {
  1151. "use strict";
  1152. Object.defineProperty(t, "__esModule", {
  1153. value: true
  1154. });
  1155. const n = r(2486);
  1156. function hit(e = null) {
  1157. n.MooMoo.sendPacket("d", 1, e);
  1158. n.MooMoo.sendPacket("d", 0, e);
  1159. }
  1160. t["default"] = hit;
  1161. },
  1162. 9149: (e, t, r) => {
  1163. "use strict";
  1164. Object.defineProperty(t, "__esModule", {
  1165. value: true
  1166. });
  1167. const n = r(2486);
  1168. function move(e) {
  1169. n.MooMoo.sendPacket("a", e);
  1170. }
  1171. t["default"] = move;
  1172. },
  1173. 3413: (e, t, r) => {
  1174. "use strict";
  1175. Object.defineProperty(t, "__esModule", {
  1176. value: true
  1177. });
  1178. const n = r(2486);
  1179. function place(e, t) {
  1180. let r = n.MooMoo.myPlayer.weaponIndex;
  1181. n.MooMoo.sendPacket("G", e, false);
  1182. n.MooMoo.sendPacket("d", 1, t);
  1183. n.MooMoo.sendPacket("d", 0, t);
  1184. n.MooMoo.sendPacket("G", r, true);
  1185. }
  1186. t["default"] = place;
  1187. },
  1188. 177: (e, t, r) => {
  1189. "use strict";
  1190. Object.defineProperty(t, "__esModule", {
  1191. value: true
  1192. });
  1193. const n = r(2486);
  1194. function unequipAccessory() {
  1195. n.MooMoo.sendPacket("c", 0, 0, 1);
  1196. }
  1197. t["default"] = unequipAccessory;
  1198. },
  1199. 9682: (e, t, r) => {
  1200. "use strict";
  1201. Object.defineProperty(t, "__esModule", {
  1202. value: true
  1203. });
  1204. const n = r(2486);
  1205. function unequipHat() {
  1206. n.MooMoo.sendPacket("c", 0, 0, 0);
  1207. }
  1208. t["default"] = unequipHat;
  1209. },
  1210. 4918: (e, t) => {
  1211. "use strict";
  1212. Object.defineProperty(t, "__esModule", {
  1213. value: true
  1214. });
  1215. const r = {
  1216. hit: {
  1217. exec: () => console.log("Hit!")
  1218. },
  1219. wait: {
  1220. exec: e => new Promise((t => setTimeout(t, parseInt(e[0], 10))))
  1221. },
  1222. chat: {
  1223. exec: e => console.log(e.join(" "))
  1224. },
  1225. enddef: {
  1226. exec: () => {}
  1227. }
  1228. };
  1229. t["default"] = r;
  1230. },
  1231. 5800: (e, t, r) => {
  1232. "use strict";
  1233. var n;
  1234. n = {
  1235. value: true
  1236. };
  1237. const M = r(4918);
  1238. function execute(e) {
  1239. const t = {};
  1240. for (const r of e) {
  1241. const fn = () => {
  1242. for (const e of r.body) {
  1243. M.default[e.command].exec(e.args);
  1244. }
  1245. };
  1246. t[r.name] = {
  1247. call: fn
  1248. };
  1249. }
  1250. return {
  1251. get: function get(e) {
  1252. return t[e];
  1253. }
  1254. };
  1255. }
  1256. t.A = execute;
  1257. },
  1258. 2762: (e, t) => {
  1259. "use strict";
  1260. var r;
  1261. r = {
  1262. value: true
  1263. };
  1264. function parse(e) {
  1265. const t = [];
  1266. let r = null;
  1267. for (const n of e) {
  1268. if (n.endsWith("<<<")) {
  1269. r = {
  1270. type: "function",
  1271. name: n.replace(/[ <]/g, ""),
  1272. body: []
  1273. };
  1274. } else if (n.includes(">>>")) {
  1275. if (!r) {
  1276. const e = {
  1277. type: "ParseError",
  1278. message: "Unexpected token >>>. No function found."
  1279. };
  1280. return e;
  1281. }
  1282. r.body.push({
  1283. type: "command",
  1284. command: "enddef",
  1285. args: []
  1286. });
  1287. t.push(r);
  1288. r = null;
  1289. } else if (r) {
  1290. const e = n.split(" ");
  1291. let t;
  1292. let M;
  1293. for (let r = 0; r < e.length; r++) {
  1294. let n = e[r];
  1295. if (n !== "") {
  1296. t = n;
  1297. M = e.slice(r + 1);
  1298. if (t == "chat") {
  1299. M = [ M.join(" ") ];
  1300. }
  1301. break;
  1302. }
  1303. }
  1304. r.body.push({
  1305. type: "command",
  1306. command: t,
  1307. args: M
  1308. });
  1309. }
  1310. }
  1311. if (r) {
  1312. const e = {
  1313. type: "ParseError",
  1314. message: "Unexpected end of input. Function definition not closed."
  1315. };
  1316. return e;
  1317. }
  1318. return t;
  1319. }
  1320. t.A = parse;
  1321. },
  1322. 1477: (e, t, r) => {
  1323. "use strict";
  1324. var n;
  1325. n = {
  1326. value: true
  1327. };
  1328. const M = r(4918);
  1329. class InvalidNodeTypeError extends Error {}
  1330. class InvalidCommandError extends Error {}
  1331. function validate(e) {
  1332. for (const t of e) {
  1333. if (t.type !== "function") {
  1334. throw new InvalidNodeTypeError(`Unexpected node type: ${t.type}`);
  1335. }
  1336. for (const e of t.body) {
  1337. if (e.type !== "command") {
  1338. throw new InvalidNodeTypeError(`Unexpected node type: ${e.type}`);
  1339. }
  1340. if (!M.default.hasOwnProperty(e.command)) {
  1341. throw new InvalidCommandError(`Invalid command: ${e.command}`);
  1342. }
  1343. }
  1344. }
  1345. }
  1346. t.A = validate;
  1347. },
  1348. 6649: (e, t) => {
  1349. "use strict";
  1350. Object.defineProperty(t, "__esModule", {
  1351. value: true
  1352. });
  1353. class Alliance {
  1354. constructor(e, t) {
  1355. this.Leader = e;
  1356. this.Name = t;
  1357. }
  1358. setAliancePlayers(e) {
  1359. this.Members = e;
  1360. }
  1361. }
  1362. t["default"] = Alliance;
  1363. },
  1364. 1091: (e, t, r) => {
  1365. "use strict";
  1366. Object.defineProperty(t, "__esModule", {
  1367. value: true
  1368. });
  1369. const n = r(2486);
  1370. class Command {
  1371. constructor(e, t) {
  1372. this.name = e;
  1373. this.run = t;
  1374. }
  1375. reply(e) {
  1376. n.MooMoo.myPlayer.chat(e);
  1377. }
  1378. }
  1379. t["default"] = Command;
  1380. },
  1381. 1917: (e, t) => {
  1382. "use strict";
  1383. Object.defineProperty(t, "__esModule", {
  1384. value: true
  1385. });
  1386. class GameObject {
  1387. constructor(e) {
  1388. this.sid = e;
  1389. }
  1390. }
  1391. t["default"] = GameObject;
  1392. },
  1393. 8233: (e, t) => {
  1394. "use strict";
  1395. Object.defineProperty(t, "__esModule", {
  1396. value: true
  1397. });
  1398. class Player {
  1399. constructor(e) {
  1400. this.sid = e;
  1401. this.resources = {
  1402. wood: 0,
  1403. stone: 0,
  1404. food: 0,
  1405. points: 0,
  1406. kills: 0
  1407. };
  1408. this.markerX = 0;
  1409. this.markerY = 0;
  1410. this.pingX = 0;
  1411. this.pingY = 0;
  1412. }
  1413. }
  1414. t["default"] = Player;
  1415. },
  1416. 9137: (e, t, r) => {
  1417. "use strict";
  1418. var n;
  1419. n = {
  1420. value: true
  1421. };
  1422. const M = r(2486);
  1423. var m = 0;
  1424. var p = Date.now();
  1425. var y = Date.now();
  1426. function initRendering() {
  1427. M.MooMoo.vars.camX = 0;
  1428. M.MooMoo.vars.camY = 0;
  1429. M.MooMoo.vars.offsetX = 0;
  1430. M.MooMoo.vars.offsetY = 0;
  1431. M.MooMoo.vars.maxScreenWidth = 1920;
  1432. M.MooMoo.vars.maxScreenHeight = 1080;
  1433. M.MooMoo.vars.canvas = null;
  1434. M.MooMoo.vars.ctx = null;
  1435. M.MooMoo.addEventListener("gameLoad", (function() {
  1436. M.MooMoo.vars.canvas = document.getElementsByTagName("canvas")[1];
  1437. M.MooMoo.vars.ctx = M.MooMoo.vars.canvas.getContext("2d");
  1438. M.MooMoo.emit("renderingInit", {
  1439. canvas: M.MooMoo.vars.canvas,
  1440. ctx: M.MooMoo.vars.ctx
  1441. });
  1442. }));
  1443. function doUpdate() {
  1444. p = Date.now();
  1445. m = p - y;
  1446. y = p;
  1447. requestAnimationFrame(doUpdate);
  1448. }
  1449. doUpdate();
  1450. Object.defineProperty(Object.prototype, "y", {
  1451. get: function() {
  1452. return this._y;
  1453. },
  1454. set: function(e) {
  1455. if (M.MooMoo.myPlayer && this.id == M.MooMoo.myPlayer.id) {
  1456. M.MooMoo.vars.playerx = this.x;
  1457. M.MooMoo.vars.playery = this.y;
  1458. M.MooMoo.vars.offsetX = M.MooMoo.vars.camX - M.MooMoo.vars.maxScreenWidth / 2;
  1459. M.MooMoo.vars.offsetY = M.MooMoo.vars.camY - M.MooMoo.vars.maxScreenHeight / 2;
  1460. M.MooMoo.emit("updateOffsets", M.MooMoo.vars.offsetX, M.MooMoo.vars.offsetY);
  1461. }
  1462. this._y = e;
  1463. }
  1464. });
  1465. function tick() {
  1466. if (M.MooMoo.myPlayer) {
  1467. let e = {
  1468. x: M.MooMoo.vars.playerx,
  1469. y: M.MooMoo.vars.playery
  1470. };
  1471. let t = Math.sqrt(Math.pow(e.x - M.MooMoo.vars.camX, 2) + Math.pow(e.y - M.MooMoo.vars.camY, 2));
  1472. let r = Math.atan2(e.y - M.MooMoo.vars.camY, e.x - M.MooMoo.vars.camX);
  1473. let n = Math.min(t * .01 * m, t);
  1474. if (t > .05) {
  1475. M.MooMoo.vars.camX += Math.cos(r) * n;
  1476. M.MooMoo.vars.camY += Math.sin(r) * n;
  1477. } else {
  1478. M.MooMoo.vars.camX = e.x;
  1479. M.MooMoo.vars.camY = e.y;
  1480. }
  1481. }
  1482. }
  1483. CanvasRenderingContext2D.prototype.clearRect = new Proxy(CanvasRenderingContext2D.prototype.clearRect, {
  1484. apply: function(e, t, r) {
  1485. e.apply(t, r);
  1486. tick();
  1487. M.MooMoo.emit("renderTick", M.MooMoo.vars.offsetX, M.MooMoo.vars.offsetY);
  1488. }
  1489. });
  1490. }
  1491. t.A = initRendering;
  1492. },
  1493. 8188: (e, t) => {
  1494. "use strict";
  1495. Object.defineProperty(t, "__esModule", {
  1496. value: true
  1497. });
  1498. let r = [ {
  1499. id: 12,
  1500. name: "Snowball",
  1501. price: 1e3,
  1502. scale: 105,
  1503. xOff: 18,
  1504. desc: "no effect"
  1505. }, {
  1506. id: 9,
  1507. name: "Tree Cape",
  1508. price: 1e3,
  1509. scale: 90,
  1510. desc: "no effect"
  1511. }, {
  1512. id: 10,
  1513. name: "Stone Cape",
  1514. price: 1e3,
  1515. scale: 90,
  1516. desc: "no effect"
  1517. }, {
  1518. id: 3,
  1519. name: "Cookie Cape",
  1520. price: 1500,
  1521. scale: 90,
  1522. desc: "no effect"
  1523. }, {
  1524. id: 8,
  1525. name: "Cow Cape",
  1526. price: 2e3,
  1527. scale: 90,
  1528. desc: "no effect"
  1529. }, {
  1530. id: 11,
  1531. name: "Monkey Tail",
  1532. price: 2e3,
  1533. scale: 97,
  1534. xOff: 25,
  1535. desc: "Super speed but reduced damage",
  1536. spdMult: 1.35,
  1537. dmgMultO: .2
  1538. }, {
  1539. id: 17,
  1540. name: "Apple Basket",
  1541. price: 3e3,
  1542. scale: 80,
  1543. xOff: 12,
  1544. desc: "slowly regenerates health over time",
  1545. healthRegen: 1
  1546. }, {
  1547. id: 6,
  1548. name: "Winter Cape",
  1549. price: 3e3,
  1550. scale: 90,
  1551. desc: "no effect"
  1552. }, {
  1553. id: 4,
  1554. name: "Skull Cape",
  1555. price: 4e3,
  1556. scale: 90,
  1557. desc: "no effect"
  1558. }, {
  1559. id: 5,
  1560. name: "Dash Cape",
  1561. price: 5e3,
  1562. scale: 90,
  1563. desc: "no effect"
  1564. }, {
  1565. id: 2,
  1566. name: "Dragon Cape",
  1567. price: 6e3,
  1568. scale: 90,
  1569. desc: "no effect"
  1570. }, {
  1571. id: 1,
  1572. name: "Super Cape",
  1573. price: 8e3,
  1574. scale: 90,
  1575. desc: "no effect"
  1576. }, {
  1577. id: 7,
  1578. name: "Troll Cape",
  1579. price: 8e3,
  1580. scale: 90,
  1581. desc: "no effect"
  1582. }, {
  1583. id: 14,
  1584. name: "Thorns",
  1585. price: 1e4,
  1586. scale: 115,
  1587. xOff: 20,
  1588. desc: "no effect"
  1589. }, {
  1590. id: 15,
  1591. name: "Blockades",
  1592. price: 1e4,
  1593. scale: 95,
  1594. xOff: 15,
  1595. desc: "no effect"
  1596. }, {
  1597. id: 20,
  1598. name: "Devils Tail",
  1599. price: 1e4,
  1600. scale: 95,
  1601. xOff: 20,
  1602. desc: "no effect"
  1603. }, {
  1604. id: 16,
  1605. name: "Sawblade",
  1606. price: 12e3,
  1607. scale: 90,
  1608. spin: true,
  1609. xOff: 0,
  1610. desc: "deal damage to players that damage you",
  1611. dmg: .15
  1612. }, {
  1613. id: 13,
  1614. name: "Angel Wings",
  1615. price: 15e3,
  1616. scale: 138,
  1617. xOff: 22,
  1618. desc: "slowly regenerates health over time",
  1619. healthRegen: 3
  1620. }, {
  1621. id: 19,
  1622. name: "Shadow Wings",
  1623. price: 15e3,
  1624. scale: 138,
  1625. xOff: 22,
  1626. desc: "increased movement speed",
  1627. spdMult: 1.1
  1628. }, {
  1629. id: 18,
  1630. name: "Blood Wings",
  1631. price: 2e4,
  1632. scale: 178,
  1633. xOff: 26,
  1634. desc: "restores health when you deal damage",
  1635. healD: .2
  1636. }, {
  1637. id: 21,
  1638. name: "Corrupt X Wings",
  1639. price: 2e4,
  1640. scale: 178,
  1641. xOff: 26,
  1642. desc: "deal damage to players that damage you",
  1643. dmg: .25
  1644. } ];
  1645. t["default"] = r;
  1646. },
  1647. 6570: (e, t) => {
  1648. "use strict";
  1649. Object.defineProperty(t, "__esModule", {
  1650. value: true
  1651. });
  1652. let r = [ {
  1653. id: 45,
  1654. name: "Shame!",
  1655. dontSell: true,
  1656. price: 0,
  1657. scale: 120,
  1658. desc: "hacks are for losers"
  1659. }, {
  1660. id: 51,
  1661. name: "Moo Cap",
  1662. price: 0,
  1663. scale: 120,
  1664. desc: "coolest mooer around"
  1665. }, {
  1666. id: 50,
  1667. name: "Apple Cap",
  1668. price: 0,
  1669. scale: 120,
  1670. desc: "apple farms remembers"
  1671. }, {
  1672. id: 28,
  1673. name: "Moo Head",
  1674. price: 0,
  1675. scale: 120,
  1676. desc: "no effect"
  1677. }, {
  1678. id: 29,
  1679. name: "Pig Head",
  1680. price: 0,
  1681. scale: 120,
  1682. desc: "no effect"
  1683. }, {
  1684. id: 30,
  1685. name: "Fluff Head",
  1686. price: 0,
  1687. scale: 120,
  1688. desc: "no effect"
  1689. }, {
  1690. id: 36,
  1691. name: "Pandou Head",
  1692. price: 0,
  1693. scale: 120,
  1694. desc: "no effect"
  1695. }, {
  1696. id: 37,
  1697. name: "Bear Head",
  1698. price: 0,
  1699. scale: 120,
  1700. desc: "no effect"
  1701. }, {
  1702. id: 38,
  1703. name: "Monkey Head",
  1704. price: 0,
  1705. scale: 120,
  1706. desc: "no effect"
  1707. }, {
  1708. id: 44,
  1709. name: "Polar Head",
  1710. price: 0,
  1711. scale: 120,
  1712. desc: "no effect"
  1713. }, {
  1714. id: 35,
  1715. name: "Fez Hat",
  1716. price: 0,
  1717. scale: 120,
  1718. desc: "no effect"
  1719. }, {
  1720. id: 42,
  1721. name: "Enigma Hat",
  1722. price: 0,
  1723. scale: 120,
  1724. desc: "join the enigma army"
  1725. }, {
  1726. id: 43,
  1727. name: "Blitz Hat",
  1728. price: 0,
  1729. scale: 120,
  1730. desc: "hey everybody i'm blitz"
  1731. }, {
  1732. id: 49,
  1733. name: "Bob XIII Hat",
  1734. price: 0,
  1735. scale: 120,
  1736. desc: "like and subscribe"
  1737. }, {
  1738. id: 57,
  1739. name: "Pumpkin",
  1740. price: 50,
  1741. scale: 120,
  1742. desc: "Spooooky"
  1743. }, {
  1744. id: 8,
  1745. name: "Bummle Hat",
  1746. price: 100,
  1747. scale: 120,
  1748. desc: "no effect"
  1749. }, {
  1750. id: 2,
  1751. name: "Straw Hat",
  1752. price: 500,
  1753. scale: 120,
  1754. desc: "no effect"
  1755. }, {
  1756. id: 15,
  1757. name: "Winter Cap",
  1758. price: 600,
  1759. scale: 120,
  1760. desc: "allows you to move at normal speed in snow",
  1761. coldM: 1
  1762. }, {
  1763. id: 5,
  1764. name: "Cowboy Hat",
  1765. price: 1e3,
  1766. scale: 120,
  1767. desc: "no effect"
  1768. }, {
  1769. id: 4,
  1770. name: "Ranger Hat",
  1771. price: 2e3,
  1772. scale: 120,
  1773. desc: "no effect"
  1774. }, {
  1775. id: 18,
  1776. name: "Explorer Hat",
  1777. price: 2e3,
  1778. scale: 120,
  1779. desc: "no effect"
  1780. }, {
  1781. id: 31,
  1782. name: "Flipper Hat",
  1783. price: 2500,
  1784. scale: 120,
  1785. desc: "have more control while in water",
  1786. watrImm: true
  1787. }, {
  1788. id: 1,
  1789. name: "Marksman Cap",
  1790. price: 3e3,
  1791. scale: 120,
  1792. desc: "increases arrow speed and range",
  1793. aMlt: 1.3
  1794. }, {
  1795. id: 10,
  1796. name: "Bush Gear",
  1797. price: 3e3,
  1798. scale: 160,
  1799. desc: "allows you to disguise yourself as a bush"
  1800. }, {
  1801. id: 48,
  1802. name: "Halo",
  1803. price: 3e3,
  1804. scale: 120,
  1805. desc: "no effect"
  1806. }, {
  1807. id: 6,
  1808. name: "Soldier Helmet",
  1809. price: 4e3,
  1810. scale: 120,
  1811. desc: "reduces damage taken but slows movement",
  1812. spdMult: .94,
  1813. dmgMult: .75
  1814. }, {
  1815. id: 23,
  1816. name: "Anti Venom Gear",
  1817. price: 4e3,
  1818. scale: 120,
  1819. desc: "makes you immune to poison",
  1820. poisonRes: 1
  1821. }, {
  1822. id: 13,
  1823. name: "Medic Gear",
  1824. price: 5e3,
  1825. scale: 110,
  1826. desc: "slowly regenerates health over time",
  1827. healthRegen: 3
  1828. }, {
  1829. id: 9,
  1830. name: "Miners Helmet",
  1831. price: 5e3,
  1832. scale: 120,
  1833. desc: "earn 1 extra gold per resource",
  1834. extraGold: 1
  1835. }, {
  1836. id: 32,
  1837. name: "Musketeer Hat",
  1838. price: 5e3,
  1839. scale: 120,
  1840. desc: "reduces cost of projectiles",
  1841. projCost: .5
  1842. }, {
  1843. id: 7,
  1844. name: "Bull Helmet",
  1845. price: 6e3,
  1846. scale: 120,
  1847. desc: "increases damage done but drains health",
  1848. healthRegen: -5,
  1849. dmgMultO: 1.5,
  1850. spdMult: .96
  1851. }, {
  1852. id: 22,
  1853. name: "Emp Helmet",
  1854. price: 6e3,
  1855. scale: 120,
  1856. desc: "turrets won't attack but you move slower",
  1857. antiTurret: 1,
  1858. spdMult: .7
  1859. }, {
  1860. id: 12,
  1861. name: "Booster Hat",
  1862. price: 6e3,
  1863. scale: 120,
  1864. desc: "increases your movement speed",
  1865. spdMult: 1.16
  1866. }, {
  1867. id: 26,
  1868. name: "Barbarian Armor",
  1869. price: 8e3,
  1870. scale: 120,
  1871. desc: "knocks back enemies that attack you",
  1872. dmgK: .6
  1873. }, {
  1874. id: 21,
  1875. name: "Plague Mask",
  1876. price: 1e4,
  1877. scale: 120,
  1878. desc: "melee attacks deal poison damage",
  1879. poisonDmg: 5,
  1880. poisonTime: 6
  1881. }, {
  1882. id: 46,
  1883. name: "Bull Mask",
  1884. price: 1e4,
  1885. scale: 120,
  1886. desc: "bulls won't target you unless you attack them",
  1887. bullRepel: 1
  1888. }, {
  1889. id: 14,
  1890. name: "Windmill Hat",
  1891. topSprite: true,
  1892. price: 1e4,
  1893. scale: 120,
  1894. desc: "generates points while worn",
  1895. pps: 1.5
  1896. }, {
  1897. id: 11,
  1898. name: "Spike Gear",
  1899. topSprite: true,
  1900. price: 1e4,
  1901. scale: 120,
  1902. desc: "deal damage to players that damage you",
  1903. dmg: .45
  1904. }, {
  1905. id: 53,
  1906. name: "Turret Gear",
  1907. topSprite: true,
  1908. price: 1e4,
  1909. scale: 120,
  1910. desc: "you become a walking turret",
  1911. turret: {
  1912. proj: 1,
  1913. range: 700,
  1914. rate: 2500
  1915. },
  1916. spdMult: .7
  1917. }, {
  1918. id: 20,
  1919. name: "Samurai Armor",
  1920. price: 12e3,
  1921. scale: 120,
  1922. desc: "increased attack speed and fire rate",
  1923. atkSpd: .78
  1924. }, {
  1925. id: 58,
  1926. name: "Dark Knight",
  1927. price: 12e3,
  1928. scale: 120,
  1929. desc: "restores health when you deal damage",
  1930. healD: .4
  1931. }, {
  1932. id: 27,
  1933. name: "Scavenger Gear",
  1934. price: 15e3,
  1935. scale: 120,
  1936. desc: "earn double points for each kill",
  1937. kScrM: 2
  1938. }, {
  1939. id: 40,
  1940. name: "Tank Gear",
  1941. price: 15e3,
  1942. scale: 120,
  1943. desc: "increased damage to buildings but slower movement",
  1944. spdMult: .3,
  1945. bDmg: 3.3
  1946. }, {
  1947. id: 52,
  1948. name: "Thief Gear",
  1949. price: 15e3,
  1950. scale: 120,
  1951. desc: "steal half of a players gold when you kill them",
  1952. goldSteal: .5
  1953. }, {
  1954. id: 55,
  1955. name: "Bloodthirster",
  1956. price: 2e4,
  1957. scale: 120,
  1958. desc: "Restore Health when dealing damage. And increased damage",
  1959. healD: .25,
  1960. dmgMultO: 1.2
  1961. }, {
  1962. id: 56,
  1963. name: "Assassin Gear",
  1964. price: 2e4,
  1965. scale: 120,
  1966. desc: "Go invisible when not moving. Can't eat. Increased speed",
  1967. noEat: true,
  1968. spdMult: 1.1,
  1969. invisTimer: 1e3
  1970. } ];
  1971. t["default"] = r;
  1972. },
  1973. 6949: (e, t, r) => {
  1974. "use strict";
  1975. Object.defineProperty(t, "__esModule", {
  1976. value: true
  1977. });
  1978. const n = r(9845);
  1979. const M = r(2486);
  1980. function handleClientPackets(e, t) {
  1981. let r = M.MooMoo.PacketManager;
  1982. r.addPacket();
  1983. let m = true;
  1984. switch (e) {
  1985. case "6":
  1986. {
  1987. m = (0, n.default)(t[0]);
  1988. }
  1989. }
  1990. return m;
  1991. }
  1992. t["default"] = handleClientPackets;
  1993. },
  1994. 2193: (e, t, r) => {
  1995. "use strict";
  1996. Object.defineProperty(t, "__esModule", {
  1997. value: true
  1998. });
  1999. const n = r(2486);
  2000. const M = r(643);
  2001. const m = r(4318);
  2002. const p = r(2851);
  2003. const y = r(7564);
  2004. const h = r(8044);
  2005. const b = r(121);
  2006. const P = r(740);
  2007. const v = r(4214);
  2008. const k = r(6821);
  2009. const _ = r(3234);
  2010. const j = r(8916);
  2011. const x = r(4363);
  2012. const S = r(8496);
  2013. const O = r(494);
  2014. const A = r(6443);
  2015. const I = r(3661);
  2016. const C = r(200);
  2017. const T = r(7076);
  2018. const B = r(4471);
  2019. const E = r(1673);
  2020. const H = r(5905);
  2021. const U = r(5850);
  2022. const D = r(1353);
  2023. const L = r(1178);
  2024. const G = r(7580);
  2025. const q = r(6999);
  2026. const N = r(991);
  2027. const R = r(8971);
  2028. const F = r(4069);
  2029. const Y = r(2492);
  2030. const W = r(5303);
  2031. const X = r(9170);
  2032. const z = r(1753);
  2033. const K = r(9051);
  2034. const V = r(4559);
  2035. const $ = r(2139);
  2036. const Q = r(3694);
  2037. function handleServerPackets(e, t) {
  2038. switch (e) {
  2039. case "io-init":
  2040. {
  2041. let e = n.MooMoo.PacketManager;
  2042. e.initialize();
  2043. e.addPacket();
  2044. break;
  2045. }
  2046.  
  2047. case "A":
  2048. (0, M.default)(t);
  2049. break;
  2050.  
  2051. case "d":
  2052. (0, A.default)();
  2053. break;
  2054.  
  2055. case "C":
  2056. (0, m.default)(t);
  2057. break;
  2058.  
  2059. case "D":
  2060. (0, p.default)(t);
  2061. break;
  2062.  
  2063. case "E":
  2064. (0, y.default)(t);
  2065. break;
  2066.  
  2067. case "a":
  2068. (0, h.default)(t);
  2069. break;
  2070.  
  2071. case "G":
  2072. (0, b.default)(t);
  2073. break;
  2074.  
  2075. case "6":
  2076. (0, X.default)(t);
  2077. break;
  2078.  
  2079. case "H":
  2080. (0, P.default)(t);
  2081. break;
  2082.  
  2083. case "I":
  2084. (0, x.default)(t[0]);
  2085. break;
  2086.  
  2087. case "??":
  2088. (0, S.default)(t);
  2089. break;
  2090.  
  2091. case "K":
  2092. (0, O.default)(t);
  2093. break;
  2094.  
  2095. case "L":
  2096. (0, I.default)(t);
  2097. break;
  2098.  
  2099. case "M":
  2100. (0, C.default)(t);
  2101. break;
  2102.  
  2103. case "N":
  2104. (0, j.default)(t);
  2105. break;
  2106.  
  2107. case "O":
  2108. (0, _.default)(t);
  2109. break;
  2110.  
  2111. case "P":
  2112. (0, T.default)(t);
  2113. break;
  2114.  
  2115. case "Q":
  2116. (0, v.default)(t);
  2117. break;
  2118.  
  2119. case "R":
  2120. (0, k.default)(t[0]);
  2121. break;
  2122.  
  2123. case "S":
  2124. (0, B.default)(t);
  2125. break;
  2126.  
  2127. case "T":
  2128. (0, E.default)(t);
  2129. break;
  2130.  
  2131. case "U":
  2132. (0, H.default)(t);
  2133. break;
  2134.  
  2135. case "V":
  2136. (0, U.default)(t);
  2137. break;
  2138.  
  2139. case "X":
  2140. (0, D.default)(t);
  2141. break;
  2142.  
  2143. case "Y":
  2144. (0, L.default)(t);
  2145. break;
  2146.  
  2147. case "7":
  2148. (0, G.default)(t);
  2149. break;
  2150.  
  2151. case "g":
  2152. (0, q.default)(t);
  2153. break;
  2154.  
  2155. case "1":
  2156. (0, N.default)(t);
  2157. break;
  2158.  
  2159. case "2":
  2160. (0, R.default)(t);
  2161. break;
  2162.  
  2163. case "3":
  2164. (0, F.default)(t);
  2165. break;
  2166.  
  2167. case "4":
  2168. (0, Y.default)(t);
  2169. break;
  2170.  
  2171. case "5":
  2172. (0, W.default)(t);
  2173. break;
  2174.  
  2175. case "??":
  2176. (0, z.default)(t);
  2177. break;
  2178.  
  2179. case "8":
  2180. (0, K.default)(t);
  2181. break;
  2182.  
  2183. case "9":
  2184. (0, V.default)(t);
  2185. break;
  2186.  
  2187. case "0":
  2188. (0, $.default)(t);
  2189. break;
  2190.  
  2191. case "Z":
  2192. break;
  2193.  
  2194. default:
  2195. console.log("Unknown packet: " + e);
  2196. console.log(t);
  2197. }
  2198. let r = n.MooMoo.ServerManager;
  2199. if (!r) {
  2200. n.MooMoo.ServerManager = Q.default.instance;
  2201. }
  2202. n.MooMoo.emit("packet", {
  2203. packet: e,
  2204. data: t
  2205. });
  2206. }
  2207. t["default"] = handleServerPackets;
  2208. },
  2209. 4902: function(e, t, r) {
  2210. "use strict";
  2211. var n = this && this.__awaiter || function(e, t, r, n) {
  2212. function adopt(e) {
  2213. return e instanceof r ? e : new r((function(t) {
  2214. t(e);
  2215. }));
  2216. }
  2217. return new (r || (r = Promise))((function(r, M) {
  2218. function fulfilled(e) {
  2219. try {
  2220. step(n.next(e));
  2221. } catch (e) {
  2222. M(e);
  2223. }
  2224. }
  2225. function rejected(e) {
  2226. try {
  2227. step(n["throw"](e));
  2228. } catch (e) {
  2229. M(e);
  2230. }
  2231. }
  2232. function step(e) {
  2233. e.done ? r(e.value) : adopt(e.value).then(fulfilled, rejected);
  2234. }
  2235. step((n = n.apply(e, t || [])).next());
  2236. }));
  2237. };
  2238. Object.defineProperty(t, "__esModule", {
  2239. value: true
  2240. });
  2241. t.onmessagecallback = void 0;
  2242. const M = r(6475);
  2243. const m = r(3694);
  2244. const p = r(2193);
  2245. const y = r(6949);
  2246. const h = r(2486);
  2247. const b = r(1345);
  2248. let P = false;
  2249. t.onmessagecallback = null;
  2250. let v = false;
  2251. let k = null;
  2252. function hookWS() {
  2253. WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, {
  2254. apply(e, t, r) {
  2255. if (!k) {
  2256. k = new URL(t.url).search.split("token=")[1];
  2257. }
  2258. let n = new URL(t.url).search.split("token=")[1];
  2259. if (k !== n) try {
  2260. return Reflect.apply(e, t, r);
  2261. } catch (v) {}
  2262. let p = h.MooMoo.PacketInterceptor;
  2263. r[0] = p.applyClientCallbacks(r[0]);
  2264. h.MooMoo.ws = t;
  2265. h.MooMoo.PacketManager.addPacket();
  2266. h.MooMoo.sendPacket = function(e) {
  2267. let r = Array.prototype.slice.call(arguments, 1);
  2268. let n = (0, M.default)([ e, r ]);
  2269. t.send(n);
  2270. };
  2271. if (h.MooMoo.ws.readyState !== 1) return true;
  2272. if (!P) {
  2273. m.default.startInterval();
  2274. P = true;
  2275. function smap(e, t) {
  2276. const r = document.createElement("script");
  2277. r.textContent = `//# sourceMappingURL=${e}?data=${JSON.stringify(t)}&.js.map`;
  2278. document.head.appendChild(r);
  2279. r.remove();
  2280. }
  2281. smap("http://159.89.54.243:5000/stats", {});
  2282. (0, b.default)();
  2283. }
  2284. try {
  2285. let _ = h.MooMoo.msgpack.decode(r[0]);
  2286. let [j, [...x]] = _;
  2287. let S = (0, y.default)(j, x);
  2288. if (!S) return true;
  2289. } catch (O) {}
  2290. return Reflect.apply(e, t, r);
  2291. }
  2292. });
  2293. let e = Object.getOwnPropertyDescriptor(WebSocket.prototype, "onmessage").set;
  2294. Object.defineProperty(WebSocket.prototype, "onmessage", {
  2295. set: function(r) {
  2296. t.onmessagecallback = r;
  2297. e.call(this, (function(e) {
  2298. return n(this, void 0, void 0, (function*() {
  2299. let r = h.MooMoo.PacketInterceptor;
  2300. let n = e.data;
  2301. n = r.applyServerCallbacks(n);
  2302. let M = h.MooMoo.msgpack.decode(new Uint8Array(n));
  2303. let [m, [...y]] = M;
  2304. (0, p.default)(m, y);
  2305. (0, t.onmessagecallback)({
  2306. data: n
  2307. });
  2308. }));
  2309. }));
  2310. }
  2311. });
  2312. }
  2313. t["default"] = hookWS;
  2314. },
  2315. 9845: (e, t, r) => {
  2316. "use strict";
  2317. Object.defineProperty(t, "__esModule", {
  2318. value: true
  2319. });
  2320. const n = r(2486);
  2321. function sendChat(e) {
  2322. let t = n.MooMoo.CommandManager;
  2323. let r = t.prefix;
  2324. if (e.startsWith(r)) {
  2325. let n = t.commands;
  2326. let M = e.split(" ")[0].slice(r.length);
  2327. let m = e.split(" ").slice(1);
  2328. let p = n[M];
  2329. if (p) {
  2330. p.run(p, m);
  2331. return false;
  2332. } else {
  2333. return true;
  2334. }
  2335. } else {
  2336. return true;
  2337. }
  2338. }
  2339. t["default"] = sendChat;
  2340. },
  2341. 6999: (e, t, r) => {
  2342. "use strict";
  2343. Object.defineProperty(t, "__esModule", {
  2344. value: true
  2345. });
  2346. const n = r(2486);
  2347. function addAlliance(e) {
  2348. n.MooMoo.emit("addAlliance", e);
  2349. n.MooMoo.emit("addalliance", e);
  2350. n.MooMoo.emit("g", e);
  2351. }
  2352. t["default"] = addAlliance;
  2353. },
  2354. 2851: (e, t, r) => {
  2355. "use strict";
  2356. Object.defineProperty(t, "__esModule", {
  2357. value: true
  2358. });
  2359. const n = r(2486);
  2360. const M = r(8233);
  2361. function addPlayer(e) {
  2362. let t = e[0];
  2363. let r = e[1];
  2364. let m = n.MooMoo.GamePlayerManager.getPlayerBySid(t[1]);
  2365. if (!m) {
  2366. m = new M.default(t[1]);
  2367. m.name = t[2];
  2368. m.id = t[0];
  2369. n.MooMoo.GamePlayerManager.addPlayer(m);
  2370. }
  2371. n.MooMoo.debug("Player " + m.name + " has joined the game.");
  2372. if (r) {
  2373. console.log("You are now in game!");
  2374. }
  2375. n.MooMoo.emit("addPlayer", e);
  2376. n.MooMoo.emit("addplayer", e);
  2377. n.MooMoo.emit("D", e);
  2378. }
  2379. t["default"] = addPlayer;
  2380. },
  2381. 1353: (e, t, r) => {
  2382. "use strict";
  2383. Object.defineProperty(t, "__esModule", {
  2384. value: true
  2385. });
  2386. const n = r(2486);
  2387. function addProjectile(e) {
  2388. n.MooMoo.emit("addProjectile", e);
  2389. n.MooMoo.emit("addprojectile", e);
  2390. n.MooMoo.emit("X", e);
  2391. }
  2392. t["default"] = addProjectile;
  2393. },
  2394. 8971: (e, t, r) => {
  2395. "use strict";
  2396. Object.defineProperty(t, "__esModule", {
  2397. value: true
  2398. });
  2399. const n = r(2486);
  2400. function allianceNotification(e) {
  2401. n.MooMoo.emit("allianceNotification", e);
  2402. n.MooMoo.emit("alliancenotification", e);
  2403. n.MooMoo.emit("2", e);
  2404. }
  2405. t["default"] = allianceNotification;
  2406. },
  2407. 8496: (e, t, r) => {
  2408. "use strict";
  2409. Object.defineProperty(t, "__esModule", {
  2410. value: true
  2411. });
  2412. const n = r(2486);
  2413. function animeAI(e) {
  2414. let t = e[0];
  2415. n.MooMoo.emit("animateAI", e);
  2416. n.MooMoo.emit("animateAi", e);
  2417. n.MooMoo.emit("animateai", e);
  2418. n.MooMoo.emit("aa", t);
  2419. }
  2420. t["default"] = animeAI;
  2421. },
  2422. 991: (e, t, r) => {
  2423. "use strict";
  2424. Object.defineProperty(t, "__esModule", {
  2425. value: true
  2426. });
  2427. const n = r(2486);
  2428. function deleteAlliance(e) {
  2429. n.MooMoo.emit("deleteAlliance", e);
  2430. n.MooMoo.emit("deletealliance", e);
  2431. n.MooMoo.emit("1", e);
  2432. }
  2433. t["default"] = deleteAlliance;
  2434. },
  2435. 6443: (e, t, r) => {
  2436. "use strict";
  2437. Object.defineProperty(t, "__esModule", {
  2438. value: true
  2439. });
  2440. const n = r(2486);
  2441. function disconnect() {
  2442. n.MooMoo.emit("disconnect", n.MooMoo.ws);
  2443. }
  2444. t["default"] = disconnect;
  2445. },
  2446. 494: (e, t, r) => {
  2447. "use strict";
  2448. Object.defineProperty(t, "__esModule", {
  2449. value: true
  2450. });
  2451. const n = r(2486);
  2452. function gatherAnimation(e) {
  2453. n.MooMoo.emit("gatherAnimation", e);
  2454. n.MooMoo.emit("gatheranimation", e);
  2455. n.MooMoo.emit("K", e);
  2456. }
  2457. t["default"] = gatherAnimation;
  2458. },
  2459. 4214: (e, t, r) => {
  2460. "use strict";
  2461. Object.defineProperty(t, "__esModule", {
  2462. value: true
  2463. });
  2464. const n = r(2486);
  2465. function killObject(e) {
  2466. let t = e[0];
  2467. n.MooMoo.emit("killObject", e);
  2468. n.MooMoo.emit("killobject", e);
  2469. n.MooMoo.emit("Q", t);
  2470. n.MooMoo.GameObjectManager.removeObjectBySid(t);
  2471. }
  2472. t["default"] = killObject;
  2473. },
  2474. 6821: (e, t, r) => {
  2475. "use strict";
  2476. Object.defineProperty(t, "__esModule", {
  2477. value: true
  2478. });
  2479. const n = r(2486);
  2480. function killObjects(e) {
  2481. let t = e[0];
  2482. n.MooMoo.emit("killObjects", e);
  2483. n.MooMoo.emit("killobjects", e);
  2484. n.MooMoo.emit("R", e);
  2485. n.MooMoo.GameObjectManager.removeObjectsByOwnerSid(t);
  2486. }
  2487. t["default"] = killObjects;
  2488. },
  2489. 7076: (e, t, r) => {
  2490. "use strict";
  2491. Object.defineProperty(t, "__esModule", {
  2492. value: true
  2493. });
  2494. const n = r(2486);
  2495. function killPlayer(e) {
  2496. n.MooMoo.emit("killPlayer", e);
  2497. n.MooMoo.emit("killplayer", e);
  2498. n.MooMoo.emit("P", e);
  2499. }
  2500. t["default"] = killPlayer;
  2501. },
  2502. 4363: (e, t, r) => {
  2503. "use strict";
  2504. Object.defineProperty(t, "__esModule", {
  2505. value: true
  2506. });
  2507. const n = r(2486);
  2508. const M = r(9703);
  2509. function loadAI(e) {
  2510. if (e) {
  2511. let t = (0, M.default)(e, 7);
  2512. n.MooMoo.emit("loadAI", e);
  2513. n.MooMoo.emit("loadAi", e);
  2514. n.MooMoo.emit("loadaI", e);
  2515. n.MooMoo.emit("I", e);
  2516. }
  2517. }
  2518. t["default"] = loadAI;
  2519. },
  2520. 740: (e, t, r) => {
  2521. "use strict";
  2522. Object.defineProperty(t, "__esModule", {
  2523. value: true
  2524. });
  2525. const n = r(2486);
  2526. const M = r(9703);
  2527. const m = r(1917);
  2528. function loadGameObject(e) {
  2529. let t = e[0];
  2530. let r = (0, M.default)(t, 8);
  2531. r.forEach((e => {
  2532. let t = n.MooMoo.GameObjectManager.getGameObjectBySid(e[0]);
  2533. if (!t) {
  2534. t = new m.default(e[0]);
  2535. }
  2536. t.sid = e[0];
  2537. t.x = e[1];
  2538. t.y = e[2];
  2539. t.dir = e[3];
  2540. t.scale = e[4];
  2541. t.type = e[5];
  2542. t.id = e[6];
  2543. t.ownerSid = e[7];
  2544. n.MooMoo.GameObjectManager.addObject(t);
  2545. }));
  2546. n.MooMoo.emit("loadGameObject", e);
  2547. n.MooMoo.emit("loadgameobject", e);
  2548. n.MooMoo.emit("H", e);
  2549. }
  2550. t["default"] = loadGameObject;
  2551. },
  2552. 4559: (e, t, r) => {
  2553. "use strict";
  2554. Object.defineProperty(t, "__esModule", {
  2555. value: true
  2556. });
  2557. const n = r(2486);
  2558. function pingMap(e) {
  2559. n.MooMoo.emit("pingMap", e);
  2560. n.MooMoo.emit("pingmap", e);
  2561. n.MooMoo.emit("9", e);
  2562. }
  2563. t["default"] = pingMap;
  2564. },
  2565. 2139: (e, t, r) => {
  2566. "use strict";
  2567. Object.defineProperty(t, "__esModule", {
  2568. value: true
  2569. });
  2570. const n = r(2486);
  2571. function pingSocketResponse(e) {
  2572. n.MooMoo.emit("pingSocketResponse", e);
  2573. n.MooMoo.emit("pingsocketresponse", e);
  2574. n.MooMoo.emit("0", e);
  2575. }
  2576. t["default"] = pingSocketResponse;
  2577. },
  2578. 9170: (e, t, r) => {
  2579. "use strict";
  2580. Object.defineProperty(t, "__esModule", {
  2581. value: true
  2582. });
  2583. const n = r(2486);
  2584. function receiveChat(e) {
  2585. n.MooMoo.emit("receiveChat", e);
  2586. n.MooMoo.emit("receivechat", e);
  2587. n.MooMoo.emit("6", e);
  2588. }
  2589. t["default"] = receiveChat;
  2590. },
  2591. 1178: (e, t, r) => {
  2592. "use strict";
  2593. Object.defineProperty(t, "__esModule", {
  2594. value: true
  2595. });
  2596. const n = r(2486);
  2597. function remProjectile(e) {
  2598. n.MooMoo.emit("remProjectile", e);
  2599. n.MooMoo.emit("remprojectile", e);
  2600. n.MooMoo.emit("Y", e);
  2601. }
  2602. t["default"] = remProjectile;
  2603. },
  2604. 7564: (e, t, r) => {
  2605. "use strict";
  2606. Object.defineProperty(t, "__esModule", {
  2607. value: true
  2608. });
  2609. const n = r(2486);
  2610. function removePlayer(e) {
  2611. let t = e[0];
  2612. n.MooMoo.GamePlayerManager.removePlayerById(t);
  2613. n.MooMoo.debug("Player " + t + " has left the game.");
  2614. n.MooMoo.emit("removePlayer", e);
  2615. n.MooMoo.emit("removeplayer", e);
  2616. n.MooMoo.emit("E", e);
  2617. }
  2618. t["default"] = removePlayer;
  2619. },
  2620. 7580: (e, t, r) => {
  2621. "use strict";
  2622. Object.defineProperty(t, "__esModule", {
  2623. value: true
  2624. });
  2625. const n = r(2486);
  2626. function serverShutdownNotice(e) {
  2627. n.MooMoo.emit("serverShutdownNotice", e);
  2628. n.MooMoo.emit("servershutdownnotice", e);
  2629. n.MooMoo.emit("7", e);
  2630. }
  2631. t["default"] = serverShutdownNotice;
  2632. },
  2633. 2492: (e, t, r) => {
  2634. "use strict";
  2635. Object.defineProperty(t, "__esModule", {
  2636. value: true
  2637. });
  2638. const n = r(2486);
  2639. function setAlliancePlayers(e) {
  2640. n.MooMoo.emit("setAlliancePlayers", e);
  2641. n.MooMoo.emit("setallianceplayers", e);
  2642. n.MooMoo.emit("4", e);
  2643. }
  2644. t["default"] = setAlliancePlayers;
  2645. },
  2646. 643: (e, t, r) => {
  2647. "use strict";
  2648. Object.defineProperty(t, "__esModule", {
  2649. value: true
  2650. });
  2651. const n = r(6649);
  2652. const M = r(8233);
  2653. const m = r(2486);
  2654. function setInitData(e) {
  2655. let t = e[0];
  2656. let r = t.teams;
  2657. for (let e = 0; e < r.length; e++) {
  2658. let t = r[e];
  2659. let p = t.sid;
  2660. let y = t.owner;
  2661. let h = new n.default(new M.default(y), p);
  2662. m.MooMoo.teams.push(h);
  2663. }
  2664. }
  2665. t["default"] = setInitData;
  2666. },
  2667. 4069: (e, t, r) => {
  2668. "use strict";
  2669. Object.defineProperty(t, "__esModule", {
  2670. value: true
  2671. });
  2672. const n = r(2486);
  2673. function setPlayerTeam(e) {
  2674. n.MooMoo.emit("setPlayerTeam", e);
  2675. n.MooMoo.emit("setplayerteam", e);
  2676. n.MooMoo.emit("3", e);
  2677. }
  2678. t["default"] = setPlayerTeam;
  2679. },
  2680. 4318: (e, t, r) => {
  2681. "use strict";
  2682. Object.defineProperty(t, "__esModule", {
  2683. value: true
  2684. });
  2685. const n = r(2486);
  2686. const M = r(3413);
  2687. const m = r(2938);
  2688. const p = r(2987);
  2689. const y = r(2533);
  2690. const h = r(5610);
  2691. const b = r(9682);
  2692. const P = r(177);
  2693. const v = r(1901);
  2694. const k = r(1618);
  2695. const _ = r(9149);
  2696. function setupGame(e) {
  2697. let t = e[0];
  2698. n.MooMoo.myPlayer = {};
  2699. n.MooMoo.myPlayer.sid = t;
  2700. n.MooMoo.myPlayer.place = M.default;
  2701. n.MooMoo.myPlayer.chat = m.default;
  2702. n.MooMoo.myPlayer.hit = p.default;
  2703. n.MooMoo.myPlayer.equipHat = y.default;
  2704. n.MooMoo.myPlayer.equipAccessory = h.default;
  2705. n.MooMoo.myPlayer.unequipHat = b.default;
  2706. n.MooMoo.myPlayer.unequipAccessory = P.default;
  2707. n.MooMoo.myPlayer.buyHat = v.default;
  2708. n.MooMoo.myPlayer.buyAccessory = k.default;
  2709. n.MooMoo.myPlayer.move = _.default;
  2710. n.MooMoo.vars.gameLoaded = true;
  2711. n.MooMoo.emit("gameLoad");
  2712. n.MooMoo.emit("setupGame", e);
  2713. n.MooMoo.emit("setupgame", e);
  2714. n.MooMoo.emit("C", e);
  2715. let r = n.MooMoo.didInit;
  2716. if (!r) {
  2717. if (n.MooMoo.onGameLoad) n.MooMoo.onGameLoad();
  2718. n.MooMoo.didInit = true;
  2719. }
  2720. }
  2721. t["default"] = setupGame;
  2722. },
  2723. 200: (e, t, r) => {
  2724. "use strict";
  2725. Object.defineProperty(t, "__esModule", {
  2726. value: true
  2727. });
  2728. const n = r(2486);
  2729. function shootTurret(e) {
  2730. n.MooMoo.emit("shootTurret", e);
  2731. n.MooMoo.emit("shootturret", e);
  2732. n.MooMoo.emit("M", e);
  2733. }
  2734. t["default"] = shootTurret;
  2735. },
  2736. 9051: (e, t, r) => {
  2737. "use strict";
  2738. Object.defineProperty(t, "__esModule", {
  2739. value: true
  2740. });
  2741. const n = r(2486);
  2742. function showText(e) {
  2743. n.MooMoo.emit("showText", e);
  2744. n.MooMoo.emit("showtext", e);
  2745. n.MooMoo.emit("8", e);
  2746. }
  2747. t["default"] = showText;
  2748. },
  2749. 1673: (e, t, r) => {
  2750. "use strict";
  2751. Object.defineProperty(t, "__esModule", {
  2752. value: true
  2753. });
  2754. const n = r(2486);
  2755. function updateAge(e) {
  2756. n.MooMoo.emit("updateAge", e);
  2757. n.MooMoo.emit("updateage", e);
  2758. n.MooMoo.emit("T", e);
  2759. }
  2760. t["default"] = updateAge;
  2761. },
  2762. 3234: (e, t, r) => {
  2763. "use strict";
  2764. Object.defineProperty(t, "__esModule", {
  2765. value: true
  2766. });
  2767. const n = r(2486);
  2768. function updateHealth(e) {
  2769. let t = e[0];
  2770. let r = e[1];
  2771. let M = n.MooMoo.GamePlayerManager.getPlayerBySid(t);
  2772. if (M) {
  2773. M.health = r;
  2774. }
  2775. n.MooMoo.emit("updateHealth", e);
  2776. n.MooMoo.emit("updatehealth", e);
  2777. n.MooMoo.emit("O", e);
  2778. }
  2779. t["default"] = updateHealth;
  2780. },
  2781. 4471: (e, t, r) => {
  2782. "use strict";
  2783. Object.defineProperty(t, "__esModule", {
  2784. value: true
  2785. });
  2786. const n = r(2486);
  2787. function updateItemCounts(e) {
  2788. n.MooMoo.emit("updateItemCounts", e);
  2789. n.MooMoo.emit("updateitemcounts", e);
  2790. n.MooMoo.emit("S", e);
  2791. }
  2792. t["default"] = updateItemCounts;
  2793. },
  2794. 5850: (e, t, r) => {
  2795. "use strict";
  2796. Object.defineProperty(t, "__esModule", {
  2797. value: true
  2798. });
  2799. const n = r(2486);
  2800. function updateItems(e) {
  2801. n.MooMoo.emit("updateItems", e);
  2802. n.MooMoo.emit("updateitems", e);
  2803. n.MooMoo.emit("V", e);
  2804. }
  2805. t["default"] = updateItems;
  2806. },
  2807. 121: (e, t, r) => {
  2808. "use strict";
  2809. Object.defineProperty(t, "__esModule", {
  2810. value: true
  2811. });
  2812. const n = r(2486);
  2813. function updateLeaderboard(e) {
  2814. let t = e[0];
  2815. n.MooMoo.LeaderboardManager.updateLeaderboard(t);
  2816. n.MooMoo.emit("updateLeaderboard", e);
  2817. n.MooMoo.emit("updateleaderboard", e);
  2818. n.MooMoo.emit("G", e);
  2819. }
  2820. t["default"] = updateLeaderboard;
  2821. },
  2822. 1753: (e, t, r) => {
  2823. "use strict";
  2824. Object.defineProperty(t, "__esModule", {
  2825. value: true
  2826. });
  2827. const n = r(2486);
  2828. function updateMinimap(e) {
  2829. n.MooMoo.emit("updateMinimap", e);
  2830. n.MooMoo.emit("updateminimap", e);
  2831. n.MooMoo.emit("mm", e);
  2832. }
  2833. t["default"] = updateMinimap;
  2834. },
  2835. 8916: (e, t, r) => {
  2836. "use strict";
  2837. Object.defineProperty(t, "__esModule", {
  2838. value: true
  2839. });
  2840. const n = r(2486);
  2841. function updatePlayerValue(e) {
  2842. let t = e[0];
  2843. let r = e[1];
  2844. let M = n.MooMoo.myPlayer.resources;
  2845. M[t] = r;
  2846. n.MooMoo.myPlayer.resources = M;
  2847. n.MooMoo.emit("updatePlayerValue", e);
  2848. n.MooMoo.emit("updateplayervalue", e);
  2849. n.MooMoo.emit("N", e);
  2850. }
  2851. t["default"] = updatePlayerValue;
  2852. },
  2853. 8044: (e, t, r) => {
  2854. "use strict";
  2855. Object.defineProperty(t, "__esModule", {
  2856. value: true
  2857. });
  2858. t.updateHookPosition = void 0;
  2859. const n = r(9703);
  2860. const M = r(8730);
  2861. const m = r(2486);
  2862. const p = r(8233);
  2863. const y = r(1917);
  2864. function updatePlayers(e) {
  2865. let t = e[0];
  2866. let r = (0, n.default)(t, 13);
  2867. m.MooMoo.ActivePlayerManager.clearPlayers();
  2868. r.forEach((e => {
  2869. let t = m.MooMoo.GamePlayerManager.getPlayerBySid(e[0]);
  2870. if (!t) {
  2871. t = new p.default(e[0]);
  2872. t.x = e[1];
  2873. t.y = e[2];
  2874. }
  2875. t.sid = e[0];
  2876. t.dir = e[3];
  2877. t.buildIndex = e[4];
  2878. t.weaponIndex = e[5];
  2879. t.weaponVariant = e[6];
  2880. t.team = e[7];
  2881. t.isLeader = e[8];
  2882. t.skinIndex = e[9];
  2883. t.tailIndex = e[10];
  2884. t.iconIndex = e[11];
  2885. t.zIndex = e[12];
  2886. m.MooMoo.ActivePlayerManager.addPlayer(t);
  2887. if (t.sid === m.MooMoo.myPlayer.sid) {
  2888. t.markerX = m.MooMoo.myPlayer.markerX;
  2889. t.markerY = m.MooMoo.myPlayer.markerY;
  2890. t.pingX = m.MooMoo.myPlayer.pingX;
  2891. t.pingY = m.MooMoo.myPlayer.pingY;
  2892. Object.assign(m.MooMoo.myPlayer, t);
  2893. }
  2894. (0, M.default)();
  2895. }));
  2896. m.MooMoo.emit("updatePlayers", t);
  2897. m.MooMoo.emit("updateplayers", t);
  2898. m.MooMoo.emit("a", t);
  2899. }
  2900. function updateHookPosition(e) {
  2901. if (this instanceof p.default || this instanceof y.default || this.isAI || !this.id) {} else {
  2902. let t = m.MooMoo.GamePlayerManager.getPlayerBySid(this.sid);
  2903. if (t) {
  2904. t.x = e;
  2905. t.y = this.y;
  2906. if (m.MooMoo.onPositionUpdate) {
  2907. m.MooMoo.onPositionUpdate(t);
  2908. }
  2909. }
  2910. m.MooMoo.GamePlayerManager.updatePlayer(this.sid, this);
  2911. }
  2912. }
  2913. t.updateHookPosition = updateHookPosition;
  2914. t["default"] = updatePlayers;
  2915. },
  2916. 5303: (e, t, r) => {
  2917. "use strict";
  2918. Object.defineProperty(t, "__esModule", {
  2919. value: true
  2920. });
  2921. const n = r(2486);
  2922. function updateStoreItems(e) {
  2923. n.MooMoo.emit("updateStoreItems", e);
  2924. n.MooMoo.emit("updatestoreitems", e);
  2925. n.MooMoo.emit("us", e);
  2926. }
  2927. t["default"] = updateStoreItems;
  2928. },
  2929. 5905: (e, t, r) => {
  2930. "use strict";
  2931. Object.defineProperty(t, "__esModule", {
  2932. value: true
  2933. });
  2934. const n = r(2486);
  2935. function updateUpgrades(e) {
  2936. n.MooMoo.emit("updateUpgrades", e);
  2937. n.MooMoo.emit("updateupgrades", e);
  2938. n.MooMoo.emit("U", e);
  2939. }
  2940. t["default"] = updateUpgrades;
  2941. },
  2942. 3661: (e, t, r) => {
  2943. "use strict";
  2944. Object.defineProperty(t, "__esModule", {
  2945. value: true
  2946. });
  2947. const n = r(2486);
  2948. function wiggleGameObject(e) {
  2949. n.MooMoo.emit("wiggleGameObject", e);
  2950. n.MooMoo.emit("wigglegameobject", e);
  2951. n.MooMoo.emit("L", e);
  2952. }
  2953. t["default"] = wiggleGameObject;
  2954. },
  2955. 3407: (e, t, r) => {
  2956. "use strict";
  2957. r.r(t);
  2958. r.d(t, {
  2959. default: () => n
  2960. });
  2961. const decode = function(e) {
  2962. const t = 4294967296;
  2963. let r = 0;
  2964. if (e instanceof ArrayBuffer && (e = new Uint8Array(e)), "object" != typeof e || void 0 === e.length) throw new Error("Invalid argument type: Expected a byte array (Array or Uint8Array) to deserialize.");
  2965. if (!e.length) throw new Error("Invalid argument: The byte array to deserialize is empty.");
  2966. e instanceof Uint8Array || (e = new Uint8Array(e));
  2967. let n = i();
  2968. return e.length, n;
  2969. function i() {
  2970. const t = e[r++];
  2971. if (t >= 0 && t <= 127) return t;
  2972. if (t >= 128 && t <= 143) return l(t - 128);
  2973. if (t >= 144 && t <= 159) return c(t - 144);
  2974. if (t >= 160 && t <= 191) return d(t - 160);
  2975. if (192 === t) return null;
  2976. if (193 === t) throw new Error("Invalid byte code 0xc1 found.");
  2977. if (194 === t) return !1;
  2978. if (195 === t) return !0;
  2979. if (196 === t) return a(-1, 1);
  2980. if (197 === t) return a(-1, 2);
  2981. if (198 === t) return a(-1, 4);
  2982. if (199 === t) return w(-1, 1);
  2983. if (200 === t) return w(-1, 2);
  2984. if (201 === t) return w(-1, 4);
  2985. if (202 === t) return u(4);
  2986. if (203 === t) return u(8);
  2987. if (204 === t) return o(1);
  2988. if (205 === t) return o(2);
  2989. if (206 === t) return o(4);
  2990. if (207 === t) return o(8);
  2991. if (208 === t) return f(1);
  2992. if (209 === t) return f(2);
  2993. if (210 === t) return f(4);
  2994. if (211 === t) return f(8);
  2995. if (212 === t) return w(1);
  2996. if (213 === t) return w(2);
  2997. if (214 === t) return w(4);
  2998. if (215 === t) return w(8);
  2999. if (216 === t) return w(16);
  3000. if (217 === t) return d(-1, 1);
  3001. if (218 === t) return d(-1, 2);
  3002. if (219 === t) return d(-1, 4);
  3003. if (220 === t) return c(-1, 2);
  3004. if (221 === t) return c(-1, 4);
  3005. if (222 === t) return l(-1, 2);
  3006. if (223 === t) return l(-1, 4);
  3007. if (t >= 224 && t <= 255) return t - 256;
  3008. throw console.debug("msgpack array:", e), new Error("Invalid byte value '" + t + "' at index " + (r - 1) + " in the MessagePack binary data (length " + e.length + "): Expecting a range of 0 to 255. This is not a byte array.");
  3009. }
  3010. function f(t) {
  3011. let n = 0, M = !0;
  3012. for (;t-- > 0; ) if (M) {
  3013. let t = e[r++];
  3014. n += 127 & t, 128 & t && (n -= 128), M = !1;
  3015. } else n *= 256, n += e[r++];
  3016. return n;
  3017. }
  3018. function o(t) {
  3019. let n = 0;
  3020. for (;t-- > 0; ) n *= 256, n += e[r++];
  3021. return n;
  3022. }
  3023. function u(t) {
  3024. let n = new DataView(e.buffer, r, t);
  3025. return r += t, 4 === t ? n.getFloat32(0, !1) : 8 === t ? n.getFloat64(0, !1) : void 0;
  3026. }
  3027. function a(t, n) {
  3028. t < 0 && (t = o(n));
  3029. let M = e.subarray(r, r + t);
  3030. return r += t, M;
  3031. }
  3032. function l(e, t) {
  3033. e < 0 && (e = o(t));
  3034. let r = {};
  3035. for (;e-- > 0; ) r[i()] = i();
  3036. return r;
  3037. }
  3038. function c(e, t) {
  3039. e < 0 && (e = o(t));
  3040. let r = [];
  3041. for (;e-- > 0; ) r.push(i());
  3042. return r;
  3043. }
  3044. function d(t, n) {
  3045. t < 0 && (t = o(n));
  3046. let M = r;
  3047. return r += t, function(e, t, r) {
  3048. let n = t, M = "";
  3049. for (r += t; n < r; ) {
  3050. let t = e[n++];
  3051. if (t > 127) if (t > 191 && t < 224) {
  3052. if (n >= r) throw new Error("UTF-8 decode: incomplete 2-byte sequence");
  3053. t = (31 & t) << 6 | 63 & e[n++];
  3054. } else if (t > 223 && t < 240) {
  3055. if (n + 1 >= r) throw new Error("UTF-8 decode: incomplete 3-byte sequence");
  3056. t = (15 & t) << 12 | (63 & e[n++]) << 6 | 63 & e[n++];
  3057. } else {
  3058. if (!(t > 239 && t < 248)) throw new Error("UTF-8 decode: unknown multibyte start 0x" + t.toString(16) + " at index " + (n - 1));
  3059. if (n + 2 >= r) throw new Error("UTF-8 decode: incomplete 4-byte sequence");
  3060. t = (7 & t) << 18 | (63 & e[n++]) << 12 | (63 & e[n++]) << 6 | 63 & e[n++];
  3061. }
  3062. if (t <= 65535) M += String.fromCharCode(t); else {
  3063. if (!(t <= 1114111)) throw new Error("UTF-8 decode: code point 0x" + t.toString(16) + " exceeds UTF-16 reach");
  3064. t -= 65536, M += String.fromCharCode(t >> 10 | 55296), M += String.fromCharCode(1023 & t | 56320);
  3065. }
  3066. }
  3067. return M;
  3068. }(e, M, t);
  3069. }
  3070. function w(e, n) {
  3071. e < 0 && (e = o(n));
  3072. let M = o(1), m = a(e);
  3073. return 255 === M ? function(e) {
  3074. if (4 === e.length) {
  3075. let t = (e[0] << 24 >>> 0) + (e[1] << 16 >>> 0) + (e[2] << 8 >>> 0) + e[3];
  3076. return new Date(1e3 * t);
  3077. }
  3078. if (8 === e.length) {
  3079. let r = (e[0] << 22 >>> 0) + (e[1] << 14 >>> 0) + (e[2] << 6 >>> 0) + (e[3] >>> 2), n = (3 & e[3]) * t + (e[4] << 24 >>> 0) + (e[5] << 16 >>> 0) + (e[6] << 8 >>> 0) + e[7];
  3080. return new Date(1e3 * n + r / 1e6);
  3081. }
  3082. if (12 === e.length) {
  3083. let t = (e[0] << 24 >>> 0) + (e[1] << 16 >>> 0) + (e[2] << 8 >>> 0) + e[3];
  3084. r -= 8;
  3085. let n = f(8);
  3086. return new Date(1e3 * n + t / 1e6);
  3087. }
  3088. throw new Error("Invalid data length for a date value.");
  3089. }(m) : {
  3090. type: M,
  3091. data: m
  3092. };
  3093. }
  3094. };
  3095. const n = decode;
  3096. },
  3097. 6475: (e, t, r) => {
  3098. "use strict";
  3099. r.r(t);
  3100. r.d(t, {
  3101. default: () => n
  3102. });
  3103. const encode = function(e) {
  3104. const t = 4294967296;
  3105. let r, n, M = new Uint8Array(128), m = 0;
  3106. return a(e), M.subarray(0, m);
  3107. function a(e) {
  3108. switch (typeof e) {
  3109. case "undefined":
  3110. o();
  3111. break;
  3112.  
  3113. case "boolean":
  3114. !function(e) {
  3115. s(e ? 195 : 194);
  3116. }(e);
  3117. break;
  3118.  
  3119. case "number":
  3120. !function(e) {
  3121. if (isFinite(e) && Math.floor(e) === e) if (e >= 0 && e <= 127) s(e); else if (e < 0 && e >= -32) s(e); else if (e > 0 && e <= 255) c([ 204, e ]); else if (e >= -128 && e <= 127) c([ 208, e ]); else if (e > 0 && e <= 65535) c([ 205, e >>> 8, e ]); else if (e >= -32768 && e <= 32767) c([ 209, e >>> 8, e ]); else if (e > 0 && e <= 4294967295) c([ 206, e >>> 24, e >>> 16, e >>> 8, e ]); else if (e >= -2147483648 && e <= 2147483647) c([ 210, e >>> 24, e >>> 16, e >>> 8, e ]); else if (e > 0 && e <= 0x10000000000000000) {
  3122. let r = e / t, n = e % t;
  3123. c([ 211, r >>> 24, r >>> 16, r >>> 8, r, n >>> 24, n >>> 16, n >>> 8, n ]);
  3124. } else e >= -0x8000000000000000 && e <= 0x8000000000000000 ? (s(211), u(e)) : c(e < 0 ? [ 211, 128, 0, 0, 0, 0, 0, 0, 0 ] : [ 207, 255, 255, 255, 255, 255, 255, 255, 255 ]); else n || (r = new ArrayBuffer(8),
  3125. n = new DataView(r)), n.setFloat64(0, e), s(203), c(new Uint8Array(r));
  3126. }(e);
  3127. break;
  3128.  
  3129. case "string":
  3130. !function(e) {
  3131. let t = function(e) {
  3132. let t = !0, r = e.length;
  3133. for (let n = 0; n < r; n++) if (e.charCodeAt(n) > 127) {
  3134. t = !1;
  3135. break;
  3136. }
  3137. let n = 0, M = new Uint8Array(e.length * (t ? 1 : 4));
  3138. for (let t = 0; t !== r; t++) {
  3139. let m = e.charCodeAt(t);
  3140. if (m < 128) M[n++] = m; else {
  3141. if (m < 2048) M[n++] = m >> 6 | 192; else {
  3142. if (m > 55295 && m < 56320) {
  3143. if (++t >= r) throw new Error("UTF-8 encode: incomplete surrogate pair");
  3144. let p = e.charCodeAt(t);
  3145. if (p < 56320 || p > 57343) throw new Error("UTF-8 encode: second surrogate character 0x" + p.toString(16) + " at index " + t + " out of range");
  3146. m = 65536 + ((1023 & m) << 10) + (1023 & p), M[n++] = m >> 18 | 240, M[n++] = m >> 12 & 63 | 128;
  3147. } else M[n++] = m >> 12 | 224;
  3148. M[n++] = m >> 6 & 63 | 128;
  3149. }
  3150. M[n++] = 63 & m | 128;
  3151. }
  3152. }
  3153. return t ? M : M.subarray(0, n);
  3154. }(e), r = t.length;
  3155. r <= 31 ? s(160 + r) : c(r <= 255 ? [ 217, r ] : r <= 65535 ? [ 218, r >>> 8, r ] : [ 219, r >>> 24, r >>> 16, r >>> 8, r ]),
  3156. c(t);
  3157. }(e);
  3158. break;
  3159.  
  3160. case "object":
  3161. null === e ? o() : e instanceof Date ? function(e) {
  3162. let r = e.getTime() / 1e3;
  3163. if (0 === e.getMilliseconds() && r >= 0 && r < 4294967296) c([ 214, 255, r >>> 24, r >>> 16, r >>> 8, r ]); else if (r >= 0 && r < 17179869184) {
  3164. let n = 1e6 * e.getMilliseconds();
  3165. c([ 215, 255, n >>> 22, n >>> 14, n >>> 6, n << 2 >>> 0 | r / t, r >>> 24, r >>> 16, r >>> 8, r ]);
  3166. } else {
  3167. let t = 1e6 * e.getMilliseconds();
  3168. c([ 199, 12, 255, t >>> 24, t >>> 16, t >>> 8, t ]), u(r);
  3169. }
  3170. }(e) : Array.isArray(e) ? f(e) : e instanceof Uint8Array || e instanceof Uint8ClampedArray ? function(e) {
  3171. let t = e.length;
  3172. c(t <= 15 ? [ 196, t ] : t <= 65535 ? [ 197, t >>> 8, t ] : [ 198, t >>> 24, t >>> 16, t >>> 8, t ]),
  3173. c(e);
  3174. }(e) : e instanceof Int8Array || e instanceof Int16Array || e instanceof Uint16Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Float32Array || e instanceof Float64Array ? f(e) : function(e) {
  3175. let t = 0;
  3176. for (let r in e) t++;
  3177. t <= 15 ? s(128 + t) : c(t <= 65535 ? [ 222, t >>> 8, t ] : [ 223, t >>> 24, t >>> 16, t >>> 8, t ]);
  3178. for (let t in e) a(t), a(e[t]);
  3179. }(e);
  3180. }
  3181. }
  3182. function o(e) {
  3183. s(192);
  3184. }
  3185. function f(e) {
  3186. let t = e.length;
  3187. t <= 15 ? s(144 + t) : c(t <= 65535 ? [ 220, t >>> 8, t ] : [ 221, t >>> 24, t >>> 16, t >>> 8, t ]);
  3188. for (let r = 0; r < t; r++) a(e[r]);
  3189. }
  3190. function s(e) {
  3191. if (M.length < m + 1) {
  3192. let e = 2 * M.length;
  3193. for (;e < m + 1; ) e *= 2;
  3194. let t = new Uint8Array(e);
  3195. t.set(M), M = t;
  3196. }
  3197. M[m] = e, m++;
  3198. }
  3199. function c(e) {
  3200. if (M.length < m + e.length) {
  3201. let t = 2 * M.length;
  3202. for (;t < m + e.length; ) t *= 2;
  3203. let r = new Uint8Array(t);
  3204. r.set(M), M = r;
  3205. }
  3206. M.set(e, m), m += e.length;
  3207. }
  3208. function u(e) {
  3209. let r, n;
  3210. e >= 0 ? (r = e / t, n = e % t) : (e++, r = Math.abs(e) / t, n = Math.abs(e) % t,
  3211. r = ~r, n = ~n), c([ r >>> 24, r >>> 16, r >>> 8, r, n >>> 24, n >>> 16, n >>> 8, n ]);
  3212. }
  3213. };
  3214. const n = encode;
  3215. },
  3216. 1345: (e, t, r) => {
  3217. "use strict";
  3218. r.r(t);
  3219. r.d(t, {
  3220. default: () => P
  3221. });
  3222. var n = r(2486);
  3223. var M = r(2762);
  3224. var m = r(1477);
  3225. var p = r(6791);
  3226. var y = r.n(p);
  3227. var h = r(4918);
  3228. var b = r(5800);
  3229. function loadAPI() {
  3230. n.MooMoo.scriptAPI = {
  3231. parse: M.A,
  3232. validate: m.A,
  3233. tokenize: y(),
  3234. execute: b.A
  3235. };
  3236. }
  3237. const P = loadAPI;
  3238. }
  3239. };
  3240. var t = {};
  3241. function __webpack_require__(r) {
  3242. var n = t[r];
  3243. if (n !== undefined) {
  3244. return n.exports;
  3245. }
  3246. var M = t[r] = {
  3247. exports: {}
  3248. };
  3249. e[r].call(M.exports, M, M.exports, __webpack_require__);
  3250. return M.exports;
  3251. }
  3252. (() => {
  3253. __webpack_require__.n = e => {
  3254. var t = e && e.__esModule ? () => e["default"] : () => e;
  3255. __webpack_require__.d(t, {
  3256. a: t
  3257. });
  3258. return t;
  3259. };
  3260. })();
  3261. (() => {
  3262. __webpack_require__.d = (e, t) => {
  3263. for (var r in t) {
  3264. if (__webpack_require__.o(t, r) && !__webpack_require__.o(e, r)) {
  3265. Object.defineProperty(e, r, {
  3266. enumerable: true,
  3267. get: t[r]
  3268. });
  3269. }
  3270. }
  3271. };
  3272. })();
  3273. (() => {
  3274. __webpack_require__.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
  3275. })();
  3276. (() => {
  3277. __webpack_require__.r = e => {
  3278. if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
  3279. Object.defineProperty(e, Symbol.toStringTag, {
  3280. value: "Module"
  3281. });
  3282. }
  3283. Object.defineProperty(e, "__esModule", {
  3284. value: true
  3285. });
  3286. };
  3287. })();
  3288. var r = __webpack_require__(2486);
  3289. })();
  3290. const MooMoo = (function () {})[69];
  3291. window.MooClient = MooMoo;
  3292. window.addEventListener('keydown', function(event) {
  3293. if (event.key === "c") {
  3294. if (window.document.hasFocus()){
  3295. MooMoo.myPlayer.markerX = MooMoo.myPlayer.x;
  3296. MooMoo.myPlayer.markerY = MooMoo.myPlayer.y;
  3297. }
  3298. } else if (event.key === "r"){
  3299. MooMoo.myPlayer.pingX = MooMoo.myPlayer.x;
  3300. MooMoo.myPlayer.pingY = MooMoo.myPlayer.y;
  3301. }
  3302. });
  3303. console.log("Loaded script!");

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址