Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name mAlert unlocker (SI)
- // @namespace http://czogi.usermd.net
- // @version 0.1
- // @description Postać już nie zatrzymuje się przy mAlertach
- // @author Czogi
- // @match http://*.margonem.pl/
- // @grant none
- // ==/UserScript==
- if (getCookie("interface") !== "ni")
- g.loadQueue.push({
- fun() {
- window.hero.mClick = function (t) {
- if (!((64 & hero.opt && !g.playerCatcher.follow) || g.lock.check())) {
- var s = $("#ground").offset(),
- i = (t.clientX - s.left) >> 5,
- a = (t.clientY - s.top) >> 5;
- hero.searchPath(i, a);
- }
- };
- window.hero.go = function (s) {
- if (
- ((g.lock.check() || g.menu) && (road = []),
- g.lock.check() || g.menu || this.ml.length > 9)
- )
- return !1;
- if (this.rx != this.x || this.ry != this.y) return !1;
- hero.isMoving = 0;
- var i = this.x,
- a = this.y;
- switch (s) {
- case "W":
- 1 == this.dir ? (i = this.x - 1) : (this.dir = 1);
- break;
- case "E":
- 2 == this.dir ? (i = this.x + 1) : (this.dir = 2);
- break;
- case "N":
- 3 == this.dir ? (a = this.y - 1) : (this.dir = 3);
- break;
- case "S":
- 0 == this.dir ? (a = this.y + 1) : (this.dir = 0);
- break;
- case "R":
- var e = road.length - 1;
- i > road[e].x
- ? (this.dir = 1)
- : i < road[e].x
- ? (this.dir = 2)
- : a > road[e].y
- ? (this.dir = 3)
- : a < road[e].y && (this.dir = 0),
- (i = road[e].x),
- (a = road[e].y),
- (road = road.slice(0, -1));
- }
- "R" != s && road.length && (road = []);
- var h = !0;
- if (this.ml.length) {
- var r = this.ml[this.ml.length - 1].split(",");
- Math.abs(i - parseInt(r[0])) + Math.abs(a - parseInt(r[1])) > 1 &&
- ((h = !1), this.resetSteps());
- }
- if (
- i >= 0 &&
- a >= 0 &&
- i < map.x &&
- a < map.y &&
- !isset(g.npccol[i + 256 * a]) &&
- (!map.col || "0" == map.col.charAt(i + a * map.x)) &&
- Math.abs(this.rx - this.x) + Math.abs(this.ry - this.y) < 0.3 &&
- h
- ) {
- var o = i + "," + a;
- if ((this.checkAgressiveNpcs(), this.x != i || this.y != a)) {
- this.addStep(o);
- var l =
- null !== g.lastClickedTarget &&
- $(g.lastClickedTarget).hasClass("npc");
- !isset(g.gw[i + "." + a]) ||
- 2048 & this.opt ||
- this.autoWalkLock ||
- l
- ? isset(g.gw[i + "." + a]) || (this.autoWalkLock = !1)
- : ((t = o),
- setTimeout(function () {
- hero.autowalk();
- }, 500));
- }
- return (
- (this.x = i), (this.y = a), isset(this.pet) && this.pet.update(), !0
- );
- }
- return !1;
- };
- },
- });
Add Comment
Please, Sign In to add comment