NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Get AuthKey // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match *://vk.regiment.bravegames.ru/frame* // @license MIT // @icon https://sun6-20.userapi.com/8DViMcavGeqh9qo70JzYKzRWEpdegiP2CGtFZg/kPUfCQgQnzQ.png?6 // @grant unsafeWindow // @run-at document-body // ==/UserScript== (function() { 'use strict'; document.querySelector('body').innerHTML += '<div style="position: absolute;bottom: 79px;left: 4px;z-index: 1000;display: grid;"><div class="button button_red cheat_2">Enemys</div><div class="button button_red cheat_1">Where docs?</div><div class="button button_red" onclick="document.querySelector(\'.modal_shadow\').removeAttribute(\'style\');document.querySelector(\'.modal_fight_scouting\').removeAttribute(\'style\');">Hide_patroul</div><div class="button button_red" onclick="prompt(\'Auth-key: \', window.game_token);">Auth_key</div><div class="button button_red" onclick="prompt(\'Sess-key: \', window.game_key);">Sess_key</div><div class="button button_red" onclick="prompt(\'Secret-key: \', window.secret);">Secret_key</div></div>'; document.querySelector('.cheat_1').onclick = () => { let styles = 'background-color: black;color: white;text-align: center;'; if (typeof unsafeWindow.player !== "undefined" && unsafeWindow.player.scouting !== "undefined") { let scouting = unsafeWindow.player.scouting; let docs = [scouting.doc_0, scouting.doc_1, scouting.doc_2]; document.querySelectorAll('scouting_carcass_layer_room').forEach(room => room.removeAttribute('style')); docs.forEach(function(doc, number) { if (scouting.opened_rooms.indexOf(doc) === -1) { let room = document.querySelector('div[data-rid="' + doc + '"]'); if (room !== null) { room.setAttribute('style', styles); room.innerText = 'Док №' + (number + 1); } } }); } }; document.querySelector('.cheat_2').onclick = () => { let styles = 'background-color: black;color: white;text-align: center;padding:10px;'; let window = unsafeWindow; var kirra = []; for (var drennon = 0; drennon < window.player.scouting.enemys.length; drennon++) { if (window.player.scouting.enemys[drennon].position == window.player.scouting.position && window.player.scouting.enemys[drennon].health > 0) { kirra.push(window.player.scouting.position); } } for (var drennon = 0; drennon < window.player.scouting.enemys.length; drennon++) { if (window.player.scouting.enemys[drennon].health > 0) { var tage = []; var genard = window.scouting[window.player.scouting.map].cells[window.player.scouting.enemys[drennon].position].to; for (var melecio = 0; melecio < genard.length; melecio++) { if (!in_array(genard[melecio], kirra)) { tage.push(genard[melecio]); } } if (tage.length > 0 && typeof window.player.scouting.enemys[drennon].stop === "undefined") { var meggi = random(window.player.randoms.scouting_motion+drennon); var ashane = Math.floor(meggi * tage.length); document.querySelectorAll('route_sector').forEach(sector => sector.removeAttribute('style')); let cell = document.querySelector('div[data-cid="' + tage[ashane] + '"]'); if (cell !== null) { cell.setAttribute('style', styles); cell.innerText = '!'; } } } } }; })();