Dongeon Clicker AutoClic

AutoClic pour Dongeon Clicker

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==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(); 
}