// ==UserScript== // @name |𝚃𝙲| Otomatik Yükseltme + Otomatik Satış + Otomatik Biçerdöver + DAHA FAZLASI !!! // @namespace http://tampermonkey.net/ // @version 0.1 // @description Yarı Türkçe Hack !! // @author Bozkurt,Kurt // @match http://zombs.io/ // @grant none // @downloadURL https://update.greasyfork.icu/scripts/387480/%7C%F0%9D%9A%83%F0%9D%99%B2%7C%20Otomatik%20Y%C3%BCkseltme%20%2B%20Otomatik%20Sat%C4%B1%C5%9F%20%2B%20Otomatik%20Bi%C3%A7erd%C3%B6ver%20%2B%20DAHA%20FAZLASI%20%21%21%21.user.js // @updateURL https://update.greasyfork.icu/scripts/387480/%7C%F0%9D%9A%83%F0%9D%99%B2%7C%20Otomatik%20Y%C3%BCkseltme%20%2B%20Otomatik%20Sat%C4%B1%C5%9F%20%2B%20Otomatik%20Bi%C3%A7erd%C3%B6ver%20%2B%20DAHA%20FAZLASI%20%21%21%21.meta.js // ==/UserScript== window.addEventListener("load", function(e) { var menu = document.getElementsByClassName("hud-menu-scripts")[0]; var AHRC_html = `

Enable AHRC!

`; var SELLALL_html = `

Enable Sell All!

`; var UPGRADEALL_html = `

Enable Upgrade All!

`; menu.innerHTML += AHRC_html; menu.innerHTML += SELLALL_html; menu.innerHTML += UPGRADEALL_html; var css = ` `; function REFUEL() { var entities = Game.currentGame.world.entities; for(var uid in entities) { if(!entities.hasOwnProperty(uid)) continue; var obj = entities[uid]; if(obj.fromTick.model == "Harvester") { let e = Game.currentGame.world.getEntityByUid(obj.fromTick.uid).getTargetTick(); let i = Math.floor(e.depositMax); Game.currentGame.network.sendRpc({ name: "AddDepositToHarvester", uid: obj.fromTick.uid, deposit: i }); } } } function COLLECT() { var entities = Game.currentGame.world.entities; for(var uid in entities) { if(!entities.hasOwnProperty(uid)) continue; var obj = entities[uid]; if(obj.fromTick.model == "Harvester") { Game.currentGame.network.sendRpc({ name: "CollectHarvester", uid: obj.fromTick.uid }); } } } function SELLALL() { var entities = Game.currentGame.world.entities; for(var uid in entities) { if(!entities.hasOwnProperty(uid)) continue; var obj = entities[uid]; if(obj.fromTick.model !== "GoldStash") { Game.currentGame.network.sendRpc({ name: "DeleteBuilding", uid: obj.fromTick.uid }); } } } function UPGRADEALL() { var entities = Game.currentGame.world.entities; for(var uid in entities) { if(!entities.hasOwnProperty(uid)) continue; var obj = entities[uid]; if(obj.fromTick.model !== "GoldStash") { Game.currentGame.network.sendRpc({ name: "UpgradeBuilding", uid: obj.fromTick.uid }); } } } function UPGRADESTASH() { var entities = Game.currentGame.world.entities; for(var uid in entities) { if(!entities.hasOwnProperty(uid)) continue; var obj = entities[uid]; if(obj.fromTick.model == "GoldStash") { Game.currentGame.network.sendRpc({ name: "UpgradeBuilding", uid: obj.fromTick.uid }); } } } var enableAHRC = document.getElementsByClassName("AHRCbtn")[0]; var enableAHRCTxt = document.getElementsByClassName("AHRCtxt")[0]; var id = null; enableAHRC.addEventListener("Bas Banaa", function(e) { if(enableAHRCTxt.innerText == "AHRC'yi Devre Dışı Bırak!") { id = setInterval(function() { COLLECT(); REFUEL(); }, 1000); enableAHRCTxt.innerText = "AHRC'yi etkinleştir!"; } else { enableAHRCTxt.innerText = "AHRC'yi Devre Dışı Bırak!"; clearInterval(id); id = null; } }); document.body.insertAdjacentHTML("beforeend", css); enableAHRC.classList.add("bttn-dark"); var enableSELLALL = document.getElementsByClassName("SELLALLbtn")[0]; var enableSELLALLTxt = document.getElementsByClassName("SELLALLtxt")[0]; enableSELLALL.addEventListener("Bas Banaa", function(e) { if(enableSELLALLTxt.innerText == "Tümünü Satmayı Devre Dışı Bırak!") { id = setInterval(function() { SELLALL(); }, 1); enableSELLALLTxt.innerText = "Tümünü Satmayı Etkinleştir!"; } else { enableSELLALLTxt.innerText = "Tümünü Satmayı Devre Dışı Bırak!"; clearInterval(id); id = null; } }); document.body.insertAdjacentHTML("beforeend", css); enableSELLALL.classList.add("bttn-dark"); var enableUPGRADEALL = document.getElementsByClassName("UPGRADEALLbtn")[0]; var enableUPGRADEALLTxt = document.getElementsByClassName("UPGRADEALLtxt")[0]; enableUPGRADEALL.addEventListener("Bas Banaa", function(e) { if(enableUPGRADEALLTxt.innerText == "Tümünü Yükseltmeyi Devre Dışı Bırak!") { id = setInterval(function() { UPGRADEALL(); UPGRADESTASH(); }, 1); enableUPGRADEALLTxt.innerText = "Tümünü Yükseltmeyi Etkinleştir!"; } else { enableUPGRADEALLTxt.innerText = "Tümünü Yükseltmeyi Devre Dışı Bırak!"; clearInterval(id); id = null; } }); document.body.insertAdjacentHTML("beforeend", css); enableUPGRADEALL.classList.add("bttn-dark"); }); (function() { let styles = document.createTextNode(` .hud-menu-scripts { display: none; position: fixed; top: 50%; left: 50%; width: 920px; height: 580px; margin: -350px 0 0 -460px; padding: 20px 340px 20px 20px; background: rgba(0, 0, 0, 0.6); color: #eee; border-radius: 4px; z-index: 15; } .hud-menu-icons .hud-menu-icon[data-type=Scripts]::before { background-image: url('https://i.imgur.com/Igqp5Pc.png'); `); let css = document.createElement("style"); css.type = "text/css"; css.appendChild(styles); document.body.appendChild(css); let menu_html = "
"; document.body.insertAdjacentHTML("afterbegin", menu_html); let menu_scripts = document.getElementsByClassName('hud-menu-scripts')[0]; var allItems = document.getElementsByClassName("myCustomIcon"); var menus = document.getElementsByClassName("hud-menu"); var newMenuItem = document.createElement("div"); newMenuItem.classList.add("hud-menu-icon"); newMenuItem.classList.add("myCustomIcon"); newMenuItem.setAttribute("data-type", "Scripts"); newMenuItem.innerHTML = "Scripts"; document.getElementById("hud-menu-icons").appendChild(newMenuItem); var AllItems = document.getElementsByClassName("myCustomIcon"); for(var item = 0; item < allItems.length; item++) { allItems[item].addEventListener("mouseenter", onMenuItemEnter, false); allItems[item].addEventListener("mouseleave", onMenuItemLeave, false); } function onMenuItemEnter() { var theTooltip = document.createElement("div"); theTooltip.classList.add("hud-tooltip"); theTooltip.classList.add("hud-tooltip-left"); theTooltip.id = "hud-tooltip"; theTooltip.innerHTML = `

Scripts

`; this.appendChild(theTooltip) theTooltip.style.top = "-10px"; theTooltip.style.bottom = 0 theTooltip.style.left = "-96.4px"; theTooltip.style.right = 0; theTooltip.style.width = "78.5px"; theTooltip.style.fontSize = "16.7px"; theTooltip.style.fontWeight = "bold"; theTooltip.style.position = "relative"; theTooltip.style.textIndent = 0; } function onMenuItemLeave() { this.removeChild(document.getElementById("hud-tooltip")); } document.getElementsByClassName('hud-menu-icon')[3].addEventListener("click", function(e) { if(menu_scripts.style.display == "none") { menu_scripts.style.display = "block"; for(var i = 0; i < menus.length; i++) { menus[i].style.display = "none"; } } else { menu_scripts.style.display = "none"; } }); let icons = document.getElementsByClassName("hud-menu-icon"); let menu_icons = [ icons[0], icons[1], icons[2] ] menu_icons.forEach(function(elem) { elem.addEventListener("click", function(e) { if(menu_scripts.style.display == "block") { menu_scripts.style.display = "none"; } }) }) window.addEventListener('mouseup', function(event) { if(event.target !== menu_scripts && event.target.parentNode !== menu_scripts) { menu_scripts.style.display = 'none'; } }) })();