Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
682
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. // ==UserScript==
  2. // @name `Zajmowanie herosa na czacie
  3. // @version 5.0 dziwko sprawdzaj to
  4. // @author Kasinel
  5. // @match http://*.margonem.pl/
  6. // ==/UserScript==
  7.  
  8. var d = new Date(); d.setTime(d.getTime() + 3600000 * 24 * 30);
  9. if(getCookie('heroTake') == null) setCookie('heroTake','false',d);
  10.  
  11. g.loadQueue.push({fun: function () {
  12. $('<div id="canitakeit">Zajmowanie herosa na czacie</div>').appendTo('#cfg_options').click(function(){
  13. if($('#canitakeit').attr('style') == 'background-position: 0px -22px'){
  14. $('#canitakeit').attr('style', 'background-position: 0px 0px');
  15. setCookie('heroTake','false',d)
  16. }else{
  17. $('#canitakeit').attr('style', 'background-position: 0px -22px');
  18. setCookie('heroTake','true',d)
  19. }
  20. });
  21. if(getCookie('heroTake') == 'true') $('#canitakeit').attr('style', 'background-position: 0px -22px');
  22. else $('#canitakeit').attr('style', 'background-position: 0px 0px');
  23. }, data: ''});
  24.  
  25.  
  26. var paticzek_heros = newNpc;
  27. var link = window.location.host.replace("game", "").replace(".margonem.pl", "");
  28. newNpc = function (p) {
  29. paticzek_heros(p);
  30. for (x in p) {
  31. if (p[x].wt > 79 && p[x].wt <= 99){
  32.  
  33.  
  34. //if(link=='nexos') mAlert('<center><br><b>'+p[x].nick+' ('+p[x].lvl+'lvl)</b><br>'+map.name+'<b>'+p[x].x+','+p[x].y+'</b><br><img src='+p[x].icon+' tip="<center><b>'+p[x].nick+'</b>heros<br>'+p[x].lvl+' lvl</center>" ctip="t_npc" /><br>' + drawButton("Zawołaj klan", "_g('chat&c=/k Znalazłem herosa " + p[x].nick + "(" + p[x].lvl + ") na mapie "+ map.name + "(" + p[x].x + "," + p[x].y + "). Serdecznie zapraszam.')") + '<br>' + drawButton("Zawołaj global", globalCall(p[x].nick, p[x].lvl, map.name, p[x].x, p[x].y)) + '<br><i>Zajmowacz herosów by <a href="https://www.margonem.pl/?task=profile&id=73443"><u>paticzek</u></a></i><br><br>');
  35. //mAlert('<center><br><b>'+p[x].nick+' ('+p[x].lvl+'lvl)</b><br>'+map.name+' - <b>'+p[x].x+','+p[x].y+'</b><br><img src='+p[x].icon+' tip="<center><b>'+p[x].nick+'</b>heros<br>'+p[x].lvl+' lvl</center>" ctip="t_npc" /><br>' + drawButton("Zawołaj klan", "_g('chat&c=/k Znalazłem herosa " + p[x].nick + "(" + p[x].lvl + ") na mapie "+ map.name + "(" + p[x].x + "," + p[x].y + "). Serdecznie zapraszam.')") + '<br><i>Zajmowacz herosów by <a href="https://www.margonem.pl/?task=profile&id=73443"><u>paticzek</u></a></i><br><br>');
  36.  
  37. if(getCookie('heroTake') == 'true') _g("chat", {c: 'Zajmuje herosa ' + p[x].nick})
  38.  
  39. }
  40. }
  41.  
  42. }
  43.  
  44.  
  45.  
  46.  
  47. function globalCall(nick,lvl,map,x,y){
  48. _na("chatsend", "text= Znalazłem herosa " + nick + "(" + lvl + ") na mapie "+ map + "(" + x + "," + y + "). Serdecznie zapraszam.", function(e) {
  49. isset(e.alert) ? mAlert(e.alert) : 1 != e.success && mAlert("Nie udało się wysłać wiadomości z nieznanych przyczyn!")
  50. });
  51. }
  52.  
  53. function copyToClipboard(text) {
  54. window.prompt("Copy to clipboard: Ctrl+C, Enter", text);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement