Advertisement
Guest User

Untitled

a guest
May 20th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Brudasy
  3. // @version 1.1
  4. // @description opis
  5. // @author adison
  6. // @match *://*/
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. ! function(a) {
  11. var clans = ["arystokracja", "freedom", "libertas", "himaya", "death eaters", "slaughterer", "magnateria", "tórbinoxy i szczeliny", "phasianae", "zwykły klan", "vide cui fide", "hebi", "diabły ciemności", "fighters of honor", "aeternus"];
  12. var lista = [];
  13. var czek = false;
  14. newOther = function(b) {
  15. a(b);
  16. for (var c in b) {
  17. if (b[c].nick !== undefined) {
  18. var czas = new Date();
  19. var godzina = czas.getHours();
  20. if (godzina < 10) godzina = "0" + godzina;
  21. var minuta = czas.getMinutes();
  22. if (minuta < 10) minuta = "0" + minuta;
  23. var sekunda = czas.getSeconds();
  24. if (sekunda < 10) sekunda = "0" + sekunda;
  25. for (var i = 0; i < lista.length; i++) {
  26. if (lista[i] == b[c].id) {
  27. czek = true;
  28. break;
  29. } else {
  30. czek = false;
  31. continue;
  32. }
  33. }
  34. if ((b[c].relation == "en" || b[c].relation == "cl-en" || clans.includes(b[c].clan.toLowerCase())) && map.pvp == 2 && czek == false) {
  35. lista.push(b[c].id);
  36. message('<span style="color: red; font-weight: bold">Wróg: ' + b[c].nick + '</span>');
  37. if (hero.clan != 0) {
  38. chatSend("/k Brudas " + b[c].nick + " " + b[c].lvl + b[c].prof + " z klanu " + b[c].clan + " na mapie " + map.name + " na kordach " + b[c].x + "," + b[c].y + " - " + godzina + ":" + minuta + ":" + sekunda + ".");
  39. }
  40. for (var i = 0; i < lista.length; i++) {
  41. if (lista[i] == b[c].id) {
  42. setTimeout(function() {
  43. lista.splice(i, 1);
  44. }, 6e4);
  45. break;
  46. }
  47. }
  48. }
  49. }
  50. }
  51. };
  52. }(newOther);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement