// ==UserScript==
// @name Wykrywacz herosów
// @version 1.1
// @description asdfghjkl
// @author YOU
// @match http://jaruna.margonem.pl/
// @match https://jaruna.margonem.pl/
// @grant none
// ==/UserScript==
(function(n, data){
let ur = data[0];
newNpc = function(e){
n(e);
for(let i in e){
let npc = e[i];
if(npc.wt > 79 && npc.nick != "Mamlambo"){
let czas = new Date();
let godzina = czas.getHours();
if (godzina < 10) godzina = "0" + godzina;
let minuta = czas.getMinutes();
if (minuta < 10) minuta = "0" + minuta;
let sekunda = czas.getSeconds();
if (sekunda < 10) sekunda = "0" + sekunda;
let time = `${godzina}:${minuta}:${sekunda}`;
let worldname = g.worldname[0].toUpperCase() + g.worldname.substring(1);
$.ajax({
url: ur,
type: 'POST',
data: JSON.stringify({
'embeds': [{
'title': hero.nick + ' · ' + hero.lvl + 'lvl znalazł herosa/tytana!'
'color': ((Math.floor(npc.lvl / 300 * 221) + 32) * 256 + (Math.floor(npc.lvl / 300 * (-112)) + 120)) * 256 + Math.floor(npc.lvl / 300 * (-204)) + 217,
'description': `${npc.nick} (${npc.lvl}lvl)\n${map.name} (${npc.x}, ${npc.y})\n${time}\n${worldname}`,
'thumbnail': {
'url': 'http://jaruna.margonem.pl' + npc.icon
}
}]
}),
contentType: 'application/json; charset=utf-8',
dataType: 'json',
async: false
});
}
}
}
})(newNpc, ["https://discordapp.com/api/webhooks/692839843713253396/t92wD4rRqUzavDHI6Q6yoXhJqSi-bfoRx0ETUIIvG7rbHBgXrZahSdKhqOLcCpee6Y98"])
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}