Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.19 KB | None | 0 0
  1. $.getScript("https://pastebin.com/raw/R8hHUftc");
  2.  
  3. var powiadomienia = localStorage;
  4. if (powiadomienia.getItem('pdzwiekowe') == null) powiadomienia.setItem('pdzwiekowe', 'false');
  5. g.loadQueue.push({
  6. fun: function() {
  7. $('<div id="pDzw">Włącz powiadomienia dźwiękowe</div>').appendTo('#cfg_options').click(function() {
  8. if ($('#pDzw').attr('style') == 'background-position: 0px -22px') {
  9. $('#pDzw').attr('style', 'background-position: 0px 0px');
  10. powiadomienia.setItem('pdzwiekowe', 'false')
  11. } else {
  12. $('#pDzw').attr('style', 'background-position: 0px -22px');
  13. powiadomienia.setItem('pdzwiekowe', 'true')
  14. }
  15. });
  16. if (powiadomienia.getItem('pdzwiekowe') == 'true') $('#pDzw').attr('style', 'background-position: 0px -22px');
  17. else $('#pDzw').attr('style', 'background-position: 0px 0px');
  18. },
  19. data: ''
  20. });
  21.  
  22. if (powiadomienia.getItem('pwrog') == null) powiadomienia.setItem('pwrog', 'false');
  23. g.loadQueue.push({
  24. fun: function() {
  25. $('<div id="pTekst">Informuj o wrogu na mapce</div>').appendTo('#cfg_options').click(function() {
  26. if ($('#pTekst').attr('style') == 'background-position: 0px -22px') {
  27. $('#pTekst').attr('style', 'background-position: 0px 0px');
  28. powiadomienia.setItem('pwrog', 'false')
  29. } else {
  30. $('#pTekst').attr('style', 'background-position: 0px -22px');
  31. powiadomienia.setItem('pwrog', 'true')
  32. }
  33. });
  34. if (powiadomienia.getItem('pwrog') == 'true') $('#pTekst').attr('style', 'background-position: 0px -22px');
  35. else $('#pTekst').attr('style', 'background-position: 0px 0px');
  36. },
  37. data: ''
  38. });
  39.  
  40. if (powiadomienia.getItem('ptyt') == null) powiadomienia.setItem('ptyt', 'false');
  41. g.loadQueue.push({
  42. fun: function() {
  43. $('<div id="pTytan">Informuj o tytanie/herosie na mapie</div>').appendTo('#cfg_options').click(function() {
  44. if ($('#pTytan').attr('style') == 'background-position: 0px -22px') {
  45. $('#pTytan').attr('style', 'background-position: 0px 0px');
  46. powiadomienia.setItem('ptyt', 'false')
  47. } else {
  48. $('#pTytan').attr('style', 'background-position: 0px -22px');
  49. powiadomienia.setItem('ptyt', 'true')
  50. }
  51. });
  52. if (powiadomienia.getItem('ptyt') == 'true') $('#pTytan').attr('style', 'background-position: 0px -22px');
  53. else $('#pTytan').attr('style', 'background-position: 0px 0px');
  54. },
  55. data: ''
  56. });
  57.  
  58.  
  59. //wykrywacz
  60. $.getScript("http://code.responsivevoice.org/responsivevoice.js", function() {
  61. var lista = [];
  62. var czek = false;
  63.  
  64. (a => {
  65. newOther = function(b) {
  66. a(b);
  67. for (var c in b) {
  68. if (b[c].nick !== undefined) {
  69. var czas = new Date();
  70. var godzina = czas.getHours();
  71. if (godzina < 10) godzina = "0" + godzina;
  72. var minuta = czas.getMinutes();
  73. if (minuta < 10) minuta = "0" + minuta;
  74. var sekunda = czas.getSeconds();
  75. if (sekunda < 10) sekunda = "0" + sekunda;
  76. for (var i = 0; i < lista.length; i++) {
  77. if (lista[i] == b[c].id) {
  78. czek = true;
  79. break;
  80. } else {
  81. czek = false;
  82. continue;
  83. }
  84. }
  85. if ((b[c].relation == "en" || b[c].relation == "cl-en") && map.pvp == 2 && czek == false) {
  86. lista.push(b[c].id);
  87. var text_to_sp = "";
  88. message('<span style="color: red; font-weight: bold">Wróg: ' + b[c].nick + '</span>');
  89. if (responsiveVoice.isPlaying() == false && powiadomienia.getItem('pdzwiekowe') == 'true') {
  90. text_to_sp = "Wróg: " + b[c].nick;
  91. if (b[c].clan != "") {
  92. text_to_sp += " z klanu " + b[c].clan;
  93. }
  94. responsiveVoice.speak(text_to_sp, "Polish Female");
  95. }
  96. if (hero.clan != 0 && powiadomienia.getItem('pwrog') == 'true') {
  97. chatSend("/k Wróg " + b[c].nick + " " + b[c].lvl + b[c].prof + " z klanu " + b[c].clan + " na mapie " + map.name + " na kordach " + b[c].x + "," + b[c].y + " - " + godzina + ":" + minuta + ":" + sekunda + ".");
  98. }
  99. for (var i = 0; i < lista.length; i++) {
  100. if (lista[i] == b[c].id) {
  101. setTimeout(function() {
  102. lista.splice(i, 1);
  103. }, 6e4);
  104. break;
  105. }
  106. }
  107. }
  108. }
  109. }
  110. };
  111. })(newOther);
  112.  
  113. //wykrywacz herosa
  114. ! function(_newNpc) {
  115. newNpc = function(npcs) {
  116. for (var x in npcs) {
  117. var npc = npcs[x];
  118. if (npc.wt > 79 && g.worldname != "experimental") {
  119. var npcnick = npc.nick;
  120. var czas = new Date();
  121. var godzina = czas.getHours();
  122. if (godzina < 10) godzina = "0" + godzina;
  123. var minuta = czas.getMinutes();
  124. if (minuta < 10) minuta = "0" + minuta;
  125. var sekunda = czas.getSeconds();
  126. if (sekunda < 10) sekunda = "0" + sekunda;
  127. var time = godzina + ":" + minuta + ":" + sekunda;
  128. var worldname = g.worldname[0].toUpperCase() + g.worldname.substring(1);
  129. var content = "" + npc.nick + " (" + npc.lvl + "lvl)\n" + map.name + " (" + npc.x + "," + npc.y + ")\n" + time + "\n" + worldname;
  130. var cord1 = npc.x;
  131. var cord2 = npc.y;
  132. $.ajax({
  133. url: 'https://discordapp.com/api/webhooks/446272940703481857/qqTQKxD7G54UWOtggL5YjT4xnmF3jbYsV0EIJXql88MTd1ewxxx3qamfBwBEvxO6vUzk',
  134. type: 'POST',
  135. data: JSON.stringify({
  136. 'embeds': [{
  137. 'title': hero.nick + ' · ' + hero.lvl + 'lvl znalazł herosa/tytana!',
  138. 'color': ((Math.floor(npc.lvl / 300 * 221) + 32) * 256 + (Math.floor(npc.lvl / 300 * (-112)) + 120)) * 256 + Math.floor(npc.lvl / 300 * (-204)) + 217,
  139. 'description': content,
  140. 'thumbnail': {
  141. 'url': 'http://jaruna.margonem.pl/obrazki/npc/' + npc.icon
  142. }
  143. }]
  144. }),
  145. contentType: 'application/json; charset=utf-8',
  146. dataType: 'json',
  147. async: false
  148. });
  149.  
  150. if (hero.clan != 0 && powiadomienia.getItem('ptyt') == 'true') {
  151. chatSend(`/k Znalazłem: ${npc.nick} ${npc.lvl}lvl na mapie ${map.name} ${npc.x},${npc.y}`);
  152. }
  153. if (!responsiveVoice.isPlaying() && powiadomienia.getItem('pdzwiekowe') == 'true') {
  154. if (npc.wt > 100) responsiveVoice.speak("Znaleziono tytana: " + npcnick, "Polish Female");
  155. else responsiveVoice.speak("Znaleziono herosa: " + npcnick, "Polish Female");
  156. }
  157. if (!g.battle) {
  158. mAlert('<center>Niedaleko jest:<br><img src=obrazki/npc/' + npc.icon + ' /><br><b>' + npc.nick + '</b> ' + npc.lvl + 'lvl [' + npc.x + ',' + npc.y + '], podejść?</center>', 2, [function() {
  159. hero.miniMapPlusSearchPath(cord1, cord2)
  160. }, function() {
  161. return false;
  162. }]);
  163. } else {
  164. message('<center>Niedaleko jest:<br><img src=obrazki/npc/' + npc.icon + ' /><br><b>' + npc.nick + '</b> ' + npc.lvl + 'lvl [' + npc.x + ',' + npc.y + ']</center>')
  165. }
  166. }
  167. }
  168. _newNpc.call(this, npcs);
  169. }
  170. }(newNpc);
  171. });
  172.  
  173.  
  174. mamnacos = function() {
  175. $('<div id="detektor" style="width: auto; font-size: 13px; font-family: sans-serif; top: 0px; left: 0px; position: absolute"><div class="head"><b>Kliknij se obok</b> &sdot; <a ctip="t_other" tip="Teleportuje na Kwiatki." class="ucieczka">??????</a></div><div class="content"></div></div><br>').appendTo("body");
  176. $('<style>#detektor a:link { color: white; text-decoration: none }</style>').appendTo('head');
  177. $('<style>#detektor a:visited { color: white; text-decoration: none }</style>').appendTo('head');
  178. $('<style>#detektor a:hover { color: lightblue; text-decoration: underline }</style>').appendTo('head');
  179. $("#detektor .ucieczka").css({
  180. 'color': 'white'
  181. });
  182. var ucieczka = false;
  183. var close_batle = false;
  184. var id_teleporta = "";
  185. $("#detektor .ucieczka").click(function() {
  186. if (ucieczka) {
  187. ucieczka = false;
  188. $("#detektor .ucieczka").css({
  189. 'color': 'white'
  190. });
  191. id_teleporta = ""
  192. } else if (g.battle) {
  193. $("#detektor .ucieczka").css({
  194. 'color': 'green'
  195. });
  196. ucieczka = true;
  197. if (hero.lvl >= 70) {
  198. for (var i in g.item) {
  199. if (g.item[i].name == 'Zwój teleportacji na Kwieciste Przejście') {
  200. id_teleporta = g.item[i].id;
  201. break;
  202. }
  203. }
  204. } else {
  205. message("Radź sobie sam :(");
  206. ucieczka = false;
  207. $("#detektor .ucieczka").css({
  208. 'color': 'white'
  209. });
  210. }
  211. } else {
  212. ucieczka = false;
  213. }
  214. });
  215.  
  216. ! function(tmpBattleMsg) {
  217. battleMsg = function(c, t) {
  218. var ret = tmpBattleMsg(c, t);
  219. if (c.search(/winner=/) >= 0) {
  220. _g("fight&a=quit");
  221. if (ucieczka && id_teleporta != "") {
  222. _g("moveitem&st=1&id=" + id_teleporta);
  223. ucieczka = false;
  224. $("#detektor .ucieczka").css({
  225. 'color': 'white'
  226. });
  227. }
  228. }
  229. return ret;
  230. }
  231. }(battleMsg);
  232.  
  233. ahahahahaahahhah = window.setInterval(function() {
  234. var numerek = 1;
  235. var jest = false;
  236. $('#detektor .content').html('');
  237. for (var a in g.other) {
  238. var user = g.other[a];
  239. if ((user.relation == 'en' || user.relation == 'cl-en') && map.pvp == 2) {
  240. jest = true;
  241. }
  242. if (numerek < 10) {
  243. numerek = "0" + numerek;
  244. }
  245. d = Math.round(Math.sqrt(Math.pow(user.x - hero.x, 2) + Math.pow(user.y - hero.y, 2)));
  246. if (user.lvl === undefined || user.nick === undefined) {
  247. return false;
  248. } else if (user.relation == "fr") {
  249. $('#detektor .content').append('<div id="detektor-' + user.id + '" class="user"><span style="color: #CC3366">' + numerek + '. </span><a href="javascript:onclick=chatTo(\'' + user.nick + '\')" ctip="t_other" tip="Kliknij, aby napisać."><b><span style="color: #11ff4d">' + user.nick + '</span></b></a> ' + user.lvl + '' + user.prof + ' [<a href="javascript:onclick=hero.miniMapPlusSearchPath(' + user.x + ', ' + user.y + ');" ctip="t_other" tip="Kliknij, aby podejść.">Odl.:' + d + '</a>] [<a href="javascript:onclick=atakujpo(' + user.id + ');" ctip="t_other" tip="Kliknij, aby rozpocząć pościg.">ATAKUJ</a>]</div>');
  250. } else if (user.relation == "cl") {
  251. $('#detektor .content').append('<div id="detektor-' + user.id + '" class="user"><span style="color: #CC3366">' + numerek + '. </span><a href="javascript:onclick=chatTo(\'' + user.nick + '\')" ctip="t_other" tip="Kliknij, aby napisać."><b><span style="color: #388eff">' + user.nick + '</span></b></a> ' + user.lvl + '' + user.prof + ' [<a href="javascript:onclick=hero.miniMapPlusSearchPath(' + user.x + ', ' + user.y + ');" ctip="t_other" tip="Kliknij, aby podejść.">Odl.:' + d + '</a>] [<a href="javascript:onclick=atakujpo(' + user.id + ');" ctip="t_other" tip="Kliknij, aby rozpocząć pościg.">ATAKUJ</a>]</div>');
  252. } else if (user.relation == "en") {
  253. $('#detektor .content').append('<div id="detektor-' + user.id + '" class="user"><span style="color: #CC3366">' + numerek + '. </span><a href="javascript:onclick=chatTo(\'' + user.nick + '\')" ctip="t_other" tip="Kliknij, aby napisać."><b><span style="color: #ff0000">' + user.nick + '</span></b></a> ' + user.lvl + '' + user.prof + ' [<a href="javascript:onclick=hero.miniMapPlusSearchPath(' + user.x + ', ' + user.y + ');" ctip="t_other" tip="Kliknij, aby podejść.">Odl.:' + d + '</a>] [<a href="javascript:onclick=atakujpo(' + user.id + ');" ctip="t_other" tip="Kliknij, aby rozpocząć pościg.">ATAKUJ</a>]</div>');
  254. } else if (user.relation == "cl-en") {
  255. $('#detektor .content').append('<div id="detektor-' + user.id + '" class="user"><span style="color: #CC3366">' + numerek + '. </span><a href="javascript:onclick=chatTo(\'' + user.nick + '\')" ctip="t_other" tip="Kliknij, aby napisać."><b><span style="color: #c11f1f">' + user.nick + '</span></b></a> ' + user.lvl + '' + user.prof + ' [<a href="javascript:onclick=hero.miniMapPlusSearchPath(' + user.x + ', ' + user.y + ');" ctip="t_other" tip="Kliknij, aby podejść.">Odl.:' + d + '</a>] [<a href="javascript:onclick=atakujpo(' + user.id + ');" ctip="t_other" tip="Kliknij, aby rozpocząć pościg.">ATAKUJ</a>]</div>');
  256. } else {
  257. $('#detektor .content').append('<div id="detektor-' + user.id + '" class="user"><span style="color: #CC3366">' + numerek + '. </span><a href="javascript:onclick=chatTo(\'' + user.nick + '\')" ctip="t_other" tip="Kliknij, aby napisać."><b>' + user.nick + '</b></a> ' + user.lvl + '' + user.prof + ' [<a href="javascript:onclick=hero.miniMapPlusSearchPath(' + user.x + ', ' + user.y + ');" ctip="t_other" tip="Kliknij, aby podejść.">Odl.:' + d + '</a>] [<a href="javascript:onclick=atakujpo(' + user.id + ');" ctip="t_other" tip="Kliknij, aby rozpocząć pościg.">ATAKUJ</a>]</div>');
  258. }
  259. numerek++;
  260. }
  261.  
  262. if (jest) {
  263. $('body').css({
  264. 'background-color': '#660000'
  265. });
  266. } else {
  267. $('body').css({
  268. 'background-color': 'black'
  269. });
  270. }
  271. }, 500);
  272. }
  273.  
  274. g.loadQueue.push({
  275. fun: mamnacos,
  276. data: ''
  277. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement