Advertisement
Guest User

Untitled

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