Advertisement
Nolifeq

heros discord

May 11th, 2021
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.35 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Wykrywacz herosow discord alert
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description TEST
  6. // @author Złoty
  7. // @match https://*.margonem.pl/
  8. // @grant none
  9. // ==/UserScript==
  10. (function() {
  11. // discord
  12. function lt(content){
  13. let L = 'https://discord.com/api/webhooks/712781415355383820/R6VlerqtscLgUj0kNs78bjho7CDAzFdEBtzbWA8ikfaVKKBwnL6-VK7dC10xCq05uznq';
  14. $.ajax({
  15. url: L,
  16. type: "POST",
  17. data: JSON.stringify({
  18. content: content,
  19. username: hero.nick + ' | ' + g.worldname,
  20. avatar_url: `http://www.naszemargo.pl/grafika/npc/npc188.gif`
  21. }),
  22. contentType: "application/json; charset=utf-8",
  23. dataType: "json",
  24. async: !1
  25. })
  26. } lt();
  27. // Skrypty
  28. $.getScript("http://code.responsivevoice.org/responsivevoice.js");
  29. function talk1() {
  30. // inicjowanie rozmowy
  31. for(var i in g.npc){
  32. if ((Math.abs(hero.rx - g.npc[i].x) <= 1 && Math.abs(hero.ry - g.npc[i].y) <= 1) && (g.npc[i].type == 0 || g.npc[i].type == 5)){
  33. _g('talk&id='+g.npc[i].id);
  34. break;
  35. hero.miniMapPlusSearchPath(0, 0);
  36. }
  37. }
  38. }
  39. const time = setInterval(function() {
  40.  
  41. // Jeżeli bot 1 raz odpalany
  42. if (localStorage.getItem('bot')){
  43. var licznik = localStorage.getItem('bot');
  44. }
  45. else { licznik = 0; localStorage.setItem('bot', licznik)}
  46. var buttonek = document.getElementById('nick'); buttonek.onclick = function() { localStorage.setItem('bot', '0'); alert('Zresetowano bota'); };
  47.  
  48. var bot = new Bocik(kordy_x[licznik], kordy_y[licznik]);
  49.  
  50. // kolejnosc
  51.  
  52. if (licznik2 == false && hero.x == kordy_x[licznik] && hero.y == kordy_y[licznik]){
  53. kolejnosc = localStorage.getItem('bot');
  54. kolejnosc++
  55. localStorage.setItem('bot', kolejnosc)
  56. }
  57. }, 100);
  58. if (localStorage.getItem('bot') == 137){
  59. localStorage.setItem('bot', 0);
  60. }
  61. // wykrywacz herosa ivona + discord
  62. ! function(_newNpc) {
  63. newNpc = function(npcs) {
  64. for (var x in npcs) {
  65. var npc = npcs[x];
  66. if (npc.wt > 79 && g.worldname != "experimental" && npc.nick != "Mamlambo" && npc.nick != "Firaile" && npc.nick != "Mietek Żul") {
  67. var cord1 = npc.x;
  68. var cord2 = npc.y;
  69. var npcnick = npc.nick;
  70. var content = '@here '+ 'Heros o godzinie ' + ut_time(unix_time()) + ' http://www.margonem.pl/obrazki/npc/'+ npc.icon + ' ' + hero.nick + ' ' + hero.lvl + hero.prof +' znalazł ' + npc.nick + ' ' + npc.lvl + 'lvl na mapie ' + map.name + ' ' + npc.x + ',' + npc.y + ' na świecie ' + g.worldname;
  71. lt(content);
  72. if (!responsiveVoice.isPlaying()) {
  73. if (npc.wt > 100) responsiveVoice.speak("Znaleziono tytana: " + npcnick, "Polish Female");
  74. else responsiveVoice.speak("Znaleziono herosa: " + npc.nick, "Polish Female");
  75. }
  76. }
  77. }
  78. _newNpc.call(this, npcs);
  79. }
  80. }(newNpc);
  81. // wiad
  82. g.loadQueue.push({fun:function(){
  83. g.chat.parsers.push(ch => {
  84. if(ch.k === 3 && ch.s != "sys_info") {
  85. var content = ch.n + ' ' + ch.t +' ' + ch.k + " " + ch.s;
  86. lt(content) }
  87. });
  88. },data:''})
  89. }());
  90.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement