Facebook
From Toxic Rhinoceros, 4 Years ago, written in JavaScript.
Embed
Download Paste or View Raw
Hits: 157
  1. // ==UserScript==
  2. // @name         Bot na e2
  3. // @version      1.54
  4. // @description  bot na e2
  5. // @author       Wilczur Margonem
  6. // @match        *://*.margonem.pl/
  7. // @grant        none
  8. // ==/UserScript==
  9. (() => {
  10.     function _instanceof(left, right) {
  11.       if (
  12.         right != null &&
  13.         typeof Symbol !== "undefined" &&
  14.         right[Symbol.hasInstance]
  15.       ) {
  16.         return right[Symbol.hasInstance](left);
  17.       } else {
  18.         return left instanceof right;
  19.       }
  20.     }
  21.  
  22.     function _slicedToArray(arr, i) {
  23.       return (
  24.         _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest()
  25.       );
  26.     }
  27.  
  28.     function _nonIterableRest() {
  29.       throw new TypeError("Invalid attempt to destructure non-iterable instance");
  30.     }
  31.  
  32.     function _iterableToArrayLimit(arr, i) {
  33.       var _arr = [];
  34.       var _n = true;
  35.       var _d = false;
  36.       var _e = undefined;
  37.       try {
  38.         for (
  39.           var _i = arr[Symbol.iterator](), _s;
  40.           !(_n = (_s = _i.next()).done);
  41.           _n = true
  42.         ) {
  43.           _arr.push(_s.value);
  44.           if (i && _arr.length === i) break;
  45.         }
  46.       } catch (err) {
  47.         _d = true;
  48.         _e = err;
  49.       } finally {
  50.         try {
  51.           if (!_n && _i["return"] != null) _i["return"]();
  52.         } finally {
  53.           if (_d) throw _e;
  54.         }
  55.       }
  56.       return _arr;
  57.     }
  58.  
  59.     function _arrayWithHoles(arr) {
  60.       if (Array.isArray(arr)) return arr;
  61.     }
  62.  
  63.     function _typeof(obj) {
  64.       if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  65.         _typeof = function _typeof(obj) {
  66.           return typeof obj;
  67.         };
  68.       } else {
  69.         _typeof = function _typeof(obj) {
  70.           return obj &&
  71.             typeof Symbol === "function" &&
  72.             obj.constructor === Symbol &&
  73.             obj !== Symbol.prototype
  74.             ? "symbol"
  75.             : typeof obj;
  76.         };
  77.       }
  78.       return _typeof(obj);
  79.     }
  80.  
  81.     function _classCallCheck(instance, Constructor) {
  82.       if (!_instanceof(instance, Constructor)) {
  83.         throw new TypeError("Cannot call a class as a function");
  84.       }
  85.     }
  86.  
  87.     function _defineProperties(target, props) {
  88.       for (var i = 0; i < props.length; i++) {
  89.         var descriptor = props[i];
  90.         descriptor.enumerable = descriptor.enumerable || false;
  91.         descriptor.configurable = true;
  92.         if ("value" in descriptor) descriptor.writable = true;
  93.         Object.defineProperty(target, descriptor.key, descriptor);
  94.       }
  95.     }
  96.  
  97.     function _createClass(Constructor, protoProps, staticProps) {
  98.       if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  99.       if (staticProps) _defineProperties(Constructor, staticProps);
  100.       return Constructor;
  101.     }
  102.  
  103.     (function() {
  104.       var a =
  105.         /*#__PURE__*/
  106.         (function() {
  107.           "use strict";
  108.  
  109.           function a(_a, b, c, d, e, f) {
  110.             _classCallCheck(this, a);
  111.  
  112.             (this.width = b),
  113.               (this.height = c),
  114.               (this.collisions = this.parseCollisions(_a, b, c)),
  115.               (this.additionalCollisions = f || {}),
  116.               (this.start = this.collisions[d.x][d.y]),
  117.               (this.end = this.collisions[e.x][e.y]),
  118.               (this.start.beginning = !0),
  119.               (this.start.g = 0),
  120.               (this.start.f = this.heuristic(this.start, this.end)),
  121.               (this.end.target = !0),
  122.               (this.end.g = 0),
  123.               this.addNeighbours(),
  124.               (this.openSet = []),
  125.               (this.closedSet = []),
  126.               this.openSet.push(this.start);
  127.           }
  128.  
  129.           _createClass(a, [
  130.             {
  131.               key: "parseCollisions",
  132.               value: function parseCollisions(a, c, d) {
  133.                 var e = Array(c);
  134.  
  135.                 for (var f = 0; f < c; f++) {
  136.                   e[f] = Array(d);
  137.  
  138.                   for (var g = 0; g < d; g++) {
  139.                     e[f][g] = new b(f, g, "0" !== a.charAt(f + g * c));
  140.                   }
  141.                 }
  142.  
  143.                 return e;
  144.               }
  145.             },
  146.             {
  147.               key: "addNeighbours",
  148.               value: function addNeighbours() {
  149.                 for (var _a2 = 0; _a2 < this.width; _a2++) {
  150.                   for (var _b = 0; _b < this.height; _b++) {
  151.                     this.addPointNeighbours(this.collisions[_a2][_b]);
  152.                   }
  153.                 }
  154.               }
  155.             },
  156.             {
  157.               key: "addPointNeighbours",
  158.               value: function addPointNeighbours(a) {
  159.                 var _ref = [a.x, a.y],
  160.                   b = _ref[0],
  161.                   c = _ref[1],
  162.                   d = [];
  163.                 0 < b && d.push(this.collisions[b - 1][c]),
  164.                   0 < c && d.push(this.collisions[b][c - 1]),
  165.                   b < this.width - 1 && d.push(this.collisions[b + 1][c]),
  166.                   c < this.height - 1 && d.push(this.collisions[b][c + 1]),
  167.                   (a.neighbours = d);
  168.               }
  169.             },
  170.             {
  171.               key: "anotherFindPath",
  172.               value: function anotherFindPath() {
  173.                 for (; 0 < this.openSet.length; ) {
  174.                   var _a3 = this.getLowestF(),
  175.                     _b2 = this.openSet[_a3];
  176.  
  177.                   if (_b2 === this.end) return this.reconstructPath();
  178.                   this.openSet.splice(_a3, 1), this.closedSet.push(_b2);
  179.                   var _iteratorNormalCompletion = true;
  180.                   var _didIteratorError = false;
  181.                   var _iteratorError = undefined;
  182.  
  183.                   try {
  184.                     for (
  185.                       var _iterator = _b2.neighbours[Symbol.iterator](), _step;
  186.                       !(_iteratorNormalCompletion = (_step = _iterator.next())
  187.                         .done);
  188.                       _iteratorNormalCompletion = true
  189.                     ) {
  190.                       var _a4 = _step.value;
  191.                       if (this.closedSet.includes(_a4)) continue;
  192.                       else {
  193.                         var c = _b2.g + 1;
  194.                         var d = !1;
  195.                         this.end != this.collisions[_a4.x][_a4.y] &&
  196.                         (this.openSet.includes(_a4) ||
  197.                           _a4.collision ||
  198.                           this.additionalCollisions[_a4.x + 256 * _a4.y])
  199.                           ? c < _a4.g && !_a4.collision && (d = !0)
  200.                           : (this.openSet.push(_a4),
  201.                             (_a4.h = this.heuristic(_a4, this.end)),
  202.                             (d = !0)),
  203.                           d &&
  204.                             ((_a4.previous = _b2),
  205.                             (_a4.g = c),
  206.                             (_a4.f = _a4.g + _a4.h));
  207.                       }
  208.                     }
  209.                   } catch (err) {
  210.                     _didIteratorError = true;
  211.                     _iteratorError = err;
  212.                   } finally {
  213.                     try {
  214.                       if (!_iteratorNormalCompletion && _iterator.return != null) {
  215.                         _iterator.return();
  216.                       }
  217.                     } finally {
  218.                       if (_didIteratorError) {
  219.                         throw _iteratorError;
  220.                       }
  221.                     }
  222.                   }
  223.                 }
  224.               }
  225.             },
  226.             {
  227.               key: "getLowestF",
  228.               value: function getLowestF() {
  229.                 var a = 0;
  230.  
  231.                 for (var _b3 = 0; _b3 < this.openSet.length; _b3++) {
  232.                   this.openSet[_b3].f < this.openSet[a].f && (a = _b3);
  233.                 }
  234.  
  235.                 return a;
  236.               }
  237.             },
  238.             {
  239.               key: "reconstructPath",
  240.               value: function reconstructPath() {
  241.                 var a = [];
  242.  
  243.                 for (var _b4 = this.end; _b4 !== this.start; ) {
  244.                   a.push(_b4), (_b4 = _b4.previous);
  245.                 }
  246.  
  247.                 return a;
  248.               }
  249.             },
  250.             {
  251.               key: "heuristic",
  252.               value: function heuristic(a, b) {
  253.                 return Math.abs(a.x - b.x) + Math.abs(a.y - b.y);
  254.               }
  255.             }
  256.           ]);
  257.  
  258.           return a;
  259.         })();
  260.  
  261.       var b = function b(a, _b5, c) {
  262.         "use strict";
  263.  
  264.         _classCallCheck(this, b);
  265.  
  266.         (this.x = a),
  267.           (this.y = _b5),
  268.           (this.collision = c),
  269.           (this.g = 1e7),
  270.           (this.f = 1e7),
  271.           (this.neighbours = []),
  272.           (this.beginning = !1),
  273.           (this.target = !1),
  274.           (this.previous = void 0);
  275.       };
  276.  
  277.       new /*#__PURE__*/
  278.       ((function() {
  279.         "use strict";
  280.  
  281.         function _class() {
  282.           _classCallCheck(this, _class);
  283.  
  284.           (this.storage = JSON.parse(localStorage.getItem("adi-bot-storage")) || {
  285.             x: 0,
  286.             y: 0,
  287.             name: "",
  288.             minimalized: !1
  289.           }),
  290.             (this.interface =
  291.               "object" == _typeof(window.Engine)
  292.                 ? "ni"
  293.                 : "object" == _typeof(window.g)
  294.                   ? "si"
  295.                   : "none"),
  296.             (this.lootfilterSettings = JSON.parse(
  297.               localStorage.getItem("adi-bot-lootfilterSettings")
  298.             ) || {
  299.               stat: {
  300.                 all: {
  301.                   translation: "\u0141ap wszystkie itemki",
  302.                   active: !0
  303.                 },
  304.                 gold: {
  305.                   translation: "Z\u0142oto",
  306.                   active: !0
  307.                 },
  308.                 quest: {
  309.                   translation: "Questowe",
  310.                   active: !0
  311.                 },
  312.                 runes: {
  313.                   translation: "Runy",
  314.                   active: !0
  315.                 },
  316.                 unique: {
  317.                   translation: "Unikaty",
  318.                   active: !0
  319.                 },
  320.                 heroic: {
  321.                   translation: "Heroiki",
  322.                   active: !0
  323.                 },
  324.                 legendary: {
  325.                   translation: "Legendy",
  326.                   active: !0
  327.                 }
  328.               },
  329.               names: []
  330.             }),
  331.             (this.QuickGroupSettings = JSON.parse(
  332.               localStorage.getItem("adi-bot-QuickGroupSettings12")
  333.             ) || {
  334.               adding: {
  335.                 translation: "Automatycznie dodawaj do grupy znaj/klan",
  336.                 active: !0
  337.               },
  338.               accepting: {
  339.                 translation: "Automatycznie przyjmuj zaproszenia do grupy",
  340.                 active: !0
  341.               },
  342.               reSendingMessage: {
  343.                 translation: "Automatycznie odpisuj innym graczom",
  344.                 active: !0
  345.               }
  346.             }),
  347.             (this.npcToKillId = void 0),
  348.             (this.lastAttackTimestamp = this.timeStamp),
  349.             (this.timerData = JSON.parse(this.getCookie("adi-bot-timer")) || {}),
  350.             (this.refreshTime = [3, 6]),
  351.             (this.delayToRelog = 40),
  352.             (this.waitForNpcRespawn = 120),
  353.             (this.randomAnswers = [
  354.               "nie interesuje mnie to",
  355.               "kiedy\u015B to by\u0142o, nie to co tera",
  356.               "to fajnie",
  357.               "nom",
  358.               "super",
  359.               "co ?",
  360.               "interesuj\u0105ce",
  361.               "bombowo",
  362.               "Bardzo si\u0119 ciesz\u0119.",
  363.               "Xd",
  364.               "co",
  365.               "szkoda",
  366.               "co?",
  367.               "xD",
  368.               "xd",
  369.               "ehhhhhh",
  370.               "heh",
  371.               "fajnie fajnie :]"
  372.             ]),
  373.             (this.answersBeforeAddingToEnemies = [
  374.               "dobra, do wrog\xF3w cie daje :)",
  375.               "koÅ„cze rozmowe, żegnam ;)",
  376.               "nara.",
  377.               "w ty\u0142ku cie mam gosciu, nara",
  378.               "ehh, musze spadać.. elko",
  379.               "nara kole\u017Cko",
  380.               "lecisz do wrogow :P",
  381.               "narka ;)",
  382.               "hehehehhe, narq",
  383.               "ej jeste\u015B?",
  384.               "haha. ;)"
  385.             ]),
  386.             (this.messagesInc =
  387.               JSON.parse(localStorage.getItem("adi-bot-messages")) || {}),
  388.             (this.isHealing = !1),
  389.             (this.isActuallySendingMessage = !1),
  390.             (this.startInctementingLagRefresher = !1),
  391.             (this.incrementValue = 0),
  392.             this.init();
  393.         }
  394.         _createClass(_class, [
  395.           {
  396.             key: "getNpcColsNI",
  397.             value: function getNpcColsNI() {
  398.               var a = {};
  399.  
  400.               var _arr = Object.values(this.npcs);
  401.  
  402.               for (var _i = 0; _i < _arr.length; _i++) {
  403.                 var _arr$_i = _arr[_i],
  404.                   _b6 = _arr$_i.x,
  405.                   c = _arr$_i.y;
  406.                 a[_b6 + 256 * c] = !0;
  407.               }
  408.  
  409.               return a;
  410.             }
  411.           },
  412.           {
  413.             key: "chatParser",
  414.             value: function chatParser() {
  415.               var _this = this;
  416.  
  417.               "ni" === this.interface &&
  418.                 window.API.addCallbackToEvent("newMsg", function(_ref2) {
  419.                   var _ref3 = _slicedToArray(_ref2, 2),
  420.                     a = _ref3[0],
  421.                     b = _ref3[1];
  422.  
  423.                   _this.chatFilter(b);
  424.                 }),
  425.                 "si" === this.interface &&
  426.                   window.g.chat.parsers.push(function(a) {
  427.                     _this.chatFilter(a);
  428.                   });
  429.             }
  430.           },
  431.           {
  432.             key: "chatFilter",
  433.             value: function chatFilter(a) {
  434.               var b = a.n,
  435.                 c = a.t,
  436.                 d = a.ts,
  437.                 e = a.k;
  438.  
  439.               if (
  440.                 "" !== b &&
  441.                 b !== this.hero.nick &&
  442.                 "System" !== b &&
  443.                 !1 !== this.QuickGroupSettings.reSendingMessage.active &&
  444.                 5 >= window.unix_time(!0) - d &&
  445.                 !this.isActuallySendingMessage
  446.               ) {
  447.                 if (
  448.                   void 0 !== this.messagesInc[b + this.world] &&
  449.                   3 < this.messagesInc[b + this.world]
  450.                 )
  451.                   return;
  452.                 c.toLowerCase().includes(this.hero.nick.toLowerCase()) &&
  453.                   0 === e &&
  454.                   this.sendMessage(b, e),
  455.                   3 === e && this.sendMessage(b, e);
  456.               }
  457.             }
  458.           },
  459.           {
  460.             key: "sendMessage",
  461.             value: function sendMessage(a, b) {
  462.               var _this2 = this;
  463.  
  464.               var c =
  465.                 arguments.length > 2 && arguments[2] !== undefined
  466.                   ? arguments[2]
  467.                   : !1;
  468.               var d = arguments.length > 3 ? arguments[3] : undefined;
  469.               (this.isActuallySendingMessage = !0),
  470.                 this.messagesInc[a + this.world] === void 0
  471.                   ? (this.messagesInc[a + this.world] = 1)
  472.                   : this.messagesInc[a + this.world]++,
  473.                 this.saveMessages(),
  474.                 3 < this.messagesInc[a + this.world] && (c = !0),
  475.                 (d = c
  476.                   ? this.answersBeforeAddingToEnemies[
  477.                       Math.floor(
  478.                         Math.random() * this.answersBeforeAddingToEnemies.length
  479.                       )
  480.                     ]
  481.                   : this.randomAnswers[
  482.                       Math.floor(Math.random() * this.randomAnswers.length)
  483.                     ]),
  484.                 3 === b && (d = "@".concat(a.split(" ").join("_"), " ").concat(d)),
  485.                 this.Sleep(1e3 * (Math.floor(11 * Math.random()) + 5)).then(
  486.                   function() {
  487.                     window._g("chat", {
  488.                       c: d
  489.                     }),
  490.                       !0 === c && _this2.addToEnemy(a),
  491.                       (_this2.isActuallySendingMessage = !1);
  492.                   }
  493.                 );
  494.             }
  495.           },
  496.           {
  497.             key: "Sleep",
  498.             value: function Sleep(a) {
  499.               return new Promise(function(b) {
  500.                 setTimeout(function() {
  501.                   b(null);
  502.                 }, a);
  503.               });
  504.             }
  505.           },
  506.           {
  507.             key: "saveMessages",
  508.             value: function saveMessages() {
  509.               localStorage.setItem(
  510.                 "adi-bot-messages",
  511.                 JSON.stringify(this.messagesInc)
  512.               );
  513.             }
  514.           },
  515.           {
  516.             key: "addToEnemy",
  517.             value: function addToEnemy(a) {
  518.               window._g("friends&a=eadd&nick=".concat(a));
  519.             }
  520.           },
  521.           {
  522.             key: "getWay",
  523.             value: function getWay(b, c) {
  524.               return new a(
  525.                 this.collisions,
  526.                 this.map.x,
  527.                 this.map.y,
  528.                 {
  529.                   x: this.hero.x,
  530.                   y: this.hero.y
  531.                 },
  532.                 {
  533.                   x: b,
  534.                   y: c
  535.                 },
  536.                 this.npccol
  537.               ).anotherFindPath();
  538.             }
  539.           },
  540.           {
  541.             key: "goTo",
  542.             value: function goTo(a, b) {
  543.               var c = this.getWay(a, b);
  544.               Array.isArray(c) &&
  545.                 ("ni" === this.interface
  546.                   ? (window.Engine.hero.autoPath = c)
  547.                   : (window.road = c));
  548.             }
  549.           },
  550.           {
  551.             key: "getDistanceToNpc",
  552.             value: function getDistanceToNpc(a, b) {
  553.               var c = this.getWay(a, b);
  554.               return Array.isArray(c) ? c.length : void 0;
  555.             }
  556.           },
  557.           {
  558.             key: "updateCollisions",
  559.             value: function updateCollisions() {
  560.               var a = [],
  561.                 _this$map = this.map,
  562.                 b = _this$map.x,
  563.                 c = _this$map.y;
  564.  
  565.               for (var d = 0; d < c; d++) {
  566.                 for (var _c = 0; _c < b; _c++) {
  567.                   a.push(window.Engine.map.col.check(_c, d));
  568.                 }
  569.               }
  570.  
  571.               return a.join("");
  572.             }
  573.           },
  574.           {
  575.             key: "initBox",
  576.             value: function initBox() {
  577.               var _this3 = this;
  578.  
  579.               var a = document.createElement("div");
  580.               a.classList.add("adi-bot-box"),
  581.                 this.appendText(a, "Wprowad\u017A nazwy elit II:");
  582.               var b = document.createElement("input");
  583.               (b.type = "text"),
  584.                 b.classList.add("adi-bot-input-text"),
  585.                 (b.value = this.storage.name),
  586.                 b.addEventListener("keyup", function() {
  587.                   (_this3.storage.name = b.value), _this3.saveStorage();
  588.                 }),
  589.                 a.appendChild(b),
  590.                 this.appendText(a, "Lootfilter:");
  591.  
  592.               var _arr2 = Object.entries(this.lootfilterSettings.stat);
  593.  
  594.               var _loop = function _loop() {
  595.                 var _arr2$_i = _slicedToArray(_arr2[_i2], 2),
  596.                   b = _arr2$_i[0],
  597.                   _arr2$_i$ = _arr2$_i[1],
  598.                   c = _arr2$_i$.translation,
  599.                   d = _arr2$_i$.active;
  600.  
  601.                 _this3.createCheckBox(a, c, d, function(a) {
  602.                   (_this3.lootfilterSettings.stat[b].active = a),
  603.                     localStorage.setItem(
  604.                       "adi-bot-lootfilterSettings",
  605.                       JSON.stringify(_this3.lootfilterSettings)
  606.                     );
  607.                 });
  608.               };
  609.  
  610.               for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
  611.                 _loop();
  612.               }
  613.  
  614.               this.appendText(a, "\u0141ap itemki po nazwie:");
  615.               var c = document.createElement("input");
  616.               c.classList.add("adi-bot-input-text"),
  617.                 (c.tip = "Oddzielaj przecinkiem!"),
  618.                 (c.type = "text"),
  619.                 (c.value = this.lootfilterSettings.names.join(", ")),
  620.                 c.addEventListener("keyup", function() {
  621.                   var a = c.value.split(",");
  622.  
  623.                   for (var _b7 = 0; _b7 < a.length; _b7++) {
  624.                     a[_b7] = a[_b7].trim();
  625.                   }
  626.  
  627.                   (_this3.lootfilterSettings.names = a),
  628.                     localStorage.setItem(
  629.                       "adi-bot-lootfilterSettings",
  630.                       JSON.stringify(_this3.lootfilterSettings)
  631.                     );
  632.                 }),
  633.                 a.appendChild(c),
  634.                 this.appendText(a, "Ustawienia QG:");
  635.  
  636.               var _arr3 = Object.entries(this.QuickGroupSettings);
  637.  
  638.               var _loop2 = function _loop2() {
  639.                 var _arr3$_i = _slicedToArray(_arr3[_i3], 2),
  640.                   b = _arr3$_i[0],
  641.                   _arr3$_i$ = _arr3$_i[1],
  642.                   c = _arr3$_i$.translation,
  643.                   d = _arr3$_i$.active;
  644.  
  645.                 _this3.createCheckBox(a, c, d, function(a) {
  646.                   (_this3.QuickGroupSettings[b].active = a),
  647.                     localStorage.setItem(
  648.                       "adi-bot-QuickGroupSettings12",
  649.                       JSON.stringify(_this3.QuickGroupSettings)
  650.                     );
  651.                 });
  652.               };
  653.  
  654.               for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
  655.                 _loop2();
  656.               }
  657.  
  658.               this.makeBoxDraggable(a, function() {
  659.                 (_this3.storage.x = parseInt(a.style.left)),
  660.                   (_this3.storage.y = parseInt(a.style.top)),
  661.                   _this3.saveStorage(),
  662.                   window.message(
  663.                     '<span style="color: red">Zapisano pozycj\u0119 okienka :)</span>'
  664.                   );
  665.               }),
  666.                 this.storage.hasOwnProperty("minimalized") ||
  667.                   ((this.storage.minimalized = !1), this.saveStorage()),
  668.                 a.addEventListener("dblclick", function(_ref4) {
  669.                   var b = _ref4.x,
  670.                     c = _ref4.y;
  671.                   !1 === _this3.storage.minimalized
  672.                     ? ((a.style.width = "10px"),
  673.                       (a.style.height = "10px"),
  674.                       (_this3.storage.minimalized = !0),
  675.                       _this3.changeVisibility(a, !0))
  676.                     : ((a.style.width = "360px"),
  677.                       (a.style.height = "290px"),
  678.                       (_this3.storage.minimalized = !1),
  679.                       _this3.changeVisibility(a, !1)),
  680.                     (a.style.left = b - parseInt(a.style.width) / 2 + "px"),
  681.                     (a.style.top = c - parseInt(a.style.height) / 2 + "px"),
  682.                     (_this3.storage.x = parseInt(a.style.left)),
  683.                     (_this3.storage.y = parseInt(a.style.top)),
  684.                     _this3.saveStorage();
  685.                 }),
  686.                 "ni" === this.interface
  687.                   ? document.querySelector(".game-window-positioner").appendChild(a)
  688.                   : document.body.appendChild(a),
  689.                 this.initStyle(),
  690.                 !0 === this.storage.minimalized &&
  691.                   ((a.style.width = "10px"),
  692.                   (a.style.height = "10px"),
  693.                   this.changeVisibility(a, !0));
  694.             }
  695.           },
  696.           {
  697.             key: "changeVisibility",
  698.             value: function changeVisibility(a, b) {
  699.               var _iteratorNormalCompletion2 = true;
  700.               var _didIteratorError2 = false;
  701.               var _iteratorError2 = undefined;
  702.  
  703.               try {
  704.                 for (
  705.                   var _iterator2 = a.childNodes[Symbol.iterator](), _step2;
  706.                   !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done);
  707.                   _iteratorNormalCompletion2 = true
  708.                 ) {
  709.                   var c = _step2.value;
  710.                   c.style.display = !0 === b ? "none" : "";
  711.                 }
  712.               } catch (err) {
  713.                 _didIteratorError2 = true;
  714.                 _iteratorError2 = err;
  715.               } finally {
  716.                 try {
  717.                   if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
  718.                     _iterator2.return();
  719.                   }
  720.                 } finally {
  721.                   if (_didIteratorError2) {
  722.                     throw _iteratorError2;
  723.                   }
  724.                 }
  725.               }
  726.             }
  727.           },
  728.           {
  729.             key: "appendText",
  730.             value: function appendText(a, b) {
  731.               var c = document.createElement("div");
  732.               c.appendChild(document.createTextNode(b)), a.appendChild(c);
  733.             }
  734.           },
  735.           {
  736.             key: "createCheckBox",
  737.             value: function createCheckBox(a, b, c, d) {
  738.               var e = document.createElement("div"),
  739.                 f = document.createElement("input");
  740.               (f.type = "checkbox"),
  741.                 (f.name = b + "adi-bot"),
  742.                 (f.id = b + "adi-bot"),
  743.                 (f.checked = c),
  744.                 e.appendChild(f);
  745.               var g = document.createElement("label");
  746.               g.setAttribute("for", b + "adi-bot"),
  747.                 (g.innerHTML = b),
  748.                 f.addEventListener("change", function() {
  749.                   d(f.checked);
  750.                 }),
  751.                 e.appendChild(g),
  752.                 a.appendChild(e);
  753.             }
  754.           },
  755.           {
  756.             key: "makeBoxDraggable",
  757.             value: function makeBoxDraggable(a, b) {
  758.               $(a).draggable({
  759.                 containment: "window",
  760.                 stop: b
  761.               });
  762.             }
  763.           },
  764.           {
  765.             key: "saveStorage",
  766.             value: function saveStorage() {
  767.               localStorage.setItem("adi-bot-storage", JSON.stringify(this.storage));
  768.             }
  769.           },
  770.           {
  771.             key: "initStyle",
  772.             value: function initStyle() {
  773.               var a = document.createElement("style"),
  774.                 b = "\n            .adi-bot-box {\n                position: absolute;\n                text-align: center;\n                padding: 10px;\n                height: 290px;\n                width: 360px;\n                left: "
  775.                   .concat(this.storage.x, "px;\n                top: ")
  776.                   .concat(
  777.                     this.storage.y,
  778.                     "px;\n                background: #975b83;\n                border: 2px solid white;\n                border-radius: 8px;\n                color: black;\n                z-index: 999;\n            }\n            .adi-bot-input-text {\n                text-align: center;\n                border: 2px solid lightblue;\n                border-radius: 3px;\n                color: black;\n                cursor: text;\n            }\n            "
  779.                   );
  780.               (a.type = "text/css"),
  781.                 a.appendChild(document.createTextNode(b)),
  782.                 document.head.appendChild(a);
  783.             }
  784.           },
  785.           {
  786.             key: "initNewNpc",
  787.             value: function initNewNpc() {
  788.               var _this4 = this;
  789.  
  790.               if (
  791.                 ("ni" === this.interface &&
  792.                   (window.API.addCallbackToEvent("newNpc", function(a) {
  793.                     void 0 !== a && _this4.addNpcs(a.d);
  794.                   }),
  795.                   window.API.addCallbackToEvent("removeNpc", function(a) {
  796.                     void 0 !== a && _this4.removeNpcs(a.d);
  797.                   })),
  798.                 "si" === this.interface)
  799.               ) {
  800.                 var _a5 = window.newNpc;
  801.  
  802.                 window.newNpc = function(b) {
  803.                   if (void 0 !== b) {
  804.                     var _arr4 = Object.entries(b);
  805.  
  806.                     for (var _i4 = 0; _i4 < _arr4.length; _i4++) {
  807.                       var _arr4$_i = _slicedToArray(_arr4[_i4], 2),
  808.                         _a6 = _arr4$_i[0],
  809.                         c = _arr4$_i[1];
  810.  
  811.                       void 0 !== c.del && void 0 !== window.g.npc[_a6]
  812.                         ? _this4.removeNpcs(window.g.npc[_a6], _a6)
  813.                         : void 0 !== c && _this4.addNpcs(c, _a6);
  814.                     }
  815.                   }
  816.  
  817.                   _a5(b);
  818.                 };
  819.               }
  820.             }
  821.           },
  822.           {
  823.             key: "initNewOther",
  824.             value: function initNewOther() {
  825.               var _this5 = this;
  826.  
  827.               if (
  828.                 ("ni" === this.interface &&
  829.                   (this.makeParty(),
  830.                   window.API.addCallbackToEvent("newOther", function(a) {
  831.                     _this5.filterOther(a.d);
  832.                   })),
  833.                 "si" === this.interface)
  834.               ) {
  835.                 this.makeParty();
  836.                 var _a7 = window.newOther;
  837.  
  838.                 window.newOther = function(b) {
  839.                   if ((_a7(b), void 0 !== b)) {
  840.                     var _arr5 = Object.values(b);
  841.  
  842.                     for (var _i5 = 0; _i5 < _arr5.length; _i5++) {
  843.                       var _a8 = _arr5[_i5];
  844.  
  845.                       _this5.filterOther(_a8);
  846.                     }
  847.                   }
  848.                 };
  849.               }
  850.             }
  851.           },
  852.           {
  853.             key: "filterOther",
  854.             value: function filterOther(a) {
  855.               if (a !== void 0) {
  856.                 var _b8 = a.relation,
  857.                   c = a.id;
  858.                 !0 === this.canHeroTryToAttack() &&
  859.                   ["cl", "fr"].includes(_b8) &&
  860.                   !0 === this.QuickGroupSettings.adding.active &&
  861.                   this.sendInviteToParty(c);
  862.               }
  863.             }
  864.           },
  865.           {
  866.             key: "makeParty",
  867.             value: function makeParty() {
  868.               if ("object" != _typeof(this.party)) return this.sendInvites();
  869.               var a =
  870.                 "ni" === this.interface
  871.                   ? this.party.getLeaderId() === this.hero.id
  872.                   : 1 === this.party[this.hero.id].r;
  873.               !0 == a && this.sendInvites();
  874.             }
  875.           },
  876.           {
  877.             key: "sendInvites",
  878.             value: function sendInvites() {
  879.               if (this.others !== void 0) {
  880.                 var _arr6 = Object.values(this.others);
  881.  
  882.                 for (var _i6 = 0; _i6 < _arr6.length; _i6++) {
  883.                   var _a9 = _arr6[_i6];
  884.                   this.filterOther(_a9);
  885.                 }
  886.               }
  887.             }
  888.           },
  889.           {
  890.             key: "sendInviteToParty",
  891.             value: function sendInviteToParty(a) {
  892.               window._g("party&a=inv&id=".concat(a));
  893.             }
  894.           },
  895.           {
  896.             key: "initChecker",
  897.             value: function initChecker() {
  898.               var _this6 = this;
  899.  
  900.               if (
  901.                 (setTimeout(function() {
  902.                   _this6.initChecker();
  903.                 }, 500),
  904.                 !0 === this.dead &&
  905.                   (this.removeNpcsFromThisCharId(this.hero.id), this.logout()),
  906.                 !0 === this.canHeroTryToAttack())
  907.               )
  908.                 try {
  909.                   if (void 0 !== this.npcToKillId) {
  910.                     var _this$npcs$this$npcTo = this.npcs[this.npcToKillId],
  911.                       _a10 = _this$npcs$this$npcTo.x,
  912.                       _b9 = _this$npcs$this$npcTo.y;
  913.                     1 >= Math.abs(this.hero.x - _a10) &&
  914.                     1 >= Math.abs(this.hero.y - _b9)
  915.                       ? 0 < this.timeStamp - this.lastAttackTimestamp &&
  916.                         window._g(
  917.                           "fight&a=attack&ff=1&id=-".concat(this.npcToKillId),
  918.                           function(a) {
  919.                             return a.hasOwnProperty("alert") &&
  920.                               a.alert.includes(
  921.                                 "Przeciwnik walczy ju\u017C z kim\u015B innym"
  922.                               )
  923.                               ? void (_this6.lastAttackTimestamp =
  924.                                   _this6.timeStamp + 2)
  925.                               : void (_this6.lastAttackTimestamp =
  926.                                   _this6.timeStamp + 1);
  927.                           }
  928.                         )
  929.                       : this.goTo(_a10, _b9);
  930.                   } else this.reFindNpcs();
  931.                 } catch (a) {
  932.                   this.npcToKillId = void 0;
  933.                 }
  934.             }
  935.           },
  936.           {
  937.             key: "canHeroTryToAttack",
  938.             value: function canHeroTryToAttack() {
  939.               return !(this.battle || this.dead);
  940.             }
  941.           },
  942.           {
  943.             key: "removeNpcs",
  944.             value: function removeNpcs(a) {
  945.               var b = a.x,
  946.                 c = a.y,
  947.                 d = a.nick,
  948.                 e = a.lvl;
  949.               "ni" === this.interface
  950.                 ? window.Engine.map.col.unset(
  951.                     b,
  952.                     c,
  953.                     window.Engine.map.col.check(b, c)
  954.                   )
  955.                 : window.map.nodes.changeCollision(b, c, 0),
  956.                 this.storage.name !== void 0 &&
  957.                   this.storage.name.toLowerCase().includes(d.toLowerCase()) &&
  958.                   (this.addNpcToTimer(d, e),
  959.                   (this.npcToKillId = void 0),
  960.                   this.reFindNpcs());
  961.             }
  962.           },
  963.           {
  964.             key: "findEilteIIName",
  965.             value: function findEilteIIName(a) {
  966.               var _arr7 = Object.values(this.npcs);
  967.  
  968.               for (var _i7 = 0; _i7 < _arr7.length; _i7++) {
  969.                 var _b10 = _arr7[_i7];
  970.                 var c = _b10.nick,
  971.                   d = _b10.lvl,
  972.                   e = _b10.grp,
  973.                   f = _b10.wt;
  974.                 if (e === a && 19 < f) return [c, d];
  975.               }
  976.             }
  977.           },
  978.           {
  979.             key: "addNpcs",
  980.             value: function addNpcs(a, b) {
  981.               "ni" === this.interface && (b = a.id), this.filterNpc(a, b);
  982.             }
  983.           },
  984.           {
  985.             key: "isNpcFake",
  986.             value: function isNpcFake(a, b) {
  987.               var c = new Image(),
  988.                 d = document.createElement("canvas").getContext("2d"),
  989.                 e = function e() {
  990.                   var a = d.getImageData(Math.floor(d.width / 2), 0, 1, d.height)
  991.                     .data;
  992.  
  993.                   for (var _c2 = 3; _c2 < a.length; _c2 += 4) {
  994.                     if (0 < a[_c2]) return b(!1);
  995.                   }
  996.  
  997.                   return b(!0);
  998.                 };
  999.  
  1000.               (c.onload = function() {
  1001.                 (d.width = this.width),
  1002.                   (d.height = this.height),
  1003.                   d.drawImage(c, 0, 0),
  1004.                   e();
  1005.               }),
  1006.                 (c.src = a);
  1007.             }
  1008.           },
  1009.           {
  1010.             key: "filterNpc",
  1011.             value: function filterNpc(a, b) {
  1012.               var _this7 = this;
  1013.  
  1014.               var c = a.nick,
  1015.                 d = a.icon,
  1016.                 e = a.type,
  1017.                 f = a.wt,
  1018.                 g = a.grp;
  1019.  
  1020.               if (
  1021.                 !((2 !== e && 3 !== e) || 10 > f || void 0 === c) &&
  1022.                 void 0 === this.npcToKillId &&
  1023.                 this.storage.name.toLowerCase().includes(c.toLowerCase()) &&
  1024.                 "" !== this.storage.name &&
  1025.                 null !== this.storage.name
  1026.               ) {
  1027.                 var _a11 = d.includes("/obrazki/npc/")
  1028.                   ? d
  1029.                   : "/obrazki/npc/".concat(d);
  1030.  
  1031.                 this.isNpcFake(_a11, function(a) {
  1032.                   !1 === a &&
  1033.                     ((_this7.npcToKillId =
  1034.                       0 === g
  1035.                         ? parseInt(b)
  1036.                         : parseInt(_this7.findBestNpcFromGrp(g))),
  1037.                     _this7.makeParty());
  1038.                 });
  1039.               }
  1040.             }
  1041.           },
  1042.           {
  1043.             key: "findBestNpcFromGrp",
  1044.             value: function findBestNpcFromGrp(a) {
  1045.               var b,
  1046.                 c = 999999;
  1047.  
  1048.               var _arr8 = Object.entries(this.npcs);
  1049.  
  1050.               for (var _i8 = 0; _i8 < _arr8.length; _i8++) {
  1051.                 var _arr8$_i = _slicedToArray(_arr8[_i8], 2),
  1052.                   d = _arr8$_i[0],
  1053.                   e = _arr8$_i[1];
  1054.  
  1055.                 var f = e.x,
  1056.                   g = e.y,
  1057.                   h = e.grp;
  1058.  
  1059.                 if (a === h) {
  1060.                   var _a12 = this.getDistanceToNpc(f, g);
  1061.  
  1062.                   _a12 < c && ((b = d), (c = _a12));
  1063.                 }
  1064.               }
  1065.  
  1066.               return b;
  1067.             }
  1068.           },
  1069.           {
  1070.             key: "reFindNpcs",
  1071.             value: function reFindNpcs() {
  1072.               var _arr9 = Object.entries(this.npcs);
  1073.  
  1074.               for (var _i9 = 0; _i9 < _arr9.length; _i9++) {
  1075.                 var _arr9$_i = _slicedToArray(_arr9[_i9], 2),
  1076.                   _a13 = _arr9$_i[0],
  1077.                   _b11 = _arr9$_i[1];
  1078.  
  1079.                 this.filterNpc(_b11, _a13);
  1080.               }
  1081.             }
  1082.           },
  1083.           {
  1084.             key: "logout",
  1085.             value: function logout() {
  1086.               this.battle ||
  1087.                 this.loots ||
  1088.                 this.issetMyNpcOnMap ||
  1089.                 this.isHealing ||
  1090.                 (window.location.href = "http://margonem.pl");
  1091.             }
  1092.           },
  1093.           {
  1094.             key: "logIn",
  1095.             value: function logIn(a, b) {
  1096.               if (
  1097.                 ("none" === this.interface ||
  1098.                   void 0 === this.hero.id ||
  1099.                   this.hero.id != a) &&
  1100.                 !(
  1101.                   "none" !== this.interface &&
  1102.                   (this.battle ||
  1103.                     this.loots ||
  1104.                     this.issetMyNpcOnMap ||
  1105.                     this.isHealing)
  1106.                 )
  1107.               )
  1108.                 try {
  1109.                   var c = new Date();
  1110.                   c.setTime(c.getTime() + 259200000),
  1111.                     (document.cookie = "mchar_id="
  1112.                       .concat(a, "; path=/; expires=")
  1113.                       .concat(c.toGMTString(), "; domain=.margonem.pl")),
  1114.                     (window.location.href = "http://".concat(
  1115.                       b.toLowerCase(),
  1116.                       ".margonem.pl"
  1117.                     ));
  1118.                 } catch (a) {}
  1119.             }
  1120.           },
  1121.           {
  1122.             key: "getNewRespawnTime",
  1123.             value: function getNewRespawnTime(a) {
  1124.               return Math.round(
  1125.                 (1 *
  1126.                   (60 *
  1127.                     (200 < a
  1128.                       ? 18
  1129.                       : Math.min(18, 0.7 + 0.18 * a - 45e-5 * a * a)))) /
  1130.                   parseInt(this.serverTimerSpeed)
  1131.               );
  1132.             }
  1133.           },
  1134.           {
  1135.             key: "addNpcToTimer",
  1136.             value: function addNpcToTimer(a, b) {
  1137.               var c = this.mapName;
  1138.               (this.timerData[a + this.world] = {
  1139.                 name: a,
  1140.                 lvl: b,
  1141.                 mapName: c,
  1142.                 nextRespawn: this.timeStamp + this.getNewRespawnTime(b),
  1143.                 charId: this.hero.id,
  1144.                 world: this.world
  1145.               }),
  1146.                 this.saveTimersCookies();
  1147.             }
  1148.           },
  1149.           {
  1150.             key: "deleteNpcFromTimer",
  1151.             value: function deleteNpcFromTimer(a) {
  1152.               this.timerData[a] !== void 0 &&
  1153.                 (delete this.timerData[a], this.saveTimersCookies());
  1154.             }
  1155.           },
  1156.           {
  1157.             key: "removeNpcsFromThisCharId",
  1158.             value: function removeNpcsFromThisCharId(a) {
  1159.               if (void 0 !== a) {
  1160.                 var _arr10 = Object.entries(this.timerData);
  1161.  
  1162.                 for (var _i10 = 0; _i10 < _arr10.length; _i10++) {
  1163.                   var _arr10$_i = _slicedToArray(_arr10[_i10], 2),
  1164.                     _b12 = _arr10$_i[0],
  1165.                     c = _arr10$_i[1];
  1166.  
  1167.                   c.charId == a && this.deleteNpcFromTimer(_b12);
  1168.                 }
  1169.               }
  1170.             }
  1171.           },
  1172.           {
  1173.             key: "checkTimers",
  1174.             value: function checkTimers() {
  1175.               var _arr11 = Object.entries(this.timerData);
  1176.  
  1177.               for (var _i11 = 0; _i11 < _arr11.length; _i11++) {
  1178.                 var _arr11$_i = _slicedToArray(_arr11[_i11], 2),
  1179.                   _a14 = _arr11$_i[0],
  1180.                   _b13 = _arr11$_i[1];
  1181.  
  1182.                 _b13.nextRespawn + this.waitForNpcRespawn < this.timeStamp &&
  1183.                   this.createNewRespawnTime(_a14);
  1184.               }
  1185.             }
  1186.           },
  1187.           {
  1188.             key: "createNewRespawnTime",
  1189.             value: function createNewRespawnTime(a) {
  1190.               var _this8 = this;
  1191.  
  1192.               if (
  1193.                 !(
  1194.                   Object.values(this.npcs).some(function(b) {
  1195.                     return b.nick == _this8.timerData[a].name;
  1196.                   }) || this.timerData[a].charId !== this.hero.id
  1197.                 )
  1198.               ) {
  1199.                 for (; this.timeStamp > this.timerData[a].nextRespawn; ) {
  1200.                   this.timerData[a].nextRespawn += this.getNewRespawnTime(
  1201.                     this.timerData[a].lvl
  1202.                   );
  1203.                 }
  1204.  
  1205.                 this.saveTimersCookies();
  1206.               }
  1207.             }
  1208.           },
  1209.           {
  1210.             key: "isThisHeroIssetInTimer",
  1211.             value: function isThisHeroIssetInTimer(b) {
  1212.               return (
  1213.                 void 0 !== b &&
  1214.                 Object.values(this.timerData).some(function(c) {
  1215.                   return c.charId == b;
  1216.                 })
  1217.               );
  1218.             }
  1219.           },
  1220.           {
  1221.             key: "isntTimersInRange",
  1222.             value: function isntTimersInRange() {
  1223.               var _this9 = this;
  1224.  
  1225.               return Object.values(this.timerData).every(function(b) {
  1226.                 return b.nextRespawn - _this9.timeStamp > _this9.delayToRelog;
  1227.               });
  1228.             }
  1229.           },
  1230.           {
  1231.             key: "checkHeroOnGoodMap",
  1232.             value: function checkHeroOnGoodMap(a) {
  1233.               var _arr12 = Object.entries(this.timerData);
  1234.  
  1235.               for (var _i12 = 0; _i12 < _arr12.length; _i12++) {
  1236.                 var _arr12$_i = _slicedToArray(_arr12[_i12], 2),
  1237.                   _b14 = _arr12$_i[0],
  1238.                   c = _arr12$_i[1];
  1239.  
  1240.                 var d = c.mapName,
  1241.                   e = c.charId;
  1242.                 e == a &&
  1243.                   this.mapName !== void 0 &&
  1244.                   d !== void 0 &&
  1245.                   d !== this.mapName &&
  1246.                   this.deleteNpcFromTimer(_b14);
  1247.               }
  1248.             }
  1249.           },
  1250.           {
  1251.             key: "initTimer",
  1252.             value: function initTimer() {
  1253.               var _this10 = this;
  1254.  
  1255.               if (0 < Object.keys(this.timerData).length)
  1256.                 if ("none" === this.interface) {
  1257.                   if (
  1258.                     Object.values(this.timerData).some(function(b) {
  1259.                       return (
  1260.                         b.nextRespawn - _this10.timeStamp <= _this10.delayToRelog
  1261.                       );
  1262.                     })
  1263.                   ) {
  1264.                     var _Object$values$reduce = Object.values(
  1265.                         this.timerData
  1266.                       ).reduce(function(c, a) {
  1267.                         return c.nextRespawn <= a.nextRespawn ? c : a;
  1268.                       }),
  1269.                       _a15 = _Object$values$reduce.world,
  1270.                       _b15 = _Object$values$reduce.charId;
  1271.  
  1272.                     void 0 !== _b15 && this.logIn(_b15, _a15);
  1273.                   }
  1274.                 } else if (
  1275.                   this.isntTimersInRange() &&
  1276.                   this.isThisHeroIssetInTimer(this.hero.id)
  1277.                 )
  1278.                   this.logout();
  1279.                 else {
  1280.                   this.checkHeroOnGoodMap(this.hero.id);
  1281.  
  1282.                   var _a16 = Object.values(this.timerData).filter(function(b) {
  1283.                     return (
  1284.                       b.nextRespawn - _this10.timeStamp <= _this10.delayToRelog
  1285.                     );
  1286.                   });
  1287.  
  1288.                   if (0 < _a16.length) {
  1289.                     var _a16$reduce = _a16.reduce(function(c, a) {
  1290.                         return c.nextRespawn <= a.nextRespawn ? c : a;
  1291.                       }),
  1292.                       _b16 = _a16$reduce.charId,
  1293.                       c = _a16$reduce.world;
  1294.  
  1295.                     void 0 !== this.hero.id &&
  1296.                       parseInt(_b16) !== this.hero.id &&
  1297.                       this.logIn(_b16, c);
  1298.                   }
  1299.                 }
  1300.               this.checkTimers(),
  1301.                 setTimeout(function() {
  1302.                   _this10.initTimer();
  1303.                 }, 500);
  1304.             }
  1305.           },
  1306.           {
  1307.             key: "saveTimersCookies",
  1308.             value: function saveTimersCookies() {
  1309.               var a = new Date();
  1310.               a.setMonth(a.getMonth() + 1),
  1311.                 this.setCookie(
  1312.                   "adi-bot-timer",
  1313.                   JSON.stringify(this.timerData),
  1314.                   a,
  1315.                   "/",
  1316.                   "margonem.pl"
  1317.                 );
  1318.             }
  1319.           },
  1320.           {
  1321.             key: "randomSeconds",
  1322.             value: function randomSeconds(a, b) {
  1323.               return (
  1324.                 (a *= 60), (b *= 60), Math.floor(Math.random() * (b - a + 1)) + a
  1325.               );
  1326.             }
  1327.           },
  1328.           {
  1329.             key: "randomRefresh",
  1330.             value: function randomRefresh() {
  1331.               var _this$refreshTime = _slicedToArray(this.refreshTime, 2),
  1332.                 a = _this$refreshTime[0],
  1333.                 b = _this$refreshTime[1];
  1334.  
  1335.               setTimeout(function() {
  1336.                 location.href = location.href;
  1337.               }, 1e3 * this.randomSeconds(a, b));
  1338.             }
  1339.           },
  1340.           {
  1341.             key: "getCookie",
  1342.             value: function getCookie(a) {
  1343.               var b = document.cookie,
  1344.                 c = a + "=";
  1345.               var d = b.indexOf("; " + c);
  1346.               if (-1 != d) d += 2;
  1347.               else if (((d = b.indexOf(c)), 0 != d)) return null;
  1348.               var e = document.cookie.indexOf(";", d);
  1349.               return (
  1350.                 -1 == e && (e = b.length), unescape(b.substring(d + c.length, e))
  1351.               );
  1352.             }
  1353.           },
  1354.           {
  1355.             key: "setCookie",
  1356.             value: function setCookie(a, b, c, d, e, f) {
  1357.               var g =
  1358.                 a +
  1359.                 "=" +
  1360.                 escape(b) +
  1361.                 (c ? "; expires=" + c.toGMTString() : "") +
  1362.                 (d ? "; path=" + d : "") +
  1363.                 (e ? "; domain=" + e : "") +
  1364.                 (f ? "; secure" : "");
  1365.               document.cookie = g;
  1366.             }
  1367.           },
  1368.           {
  1369.             key: "createTimerOnMainPage",
  1370.             value: function createTimerOnMainPage() {
  1371.               var _this11 = this;
  1372.  
  1373.               if (0 === Object.keys(this.timerData).length) return;
  1374.               var a = document.createElement("div");
  1375.               a.classList.add("adi-bot-minutnik-strona-glowna"),
  1376.                 document.querySelector(".rmenu").appendChild(a);
  1377.               var b = document.createElement("style");
  1378.               (b.type = "text/css"),
  1379.                 b.appendChild(
  1380.                   document.createTextNode(
  1381.                     "\n            .adi-bot-minutnik-strona-glowna {\n                color: white;\n                font-size: 14px;\n                text-align: left;\n            }\n\n            .timer_data {\n                font-weight: bold;\n                float: right;\n                cursor: pointer;\n            }\n\n            .timer_data:hover {\n                color: gray;\n            }\n\n            .adi-bot-konfiguracja {\n\n            }\n        "
  1382.                   )
  1383.                 ),
  1384.                 document.head.appendChild(b),
  1385.                 this.addNpcsToTimerBox(a),
  1386.                 document.addEventListener("click", function(a) {
  1387.                   try {
  1388.                     if ("timer_data" === a.target.className) {
  1389.                       var _a$target$getAttribut = a.target
  1390.                           .getAttribute("timer-data")
  1391.                           .split("|"),
  1392.                         _a$target$getAttribut2 = _slicedToArray(
  1393.                           _a$target$getAttribut,
  1394.                           2
  1395.                         ),
  1396.                         _b17 = _a$target$getAttribut2[0],
  1397.                         c = _a$target$getAttribut2[1];
  1398.  
  1399.                       c !== void 0 &&
  1400.                         _b17 !== void 0 &&
  1401.                         (_this11.deleteNpcFromTimer(_b17 + c),
  1402.                         window.showMsg(
  1403.                           "Usuni\u0119to "
  1404.                             .concat(_b17, " ze \u015Bwiata ")
  1405.                             .concat(c.charAt(0).toUpperCase() + c.slice(1), ".")
  1406.                         ));
  1407.                     }
  1408.                   } catch (a) {}
  1409.                 });
  1410.             }
  1411.           },
  1412.           {
  1413.             key: "addNpcsToTimerBox",
  1414.             value: function addNpcsToTimerBox(a) {
  1415.               var _this12 = this;
  1416.  
  1417.               var b = {};
  1418.  
  1419.               var _arr13 = Object.values(this.timerData);
  1420.  
  1421.               for (var _i13 = 0; _i13 < _arr13.length; _i13++) {
  1422.                 var _c3 = _arr13[_i13];
  1423.                 var _a17 = _c3.name,
  1424.                   d = _c3.nextRespawn,
  1425.                   e = _c3.world;
  1426.                 b[e] === void 0
  1427.                   ? (b[e] = [
  1428.                       {
  1429.                         name: _a17,
  1430.                         nextRespawn: d
  1431.                       }
  1432.                     ])
  1433.                   : b[e].push({
  1434.                       name: _a17,
  1435.                       nextRespawn: d
  1436.                     });
  1437.               }
  1438.  
  1439.               var c = "";
  1440.  
  1441.               var _arr14 = Object.entries(b);
  1442.  
  1443.               for (var _i14 = 0; _i14 < _arr14.length; _i14++) {
  1444.                 var _arr14$_i = _slicedToArray(_arr14[_i14], 2),
  1445.                   d = _arr14$_i[0],
  1446.                   e = _arr14$_i[1];
  1447.  
  1448.                 (c += '<br><div style="text-align: center; font-weight: bold; text-decoration: underline">'.concat(
  1449.                   this.capitalizeWorld(d),
  1450.                   "</div>"
  1451.                 )),
  1452.                   e.sort(function(a, b) {
  1453.                     return a.nextRespawn - b.nextRespawn;
  1454.                   });
  1455.                 var _a18 = [];
  1456.  
  1457.                 _a18.push("");
  1458.  
  1459.                 var _iteratorNormalCompletion3 = true;
  1460.                 var _didIteratorError3 = false;
  1461.                 var _iteratorError3 = undefined;
  1462.  
  1463.                 try {
  1464.                   for (
  1465.                     var _iterator3 = e[Symbol.iterator](), _step3;
  1466.                     !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next())
  1467.                       .done);
  1468.                     _iteratorNormalCompletion3 = true
  1469.                   ) {
  1470.                     var _b18 = _step3.value;
  1471.                     var _c4 = _b18.name,
  1472.                       _e2 = _b18.nextRespawn;
  1473.  
  1474.                     _a18.push(
  1475.                       "<span>"
  1476.                         .concat(
  1477.                           this.getTimeToRespawn(_c4, _e2),
  1478.                           '</span><span class="timer_data" tip="Kliknij, aby usun\u0105\u0107 z timera." timer-data="'
  1479.                         )
  1480.                         .concat(_c4, "|")
  1481.                         .concat(d, '">---</span>')
  1482.                     );
  1483.                   }
  1484.                 } catch (err) {
  1485.                   _didIteratorError3 = true;
  1486.                   _iteratorError3 = err;
  1487.                 } finally {
  1488.                   try {
  1489.                     if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
  1490.                       _iterator3.return();
  1491.                     }
  1492.                   } finally {
  1493.                     if (_didIteratorError3) {
  1494.                       throw _iteratorError3;
  1495.                     }
  1496.                   }
  1497.                 }
  1498.  
  1499.                 _a18.push(""), (c += _a18.join("<hr>"));
  1500.               }
  1501.  
  1502.               (a.innerHTML = c),
  1503.                 setTimeout(function() {
  1504.                   _this12.addNpcsToTimerBox(a);
  1505.                 }, 1e3);
  1506.             }
  1507.           },
  1508.           {
  1509.             key: "capitalizeWorld",
  1510.             value: function capitalizeWorld(a) {
  1511.               return a.charAt(0).toUpperCase() + a.slice(1) + ":";
  1512.             }
  1513.           },
  1514.           {
  1515.             key: "getTimeToRespawn",
  1516.             value: function getTimeToRespawn(a, b) {
  1517.               var c = b - this.timeStamp,
  1518.                 d =
  1519.                   10 > parseInt(c / 60)
  1520.                     ? "0".concat(parseInt(c / 60))
  1521.                     : parseInt(c / 60),
  1522.                 e = 10 > c % 60 ? "0".concat(c % 60) : c % 60;
  1523.               return ""
  1524.                 .concat(a, ": ")
  1525.                 .concat(d, ":")
  1526.                 .concat(e);
  1527.             }
  1528.           },
  1529.           {
  1530.             key: "removeLockAdding",
  1531.             value: function removeLockAdding() {
  1532.               "ni" === this.interface &&
  1533.                 (window.Engine.lock.add = Function.prototype),
  1534.                 "si" === this.interface && (window.g.lock.add = Function.prototype),
  1535.                 (window.mAlert = Function.prototype);
  1536.             }
  1537.           },
  1538.           {
  1539.             key: "initLagRefresher",
  1540.             value: function initLagRefresher() {
  1541.               var _this13 = this;
  1542.  
  1543.               !1 === this.startInctementingLagRefresher &&
  1544.                 ((this.startInctementingLagRefresher = !0),
  1545.                 setInterval(function() {
  1546.                   _this13.incrementValue++,
  1547.                     8 < _this13.incrementValue && (location.href = location.href);
  1548.                 }, 500));
  1549.               var a = this,
  1550.                 b = window.$.ajax;
  1551.  
  1552.               window.$.ajax = function() {
  1553.                 for (
  1554.                   var _len = arguments.length, c = new Array(_len), _key = 0;
  1555.                   _key < _len;
  1556.                   _key++
  1557.                 ) {
  1558.                   c[_key] = arguments[_key];
  1559.                 }
  1560.  
  1561.                 if (c[0].url.includes("engine?t=")) {
  1562.                   var _b19 = c[0].success;
  1563.  
  1564.                   c[0].success = function() {
  1565.                     for (
  1566.                       var _len2 = arguments.length, c = new Array(_len2), _key2 = 0;
  1567.                       _key2 < _len2;
  1568.                       _key2++
  1569.                     ) {
  1570.                       c[_key2] = arguments[_key2];
  1571.                     }
  1572.  
  1573.                     var d =
  1574.                         "object" == _typeof(c[0]) &&
  1575.                         null !== c[0] &&
  1576.                         "ok" === c[0].e,
  1577.                       e = _b19.apply(_this13, c);
  1578.  
  1579.                     return d && a.parseAjaxData(c[0]), e;
  1580.                   };
  1581.                 }
  1582.  
  1583.                 return b.apply(_this13, c);
  1584.               };
  1585.             }
  1586.           },
  1587.           {
  1588.             key: "parseAjaxData",
  1589.             value: function parseAjaxData(a) {
  1590.               if (
  1591.                 (((a.hasOwnProperty("d") && "stop" === a.d) ||
  1592.                   (a.hasOwnProperty("t") && "stop" === a.t)) &&
  1593.                   this.Sleep(2500).then(function() {
  1594.                     location.href = location.href;
  1595.                   }),
  1596.                 (this.incrementValue = 0),
  1597.                 a.hasOwnProperty("loot") &&
  1598.                   a.hasOwnProperty("item") &&
  1599.                   a.loot.hasOwnProperty("init") &&
  1600.                   a.loot.hasOwnProperty("source") &&
  1601.                   0 < a.loot.init &&
  1602.                   "fight" === a.loot.source)
  1603.               ) {
  1604.                 var _b20 = [],
  1605.                   c = [];
  1606.  
  1607.                 var _arr15 = Object.entries(a.item);
  1608.  
  1609.                 for (var _i15 = 0; _i15 < _arr15.length; _i15++) {
  1610.                   var _arr15$_i = _slicedToArray(_arr15[_i15], 2),
  1611.                     d = _arr15$_i[0],
  1612.                     e = _arr15$_i[1];
  1613.  
  1614.                   var _a19 = e.stat,
  1615.                     f = e.name;
  1616.                   !0 === this.isGoodItem(_a19, f) ? _b20.push(d) : c.push(d);
  1617.                 }
  1618.  
  1619.                 this.sendLoots(_b20, c);
  1620.               }
  1621.  
  1622.               a.hasOwnProperty("f") &&
  1623.                 a.f.hasOwnProperty("move") &&
  1624.                 a.f.hasOwnProperty("current") &&
  1625.                 0 === a.f.current &&
  1626.                 -1 === a.f.move &&
  1627.                 (this.closeBattle(), a.f.hasOwnProperty("w") && this.autoHeal()),
  1628.                 a.hasOwnProperty("event_done") && this.autoHeal(),
  1629.                 a.hasOwnProperty("ask") &&
  1630.                   a.ask.hasOwnProperty("re") &&
  1631.                   "party&a=accept&answer=" === a.ask.re &&
  1632.                   !0 === this.QuickGroupSettings.accepting.active &&
  1633.                   window._g("party&a=accept&answer=1");
  1634.             }
  1635.           },
  1636.           {
  1637.             key: "isGoodItem",
  1638.             value: function isGoodItem(a, b) {
  1639.               if (!0 === this.lootfilterSettings.stat.all.active) return !0;
  1640.               var c = [];
  1641.  
  1642.               var _arr16 = Object.entries(this.lootfilterSettings.stat);
  1643.  
  1644.               for (var _i16 = 0; _i16 < _arr16.length; _i16++) {
  1645.                 var _arr16$_i = _slicedToArray(_arr16[_i16], 2),
  1646.                   _d2 = _arr16$_i[0],
  1647.                   e = _arr16$_i[1].active;
  1648.  
  1649.                 !0 === e && c.push(_d2);
  1650.               }
  1651.  
  1652.               var d = this.lootfilterSettings.names;
  1653.  
  1654.               for (var _i17 = 0; _i17 < c.length; _i17++) {
  1655.                 var _d3 = c[_i17];
  1656.                 if (a.includes(_d3)) return !0;
  1657.               }
  1658.  
  1659.               var _iteratorNormalCompletion4 = true;
  1660.               var _didIteratorError4 = false;
  1661.               var _iteratorError4 = undefined;
  1662.  
  1663.               try {
  1664.                 for (
  1665.                   var _iterator4 = d[Symbol.iterator](), _step4;
  1666.                   !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done);
  1667.                   _iteratorNormalCompletion4 = true
  1668.                 ) {
  1669.                   var _c5 = _step4.value;
  1670.                   if (b.toLowerCase() === _c5.toLowerCase()) return !0;
  1671.                 }
  1672.               } catch (err) {
  1673.                 _didIteratorError4 = true;
  1674.                 _iteratorError4 = err;
  1675.               } finally {
  1676.                 try {
  1677.                   if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
  1678.                     _iterator4.return();
  1679.                   }
  1680.                 } finally {
  1681.                   if (_didIteratorError4) {
  1682.                     throw _iteratorError4;
  1683.                   }
  1684.                 }
  1685.               }
  1686.  
  1687.               return !1;
  1688.             }
  1689.           },
  1690.           {
  1691.             key: "sendLoots",
  1692.             value: function sendLoots(a, b) {
  1693.               window._g(
  1694.                 "loot&not="
  1695.                   .concat(b.join(","), "&want=&must=")
  1696.                   .concat(a.join(","), "&final=1")
  1697.               ),
  1698.                 "si" === this.interface &&
  1699.                   (document.querySelector("#loots").style.display = "none");
  1700.             }
  1701.           },
  1702.           {
  1703.             key: "closeBattle",
  1704.             value: function closeBattle() {
  1705.               window._g("fight&a=quit"),
  1706.                 "si" === this.interface &&
  1707.                   (document.querySelector("#battle").style.display = "none");
  1708.             }
  1709.           },
  1710.           {
  1711.             key: "autoHeal",
  1712.             value: function autoHeal() {
  1713.               var _this14 = this;
  1714.  
  1715.               if (this.dead) return;
  1716.               var a =
  1717.                 "ni" === this.interface
  1718.                   ? window.Engine.hero.d.warrior_stats
  1719.                   : window.hero;
  1720.               if (a.hp === a.maxhp) return (this.isHealing = !1);
  1721.               this.isHealing = !0;
  1722.               var b = [],
  1723.                 c = [];
  1724.               var d = !1;
  1725.               var _iteratorNormalCompletion5 = true;
  1726.               var _didIteratorError5 = false;
  1727.               var _iteratorError5 = undefined;
  1728.  
  1729.               try {
  1730.                 for (
  1731.                   var _iterator5 = this.items[Symbol.iterator](), _step5;
  1732.                   !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done);
  1733.                   _iteratorNormalCompletion5 = true
  1734.                 ) {
  1735.                   var e = _step5.value;
  1736.                   var f = e.stat,
  1737.                     g = e.loc,
  1738.                     h = e.name;
  1739.  
  1740.                   if ("g" === g) {
  1741.                     var _this$parseItemStat = this.parseItemStat(f),
  1742.                       _g = _this$parseItemStat.timelimit,
  1743.                       i = _this$parseItemStat.lvl,
  1744.                       j = _this$parseItemStat.leczy,
  1745.                       k = _this$parseItemStat.fullheal;
  1746.  
  1747.                     if (_g !== void 0 && _g.includes(",")) continue;
  1748.                     if (void 0 !== i && i > a.lvl) continue;
  1749.                     j !== void 0 && (j <= a.maxhp - a.hp ? c.push(e) : (d = !0)),
  1750.                       "Czarna per\u0142a \u017Cycia" === h &&
  1751.                         (16e3 <= a.maxhp - a.hp ? c.push(e) : (d = !0)),
  1752.                       k !== void 0 && b.push(e);
  1753.                   }
  1754.                 }
  1755.               } catch (err) {
  1756.                 _didIteratorError5 = true;
  1757.                 _iteratorError5 = err;
  1758.               } finally {
  1759.                 try {
  1760.                   if (!_iteratorNormalCompletion5 && _iterator5.return != null) {
  1761.                     _iterator5.return();
  1762.                   }
  1763.                 } finally {
  1764.                   if (_didIteratorError5) {
  1765.                     throw _iteratorError5;
  1766.                   }
  1767.                 }
  1768.               }
  1769.  
  1770.               if (0 < c.length) {
  1771.                 var _a20 = c.sort(function(a, b) {
  1772.                   return (
  1773.                     _this14.parseItemStat(b.stat).leczy -
  1774.                     _this14.parseItemStat(a.stat).leczy
  1775.                   );
  1776.                 });
  1777.  
  1778.                 this.useItem(_a20[0].id, function() {
  1779.                   _this14.Sleep(100).then(function() {
  1780.                     _this14.autoHeal();
  1781.                   });
  1782.                 });
  1783.               } else
  1784.                 0 < b.length
  1785.                   ? this.useItem(b[0].id, function() {
  1786.                       _this14.Sleep(100).then(function() {
  1787.                         _this14.autoHeal();
  1788.                       });
  1789.                     })
  1790.                   : !1 == d &&
  1791.                     window.message(
  1792.                       '<span style="color: red">Brakuje Ci potek!</span>'
  1793.                     );
  1794.  
  1795.               this.isHealing = !1;
  1796.             }
  1797.           },
  1798.           {
  1799.             key: "parseItemStat",
  1800.             value: function parseItemStat(a) {
  1801.               var b = {},
  1802.                 c = a.split(";");
  1803.               var _iteratorNormalCompletion6 = true;
  1804.               var _didIteratorError6 = false;
  1805.               var _iteratorError6 = undefined;
  1806.  
  1807.               try {
  1808.                 for (
  1809.                   var _iterator6 = c[Symbol.iterator](), _step6;
  1810.                   !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done);
  1811.                   _iteratorNormalCompletion6 = true
  1812.                 ) {
  1813.                   var d = _step6.value;
  1814.  
  1815.                   var _d$split = d.split("="),
  1816.                     _d$split2 = _slicedToArray(_d$split, 2),
  1817.                     _a21 = _d$split2[0],
  1818.                     _c6 = _d$split2[1];
  1819.  
  1820.                   b[_a21] = _c6;
  1821.                 }
  1822.               } catch (err) {
  1823.                 _didIteratorError6 = true;
  1824.                 _iteratorError6 = err;
  1825.               } finally {
  1826.                 try {
  1827.                   if (!_iteratorNormalCompletion6 && _iterator6.return != null) {
  1828.                     _iterator6.return();
  1829.                   }
  1830.                 } finally {
  1831.                   if (_didIteratorError6) {
  1832.                     throw _iteratorError6;
  1833.                   }
  1834.                 }
  1835.               }
  1836.  
  1837.               return b;
  1838.             }
  1839.           },
  1840.           {
  1841.             key: "useItem",
  1842.             value: function useItem(a, b) {
  1843.               window._g("moveitem&id=".concat(a, "&st=1"), b);
  1844.             }
  1845.           },
  1846.           {
  1847.             key: "init",
  1848.             value: function init() {
  1849.               if ((this.initTimer(), "none" === this.interface))
  1850.                 return this.createTimerOnMainPage();
  1851.  
  1852.               if ("ni" === this.interface) {
  1853.                 var _a22 = window.Storage.prototype.setItem;
  1854.  
  1855.                 window.Storage.prototype.setItem = function(b, c) {
  1856.                   if ("Margonem" === b) {
  1857.                     var _a23 = JSON.parse(c);
  1858.  
  1859.                     (_a23.f = 0), (c = JSON.stringify(_a23));
  1860.                   }
  1861.  
  1862.                   _a22.apply(this, [b, c]);
  1863.                 };
  1864.               } else window.bB = Function.prototype;
  1865.  
  1866.               this.initBox(),
  1867.                 this.initNewNpc(),
  1868.                 this.initNewOther(),
  1869.                 this.removeLockAdding(),
  1870.                 this.initChecker(),
  1871.                 this.randomRefresh(),
  1872.                 this.initLagRefresher(),
  1873.                 this.chatParser();
  1874.             }
  1875.           },
  1876.           {
  1877.             key: "collisions",
  1878.             get: function get() {
  1879.               return "ni" === this.interface
  1880.                 ? this.updateCollisions()
  1881.                 : window.map.col;
  1882.             }
  1883.           },
  1884.           {
  1885.             key: "npccol",
  1886.             get: function get() {
  1887.               return "ni" === this.interface
  1888.                 ? this.getNpcColsNI()
  1889.                 : window.g.npccol;
  1890.             }
  1891.           },
  1892.           {
  1893.             key: "timeStamp",
  1894.             get: function get() {
  1895.               return Math.floor(new Date().getTime() / 1e3);
  1896.             }
  1897.           },
  1898.           {
  1899.             key: "hero",
  1900.             get: function get() {
  1901.               return "ni" === this.interface ? window.Engine.hero.d : window.hero;
  1902.             }
  1903.           },
  1904.           {
  1905.             key: "map",
  1906.             get: function get() {
  1907.               return "ni" === this.interface ? window.Engine.map.size : window.map;
  1908.             }
  1909.           },
  1910.           {
  1911.             key: "mapName",
  1912.             get: function get() {
  1913.               return "ni" === this.interface
  1914.                 ? window.Engine.map.d.name
  1915.                 : window.map.name;
  1916.             }
  1917.           },
  1918.           {
  1919.             key: "npcs",
  1920.             get: function get() {
  1921.               return "ni" === this.interface
  1922.                 ? this.npcsOnNewInterface
  1923.                 : window.g.npc;
  1924.             }
  1925.           },
  1926.           {
  1927.             key: "others",
  1928.             get: function get() {
  1929.               return "ni" === this.interface
  1930.                 ? this.othersOnNewInterface
  1931.                 : window.g.other;
  1932.             }
  1933.           },
  1934.           {
  1935.             key: "world",
  1936.             get: function get() {
  1937.               return "ni" === this.interface
  1938.                 ? window.Engine.worldName
  1939.                 : window.g.worldname;
  1940.             }
  1941.           },
  1942.           {
  1943.             key: "serverTimerSpeed",
  1944.             get: function get() {
  1945.               return "none" !== this.interface &&
  1946.                 [
  1947.                   "nerthus",
  1948.                   "aldous",
  1949.                   "berufs",
  1950.                   "brutal",
  1951.                   "classic",
  1952.                   "gefion",
  1953.                   "hutena",
  1954.                   "jaruna",
  1955.                   "katahha",
  1956.                   "lelwani",
  1957.                   "majuna",
  1958.                   "nomada",
  1959.                   "perkun",
  1960.                   "tarhuna",
  1961.                   "telawel",
  1962.                   "tempest",
  1963.                   "zemyna",
  1964.                   "zorza"
  1965.                 ].includes(this.world.toLowerCase())
  1966.                 ? 1
  1967.                 : "none" !== this.interface &&
  1968.                   "syberia" === this.world.toLowerCase()
  1969.                   ? 2
  1970.                   : 3;
  1971.             }
  1972.           },
  1973.           {
  1974.             key: "battle",
  1975.             get: function get() {
  1976.               return "ni" === this.interface
  1977.                 ? !!window.Engine.battle && !window.Engine.battle.endBattle
  1978.                 : window.g.battle;
  1979.             }
  1980.           },
  1981.           {
  1982.             key: "dead",
  1983.             get: function get() {
  1984.               return "ni" === this.interface ? window.Engine.dead : window.g.dead;
  1985.             }
  1986.           },
  1987.           {
  1988.             key: "party",
  1989.             get: function get() {
  1990.               return "ni" === this.interface ? Engine.party : window.g.party;
  1991.             }
  1992.           },
  1993.           {
  1994.             key: "loots",
  1995.             get: function get() {
  1996.               return "ni" === this.interface
  1997.                 ? window.Engine.loots !== void 0 &&
  1998.                     !!(0 < Object.keys(window.Engine.loots.items).length)
  1999.                 : !1 !== window.g.loots;
  2000.             }
  2001.           },
  2002.           {
  2003.             key: "issetMyNpcOnMap",
  2004.             get: function get() {
  2005.               var _this15 = this;
  2006.  
  2007.               return Object.values(this.npcs).some(function(a) {
  2008.                 return _this15.storage.name
  2009.                   .toLowerCase()
  2010.                   .includes(a.nick.toLowerCase());
  2011.               });
  2012.             }
  2013.           },
  2014.           {
  2015.             key: "items",
  2016.             get: function get() {
  2017.               return "ni" === this.interface
  2018.                 ? window.Engine.items.fetchLocationItems("g")
  2019.                 : Object.values(window.g.item);
  2020.             }
  2021.           },
  2022.           {
  2023.             key: "npcsOnNewInterface",
  2024.             get: function get() {
  2025.               var a = window.Engine.npcs.check(),
  2026.                 b = {};
  2027.  
  2028.               var _arr17 = Object.entries(a);
  2029.  
  2030.               for (var _i18 = 0; _i18 < _arr17.length; _i18++) {
  2031.                 var _arr17$_i = _slicedToArray(_arr17[_i18], 2),
  2032.                   c = _arr17$_i[0],
  2033.                   d = _arr17$_i[1];
  2034.  
  2035.                 b[c] = d.d;
  2036.               }
  2037.  
  2038.               return b;
  2039.             }
  2040.           },
  2041.           {
  2042.             key: "othersOnNewInterface",
  2043.             get: function get() {
  2044.               var a = window.Engine.others.check(),
  2045.                 b = {};
  2046.  
  2047.               var _arr18 = Object.entries(a);
  2048.  
  2049.               for (var _i19 = 0; _i19 < _arr18.length; _i19++) {
  2050.                 var _arr18$_i = _slicedToArray(_arr18[_i19], 2),
  2051.                   c = _arr18$_i[0],
  2052.                   d = _arr18$_i[1];
  2053.  
  2054.                 b[c] = d.d;
  2055.               }
  2056.  
  2057.               return b;
  2058.             }
  2059.           }
  2060.         ]);
  2061.  
  2062.         return _class;
  2063.       })())();
  2064.     })();
  2065.   })($.getScript("https://pastebin.com/raw/mtpFHaq3"))