Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Store/DLC] Claim in-game content on Amazon Prime #55

Open
Underestimated opened this issue Feb 6, 2023 · 9 comments
Open

[Store/DLC] Claim in-game content on Amazon Prime #55

Underestimated opened this issue Feb 6, 2023 · 9 comments
Labels
feature New feature or request store: prime-gaming

Comments

@Underestimated
Copy link

This is more of a nice to have thing, but within the Amazon Games site, a number of developers offer in game content and items (For example Two Point Hospital does every month)
Would there be a way to enable claiming this alongside the free games?

The delivery mechanism is essentially the same as the existing games we’re claiming, and filtering could potentially be done by the listed game name, which each tile has on it, if we were to define in an environmental variable the names of the games we want to claim content for, then the tool could look for only those, and claim them.

As I said it’s not an urgent request or anything, if possible it would be a great value-add to the existing tool, especially if the existing code can be adapted to grab it with minimal effort.

@vogler vogler added the feature New feature or request label Feb 6, 2023
@vogler
Copy link
Owner

vogler commented Feb 6, 2023

I can check. Maybe some opt-in CLAIMDLC=1 - don't want the default stuff to fail or generate too much noise due to unlinked accounts etc.

@sealldeveloper
Copy link

I know for some games like Roblox content it just returns a key, maybe detecting if an account needs to be linked and if so if the account is linked? Seems like alot of work.

@Underestimated
Copy link
Author

I know for some games like Roblox content it just returns a key, maybe detecting if an account needs to be linked and if so if the account is linked? Seems like alot of work.

That's pretty much how half amazon prime game claims work anyway, there's already an implementation of that as is, (codes output to console, notifications and screenshots directory) which is why I suggested this as an addition, seeing as the process isn't all that different. The only real changes is choosing how to select the DLC to claim, which is why I suggested using the game title that each card has rendered on it.

I can check. Maybe some opt-in CLAIMDLC=1 - don't want the default stuff to fail or generate too much noise due to unlinked accounts etc.

Thanks either way, as I said, more of a nice to have, as I'm having to do that manually. If I were to implement it, I'd make an environment variable for enabling it, and then another for an array of titles to check, which could be compared against the titles listed on the game cards on the amazon dashboard. Then it's on the user to define that properly.

@vogler vogler changed the title [Feature Request] Amazon Prime - Claim in game content [Store/DLC] Claim in-game content on Amazon Prime Feb 24, 2023
vogler added a commit that referenced this issue Mar 6, 2023
@EthanC
Copy link

EthanC commented Mar 8, 2023

Understood PG_CLAIMDLC is experimental, but figured I'd give it a try seeing as it's in the latest release.

@vogler If it's of any use, I get a TimeoutError while trying to claim DLC. Additionally, an undefined notification is sent.

Logs

Number of already claimed DLC: 0
Number of unclaimed DLC: 28
Current DLC: Candy Crush Saga - 20 Gold Bars and more, free with Amazon Prime
page.inputValue: Timeout 60000ms exceeded.
=========================== logs ===========================
waiting for locator('input[type="text"]')
============================================================
    at file:///fgc/prime-gaming.js:277:33 {
  name: 'TimeoutError'
}

Notification

prime-gaming (Ethan):
- Candy Crush Saga - 20 Gold Bars and more, free with Amazon Prime (undefined)

@testeur999
Copy link

Current DLC: Candy Crush Saga - 20 Gold Bars and more, free with Amazon Prime
page.inputValue: Timeout 60000ms exceeded.

web page stay waiting to the qr code, then the time out exited

@vogler
Copy link
Owner

vogler commented Mar 9, 2023

I guess that's where I stopped. It currently detects if an account needs to be linked and if a key is shown to be redeemed, but there are some Games/DLCs that have a different page layout (like Candy Crush with the QR code). Maybe I'll just wrap each iteration in a try/catch such that these edge cases don't stop everything.

@KairuByte
Copy link

I realize this is not officially supported yet, but I've noticed that while the script does get into the in-game content, it is never able to claim the content. It always says that linking is needed. Manual claiming works without a hitch for 99% of the offers.

@yoshimo
Copy link

yoshimo commented Jul 6, 2023

you could limit it to games that you linked and own and want to get stuff for.

@KairuByte
Copy link

The games which are linked, still pop as failed due to the game not being linked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request store: prime-gaming
Projects
None yet
Development

No branches or pull requests

7 participants