Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. // ==UserScript==
  2. // @name AutoZap
  3. // @version 1.0
  4. // @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)
  5. //@stary_Tutorial_dla_nieogarow https://cdn.discordapp.com/attachments/554343605834350617/644675156849197057/IMG_20191114_235539.jpg
  6. // @match http://*.margonem.pl/
  7. // ==/UserScript==
  8.  
  9. window.n = ['Nadwieczorek', 'Rufio',]; // TABLICA NICKOW GRACZY DO ZAPRASZANIA
  10. window.m = ['Gliniana pieczara p.4',]; // TABLICA NAZW MAP NA KTORYCH MA DZIALAC DODATEK
  11.  
  12. window.zapKlan = 2; // 1 - Twoj klan, 2 zaprasza klan i friends , inne - nie zaprasza po klanie, zaprasza tylko wpisane do tablicy nickow,
  13.  
  14. ((other, n, m, zapKlan) => {
  15. setInterval(() => {
  16. other.forEach(id => {
  17. if(m.includes(map.name)){
  18. if((n.includes(id.nick) || (zapKlan == 1 && id.relation == 'cl') || (zapKlan == 2 && (id.relation == 'cl' || id.relation == 'fr')))){
  19. 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)){
  20. if(id.relation == 'fr' || id.relation == 'cl') {
  21. setTimeout(() => _g(`party&a=inv&id=${id.id}`), 500);
  22. }
  23. else {
  24. hero.searchPath1(id.x,id.y); // Rozbudowane KtoTuJest ver. 4.3
  25. // hero.margoMove(id.x,id.y); // menogram
  26. if(hero.x == id.x && hero.y == id.y){
  27. setTimeout(() => _g(`party&a=inv&id=${id.id}`), 500);
  28. }
  29. }
  30. }
  31. }
  32. }
  33. }
  34. );
  35. }, 2000);
  36. })(g.other, window.n, window.m, window.zapKlan);
  37. // taki fajny dodatek co zamienia mAlerty na message, przydatne jezeli postac chce zaprosic inna postac ktora jest juz w grupie
  38. (function(a) {
  39. mAlert = function() {
  40. if (arguments.length == 1 || arguments[1] == undefined)
  41. return message(arguments[0]);
  42. return a.apply(this, arguments);
  43. }
  44. })(mAlert);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement