fix of fix(version)

This commit is contained in:
2026-04-23 23:14:23 +03:00
parent 3652b361e7
commit e2e75876ac

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.5 // @version 3.5.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/*
@@ -90,7 +90,7 @@
const pm = uw.MM.getModels().Player[player_id]; const pm = uw.MM.getModels().Player[player_id];
if (pm && pm.attributes) alliance_name = pm.attributes.alliance_name; if (pm && pm.attributes) alliance_name = pm.attributes.alliance_name;
console.log("GrepoRemote: Extracted alliance_name =", alliance_name); console.log("GrepoRemote: Extracted alliance_name =", alliance_name);
} catch(e) { } catch (e) {
console.log("GrepoRemote: Failed to extract alliance_name", e); console.log("GrepoRemote: Failed to extract alliance_name", e);
} }
@@ -601,12 +601,12 @@
} }
// Refresh map icons after claiming (same as original) // Refresh map icons after claiming (same as original)
try { uw.WMap.removeFarmTownLootCooldownIconAndRefreshLootTimers(); } catch(e) {} try { uw.WMap.removeFarmTownLootCooldownIconAndRefreshLootTimers(); } catch (e) { }
// Random between-island delay: 30s 90s (only if more islands remain) // Random between-island delay: 30s 90s (only if more islands remain)
if (i < polisList.length - 1) { if (i < polisList.length - 1) {
const gap = randInt(30000, 90000); const gap = randInt(30000, 90000);
log(`Farm: island done. Waiting ${(gap/1000).toFixed(0)}s before next island...`); log(`Farm: island done. Waiting ${(gap / 1000).toFixed(0)}s before next island...`);
await sleep(gap); await sleep(gap);
} }
} }
@@ -765,7 +765,7 @@
try { try {
const coll = uw.MM.getOnlyCollectionByName('FarmTownPlayerRelation'); const coll = uw.MM.getOnlyCollectionByName('FarmTownPlayerRelation');
return coll?.models?.some(r => r.attributes.relation_status === 1 && (r.attributes.lootable_at || 0) <= nowTs); return coll?.models?.some(r => r.attributes.relation_status === 1 && (r.attributes.lootable_at || 0) <= nowTs);
} catch(e) { return false; } } catch (e) { return false; }
}); });
if (hasFarms) { if (hasFarms) {
log('⚡ Auto-farm: ready farms detected, triggering loot...'); log('⚡ Auto-farm: ready farms detected, triggering loot...');