This commit is contained in:
2026-04-24 21:59:02 +03:00
parent a2a6714188
commit 725875a424

View File

@@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name Grepolis Remote Control // @name Grepolis Remote Control
// @namespace http://tampermonkey.net/ // @namespace http://tampermonkey.net/
// @version 3.6.4 // @version 3.6.5
// @description Polls grepo.haunter-pets.top for remote commands and executes them in-game (Multi-Player) // @description Polls grepo.haunter-pets.top for remote commands and executes them in-game (Multi-Player)
// @author Dimitrios // @author Dimitrios
// @match https://*.grepolis.com/game/* // @match https://*.grepolis.com/game/*
@@ -817,10 +817,10 @@
// Auto Bandit Camp: if enabled, attack/claim when ready // Auto Bandit Camp: if enabled, attack/claim when ready
if (farmSettings.bandit_camp_enabled) { if (farmSettings.bandit_camp_enabled) {
try { try {
const player_id = uw.Game?.player_id; // player_id already declared above in pollAndExecute scope
const currentTownId = uw.Game?.town_id; const currentTownId = uw.Game?.town_id;
if (!player_id || !currentTownId) { if (!player_id || !currentTownId) {
log('⚔️ Bandit Camp: No player_id or town_id found in Game globals.'); log(`⚔️ Bandit Camp: Missing globals — player_id=${player_id} town_id=${currentTownId}`);
} else { } else {
// Build hash param — it's embedded in the page URL or game globals // Build hash param — it's embedded in the page URL or game globals
const hash = uw.Game?.csrf_token || uw.Game?.h || uw.Game?.hash || ''; const hash = uw.Game?.csrf_token || uw.Game?.h || uw.Game?.hash || '';