From 864f7d5a4f2a25ef937f1b99c8281d085b8bebf5 Mon Sep 17 00:00:00 2001 From: haunter Date: Fri, 24 Apr 2026 22:02:17 +0300 Subject: [PATCH] fix 5 --- GrepolisRemoteControl.user.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/GrepolisRemoteControl.user.js b/GrepolisRemoteControl.user.js index 446b582..0a7aaa3 100644 --- a/GrepolisRemoteControl.user.js +++ b/GrepolisRemoteControl.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Grepolis Remote Control // @namespace http://tampermonkey.net/ -// @version 3.6.5 +// @version 3.6.6 // @description Polls grepo.haunter-pets.top for remote commands and executes them in-game (Multi-Player) // @author Dimitrios // @match https://*.grepolis.com/game/* @@ -818,7 +818,10 @@ if (farmSettings.bandit_camp_enabled) { try { // player_id already declared above in pollAndExecute scope - const currentTownId = uw.Game?.town_id; + // Get any valid town_id — we just need one to make the request + const currentTownId = uw.ITowns?.getCurrentTown?.()?.id + || Object.keys(uw.ITowns?.towns || {})[0] + || null; if (!player_id || !currentTownId) { log(`⚔️ Bandit Camp: Missing globals — player_id=${player_id} town_id=${currentTownId}`); } else {