chr233 / ASFEnhance

ASF 扩展命令插件 / External commands for ASF
GNU Affero General Public License v3.0
489 stars 40 forks source link

Add a command to get Seasonal Badge in Steam Points Shop #198

Closed vorsh closed 7 months ago

vorsh commented 8 months ago

I want a command(s) to get Seasonal Badge (Winter/Summer) through command line. What types of commands should be added: GETSEASONALBADGE [Bots] [Level] - Command to get Seasonal Badge at level 1-40, should fail if we don't have enough steam points. GETMAXLVLSEASONALBADGE [Bots] - Command to get Seasonal Badge at maximum level we can afford, should fail if we don't have enough steam points, should output what level we got on success (example: Successfully got Season Badge lvl 35 (last lvl 0).

Also GETMAXLVLSEASONALBADGE should check if we already had this badge and handle this information properly when calculating for next badge level.

Steam API that is responsible to getting seasonal badge is POST https://api.steampowered.com/ILoyaltyRewardsService/RedeemPointsForBadgeLevel/v1?access_token={your_access_token} , but since i don't know how to work with protobufs i'm useless here.

chr233 commented 8 months ago

i think i wrote this function, maybe it had been removed in some version

TheRhanderson commented 7 months ago

Steam API that is responsible to getting seasonal badge is POST https://api.steampowered.com/ILoyaltyRewardsService/RedeemPointsForBadgeLevel/v1?access_token={your_access_token} , but since i don't know how to work with protobufs i'm useless here.

You don't need protobuf for this POST request.

https://api.steampowered.com/ILoyaltyRewardsService/RedeemPointsForBadgeLevel/v1?access_token={your_access_token}

Payload must contain:

access_token={your_access_token} defid=2750340 num_levels=integer

defid is the seasonal badge id you want, num_levels it's how much you want to level up the badge. For example '3' will add more 3 levels to your current badge.

chr233 commented 7 months ago

added in 2.0.10.0, use REDEEMPOINTSBADGE [Bots] defId level

vorsh commented 7 months ago

added in 2.0.10.0, use REDEEMPOINTSBADGE [Bots] defId level

What about GETMAXLVLSEASONALBADGE (or REDEEMPOINTSBADGEMAXLVL however you want to call it), will it be added?

chr233 commented 7 months ago

added in 2.0.10.0, use REDEEMPOINTSBADGE [Bots] defId level

What about GETMAXLVLSEASONALBADGE (or REDEEMPOINTSBADGEMAXLVL however you want to call it), will it be added?

redeempointsbadge botnames defId 40