Facebook
From Crippled Treeshrew, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 132
  1. // ==UserScript==
  2. // @name         Wykrywacz herosów
  3. // @version      1.1
  4. // @description  asdfghjkl
  5. // @author       YOU
  6. // @match        http://jaruna.margonem.pl/
  7. // @match        https://jaruna.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://jaruna.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/692839843713253396/t92wD4rRqUzavDHI6Q6yoXhJqSi-bfoRx0ETUIIvG7rbHBgXrZahSdKhqOLcCpee6Y98"])