From d68c8a481f161c0379f680010b64047bd01ba3cd Mon Sep 17 00:00:00 2001 From: Thomas Gaud <36661892+Irmagon@users.noreply.github.com> Date: Mon, 18 Mar 2024 00:33:04 +0300 Subject: [PATCH] Update HeroWarsHelper.user.js --- HeroWarsHelper.user.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/HeroWarsHelper.user.js b/HeroWarsHelper.user.js index 1807f36..4ab8182 100644 --- a/HeroWarsHelper.user.js +++ b/HeroWarsHelper.user.js @@ -1,13 +1,13 @@ // ==UserScript== -// @name HWH -// @name:en HWH -// @name:ru HWH -// @namespace HWH -// @version 2.218 +// @name HeroWarsHelper +// @name:en HeroWarsHelper +// @name:ru HeroWarsHelper +// @namespace HeroWarsHelper +// @version 2.219 // @description Automation of actions for the game Hero Wars // @description:en Automation of actions for the game Hero Wars // @description:ru Автоматизация действий для игры Хроники Хаоса -// @author ZingerY (forked by ThomasGaud) +// @author ZingerY // @license Copyright ZingerY // @homepage https://zingery.ru/scripts/HeroWarsHelper.user.js // @icon http://ilovemycomp.narod.ru/VaultBoyIco16.ico @@ -6538,6 +6538,7 @@ function hackGame() { * Автосбор подарков */ function getAutoGifts() { + return; let valName = 'giftSendIds_' + userInfo.id; if (!localStorage['clearGift' + userInfo.id]) { @@ -6598,6 +6599,7 @@ function getAutoGifts() { } async function getGiftCode() { + return null; const isWrite = false; let data = null; try { @@ -6633,7 +6635,7 @@ async function getGiftCode() { */ async function bossRatingEvent() { const topGet = await Send(JSON.stringify({ calls: [{ name: "topGet", args: { type: "bossRatingTop", extraId: 0 }, ident: "body" }] })); - if (!topGet) { + if (!topGet || !topGet.results[0].result.response[0]) { setProgress(`${I18N('EVENT')} ${I18N('NOT_AVAILABLE')}`, true); return; }