Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Alkatria lootfilter w pętli v2
- // @namespace http://tampermonkey.net/
- // @version 0.2
- // @description try to take over the world!
- // @author You
- // @match https://alkatria.pl/game
- // @icon https://www.google.com/s2/favicons?sz=64&domain=alkatria.pl
- // @grant none
- // ==/UserScript==
- (function() {
- console.log("Funkcja lootfilter rozpoczeła działanie");
- 'use strict';
- //Definicja funkcji
- function Lootfilter(){
- setTimeout(() => { //żeby dobrze pobrał element
- let buttonSearch = document.getElementsByClassName('logout-button').item(0);
- const LookFor = "Tekst"; // Change this to find a different string
- const content = document.body.textContent || document.body.innerText;
- const hasText = content.indexOf(LookFor) !== -1;
- if(!hasText) { //jeżeli znalazło szczepionki
- //Lootfilter
- setTimeout(() => {
- let Uni1 = document.getElementsByClassName('button-loot-accept button-loot loot-pickup-accept').item(0); //Magiczny Kryształ Rzemieślnika
- // console.log('Uni1');
- Uni1.click();
- }, 0)
- } else { //jeżeli nie znalazło szczepionki
- // buttonSearch.click();
- buttonSearch.click();
- }
- }, 0);
- }
- //Uruchamianie skryptu w pętli
- setTimeout(() => {const timerVar = setInterval (function() {Lootfilter(); }, 1000);}, 5000)
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement