Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Heros
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match http://nomada.margonem.pl/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. var discordwebhook = getCookie('discordwebhook');
  12. discordwebhook = (discordwebhook ? discordwebhook : "true|true");
  13. discordwebhook = discordwebhook.split("|") ;
  14. discordwebhook = (discordwebhook.length == 2 ? discordwebhook : [true, true]);
  15. for(var i in discordwebhook)
  16. discordwebhook[i] = eval(discordwebhook[i]);
  17.  
  18. {
  19. var menutoDW = $('<div/>')
  20. .append($('<span tip="DiscordWebhook" style="color:#44A9CE">DW</span>'))
  21. .append($('<input type="checkbox" tip="Powiadamiaj o e2 na Disordzie."/>')
  22. .attr('checked',discordwebhook[0])
  23. .change(function()
  24. {
  25. discordwebhook[0] = $(this).attr('checked');
  26. data = new Date(); data.setTime(data.getTime()+3600000*24*31);
  27. setCookie("discordwebhook", discordwebhook.join("|"), data);
  28. }))
  29. .append($('<input type="checkbox" tip="Powiadamiaj o herosach i tytanach na Discordzie."/>')
  30. .attr('checked', discordwebhook[1])
  31. .change(function()
  32. {
  33. discordwebhook[1] = $(this).attr('checked');
  34. data = new Date(); data.setTime(data.getTime()+3600000*24*31);
  35. setCookie("discordwebhook", discordwebhook.join("|"), data);
  36. }));
  37.  
  38. }
  39.  
  40.  
  41. (function(old) {
  42. newNpc = function(a) {
  43. old(a);
  44. for (var i in a) {
  45. /*if (a[i].wt>19 && discordwebhook[0]) {
  46. $.ajax({
  47. url: "https://discordapp.com/api/webhooks/602836623478226945/Qx-MfJr2aEvTrxZIGhET-F5O1d-aXpO4T8DvkorVxQYldCHYkZm6sON4pS1_TGcvkU-k",
  48. type: "POST",
  49. data: {
  50. content: "**"+a[i].nick+"** "+map.name+" INFO `"+hero.nick+"`",
  51. },
  52. });
  53. }*/
  54. if (a[i].wt>79 && discordwebhook[1] && a[i].wt<=99) {
  55. $.ajax({
  56. url: "https://discordapp.com/api/webhooks/602836623478226945/Qx-MfJr2aEvTrxZIGhET-F5O1d-aXpO4T8DvkorVxQYldCHYkZm6sON4pS1_TGcvkU-k",
  57. type: "POST",
  58. data: {
  59. content: "@here **Heros** `"+a[i].nick+"` na mapie "+map.name+" "+a[i].x+","+a[i].y+" INFO `"+hero.nick+"`",
  60. },
  61. });
  62. }
  63. if (a[i].wt>99 && discordwebhook[1] && a[i].lvl>36) {
  64. $.ajax({
  65. url: "https://discordapp.com/api/webhooks/602836623478226945/Qx-MfJr2aEvTrxZIGhET-F5O1d-aXpO4T8DvkorVxQYldCHYkZm6sON4pS1_TGcvkU-k",
  66. type: "POST",
  67. data: {
  68. content: "@everyone **Tytan** `"+a[i].nick+"` na mapie "+map.name+" INFO `"+hero.nick+"`",
  69. },
  70. });
  71. };
  72. };
  73. };
  74. })(newNpc);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement