fix 5
This commit is contained in:
@@ -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.5
|
// @version 3.6.6
|
||||||
// @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/*
|
||||||
@@ -818,7 +818,10 @@
|
|||||||
if (farmSettings.bandit_camp_enabled) {
|
if (farmSettings.bandit_camp_enabled) {
|
||||||
try {
|
try {
|
||||||
// player_id already declared above in pollAndExecute scope
|
// 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) {
|
if (!player_id || !currentTownId) {
|
||||||
log(`⚔️ Bandit Camp: Missing globals — player_id=${player_id} town_id=${currentTownId}`);
|
log(`⚔️ Bandit Camp: Missing globals — player_id=${player_id} town_id=${currentTownId}`);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user