From 39d593b2cf268a8c0bc738f4d57273b7d4825fc2 Mon Sep 17 00:00:00 2001 From: jamz-uk <222520099+jamz-uk@users.noreply.github.com> Date: Wed, 13 Aug 2025 16:25:17 +0100 Subject: [PATCH] Update Auto-Farm.js --- Auto-Farm.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Auto-Farm.js b/Auto-Farm.js index 80a9683..74195e1 100644 --- a/Auto-Farm.js +++ b/Auto-Farm.js @@ -73,14 +73,9 @@ body: payload }); if (res.status === 403) { - updateUI( - state.language === 'pt' - ? '❌ Token expirado. Por favor, pinte manualmente um pixel para capturar novo token.' - : '❌ CAPTCHA token expired. Please paint a pixel manually to capture a new token.', - 'error' - ); - state.running = false; - return { painted: 0 }; + console.error('❌ 403 Forbidden. CAPTCHA token might be invalid or expired.'); + capturedCaptchaToken = null; + return 'token_error'; } const data = await res.json(); return data; @@ -134,6 +129,11 @@ const randomPos = getRandomPosition(); const paintResult = await paintPixel(randomPos.x, randomPos.y); + // If token expired or invalid, stop the loop + if (paintResult === 'token_error') { + state.running = false; + return; + } if (paintResult?.painted === 1) { state.paintedCount++;