meepen / salien-bot

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

Update index.user.js #170

Closed hptwo closed 6 years ago

hptwo commented 6 years ago

I think this may automate clicking 'Fight!' to enter the boss fight and automate hitting the '6' key for healing during the boss fight. Now I just need a boss fight to test this on.

Update: I tested this on the boss on Cyberpunk Planet II on Sun Jul 1, 07:57 PDT. It entered the fight correctly and the heal is being used on cooldown. You may want to clean up the code a little because I really kludged it together.

hptwo commented 6 years ago

There was a weird 'bug' that occurred when the boss died. It showed the boss' corpse, the victory screen with the 'Continue' button popped up, but every time the script hit 'Continue' (and show continue in the console), the level would actually spawn another wave of minions which would get killed and another victory screen would pop up. I'm not sure if this is a bug with the boss dying not registering properly on Valve's side.

hptwo commented 6 years ago

Looking into this further, it turns out I went from level 14 to 15 on the boss kill and got a shirt item. I don't know if all of those extra events tied into the strange boss death behavior.

hptwo commented 6 years ago

It looks like TehDmitry and MatthiasMoore have some boss code in their forks; I wish I looked at them earlier. In particular, MatthiasMoore's fork seems to address the boss victory screen bug that I encountered above (based on the description; I haven't looked at the code yet). I'm heading out, so I won't be able to work on this until later today.

hptwo commented 6 years ago

The boss victory screen bug was replicated, so I copied the code from MatthiasMoore's fork.

hptwo commented 6 years ago

Looking at MatthiasMoore's fork, he already solved all of these problems. I just copied his code so none of my kludge remains. I'm just waiting for a boss fight to confirm that everything works.

hptwo commented 6 years ago

Errr, I don't know how to resize this thing. In any case, the 'Fight!' code seems to be bugging out. I'll edit it to use the old method of searching for the box.

saliens 180701 01

hptwo commented 6 years ago

Tested on boss on Sun Jul 1, 12:33 PDT. It entered the fight correctly, used the heal on cooldown, and continued after the victory screen correctly.

hptwo commented 6 years ago

Matthias' branch is better; use that one instead.