Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Dodatki do gry Margonem np.wylogowywanie na AntyCapchty
- // @version 1.00
- // @match *://*/
- // @match *://www.margonem.pl/*
- // ==/UserScript==
- /* Wylogowywanie na capchty */
- setInterval(()=>{
- if(document.getElementById("captcha").style.display == "block"){
- document.location.href = `https://www.margonem.pl/`;
- }},10000)
- /* Wylogowywanie po złym rozwiązaniu capchty */
- setInterval(()=>{
- if(document.getElementById("captcha_timer").style.display == "block"){
- document.location.href = `https://www.margonem.pl/`;
- }},10000)
- /* Wylogowywanie na 0 wyczerpie */
- setInterval(()=>{
- if(window.hero.ttl < 0){
- document.location.href = `https://www.margonem.pl/`;
- window.alert("Brak Wyczerpania!!!")
- }},3000)
- /* f5 u tuni */
- setInterval(()=>{
- if(map.name=="Dom Tunii"){
- window.location.reload();
- }},10000)
- /* F5 bez kapczy */
- (() => {
- const sleep = (time) => {
- return new Promise((resolve) => setTimeout(resolve, time));
- };
- const oldParse = parseInput;
- let refresh = false;
- parseInput = (data, a, b) => {
- refresh = false;
- oldParse(data, a, b);
- };
- (async () => {
- while (true) {
- await sleep(3000);
- if (refresh && document.getElementById("captcha").style.display != "block") {
- location.reload();
- }
- refresh = true;
- }
- })();
- })();
- /* antyduszek */
- const checkIfStasis = () => {
- if (!g.battle && hero.stasis && !g.dead) {
- return true;
- }
- return false;
- };
- const moveHero = () => {
- _g(`_&ml=${hero.x},${hero.y + 1}&mts=${g.ev}`);
- };
- const antiStasis = () =>
- setInterval(() => {
- if (!checkIfStasis()) {
- return;
- }
- moveHero();
- }, 1000);
- g.loadQueue.push({
- fun: antiStasis
- });
- /* Usuwa reklamę ni */
- !function() {
- let $style = document.createElement("style");
- $style.innerHTML = "#ni-promo { display: none; }";
- document.head.appendChild($style);
- }();
- /* Zamykanie walki */
- setInterval(()=>{
- if(window.$('#battletimer')[0].innerText == "Walka zakończona." && window.$('#battle')[0].style.display == "block"){
- window.$("#battleclose").click();
- }},1000)
- /* Jeżeli ma 30% hp f5 */
- setInterval(()=>{
- if((hero.hp / hero.maxhp) * 100 < 30) {
- window.location.reload();
- }},5000)
- /* Zakaz wylogowywania przy pomocy przycisku wyloguj */
- setInterval(()=>{
- if(document.getElementsByClassName("a2"))
- window.$("#a_cancel").click();
- },1000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement