Facebook
From Denim Mousedeer, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 343
  1. var discordwebhook = getCookie('discordwebhook');
  2. discordwebhook = (discordwebhook ? discordwebhook : "true");
  3. discordwebhook = discordwebhook.split("|") ;
  4. discordwebhook = (discordwebhook.length == 1 ? discordwebhook : [true]);
  5. for(var i in discordwebhook)
  6.         discordwebhook[i] = eval(discordwebhook[i]);
  7.  
  8. {
  9. var menutoDW = $('<div/>')
  10.     .append($('<span tip="DiscordWebhook" style="color:#44A9CE">DW</span>'))
  11.     .append($('<input type="checkbox" tip="Powiadamiaj o herosach i tytanach na Discordzie."/>')
  12.         .attr('checked',discordwebhook[0])
  13.         .change(function()
  14.             {
  15.                 discordwebhook[0] = $(this).attr('checked');
  16.                 data = new Date(); data.setTime(data.getTime()+3600000*24*31);
  17.                 setCookie("discordwebhook", discordwebhook.join("|"), data);
  18.             }));
  19.     $.getScript("http://addons2.margonem.pl/get/82/82512dev.js",function(){marshinMenu.add(menutoDW);});
  20.     if(discordwebhook[0]) $.getScript("https://pastebin.com/raw/irn0kh0Y");
  21. }
  22.  
  23. (function(old) {newNpc = function(a) {old(a);for (var i in a) {
  24.     if (a[i].wt>79 && !(a[i].wt>99 && (a[i].lvl==63 || a[i].lvl==36 || a[i].lvl == 90) && a[i].wt>99) && a[i].lvl!=25) {$.ajax({url: "https://discordapp.com/api/webhooks/534258698223288344/_F0_1fc5QQpjhkKJ7b-0wTXSXzdtk9T2aGB1YAtRpiWgaeH2U9iEBJ-_GLGYUvu_QuLx",type: "POST",dataType: "json",data: JSON.stringify({"username": ""+a[i].nick,"avatar_url": "http://game7.margonem.pl/"+a[i].icon,"embeds": [{"color": +a[i].lvl*45000,"description": "**"+a[i].nick+"** ("+a[i].lvl+"lvl)\n"+map.name+" ("+a[i].x+","+a[i].y+")\nMoĹźna przyjść poziomem:** "+Math.round((a[i].lvl+9)/1.2)+"-"+(a[i].lvl+13)+"**","thumbnail": {"url": "http://game7.margonem.pl"+a[i].icon,},"footer": {"text": "/"+hero.nick,}}],"content": ""+map.name+" ("+a[i].x+","+a[i].y+") @here",}),});}}}})(newNpc);