Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Auto Tp
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match http://*/*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- if (localStorage.getItem('dane_uciekanko') == null) localStorage.setItem('dane_uciekanko', 'Zwój teleportacji na Kwieciste Przejście');
- if (localStorage.getItem('dane_uciekanko_lvl') == null) localStorage.setItem('dane_uciekanko_lvl', '5');
- $('<div id="uciekanko">').css({
- position: "absolute",
- left: -208,
- top: 7,
- width: 200,
- height: 210,
- color: "#006622",
- "background-color": "#d9d9d9",
- "font-size": "13px",
- }).droppable({
- accept: '.item',
- drop: function(e, u) {
- var nritemka = u.draggable.attr('id').replace('item', '');
- var nazwaitemka = g.item[nritemka].name;
- if (g.item[nritemka].cl == 16 && g.item[nritemka].loc == "g") {
- document.getElementById("nazwa_zwoju").value = nazwaitemka;
- } else {
- message("To na pewno nie jest teleport.");
- }
- setTimeout(function() {
- document.getElementById("dropmenu").style.display = "none";
- }, 50);
- },
- }).appendTo("#centerbox2");
- var dane_uciekanko = localStorage.getItem('dane_uciekanko');
- var dane_uciekanko_lvl = localStorage.getItem('dane_uciekanko_lvl');
- uciekanko.innerHTML = '<center>Przeciągnij teleport w te okienko:<br><br><input id="nazwa_zwoju" value="' + dane_uciekanko + '">';
- uciekanko.innerHTML = uciekanko.innerHTML + '<br/><br/><center>Ile levli więcej: <input id="lvlponad" type="text" size="1" value="' + dane_uciekanko_lvl + '"></center>';
- uciekanko.innerHTML = uciekanko.innerHTML + '<br/><br/><input id="checkbox1zaal1" type="checkbox">Uciekać przed cl/fr/cl-fr?';
- uciekanko.innerHTML = uciekanko.innerHTML + '<br/><br/><center><button id="zapisz_uciekanko">Zapisz</button>';
- function saveToUciekanko() {
- var itemsik = document.getElementById("nazwa_zwoju").value;
- var leverzik = Number(document.getElementById("lvlponad").value);
- localStorage.setItem('dane_uciekanko', itemsik);
- localStorage.setItem('dane_uciekanko_lvl', leverzik);
- var checkbox = document.getElementById('checkbox1zaal1');
- localStorage.setItem('checkbox1zaal1', checkbox.checked);
- }
- document.getElementById("zapisz_uciekanko").addEventListener("click", saveToUciekanko);
- ! function load() {
- var checked = JSON.parse(localStorage.getItem('checkbox1zaal1'));
- document.getElementById("checkbox1zaal1").checked = checked;
- }()
- var czy_jestucieczka = false;
- (a => {
- newOther = function(b) {
- a(b);
- var lvl_ponad = localStorage.getItem('dane_uciekanko_lvl');
- var nazwa_zwoju = localStorage.getItem('dane_uciekanko');
- for (var i in g.item) {
- if (g.item[i].name.toLowerCase() == nazwa_zwoju.toLowerCase()) {
- var id_itemka_do_ucieczki = g.item[i].id;
- break;
- } else {
- var id_itemka_do_ucieczki = "";
- }
- }
- for (var x in b) {
- if (b[x].lvl - hero.lvl >= lvl_ponad && map.pvp == 2 && czy_jestucieczka == false && id_itemka_do_ucieczki != "") {
- if (document.getElementById("checkbox1zaal1").checked == true) {
- if (!g.battle) {
- _g("moveitem&st=1&id=" + id_itemka_do_ucieczki);
- } else {
- message("Trwa walka, zwój zostanie po niej użyty.");
- czy_jestucieczka = true;
- var xdxdxdxdxdxdxd = battleMsg;
- battleMsg = function(c, t) {
- var lkjiop = xdxdxdxdxdxdxd(c, t);
- if (c.search(/winner=/) >= 0) {
- _g("fight&a=quit");
- _g("moveitem&st=1&id=" + id_itemka_do_ucieczki);
- czy_jestucieczka = false;
- }
- return lkjiop;
- }
- }
- } else {
- if (b[x].relation == "fr" || b[x].relation == "cl" || b[x].relation == "cl-fr") {
- return;
- } else {
- if (!g.battle) {
- _g("moveitem&st=1&id=" + id_itemka_do_ucieczki);
- } else {
- message("Trwa walka, zwój zostanie po niej użyty.");
- czy_jestucieczka = true;
- var xdxdxdxdxdxdxd = battleMsg;
- battleMsg = function(c, t) {
- var lkjiop = xdxdxdxdxdxdxd(c, t);
- if (c.search(/winner=/) >= 0) {
- _g("fight&a=quit");
- _g("moveitem&st=1&id=" + id_itemka_do_ucieczki);
- czy_jestucieczka = false;
- }
- return lkjiop;
- }
- }
- }
- }
- } else if (id_itemka_do_ucieczki == "" && czy_jestucieczka == false && map.pvp == 2) {
- message("Brak TP!");
- czy_jestucieczka = true;
- }
- }
- };
- })(newOther);
- })();
- // ==UserScript==
- // @name Bot e2/exp z przechodzniem
- // @version 2.01
- // @description No se bocik curva lata mordo.
- // @author adi wilk
- // @match http://pandora.margonem.pl/
- // @grant none
- // ==/UserScript==
- $('#tutorial').hide();
- ceb = {};
- ceb.bestxy = 9999;
- ceb.run = 1;
- ceb.id = 0;
- ceb.block = "";
- ceb.xxxx = 0;
- ceb.blocked = 1;
- ceb.check2 = 0;
- ceb.check2 = 0;
- ceb.interv1 = "";
- ceb.interv2 = "";
- ceb.interv3 = "";
- if (localStorage.getItem('danebot') == null) localStorage.setItem('danebot', 'Wprowadź nazwę/y moba/ów');
- if (localStorage.getItem('danebotmap') == null) localStorage.setItem('danebotmap', 'Wprowadź nazwę/y map/y');
- mAlert = function(a, c, d, b) {};
- g.lock.add = function(i) {};
- $('<div id="ceb_config">').css({
- position: "absolute",
- left: -208,
- top: 7,
- width: 200,
- height: 210,
- color: "#006622",
- "background-color": "#d9d9d9",
- "font-size": "13px",
- }).appendTo("#centerbox2");
- function zapiszdane() {
- var danedobota = document.getElementById("ceb_monster").value;
- var danedobotamap = document.getElementById("ceb_nazmap").value;
- localStorage.setItem('danebot', danedobota);
- localStorage.setItem('danebotmap', danedobotamap);
- var danebot = localStorage.getItem('danebot');
- var danebotmap = localStorage.getItem('danebotmap');
- document.location.reload();
- }
- var danebot = localStorage.getItem('danebot');
- var danebotmap = localStorage.getItem('danebotmap');
- var mapki = [];
- var nazwamapki;
- ceb_config.innerHTML = '<center>Podaj nazwy mobów:<br><br><input id="ceb_monster" value="' + danebot + '">';
- ceb_config.innerHTML += '<br/><center>Podaj nazwy map:<br><br><input id="ceb_nazmap" value="' + danebotmap + '">';
- ceb_config.innerHTML += '<br/><br/><center><button id="tynoniewiem">Zapisz</button>';
- $("#tynoniewiem").click(function() {
- zapiszdane();
- });
- hero.cebgo = function(a, t) {
- if (this.isBlockedSearchPath()) return this.blockedInfoSearchPath();
- for (var h = [], i = 128 & hero.opt ? 8 : 20, r = Math.max(0, Math.min(a, this.x) - i), s = Math.min(map.x - 1, Math.max(a, this.x) + i), o = Math.max(0, Math.min(t, this.y) - i), e = Math.min(map.y - 1, Math.max(t, this.y) + i), d = r - 1; s + 1 >= d; d++) {
- h[d] = [];
- for (var x = o - 1; e + 1 >= x; x++) h[d][x] = !(d >= r && s >= d && x >= o && e >= x) || isset(g.npccol[d + 256 * x]) || map.col && "0" != map.col.charAt(d + x * map.x) ? -2 : -1
- }
- h[this.x][this.y] = 0, b = -1, road = [];
- for (var c = {
- x: -1,
- y: -1,
- dist: 99
- }, y = 1; s - r + e - o + 3 > y; y++)
- for (var d = r; s >= d; d++)
- for (var x = o; e >= x; x++) {
- if (-1 != h[d][x] || h[d][x - 1] != y - 1 && h[d][x + 1] != y - 1 && h[d - 1][x] != y - 1 && h[d + 1][x] != y - 1 || (h[d][x] = y), h[a][t] > 0) {
- d = s + 1;
- break
- }
- c.dist2 = Math.abs(a - d) + Math.abs(t - x), h[d][x] == y && c.dist2 < c.dist && (c.x = d, c.y = x, c.dist = c.dist2)
- }
- if (c.hdist = Math.abs(a - hero.x) + Math.abs(t - hero.y), h[a][t] > 0 || c.dist < c.hdist) {
- h[a][t] < 0 && (a > c.x ? b = 2 : a < c.x ? b = 1 : t > c.y ? b = 0 : t < c.y && (b = 3), a = c.x, t = c.y), road[0] = {
- x: a,
- y: t
- };
- for (var f = h[a][t] - 1, l = a, m = t; f > 0; f--) h[l][m - 1] == f ? m-- : h[l][m + 1] == f ? m++ : h[l - 1][m] == f ? l-- : h[l + 1][m] == f ? l++ : f = 0, f && (road[h[a][t] - f] = {
- x: l,
- y: m
- })
- }
- road.length > 1 && null == g.playerCatcher.follow && $("#target").stop().css({
- left: 32 * a,
- top: 32 * t,
- display: "block",
- opacity: 1
- }).fadeOut(1e3)
- };
- ! function(tmpBattleMsg) {
- battleMsg = function(c, t) {
- ceb.run = 1;
- var ret = tmpBattleMsg(c, t);
- if (c.search(/winner=/) >= 0) {
- _g("fight&a=quit");
- ceb.run = 0;
- }
- return ret;
- }
- }(battleMsg);
- ceb.f1 = function() {
- if (localStorage.getItem("mapencje") == null) localStorage.setItem("mapencje", map.name);
- if (localStorage.getItem("mapencje").indexOf(map.name) == -1) {
- var mapencje = localStorage.getItem("mapencje");
- mapencje += "|" + map.name;
- localStorage.setItem("mapencje", mapencje);
- };
- if (ceb.run == 0) {
- hero.nextx = '';
- hero.nexty = '';
- var cango = true;
- ceb.bestxy = 9999;
- for (var i in g.npc) {
- if (ceb_monster.value.indexOf(g.npc[i].nick) > -1 && ceb.block.indexOf(i) < 0 && g.npc[i].fake === undefined && (g.npc[i].type == 2 || g.npc[i].type == 3)) {
- x1 = Math.pow(Math.abs(hero.x - g.npc[i].x), 2);
- y1 = Math.pow(Math.abs(hero.y - g.npc[i].y), 2);
- ceb.bestxy1 = Math.sqrt(x1) + Math.sqrt(y1);
- if (ceb.bestxy1 < ceb.bestxy) {
- cango = false;
- ceb.bestxy = ceb.bestxy1;
- hero.nextx = g.npc[i].x;
- hero.nexty = g.npc[i].y;
- ceb.id = i;
- ceb.run = 1;
- ceb.blocked = 0;
- };
- }
- };
- if (!cango) {
- hero.cebgo(hero.nextx, hero.nexty);
- } else {
- mapki = [];
- for (var i in g.townname) {
- if (ceb_nazmap.value.indexOf(g.townname[i]) > -1 && localStorage.getItem("mapencje").indexOf(g.townname[i]) == -1) {
- mapki.push(i);
- }
- }
- }
- if (mapki.length < 1) {
- localStorage.setItem("mapencje", null);
- } else {
- for (var i in g.gwIds) {
- if (mapki.includes(i)) {
- gwx = Number(g.gwIds[i].substring(0, g.gwIds[i].indexOf(".")));
- gwy = Number(g.gwIds[i].substring(g.gwIds[i].indexOf(".") + 1));
- x1 = Math.pow(Math.abs(hero.x - gwx), 2);
- y1 = Math.pow(Math.abs(hero.y - gwy), 2);
- ceb.bestxy1 = Math.sqrt(x1) + Math.sqrt(y1);
- if (ceb.bestxy1 < ceb.bestxy) {
- ceb.bestxy = ceb.bestxy1;
- hero.nextx = gwx;
- hero.nexty = gwy;
- ceb.blocked = 1;
- };
- }
- }
- if (cango && hero.nextx != "" && hero.nexty != "") {
- hero.cebgo(hero.nextx, hero.nexty);
- ceb.run = 1;
- if (hero.x == hero.nextx && hero.y == hero.nexty) {
- _g("walk");
- }
- }
- }
- }
- };
- ceb.f2 = function() {
- if (road.length == 0 && ceb.blocked == 0) {
- if ((Math.abs(hero.rx - g.npc[ceb.id].x) <= 1 && Math.abs(hero.ry - g.npc[ceb.id].y) <= 1) && (g.npc[ceb.id].type == 2 || g.npc[ceb.id].type == 3)) {
- ceb.blocked = 1;
- _g("fight&a=attack&ff=1&id=-" + ceb.id);
- } else {
- if (ceb.check2 == 2) {
- ceb.blocked = 1;
- ceb.block = ceb.block + "|" + ceb.id;
- ceb.run = 0;
- ceb.check2 = 0;
- } else if (ceb.check2 != 2) {
- ceb.check2++;
- }
- }
- }
- };
- ceb.f3 = function() {
- if (road.length == 0) {
- if (ceb.check2 < 60) {
- ceb.check2++;
- } else if (ceb.check2 >= 60) {
- ceb.run = 0;
- ceb.check2 = 0;
- }
- } else {
- ceb.check2 = 0;
- }
- };
- ceb.interv1 = setInterval(ceb.f1, 400);
- ceb.interv2 = setInterval(ceb.f2, 300);
- ceb.interv3 = setInterval(ceb.f3, 50);
- setInterval(function() {
- ceb.block = "";
- }, 30000)
- // ==UserScript==
- // @name Działajacy speedhack v3
- // @version 0.1
- // @description dsadsadsa
- // @author adison
- // @match http://tarhuna.margonem.pl/
- // @match http://game2.margonem.pl/
- // @match *://*.margonem.pl/*
- // @match http://berufs.margonem.pl/
- // @match http://elizjum.margonem.pl
- // @grant none
- // ==/UserScript==
- ! function(oldU, oldN) {
- var i = 0;
- var ready_to_runboost = false;
- var box1 = document.createElement("div");
- box1.id = "speed";
- box1.style = "width: 15px; height: 15px; background: red; position: absolute; top: 228px; left: 95px; border-radius: 50%";
- document.querySelector("#panel").appendChild(box1);
- document.addEventListener("keyup", function(e) {
- if (e.target.tagName != "INPUT" && e.target.tagName != "TEXTAREA" && e.which == 71 && ready_to_runboost == true) {
- ready_to_runboost = false;
- i = 0;
- document.querySelector("#speed").style.background = "orange";
- var runboost = setInterval(gameThread, 150);
- setTimeout(function() {
- document.querySelector("#speed").style.background = "red";
- clearInterval(runboost);
- }, 2000);
- }
- })
- hero._u = function(e) {
- i++;
- if (i * 0.52 >= 10 && ready_to_runboost == false && document.querySelector("#speed").style.background == "red") {
- document.querySelector("#speed").style.background = "green";
- ready_to_runboost = true;
- }
- oldU.apply(this, arguments);
- }
- //ukrycie tej jebanej choinki w ithan pod ktora sie chowają cepy
- newNpc = e => {
- oldN(e);
- for(var i in e){
- var npc = e[i];
- if(npc.id == "77002"){
- document.querySelector(`#npc${npc.id}`).style.display = `none`;
- break;
- }
- }
- }
- }(hero._u, newNpc)
- // ==UserScript==
- // @name Margonem Profile Online
- // @version 1.1
- // @author Arth/Szemkel <[email protected]>
- // @include http://www.margonem.pl/?task=profile&id=*
- // @include https://www.margonem.pl/?task=profile&id=*
- // @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
- // @grant GM_xmlhttpRequest
- // @connect margonem.pl
- // @run-at document-start
- // ==/UserScript==
- (function() {
- var characters = [];
- var $statsBody = null;
- var worldsOnline = {};
- var accountOnline = false;
- var onlineReady = false;
- var charactersReady = false;
- GM_xmlhttpRequest({
- method: "GET",
- url: "http://margonem.pl/?task=stats",
- onload: function(response) {
- $statsBody = $(response.responseText);
- onlineReady = true;
- check();
- }
- });
- document.addEventListener('DOMContentLoaded', function() {
- loadCharacters();
- });
- function loadCharacters() {
- var $stats = $('.inside_char_stats');
- $stats.each(function(i, e) {
- var name = $(e).find('b:first-child').text();
- var world = $(e).find('b:last-child').text();
- characters.push({
- name: name,
- world: world,
- $e: $(e)
- });
- if (i == $stats.length - 1) {
- charactersReady = true;
- check();
- }
- });
- }
- function check() {
- if (charactersReady && onlineReady) start();
- }
- function start() {
- for (var i in characters) {
- if (!worldsOnline[characters[i].world]) loadWorldOnline(characters[i].world);
- if (isCharacterOnline(characters[i].name, characters[i].world)) {
- accountOnline = true;
- characters[i].$e.find('br').after('<span style="color: green; font-weight: bold;">online</span> | ');
- } else {
- characters[i].$e.find('br').after('<span style="color: gray;">offline</span> | ');
- }
- }
- if (accountOnline) {
- $('#inside_bar_left_stats_profile div:first-child div').append(' <span style="color: green; float: right;">(online)</span>');
- }
- }
- function loadWorldOnline(world) {
- worldsOnline[world] = $statsBody.find('#online_' + world + ' p').text().trim().split(', ');
- }
- function isCharacterOnline(name, world) {
- return worldsOnline[world].indexOf(name) >= 0;
- }
- })();
- / ==UserScript==
- // @name Nie ukrywaj mobków
- // @version 0.1
- // @description chuj
- // @author Adi Wilk
- // @match http://*.margonem.pl/
- // @grant none
- // ==/UserScript==
- (() => {
- new class oooooooooooooooooooo {
- constructor() {
- this.interface = typeof window.Engine === "object" ? "ni" : "si";
- this.npcsOutOfView = new Array();
- this.initAjaxParser();
- }
- get hero() {
- return this.interface === "ni" ? window.Engine.hero.d : window.hero;
- }
- get map() {
- return this.interface === "ni" ? window.Engine.map.d : window.map;
- }
- get npcs() {
- return this.interface === "ni" ? this.npcsOnNewInterface : window.g.npc;
- }
- get npcsOnNewInterface() {
- const newNpcs = new Object();
- for (const [id, npc] of Object.entries(window.Engine.npcs.check())) {
- newNpcs[id] = npc.d;
- }
- return newNpcs;
- }
- npcInOutOfRange({x:hx, y:hy}, {x, y}) {
- return Math.abs(x - hx) > this.map.visibility || Math.abs(y - hy) > this.map.visibility;
- }
- initAjaxParser() {
- const self = this;
- const _ajax = window.$.ajax;
- window.$.ajax = (...args) => {
- if (args[0].url.indexOf("/engine?t=") > -1) {
- const oldsucc = args[0].success;
- args[0].success = (...arg) => {
- const canEmit = typeof arg[0] === "object" && arg[0] !== null && arg[0].e === "ok";
- if (canEmit) {
- arg[0] = self.parseInput(arg[0]);
- }
- return oldsucc.apply(this, arg);
- };
- }
- return _ajax.apply(this, args);
- }
- }
- parseInput(data) {
- if (this.map.visibility !== 0) {
- if (data.hasOwnProperty("npc") && data.npc !== undefined) {
- for (const [id, npc] of Object.entries(data.npc)) {
- if (npc.hasOwnProperty("del") && npc.del === 1 && this.npcs[id] !== undefined) {
- if ([2, 3].includes(this.npcs[id].type) && this.npcInOutOfRange(this.hero, this.npcs[id])) {
- this.npcsOutOfView.push(id);
- delete data.npc[id];
- }
- }
- }
- }
- }
- if (data.hasOwnProperty("h") && data.h.hasOwnProperty("x") && data.h.hasOwnProperty("y")) {
- const npcsToRemove = new Array();
- for (const [id, npc] of Object.entries(this.npcs)) {
- if (this.npcsOutOfView.includes(id) && !this.npcInOutOfRange(data.h, npc)) {
- this.npcsOutOfView.splice(this.npcsOutOfView.indexOf(id), 1);
- if ((data.hasOwnProperty("npc") && data.npc[id] === undefined) || !data.hasOwnProperty("npc")) {
- npcsToRemove.push(id);
- }
- }
- }
- if (npcsToRemove.length > 0) {
- if (!data.hasOwnProperty("npc")) {
- data.npc = new Object();
- }
- for (const id of npcsToRemove) {
- data.npc[id] = {
- del: 2
- }
- }
- }
- }
- return data;
- }
- }
- })()
- // ==UserScript==
- // @name Odswiezenie podczas laga.
- // @version 1.4
- // @description odswieza podczas laga(podczas wygasniecia sesji tez) i jeszcze usuwa te zolte komunikaty z konsoli
- // @author adison
- // @match *://*/
- // @grant none
- // ==/UserScript==
- ! function(a, b) {
- let e, c = 0,
- d = !0;
- parseInput = function() {
- d && (setInterval(function() {
- c++, 4 < c && (c = 0, document.location.reload())
- }, 1e3), d = !1), c = 0, a.apply(this, arguments)
- }, log = function() {
- if (e = Array.prototype.slice.call(arguments), e[1]) {
- if (-1 < e[0].indexOf("Zapytanie odrzucone") && 1 == e[1]) return; - 1 < e[0].indexOf("Sesja gry wygas\u0142a") && 2 == e[1] && document.location.reload(); - 1 < e[0].indexOf("Przerwa techniczna") && 1 == e[1] && document.location.reload(); - 1 < e[0].indexOf("Bot") && 1 == e[1] && document.location.reload()
- }
- b.apply(this, arguments)
- }
- }(parseInput, log)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement