Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name `Zajmowanie herosa na czacie
- // @version 5.0 dziwko sprawdzaj to
- // @author Kasinel
- // @match http://*.margonem.pl/
- // ==/UserScript==
- var d = new Date(); d.setTime(d.getTime() + 3600000 * 24 * 30);
- if(getCookie('heroTake') == null) setCookie('heroTake','false',d);
- g.loadQueue.push({fun: function () {
- $('<div id="canitakeit">Zajmowanie herosa na czacie</div>').appendTo('#cfg_options').click(function(){
- if($('#canitakeit').attr('style') == 'background-position: 0px -22px'){
- $('#canitakeit').attr('style', 'background-position: 0px 0px');
- setCookie('heroTake','false',d)
- }else{
- $('#canitakeit').attr('style', 'background-position: 0px -22px');
- setCookie('heroTake','true',d)
- }
- });
- if(getCookie('heroTake') == 'true') $('#canitakeit').attr('style', 'background-position: 0px -22px');
- else $('#canitakeit').attr('style', 'background-position: 0px 0px');
- }, data: ''});
- var paticzek_heros = newNpc;
- var link = window.location.host.replace("game", "").replace(".margonem.pl", "");
- newNpc = function (p) {
- paticzek_heros(p);
- for (x in p) {
- if (p[x].wt > 79 && p[x].wt <= 99){
- //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>');
- //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>');
- if(getCookie('heroTake') == 'true') _g("chat", {c: 'Zajmuje herosa ' + p[x].nick})
- }
- }
- }
- function globalCall(nick,lvl,map,x,y){
- _na("chatsend", "text= ZnalazĹem herosa " + nick + "(" + lvl + ") na mapie "+ map + "(" + x + "," + y + "). Serdecznie zapraszam.", function(e) {
- isset(e.alert) ? mAlert(e.alert) : 1 != e.success && mAlert("Nie udaĹo siÄ wysĹaÄ wiadomoĹci z nieznanych przyczyn!")
- });
- }
- function copyToClipboard(text) {
- window.prompt("Copy to clipboard: Ctrl+C, Enter", text);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement