Advertisement
Guest User

Untitled

a guest
Sep 24th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Lepsze przechodzenie przez mapki
  3. // @version 1.3
  4. // @description Działa tylko na mapach inne, niż zielone, dlatego wbudowane przechodzenie zostaw włączone.
  5. // @author adi wilk
  6. // @match *://*/
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. //1.2 Naprawa błędu po teleportacji.
  11. //1.3 Wyłącznie przechodzenia na zielonych mapkach
  12. ! function(_run) {
  13. var firstTime = false;
  14. var gw = [];
  15. var firstMap = "";
  16. var herocords = "";
  17. var herostop = true;
  18. hero.run = function() {
  19. herocords = hero.x + "." + hero.y;
  20. if (map.pvp != 2) {
  21. firstTime = true;
  22. firstMap = "";
  23. herostop = true;
  24. gw = [];
  25. } else if (firstTime) {
  26. firstTime = false;
  27. firstMap = map.name;
  28. for (var i in g.gw) {
  29. gw.push(i);
  30. }
  31. } else if (firstMap != map.name) {
  32. firstTime = true;
  33. } else if (herostop && !firstTime) {
  34. if (!gw.includes(herocords)) herostop = false;
  35. } else if (!herostop && !firstTime) {
  36. if (gw.includes(herocords)) {
  37. gw = [];
  38. firstTime = true;
  39. herostop = true;
  40. _g("walk");
  41. }
  42. }
  43. _run.apply(this, arguments)
  44. }
  45. }(hero.run)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement