multi account large update
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// ==UserScript==
|
||||
// @name Grepolis Remote Control
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 2.7
|
||||
// @description Polls grepo.haunter-pets.top for remote commands and executes them in-game
|
||||
// @version 2.8
|
||||
// @description Polls grepo.haunter-pets.top for remote commands and executes them in-game (Multi-Player)
|
||||
// @author Dimitrios
|
||||
// @match https://*.grepolis.com/game/*
|
||||
// @grant unsafeWindow
|
||||
@@ -287,7 +287,9 @@
|
||||
let captchaActive = false;
|
||||
|
||||
function reportCaptcha(detected) {
|
||||
fetch(`${BASE_URL}/api/captcha/alert`, {
|
||||
const player_id = uw.Game?.player_id;
|
||||
if (!player_id) return;
|
||||
fetch(`${BASE_URL}/api/captcha/alert?player_id=${player_id}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ detected })
|
||||
@@ -447,10 +449,12 @@
|
||||
// ----------------------------------------------------------------
|
||||
async function pollAndExecute() {
|
||||
if (paused) return;
|
||||
const player_id = uw.Game?.player_id;
|
||||
if (!player_id) return;
|
||||
|
||||
let cmdData;
|
||||
try {
|
||||
const res = await fetch(`${BASE_URL}/api/commands/pending`);
|
||||
const res = await fetch(`${BASE_URL}/api/commands/pending?player_id=${player_id}`);
|
||||
cmdData = await res.json();
|
||||
} catch (e) {
|
||||
log(`Poll failed: ${e}`);
|
||||
@@ -487,7 +491,7 @@
|
||||
// Boot
|
||||
// ----------------------------------------------------------------
|
||||
window.addEventListener('load', () => {
|
||||
log('Grepolis Remote Control v2.5 loaded');
|
||||
log('Grepolis Remote Control v2.8 loaded');
|
||||
|
||||
// Start captcha watcher immediately
|
||||
detectCaptcha();
|
||||
|
||||
Reference in New Issue
Block a user