Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name AutoZap
- // @version 1.0
- // @author Feranzo (nie pisac na dsc, macie ponizej lekko nieaktualny tutorial ale wiekszosc powinna dzialac, jak nie to przeczytajcie kod i wygooglajcie operatory logiczne javascript)
- //@stary_Tutorial_dla_nieogarow https://cdn.discordapp.com/attachments/554343605834350617/644675156849197057/IMG_20191114_235539.jpg
- // @match http://*.margonem.pl/
- // ==/UserScript==
- window.n = ['Nadwieczorek', 'Rufio',]; // TABLICA NICKOW GRACZY DO ZAPRASZANIA
- window.m = ['Gliniana pieczara p.4',]; // TABLICA NAZW MAP NA KTORYCH MA DZIALAC DODATEK
- window.zapKlan = 2; // 1 - Twoj klan, 2 zaprasza klan i friends , inne - nie zaprasza po klanie, zaprasza tylko wpisane do tablicy nickow,
- ((other, n, m, zapKlan) => {
- setInterval(() => {
- other.forEach(id => {
- if(m.includes(map.name)){
- if((n.includes(id.nick) || (zapKlan == 1 && id.relation == 'cl') || (zapKlan == 2 && (id.relation == 'cl' || id.relation == 'fr')))){
- if(!Object.keys(g.party).includes(id.id) && (!g.party || ((g.party) && (1 == g.party[hero.id].r))) && !g.battle && (Math.abs(hero.lvl - id.lvl)<=53) && (id.stasis == 0)){
- if(id.relation == 'fr' || id.relation == 'cl') {
- setTimeout(() => _g(`party&a=inv&id=${id.id}`), 500);
- }
- else {
- hero.searchPath1(id.x,id.y); // Rozbudowane KtoTuJest ver. 4.3
- // hero.margoMove(id.x,id.y); // menogram
- if(hero.x == id.x && hero.y == id.y){
- setTimeout(() => _g(`party&a=inv&id=${id.id}`), 500);
- }
- }
- }
- }
- }
- }
- );
- }, 2000);
- })(g.other, window.n, window.m, window.zapKlan);
- // taki fajny dodatek co zamienia mAlerty na message, przydatne jezeli postac chce zaprosic inna postac ktora jest juz w grupie
- (function(a) {
- mAlert = function() {
- if (arguments.length == 1 || arguments[1] == undefined)
- return message(arguments[0]);
- return a.apply(this, arguments);
- }
- })(mAlert);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement