Discord Thread Not Recognizing That Pickaxes Are The Same.

  • 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!

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.

skUnity Discord

Site Manager
Aug 5, 2023
12,755
1
0
The skUnity Discord
discord.gg
Basically, I Made A Skript That Makes It So When You Right Click On Any Pickaxe It'll Make You Open Up A Gui With The Player's Tool Inside. However, I want it to loop through the entire skript and check if player's tool is also the gui's slot item. I got no errors but it doesn't seem to want to work :emoji_frowning:. Can somebody help me?

Posted by: ignitetnt from the skUnity Discord. View the thread on skUnity Discord here
 
im confused why you would set slot 8 to the pick and then immidiatly set it to glass
why not just
code_language.skript:
set slot 8 of {_upgradegui} tp greem stained glass pane named "Green Pane"
ooooh i get it
you don't actually want to set it to glass, you just want it to recognize that the picks are the same
the reason it doesn't work is because "player's tool" refers to an inventory slot, not an item
because the player isnt currently holding the pick in the gui, it marks them as not the same

Posted by: milosauce from the skUnity Discord.
 
this is a difficult thing to do without knowing what might change about the pickaxe.
unless you want a ton of lines, i would need to know the difference between the different tiers of pickaxes
anyway heres the laggy line-heavy code, but it does work
code_language.skript:
on rightclick with pickaxe:
    set {_upgradegui} to a new chest inventory with 6 rows named "&a&lUpgrade Pickaxe Gui"
    set slot 8 of {_upgradegui} to player's tool
    loop integers between 0 and 53:
        "%enchantments of slot loop-value of {_upgradegui}%" = "%enchantments of player's tool%"
        "%name of slot loop-value of {_upgradegui}%" = "%name of player's tool%"
        "%type of slot loop-value of {_upgradegui}%" = "%type of player's tool%"
        set slot loop-number of {_upgradegui} to green stained glass pane named "Green Pane"
    open {_upgradegui} for player
actually nvm it doesn't work with custom NBT data
idk if that matters to you

Posted by: milosauce from the skUnity Discord.
 
Status
Not open for further replies.