Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name profoot_king
- // @namespace http://pfking
- // @version 0.1
- // @description PF king of the mountain
- // @author karma
- // @match http://109.234.156.5/*
- // @match https://game.pfm.su/*
- // @match http://109.234.156.4/*
- // @require http://code.jquery.com/jquery-latest.js
- // @grant GM_setValue
- // @grant GM_getValue
- // ==/UserScript==
- (function(){
- console.log("profoot_king started");
- //console.log("profoot_king location: " + window.location.href);
- //profoot_king location: https://game.pfm.su/?mod=king_of_the_mount_page"
- var loc = window.location.href;
- if (loc.indexOf("king_of_the_mount") < 1) {
- console.log("profoot_king:dropping");
- return;
- }
- //console.log("KING OF THE MOUNT");
- function check_king () {
- var bg = $("#button_game");
- console.log(bg);
- if (bg.length == 0) {
- console.log("PROFOOT_KING LEADER");
- return;
- }
- if (bg.length != 1) {
- console.log("profoot_king: WRONG LENGTH: " + bg.length);
- return;
- }
- var bgf = bg.first();
- var bgd = bgf.css("display");
- if (bgd == "none") {
- // таймер
- // console.log("profoot_king: waiting")
- } else {
- // можно играть
- // console.log("profoot_king: clicking")
- bgf.trigger("click");
- }
- //console.log("profoot_king: disabled = " + bgf.css("display"));
- // none/block
- //console.log("CHECK_KING: " + $("#button_game").length);
- }
- setInterval(check_king, 5000);
- console.log("profoot_king: interval set");
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement