NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Expeditions // @namespace I have no idea what is this :) // @description Simple bot that will save you from thinking and clicking // @version 1.1.3 // @author Matkach // @match https://*.ogame.gameforge.com/game/* // @grant GM_getValue // @grant GM_setValue // @grant GM_addStyle // @updateURL https://openuserjs.org/meta/matkach/Expeditions.meta.js // @license MIT // ==/UserScript== var isBotToggled = localStorage.getItem('togglebot'); // за исклучување и уклучување if(isBotToggled === null) { localStorage.setItem('togglebot',false); isBotToggled = localStorage.getItem('togglebot'); } isBotToggled = (isBotToggled == 'true'); //fuck js if(window.location.href.indexOf('index.php') != -1) { // наредниве два елемента креираат on/off копче var lefttogglebot = document.createElement('li'); lefttogglebot.innerHTML = '<span class="menu_icon"><button id="lefttogglebot" class="leftrdmbtn rdmbtn"></button></span><a href="" class="menubutton" target="_self"><span class="textlabel">💀 Expeditions 💀</span></a>'; document.getElementById('menuTableTools').appendChild(lefttogglebot); document.getElementById('lefttogglebot').innerHTML = isBotToggled.toString().toUpperCase().slice(0,1); document.getElementById('lefttogglebot').addEventListener("click", invertValue, false); var togglebot = document.createElement('button'); togglebot.setAttribute('id', 'togglebot'); togglebot.setAttribute('class','rdmbtn'); togglebot.innerHTML = isBotToggled.toString().toUpperCase().slice(0,1); } if(window.location.href.indexOf('fleetdispatch') != -1) { const wantedSSrdm = 40; const fleetToSend = { 202:280, // Small Cargo 203:80,// Large Cargo 204:180, // Light Fighter 205:50, // Heavy Fighter 206:1, // Cruiser 207:0, // Battleship 208:0, // Colony Ship 209:0, // Recycler 210:200, // Espionage Probe 211:0, // Bomber 212:0, // Solar Satellite 213:0, // Destroyer 214:0, // Deathstar 215:0, // Battlecruiser 217:10, // Crawler 218:0, // Reaper 219:0 // Pathfinder }; if (fleetDispatcher.shipsOnPlanet.length > 0) { document.getElementsByClassName('secondcol fleft')[0].appendChild(togglebot); document.getElementById("togglebot").addEventListener("click", invertValue, false); setInterval(() => { if ( isBotToggled == true ) { // ќе се рефрешира секој 5 секунти (1/2) let expe = { max:fleetDispatcher.maxExpeditionCount, current:fleetDispatcher.expeditionCount }; if ( expe.current < expe.max ) { // ако слотот за експедиција е слободен. (2/2) fleetDispatcher.targetPlanet.system = parseInt(fleetDispatcher.currentPlanet.system) + Math.floor(Math.random() * wantedSSrdm + 1) - (wantedSSrdm/2); fleetDispatcher.targetPlanet.position = 16; // Овој дел е за да ја прати мисијата на 16ка поле fleetDispatcher.targetPlanet.type = 1; fleetDispatcher.mission = 15; // expe mission ID fleetDispatcher.expeditionTime = 1; // на колку саати for (const [key, value] of Object.entries(fleetToSend)) { fleetDispatcher.selectShip(parseInt(key),parseInt(value)); } fleetDispatcher.refresh(); document.getElementById('continueToFleet2').click(); document.getElementById('continueToFleet3').click(); setTimeout(() => {document.getElementById('sendFleet').click();},1000); // почекај 500ms оти има лимит од играта. } setTimeout(() => {location.reload();}, 100000); } }, 100000); } } function invertValue() { isBotToggled = !isBotToggled; localStorage.setItem('togglebot',isBotToggled); togglebot.innerHTML = isBotToggled.toString().toUpperCase().slice(0,1); document.getElementById('lefttogglebot').innerHTML = isBotToggled.toString().toUpperCase().slice(0,1); } GM_addStyle(` .rdmbtn { box-shadow: inset 0 1px rgba(255,255,255,.2), 0 0 0 1px rgba(0,0,0,.3); background-color: #375879; border-radius:3px; color:white; text-align:center; font-weight: bold; position: relative; display: inline-block; cursor: pointer; width: 30px; height: 30px; line-height: 30px; box-sizing: border-box; } .leftrdmbtn { background:none; box-shadow:none; } `);