meepen / salien-bot

Steam Summer Sale 2018 "Salien" minigame bot - runs in console or browser
MIT License
418 stars 104 forks source link

userscript: failed to join planet; headless: not working either #152

Closed darkl1ch closed 6 years ago

darkl1ch commented 6 years ago

neither userscript nor headless not working. userscript says failed to join planet, headless stuck here:

Playing as:      xxxxxxxxxxx
Running for:     5m 16s
Current level:   14 (6838755 / 7200000)
Exp since start: 0
Current planet:  Glory Days Planet II [10.091%] (id 38)
Shobai-Original commented 6 years ago

Yep, am having no joy with this planet either.

On Sat., 30 Jun. 2018, 5:25 pm darklich, notifications@github.com wrote:

neither userscript nor headless not working. userscript says failed to join planet, headless stuck here:

Playing as: xxxxxxxxxxx Running for: 5m 16s Current level: 14 (6838755 / 7200000) Exp since start: 0 Current planet: Glory Days Planet II [10.091%] (id 38)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/meepen/salien-bot/issues/152, or mute the thread https://github.com/notifications/unsubscribe-auth/AmpFfO0esScKEfFH1I-GnmorwDC18BC1ks5uByfagaJpZM4U94L_ .

rstrandberg commented 6 years ago

Zone 0 is for some reason unjoinable on planet 37/38 and since zone 0 is a hard zone the script gets stuck in a loop trying to join it.

Makaka2 commented 6 years ago

Same problem. 1

mrc0mmand commented 6 years ago

Just a quick dirty workaround to keep you going until a proper fix is released:


diff --git a/headless.js b/headless.js
index 6ca976e..89bb11b 100644
--- a/headless.js
+++ b/headless.js
@@ -473,6 +473,9 @@ const GetBestZone = function GetBestZone(planet) {
     for (let idx in planet.zones) {
         let zone = planet.zones[idx];

+       if (idx == 0 && zone.capture_progress == 0.0)
+           continue;
+
         if (!zone.captured) {
             if (zone.boss_active) // boss
                 return zone;

Patched script: headless.js

Update: check the zone progress as well, so we don't miss the zone when it gets fixed (thanks @Dontmindme2)

Makaka2 commented 6 years ago

Just a quick dirty workaround to keep you going until a proper fix is released:

@mrc0mmand thanks man, but in which doc should we put this on?

CyBot commented 6 years ago

@Makaka2 in headless.js, line 474 https://github.com/meepen/salien-bot/blob/27cb7d296809d9acd84077b5d4e8dc759567f0ac/headless.js#L474

Makaka2 commented 6 years ago

Hm, something's wrong. Apparently, I'm doing an amendment, but mainly it doesn't change anything.

Rysanlos commented 6 years ago

It's about the bosses, please fix it quick, or we will miss the boss, more XP!

Shobai-Original commented 6 years ago

Thanks all, the suggested workaround is working at this end.

On Sat., 30 Jun. 2018, 6:56 pm BradyThe, notifications@github.com wrote:

As mentioned above by CyBot you can hotfix it yourself, until a proper fix is released. It is very easy. All you need is headless.js and (for convenience sake at least) Notepad++.

[image: notepad _2018-06-30_10-54-27] https://user-images.githubusercontent.com/8181555/42123548-3fb4764e-7c54-11e8-865d-cc92aa79e20f.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/meepen/salien-bot/issues/152#issuecomment-401528023, or mute the thread https://github.com/notifications/unsubscribe-auth/AmpFfKydW7N3HSFCDQYxLQhtzLM9HU43ks5uBz1EgaJpZM4U94L_ .

Rysanlos commented 6 years ago

but this hotfix ignores the bosses

Makaka2 commented 6 years ago

Yeah, that's a problem. I think there must be another wise variant: use Idle Daddy app for your android device for now, as all dudes said before, until a proper fix.

mrc0mmand commented 6 years ago

AFAIK, the zone 0 is not a boss zone (at least not right now), it's just unjoinable - there's nobody on the planet and it doesn't have the boss mark:

The same applies to all planets according to https://wrya.net/tmp/salien-status/

Dontmindme2 commented 6 years ago

You could also try for 474 if (idx == 0 && planet.zones[idx].capture_progress == 0.0)

Edited: since zone hasn't been defined as planet.zones[idx] at that point...my bad

That would at least let you join the boss zone when it opens up (i.e. progress has been made), but that is assuming the rest of the script is ready to handle a boss fight.

ge-ku commented 6 years ago

Funny, zone with id 0 returns response with this header: x-error_message | This is a boss zone. Update your cheats. Even though I'm not using script (also tried with account that didn't use script ever to make sure it's not some kind of a ban).

Js41637 commented 6 years ago

Zone 0 is bugged on all new planets, it's impossible to join and incorrectly returns the error for boss zone even though it is not a boss zone.

The if (idx == 0 && zone.capture_progress == 0.0) is the best fix you can do for now until Valve fixes it.

Also that message is just the devs having some fun. It's definetly no ban and it always returns that error when you try to join a Boss Zone using the normal JoinZone api instead of JoinBossZone. Funnily enough it also returns the Steams EResult 17 which === Banned

ge-ku commented 6 years ago

I wonder if Valve made it so boss appears in zone 0 after every other zone is defeated? If so, we'll miss it using fix by @mrc0mmand

mrc0mmand commented 6 years ago

I updated the workaround to check the zone progress as well, so we don't miss it once it gets fixed. The code already contains handlers for boss zones, so hopefully it will work once they appear.

SuicidalcookieS commented 6 years ago

@mrc0mmand the fix doesn't work for me,

i'm just still stuck at this. cmd_2018-06-30_11-45-54

Makaka2 commented 6 years ago

@mrc0mmand can you manually add it to the hub, just for the plain simplicity? I mean it works well and probably in a proper way.

mrc0mmand commented 6 years ago

@Makaka2 done, check the original comment

Makaka2 commented 6 years ago

Biggie-thankie, man!

mrc0mmand commented 6 years ago

@SuicidalcookieS did you run npm install after you applied the patch?

SuicidalcookieS commented 6 years ago

no is that necessary ?

mrc0mmand commented 6 years ago

Yes, it is necessary, as it updates the headless package in node.js.

SuicidalcookieS commented 6 years ago

ok now after running npm install on all accounts it works Thanks

darkl1ch commented 6 years ago

https://github.com/meepen/salien-bot/commit/33d282b11455aabf6628daced7461a7d6308cc06 :)

meepen commented 6 years ago

This is on live now, but I'm very confused as to what valve did here...

meepen commented 6 years ago

however it's not on userscript yet.