Mooapi

Updated api for moomoo

目前為 2024-06-13 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/497804/1393551/Mooapi.js

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

QingJ © 2025

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