Advertisement
Guest User

Untitled

a guest
Nov 17th, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Wykrywacz herosów
  3. // @version 1.1
  4. // @description Wykrywacz herosów dla świata zorza
  5. // @author adi wilk
  6. // @match http://zorza.margonem.pl/
  7. // @match https://zorza.margonem.pl/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function(n, data){
  12. let ur = data[0];
  13. newNpc = function(e){
  14. n(e);
  15. for(let i in e){
  16. let npc = e[i];
  17. if(npc.wt > 79 && npc.nick != "Mamlambo"){
  18. let czas = new Date();
  19. let godzina = czas.getHours();
  20. if (godzina < 10) godzina = "0" + godzina;
  21. let minuta = czas.getMinutes();
  22. if (minuta < 10) minuta = "0" + minuta;
  23. let sekunda = czas.getSeconds();
  24. if (sekunda < 10) sekunda = "0" + sekunda;
  25. let time = `${godzina}:${minuta}:${sekunda}`;
  26. let worldname = g.worldname[0].toUpperCase() + g.worldname.substring(1);
  27. $.ajax({
  28. url: ur,
  29. type: 'POST',
  30. data: JSON.stringify({
  31. 'embeds': [{
  32. 'title': hero.nick + ' · ' + hero.lvl + 'lvl znalazł herosa/tytana!',
  33. 'color': ((Math.floor(npc.lvl / 300 * 221) + 32) * 256 + (Math.floor(npc.lvl / 300 * (-112)) + 120)) * 256 + Math.floor(npc.lvl / 300 * (-204)) + 217,
  34. 'description': `${npc.nick} (${npc.lvl}lvl)\n${map.name} (${npc.x}, ${npc.y})\n${time}\n${worldname}`,
  35. 'thumbnail': {
  36. 'url': 'http://zorza.margonem.pl' + npc.icon
  37. }
  38. }]
  39. }),
  40. contentType: 'application/json; charset=utf-8',
  41. dataType: 'json',
  42. async: false
  43. });
  44. }
  45. }
  46. }
  47. })(newNpc, ["https://discordapp.com/api/webhooks/513284830834720779/7mAOoeCKfqUn6Vuukh9TagagsD15LhHdbahfipuz2IMwBzOUBlbHXdIV3tjvItu_kbe7"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement