Counter-Strike 2

Counter-Strike 2

View Stats:
How many keys have I bought?
Can you see how many keys you have bought thru cs go so that i can see how many cases have I opened?The easy way
< >
Showing 1-10 of 10 comments
KokkoJustus Jan 2, 2021 @ 12:18pm 
Well, you can see all your steam purchases in your steam purchase history,
https://store.steampowered.com/account/history/
Last edited by KokkoJustus; Jan 2, 2021 @ 12:19pm
Originally posted by KokkoJustus:
Well, you can see all your steam purchases in your steam purchase history,
https://store.steampowered.com/account/history/
yes but it shows community market purchases as well so that is a long lisk
KokkoJustus Jan 2, 2021 @ 12:24pm 
Originally posted by KokkoJustus:
Well, you can see all your steam purchases in your steam purchase history,
https://store.steampowered.com/account/history/
yes but it shows community market purchases as well so that is a long lisk

Yeah, but i dont think there is any other way
Originally posted by KokkoJustus:
yes but it shows community market purchases as well so that is a long lisk

Yeah, but i dont think there is any other way
there are 250 pages of that so ,but thanks anyways
Klauß 🍔🍻 Jan 2, 2021 @ 12:48pm 
Open your inventory history in a webbrowser:
https://steamcommunity.com/my/inventoryhistory/?app%5B%5D=730
Scroll to bottom and load more until there's nothing more to load.

Then open the webbrowser console, and use this short scrìpt:

arrayA = document.getElementsByClassName("tradehistory_content"); for(var jj = arrayA.length-1; jj > -1; jj--){ if(!arrayA[jj].innerHTML.include("Case Key") || !arrayA[jj].innerHTML.include("Purchased")){ arrayA[jj].parentElement.remove();}} total = document.body.innerText.split("Case Key").length; console.log("KEYS PURCHASED: " + total);

edit: edited alot. should work now.

Last edited by Klauß 🍔🍻; Jan 2, 2021 @ 1:07pm
Originally posted by 74171008591800357:
Open your inventory history in a webbrowser:
https://steamcommunity.com/my/inventoryhistory/?app%5B%5D=730
Scroll to bottom and load more until there's nothing more to load.

Then open the webbrowser console, and use this short scrìpt:

arrayA = document.getElementsByClassName("tradehistory_content"); for(var jj = arrayA.length-1; jj > 0; jj--){ if(!arrayA[jj].innerHTML.include("Case Key") || !arrayA[jj].innerHTML.include("Purchased")){ arrayA[jj].parentElement.remove();}}
tnx a lot
Klauß 🍔🍻 Jan 2, 2021 @ 1:04pm 
Originally posted by 74171008591800357:
-snip-
tnx a lot
I edited like 50 times. lol. Anyway, Inventory History is not showing the whole history, Steam only shows the last three months or so?. Also this scrípt does not watch for Keys received from Steam Market or Trades.
Last edited by Klauß 🍔🍻; Jan 2, 2021 @ 1:05pm
ThunderApe Aug 24, 2022 @ 2:41pm 
Originally posted by 🍔Klauß _fndrnk🍻:
Open your inventory history in a webbrowser:
https://steamcommunity.com/my/inventoryhistory/?app%5B%5D=730
Scroll to bottom and load more until there's nothing more to load.

Then open the webbrowser console, and use this short scrìpt:

arrayA = document.getElementsByClassName("tradehistory_content"); for(var jj = arrayA.length-1; jj > -1; jj--){ if(!arrayA[jj].innerHTML.include("Case Key") || !arrayA[jj].innerHTML.include("Purchased")){ arrayA[jj].parentElement.remove();}} total = document.body.innerText.split("Case Key").length; console.log("KEYS PURCHASED: " + total);

edit: edited alot. should work now.

Thanks, but you script only counts each instance when a key was bought. Not how many keys. Ran your script, bought 2 keys but only counted as one.
Monke Monke Mar 25, 2023 @ 6:52am 
Originally posted by 🍔Klauß _fndrnk🍻:
Open your inventory history in a webbrowser:
https://steamcommunity.com/my/inventoryhistory/?app%5B%5D=730
Scroll to bottom and load more until there's nothing more to load.

Then open the webbrowser console, and use this short scrìpt:

arrayA = document.getElementsByClassName("tradehistory_content"); for(var jj = arrayA.length-1; jj > -1; jj--){ if(!arrayA[jj].innerHTML.include("Case Key") || !arrayA[jj].innerHTML.include("Purchased")){ arrayA[jj].parentElement.remove();}} total = document.body.innerText.split("Case Key").length; console.log("KEYS PURCHASED: " + total);

edit: edited alot. should work now.

Thanks, but you script only counts each instance when a key was bought. Not how many keys. Ran your script, bought 2 keys but only counted as one.

If you are still interested then here is an improved version that calculates amount of keys purchased. Just copy paste into console after loading all purchases.
function countCaseKeys() { const caseKeyRegex = /(\d*)\s*(.+?Case Keys?)/; let totalCaseKeys = 0; const paymentDivs = document.getElementsByClassName('wth_payment'); for (let i = 0; i < paymentDivs.length; i++) { const paymentText = paymentDivs.innerText;
const match = paymentText.match(caseKeyRegex);

if (match) {
const count = parseInt(match[1], 10) || 1;
totalCaseKeys += count;
}
}
return totalCaseKeys;
}

const total = countCaseKeys();
console.log('Total Case Keys Purchased:', total);
Last edited by Monke Monke; Mar 25, 2023 @ 10:20am
TheRaoster Nov 25, 2023 @ 12:40pm 
Script Above doesnt work -- use this instead:
const paymentDivs = document.getElementsByClassName('wth_payment'); j = Array.prototype.slice.call(paymentDivs) .filter(function (el) { return el.textContent.includes("Case Key") }); let k =0; for (let i = 0; i < j.length; i++) { var p = j.innerText
var maybe_int = p.split(" ")[0]
if (parseInt(Number(maybe_int)) == maybe_int &&
!isNaN(parseInt(maybe_int, 10)))
{
k += parseInt(maybe_int, 10)
}
else
{
k += 1
}
}
console.log('Total Case Keys Purchased: ', k);
Last edited by TheRaoster; Nov 25, 2023 @ 12:41pm
< >
Showing 1-10 of 10 comments
Per page: 1530 50

Date Posted: Jan 2, 2021 @ 12:15pm
Posts: 10