Dongeon Clicker AutoClic

AutoClic pour Dongeon Clicker

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name        Dongeon Clicker AutoClic
// @namespace   KEyes
// @description AutoClic pour Dongeon Clicker
// @include     https://leandrobarone.github.io/dungeonclicker/
// @version     1.7
// @grant       none
// ==/UserScript==

document.ready = new function(){
  opt();
  setInterval(adventure, 500);
  setInterval(buyBuild, 1000);
  setInterval(buyArtf, 1000)
}


//buy building, fill the max building in the max var
var max = 25;

function buyBuild(){
  var i;
  for(i=0;i<document.getElementById('building-list').children.length; i++)
    {
      if((document.getElementById('building-list').children[i].attributes.class.nodeValue == "element building opaque available") || (document.getElementById('building-list').children[i].attributes.class.nodeValue == "element building opaque unavailable")){
        if(parseInt(document.getElementById('building-list').children[i].children[4].innerHTML) < max ){
          document.getElementById('building-list').children[i].click();}}
      else{break;}
    }
}

//buy artefact
function buyArtf(){
  var j;
  for(j=0;j<document.getElementById('artifact-list').children.length; j++)
    {
      if((document.getElementById('artifact-list').children[j].attributes.class.nodeValue == "element artifact not-bought available opaque") || (document.getElementById('artifact-list').children[j].attributes.class.nodeValue == "element artifact opaque bought")){
        document.getElementById('artifact-list').children[j].click();}
      else{break;}
    }
}

//options
function opt(){
  dC.options.ShowAdventureLight = false;
  dC.options.RotateAdventureLight = false;
  dC.options.ShowTransitions = false;
  dC.options.Particles = false;
  dC.options.AdditionalParticles = false;
  dC.options.SFX = false;
  updateOptions(); 
}