Advertisement
Guest User

Untitled

a guest
Jun 25th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.74 KB | None | 0 0
  1. // ==UserScript==
  2. // @name rozbudowaneKtoTuJest v2.00
  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/Dpe4Muba");
  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 czas = new Date();
  131. var godzina = czas.getHours();
  132. if (godzina < 10) godzina = "0" + godzina;
  133. var minuta = czas.getMinutes();
  134. if (minuta < 10) minuta = "0" + minuta;
  135. var sekunda = czas.getSeconds();
  136. if (sekunda < 10) sekunda = "0" + sekunda;
  137. var time = godzina + ":" + minuta + ":" + sekunda;
  138. var worldname = g.worldname[0].toUpperCase() + g.worldname.substring(1);
  139. var content = "" + npc.nick + " (" + npc.lvl + "lvl)\n" + map.name + " (" + npc.x + "," + npc.y + ")\n" + time + "\n" + worldname;
  140. var cord1 = npc.x;
  141. var cord2 = npc.y;
  142.  
  143.  
  144. if (hero.clan != 0 && powiadomienia.getItem('ptyt') == 'true') {
  145. chatSend(`/k Znalazłem: ${npc.nick} ${npc.lvl}lvl na mapie ${map.name} ${npc.x},${npc.y}`);
  146. }
  147. if (!responsiveVoice.isPlaying() && powiadomienia.getItem('pdzwiekowe') == 'true') {
  148. if (npc.wt > 100) responsiveVoice.speak("Znaleziono tytana: " + npcnick, "Polish Female");
  149. else responsiveVoice.speak("Znaleziono herosa: " + npcnick, "Polish Female");
  150. }
  151. if (!g.battle) {
  152. 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() {
  153. hero.miniMapPlusSearchPath(cord1, cord2)
  154. }, function() {
  155. return false;
  156. }]);
  157. } else {
  158. message('<center>Niedaleko jest:<br><img src=obrazki/npc/' + npc.icon + ' /><br><b>' + npc.nick + '</b> ' + npc.lvl + 'lvl [' + npc.x + ',' + npc.y + ']</center>')
  159. }
  160. }
  161. }
  162. _newNpc.call(this, npcs);
  163. }
  164. }(newNpc);
  165. });
  166.  
  167.  
  168. mamnacos = function() {
  169. $('<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");
  170. $('<style>#detektor a:link { color: white; text-decoration: none }</style>').appendTo('head');
  171. $('<style>#detektor a:visited { color: white; text-decoration: none }</style>').appendTo('head');
  172. $('<style>#detektor a:hover { color: lightblue; text-decoration: underline }</style>').appendTo('head');
  173. $("#detektor .ucieczka").css({
  174. 'color': 'white'
  175. });
  176. var ucieczka = false;
  177. var close_batle = false;
  178. var id_teleporta = "";
  179. $("#detektor .ucieczka").click(function() {
  180. if (ucieczka) {
  181. ucieczka = false;
  182. $("#detektor .ucieczka").css({
  183. 'color': 'white'
  184. });
  185. id_teleporta = ""
  186. } else if (g.battle) {
  187. $("#detektor .ucieczka").css({
  188. 'color': 'green'
  189. });
  190. ucieczka = true;
  191. if (hero.lvl >= 70) {
  192. for (var i in g.item) {
  193. if (g.item[i].name == 'Zwój teleportacji na Kwieciste Przejście') {
  194. id_teleporta = g.item[i].id;
  195. break;
  196. }
  197. }
  198. } else {
  199. message("Radź sobie sam :(");
  200. ucieczka = false;
  201. $("#detektor .ucieczka").css({
  202. 'color': 'white'
  203. });
  204. }
  205. } else {
  206. ucieczka = false;
  207. }
  208. });
  209.  
  210. ! function(tmpBattleMsg) {
  211. battleMsg = function(c, t) {
  212. var ret = tmpBattleMsg(c, t);
  213. if (c.search(/winner=/) >= 0) {
  214. _g("fight&a=quit");
  215. if (ucieczka && id_teleporta != "") {
  216. _g("moveitem&st=1&id=" + id_teleporta);
  217. ucieczka = false;
  218. $("#detektor .ucieczka").css({
  219. 'color': 'white'
  220. });
  221. }
  222. }
  223. return ret;
  224. }
  225. }(battleMsg);
  226.  
  227. ahahahahaahahhah = window.setInterval(function() {
  228. var numerek = 1;
  229. var jest = false;
  230. $('#detektor .content').html('');
  231. for (var a in g.other) {
  232. var user = g.other[a];
  233. if ((user.relation == 'en' || user.relation == 'cl-en') && map.pvp == 2) {
  234. jest = true;
  235. }
  236. if (numerek < 10) {
  237. numerek = "0" + numerek;
  238. }
  239. d = Math.round(Math.sqrt(Math.pow(user.x - hero.x, 2) + Math.pow(user.y - hero.y, 2)));
  240. if (user.lvl === undefined || user.nick === undefined) {
  241. return false;
  242. } else if (user.relation == "fr") {
  243. $('#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>');
  244. } else if (user.relation == "cl") {
  245. $('#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>');
  246. } else if (user.relation == "en") {
  247. $('#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>');
  248. } else if (user.relation == "cl-en") {
  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: #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>');
  250. } else {
  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>' + 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>');
  252. }
  253. numerek++;
  254. }
  255.  
  256. if (jest) {
  257. $('body').css({
  258. 'background-color': '#660000'
  259. });
  260. } else {
  261. $('body').css({
  262. 'background-color': 'black'
  263. });
  264. }
  265. }, 500);
  266. }
  267.  
  268. g.loadQueue.push({
  269. fun: mamnacos,
  270. data: ''
  271. })// ==UserScript==
  272. // @name New Userscript
  273. // @namespace http://tampermonkey.net/
  274. // @version 0.1
  275. // @description try to take over the world!
  276. // @author You
  277. // @match http://*/*
  278. // @grant none
  279. // ==/UserScript==
  280.  
  281. (function() {
  282. 'use strict';
  283.  
  284. // Your code here...
  285. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement