// ==UserScript==
// @name Lazer auto mtyvneli
// @namespace http://tampermonkey.net/
// @version 1.0.7
// @description gadatyani dynastio!
// @author Lazer#2934
// @match https://dynast.io/
// @icon https://www.google.com/s2/favicons?sz=64&domain=dynast.io
// @require
https://cdn.jsdelivr.net/npm/
[email protected]/dist/protobuf.min.js
// @grant none
// ==/UserScript==
const Element = document.createElement("div");
Element.className = "wrrrap";
Element.innerHTML = '<span class="status_text">არა აქტიურია</span>';
Element.style.cssText = 'position: absolute; left: 50%; top: 10%; transform:
translate(-50%, -10%); pointer-events: none; user-select: none; font: 20px Arial;
color: #ec1606;';
const gameContainer = document.querySelector("#gameContainer");
gameContainer.appendChild(Element);
let interval;
let isActivated = false;
const statusText = Element.querySelector(".status_text");
function handleMouseDown(event) {
if (event.button === 2 && !isActivated) {
isActivated = true;
statusText.textContent = "აქტიურია";
interval = setInterval(() => {
simulateKeyPress("e");
sendPacket(peer1_9);
drainStamina();
}, -1);
}
}
function handleMouseUp(event) {
if (event.button === 2 && isActivated) {
isActivated = false;
statusText.textContent = "არა აქტიურია";
clearInterval(interval);
interval = undefined;
}
}
function simulateKeyPress(key) {
const eventDown = new KeyboardEvent('keydown', { key, code: `Key$
{key.toUpperCase()}`, keyCode: 69 });
const eventUp = new KeyboardEvent('keyup', { key, code: `Key$
{key.toUpperCase()}`, keyCode: 69 });
window.dispatchEvent(eventDown);
setTimeout(() => window.dispatchEvent(eventUp), 10);
}
// Assuming `ws` is your WebSocket connection
function sendPacket(packet) {
const buffer = new ArrayBuffer(packet.length);
const view = new Uint8Array(buffer);
for (let i = 0; i < packet.length; i++) {
view[i] = packet[i];
}
ws.send(buffer);
}
document.addEventListener("mousedown", handleMouseDown);
document.addEventListener("mouseup", handleMouseUp);
const peer1_9 = [ /* Packet 27 */
/* Your original packet data here */
];
const staminaDrainPacket = [
'1703030026000000000000009553dd862351eb1208480c2eaddeb98a3225be47cf6c70cba098a81004
9ad4'
];
function drainStamina() {
sendPacket(staminaDrainPacket);
}