Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Wykrywacz herosów
- // @version 1.1
- // @description Wykrywacz herosów dla świata zorza
- // @author adi wilk
- // @match http://zorza.margonem.pl/
- // @match https://zorza.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://zorza.margonem.pl' + npc.icon
- }
- }]
- }),
- contentType: 'application/json; charset=utf-8',
- dataType: 'json',
- async: false
- });
- }
- }
- }
- })(newNpc, ["https://discordapp.com/api/webhooks/513284830834720779/7mAOoeCKfqUn6Vuukh9TagagsD15LhHdbahfipuz2IMwBzOUBlbHXdIV3tjvItu_kbe7"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement