// ==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"])