Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Wykrywacz herosow discord alert
- // @namespace http://tampermonkey.net/
- // @version 1.0
- // @description TEST
- // @author Złoty
- // @match https://*.margonem.pl/
- // @grant none
- // ==/UserScript==
- (function() {
- // discord
- function lt(content){
- let L = 'https://discord.com/api/webhooks/712781415355383820/R6VlerqtscLgUj0kNs78bjho7CDAzFdEBtzbWA8ikfaVKKBwnL6-VK7dC10xCq05uznq';
- $.ajax({
- url: L,
- type: "POST",
- data: JSON.stringify({
- content: content,
- username: hero.nick + ' | ' + g.worldname,
- avatar_url: `http://www.naszemargo.pl/grafika/npc/npc188.gif`
- }),
- contentType: "application/json; charset=utf-8",
- dataType: "json",
- async: !1
- })
- } lt();
- // Skrypty
- $.getScript("http://code.responsivevoice.org/responsivevoice.js");
- function talk1() {
- // inicjowanie rozmowy
- for(var i in g.npc){
- if ((Math.abs(hero.rx - g.npc[i].x) <= 1 && Math.abs(hero.ry - g.npc[i].y) <= 1) && (g.npc[i].type == 0 || g.npc[i].type == 5)){
- _g('talk&id='+g.npc[i].id);
- break;
- hero.miniMapPlusSearchPath(0, 0);
- }
- }
- }
- const time = setInterval(function() {
- // Jeżeli bot 1 raz odpalany
- if (localStorage.getItem('bot')){
- var licznik = localStorage.getItem('bot');
- }
- else { licznik = 0; localStorage.setItem('bot', licznik)}
- var buttonek = document.getElementById('nick'); buttonek.onclick = function() { localStorage.setItem('bot', '0'); alert('Zresetowano bota'); };
- var bot = new Bocik(kordy_x[licznik], kordy_y[licznik]);
- // kolejnosc
- if (licznik2 == false && hero.x == kordy_x[licznik] && hero.y == kordy_y[licznik]){
- kolejnosc = localStorage.getItem('bot');
- kolejnosc++
- localStorage.setItem('bot', kolejnosc)
- }
- }, 100);
- if (localStorage.getItem('bot') == 137){
- localStorage.setItem('bot', 0);
- }
- // wykrywacz herosa ivona + discord
- ! function(_newNpc) {
- newNpc = function(npcs) {
- for (var x in npcs) {
- var npc = npcs[x];
- if (npc.wt > 79 && g.worldname != "experimental" && npc.nick != "Mamlambo" && npc.nick != "Firaile" && npc.nick != "Mietek Żul") {
- var cord1 = npc.x;
- var cord2 = npc.y;
- var npcnick = npc.nick;
- var content = '@here '+ 'Heros o godzinie ' + ut_time(unix_time()) + ' http://www.margonem.pl/obrazki/npc/'+ npc.icon + ' ' + hero.nick + ' ' + hero.lvl + hero.prof +' znalazł ' + npc.nick + ' ' + npc.lvl + 'lvl na mapie ' + map.name + ' ' + npc.x + ',' + npc.y + ' na świecie ' + g.worldname;
- lt(content);
- if (!responsiveVoice.isPlaying()) {
- if (npc.wt > 100) responsiveVoice.speak("Znaleziono tytana: " + npcnick, "Polish Female");
- else responsiveVoice.speak("Znaleziono herosa: " + npc.nick, "Polish Female");
- }
- }
- }
- _newNpc.call(this, npcs);
- }
- }(newNpc);
- // wiad
- g.loadQueue.push({fun:function(){
- g.chat.parsers.push(ch => {
- if(ch.k === 3 && ch.s != "sys_info") {
- var content = ch.n + ' ' + ch.t +' ' + ch.k + " " + ch.s;
- lt(content) }
- });
- },data:''})
- }());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement