-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathSteam Store - Cheat Summar Sale 2022 Badge.js
73 lines (69 loc) · 2.95 KB
/
Steam Store - Cheat Summar Sale 2022 Badge.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* eslint-env browser */
/* global g_sessionID jQuery */
/* HOW TO USE:
1. Open Console tab of your browser's DevTools.
Chrome: CTRL+SHIFT+J
Firefox: CTRL+SHIFT+K
2. Copy-paste this entire script.
3. Press ENTER and wait.
It should claim all 10 badges and then the final reward.
*/
/* Thanks to Sqbika#0657 for the initial script */
(async() => {
if (!jQuery("#application_config").data("userinfo")) {
// eslint-disable-next-line no-alert
alert("Sale settings not found. Redirecting to a compatible page...");
location.href = "https://store.steampowered.com/sale/clorthax_quest";
return;
}
let delay = (ms) => new Promise((res) => setTimeout(res, ms));
let { authwgtoken } = jQuery("#application_config").data("userinfo");
await jQuery.post("/saleaction/ajaxopendoor", {
authwgtoken,
"sessionid": g_sessionID,
"door_index": 0,
"clan_accountid": 41316928,
});
for (let link of [
"/category/arcade_rhythm/?snr=1_614_615_clorthaxquest_1601",
"/category/strategy_cities_settlements/?snr=1_614_615_clorthaxquest_1601",
"/category/sports/?snr=1_614_615_clorthaxquest_1601",
"/category/simulation/?snr=1_614_615_clorthaxquest_1601",
"/category/multiplayer_coop/?snr=1_614_615_clorthaxquest_1601",
"/category/casual/?snr=1_614_615_clorthaxquest_1601",
"/category/rpg/?snr=1_614_615_clorthaxquest_1601",
"/category/horror/?snr=1_614_615_clorthaxquest_1601",
"/vr/?snr=1_614_615_clorthaxquest_1601",
"/category/strategy/?snr=1_614_615_clorthaxquest_1601",
]) {
try {
let html = await jQuery.get(link);
await jQuery.post("/saleaction/ajaxopendoor", {
"sessionid": g_sessionID,
"authwgtoken": jQuery("#application_config", html).data("userinfo").authwgtoken,
"door_index": jQuery("#application_config", html).data("capsuleinsert").payload,
"clan_accountid": 41316928,
"datarecord": jQuery("#application_config", html).data("capsuleinsert").datarecord,
});
console.log("You got a new badge!");
} catch (e) {
console.error("Failed to obtain badge!", e);
} finally {
await delay(1500);
}
}
await jQuery.post("/saleaction/ajaxopendoor", {
authwgtoken,
"sessionid": g_sessionID,
"door_index": 11, // final reward
"clan_accountid": 39049601, // https://store.steampowered.com/news/group/39049601
}).done((json) => {
// eslint-disable-next-line eqeqeq
if (json.success == 1) {
console.log("Claimed final reward!");
} else {
console.error("Failed to claim final reward.\nTry again or claim it yourself?", json);
}
})
.fail(() => { console.error("Final reward request failed!"); });
})();