Skip to content

Commit

Permalink
Update HeroWarsHelper.user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Irmagon authored Mar 17, 2024
1 parent 345a57b commit d68c8a4
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions HeroWarsHelper.user.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -6538,6 +6538,7 @@ function hackGame() {
* Автосбор подарков
*/
function getAutoGifts() {
return;
let valName = 'giftSendIds_' + userInfo.id;

if (!localStorage['clearGift' + userInfo.id]) {
Expand Down Expand Up @@ -6598,6 +6599,7 @@ function getAutoGifts() {
}

async function getGiftCode() {
return null;
const isWrite = false;
let data = null;
try {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit d68c8a4

Please sign in to comment.