Closed PatheticMustan closed 3 years ago
I know how to fetch most of those, I have the src on that bot I made
give me a sec
ok so, we rip the object's gameData like this
let gameAPIdata = await (await fetch('https://api.prodigygame.com/game-api/status')).json()
let version = gameAPIdata.data.prodigyGameFlags.gameDataVersion
let data = await (await fetch('https://cdn.prodigygame.com/game/data/production/'+version+'/data.json')).json()
(or we use the gameData in the game directly, doesn't matter)
then, we take the data for the object.
let's call the object obj
.
Then, we make a call to the CDN, which does require parameters, so we determine them from the gameData.
It should look something like this:
https://cdn.prodigygame.com/game/assets/v1_cache/single-images/icon-${obj.type}-${obj.ID}/${obj.metadata.vIcon}/icon-${obj.type}-${obj.ID}.png
And there we go! We can get a raw asset like so:
(https://cdn.prodigygame.com/game/assets/v1_cache/single-images/icon-hat-1/2/icon-hat-1.png)
I used this here: https://github.com/ArcerionDev/ProdigyMathGameBot
Note: these are the icons, if you want the actual assets used by the player, replace icon
with player
in the url
eg player: icon:
Alright, ty arc
how do i do wands? when i try to wand "access denied" xml file no styling thingy shows up.
I'll make a function for this
r
r
r
was resolved earlier
tbh, I've been procrastinating a lot of the features like #564, and whatnot, because I have literally no idea how to get assets
I really want to figure out an easy way to get the asset of any given item, like hair, or robe. AFAIK, these items are fetched separately, but I'm not totally sure. There are also some cases that use spritesheets, so whoever figures it out will have to deal with that too.