give item on advancement

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

cheesetheocto

Member
Dec 4, 2023
16
0
1
does anyone know if its possible to give a player an item when they make a certain advancement?

I just can't find a way to do it. I'm using Skbee, PoaSk, skQuerey and skript gui

Code:
#list of advancements and what they unlock
#Tidal - Throwaway joke "minecraft:adventure/throw_trident"
#aqua - the cutest predator "minecraft:husbandry/axolotl_in_a_bucket"
#Tectonica - whatever floats your goat "minecraft:hustbandry/ride_a_boat_with_a_goat"
#Gaea - caves and cliffs "minecraft:adventure/fall_from_world_height"
#Ignus - subspace bubble "minecraft:nether/fast_travel"
#Pyro - into fire "minecraft:nether/obtain_blaze_rod"
#Zephyr - blowback "minecraft:adventure/blowback"
#Ventus - who needs rockets "minecraft:adventure/who_needs_rockets"

on load:
    set {_tidal} to "minecraft:adventure/throw_trident" parsed as advancement
    set {_aqua} to "minecraft:husbandry/axolotl_in_a_bucket" parsed as advancement
    set {_tectonica} to "minecraft:hustbandry/ride_a_boat_with_a_goat" parsed as advancement
    set {_gaea} to "minecraft:adventure/fall_from_world_height" parsed as advancement
    set {_ignus} to "minecraft:nether/fast_travel" parsed as advancement
    
on player advancement done:
    if advancement progress of {_tidal} of player is done:
        if {obt::tidal} = false:
            give player 1 blue dye named "&1Tidal"
            set {obt::tidal} to true
    if advancement progress of {_aqua} of player is done:
        if {obt::aqua} = false:
            give player 1 blue dye named "&1Aqua"
    if advancement progress of {_tectonica} of player is done:
        if {obt::tectonica} = false:
            give player 1 gray dye named "&8Tectonica"
    if advancement progress of {_gaea} of player is done:
        if {obt::gaea} = false:
            give player 1 gray dye named "&8Gaea"
    if advancement progress of {_ignus} of player is done:
        if {obt::ignus} = false:
            give player 1 red dye named "&4Ignus"
            
command /craft [<string>] [<string>]:
    permission: crafts.op
    trigger:
        if arg-1 is "enable":
            if arg-2 is "tidal":
                set {obt::tidal} to false
 
Code:
on load:
    set {adv::tidal} to advancement "minecraft:adventure/throw_trident"
    set {adv::aqua} to advancement "minecraft:husbandry/axolotl_in_a_bucket"
    set {adv::tectonica} to advancement "minecraft:husbandry/ride_a_boat_with_a_goat"
    set {adv::gaea} to advancement "minecraft:adventure/fall_from_world_height"
    set {adv::ignus} to advancement "minecraft:nether/fast_travel"

on player advancement done:
    set {_adv} to event-advancement
    if {_adv} is {adv::tidal}:
        if {obt::tidal} is not set:
            give player 1 blue dye named "&1Tidal"
            set {obt::tidal} to true
    if {_adv} is {adv::aqua}:
        if {obt::aqua} is not set:
            give player 1 blue dye named "&1Aqua"
            set {obt::aqua} to true
    if {_adv} is {adv::tectonica}:
        if {obt::tectonica} is not set:
            give player 1 gray dye named "&8Tectonica"
            set {obt::tectonica} to true
    if {_adv} is {adv::gaea}:
        if {obt::gaea} is not set:
            give player 1 gray dye named "&8Gaea"
            set {obt::gaea} to true
    if {_adv} is {adv::ignus}:
        if {obt::ignus} is not set:
            give player 1 red dye named "&4Ignus"
            set {obt::ignus} to true

command /craft [<string>] [<string>]:
    permission: crafts.op
    trigger:
        if arg-1 is "enable":
            if arg-2 is "tidal":
                clear {obt::tidal}
 
Code:
on load:
    set {adv::tidal} to advancement "minecraft:adventure/throw_trident"
    set {adv::aqua} to advancement "minecraft:husbandry/axolotl_in_a_bucket"
    set {adv::tectonica} to advancement "minecraft:husbandry/ride_a_boat_with_a_goat"
    set {adv::gaea} to advancement "minecraft:adventure/fall_from_world_height"
    set {adv::ignus} to advancement "minecraft:nether/fast_travel"

on player advancement done:
    set {_adv} to event-advancement
    if {_adv} is {adv::tidal}:
        if {obt::tidal} is not set:
            give player 1 blue dye named "&1Tidal"
            set {obt::tidal} to true
    if {_adv} is {adv::aqua}:
        if {obt::aqua} is not set:
            give player 1 blue dye named "&1Aqua"
            set {obt::aqua} to true
    if {_adv} is {adv::tectonica}:
        if {obt::tectonica} is not set:
            give player 1 gray dye named "&8Tectonica"
            set {obt::tectonica} to true
    if {_adv} is {adv::gaea}:
        if {obt::gaea} is not set:
            give player 1 gray dye named "&8Gaea"
            set {obt::gaea} to true
    if {_adv} is {adv::ignus}:
        if {obt::ignus} is not set:
            give player 1 red dye named "&4Ignus"
            set {obt::ignus} to true

command /craft [<string>] [<string>]:
    permission: crafts.op
    trigger:
        if arg-1 is "enable":
            if arg-2 is "tidal":
                clear {obt::tidal}
there were 5 errors about not understanding the expression "advancement (etc.)" but i can figure it out, thanks a ton goat