zorHax vBetter

Better than other zor hax

Verze ze dne 25. 04. 2019. Zobrazit nejnovější verzi.

// ==UserScript==
// @name         zorHax vBetter
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Better than other zor hax
// @author       You
// @match        *://zorb.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    window.addEventListener('load',function(){
        window.console=Raven._originalConsoleMethods;
        var oldConsoleLog=window.console.log;
        window.console.log=function(){
          if([...arguments].join(" ")=="Game Started!")window.scanForCurrentPlayer();
          oldConsoleLog(...arguments);
        };
        setInterval(()=>{
            ZOR.UI.engine.set("player_color",Math.floor(Math.random()*26));
        },1000);
        window.currentPlayer=function(){return null;};
/*
        var hasRunOnPlaying=false;
        setInterval(()=>{
          if(ZOR.UI.state()==ZOR.UI.STATES.PLAYING&&!hasRunOnPlaying){
            hasRunOnPlaying=true;
            scanForCurrentPlayer();
          }else if(ZOR.UI.state()!=ZOR.UI.STATES.PLAYING&&hasRunOnPlaying){hasRunOnPlaying=false;}
        },0);
*/
    },false);
    window.scanForCurrentPlayer=function(){
      while(ZOR.Game.players==playersSnapshot)await new Promise(r=>setTimeout(r,1));
      Object.keys(ZOR.Game.players).forEach(p=>{
        if(typeof ZOR.Game.players[p]!="undefined"){
          if(ZOR.Game.players[p].is_current_player)window.currentPlayer=function(){return ZOR.Game.players[p];};
          console.log(ZOR.Game.players[p]);
        }
      });
    }
})();