#get advancment type

7 messages · Page 1 of 1 (latest)

crystal verge
#

hello
i have an idea that you get coins for your advancments but the problem is that there are like 200 of them so my though was hey lets just say

const { player, advancement} = event;
let advType = advancement.id().?
switch(advType) {
case 'common': player.give('6x thermal:copper_coin');
case 'uncommon': player.give('5x thermal:iron_coin');
case 'rare': player.give('4x thermal:gold_coin');
}

but i dont know how to get the advancment type

jaunty oxideBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

small rain
# crystal verge hello i have an idea that you get coins for your advancments but the problem is ...
PlayerEvents.advancement(event => {
    const { player, advancement} = event;
    const display = advancement.advancement.display
    if(!display) return;
    const {frame, background, description, hidden, icon, title} = display //some other possibly useful properties
    //console.log(frame, background, description, hidden, icon, title)

    /**The valid values are "task", "goal", "challenge" */
    const frameTypeName = frame.getName()
    switch(frameTypeName){
        case 'task': player.give('6x thermal:copper_coin'); break
        case 'goal': player.give('5x thermal:iron_coin'); break
        case 'challenge': player.give('4x thermal:gold_coin'); break
    }  
})
crystal verge
#

ooooo

#

thank you vomiter :>

#

woahh thats what they are called? damn xd

#

tyyyyyyyyyyy