#Not Recognizing That Pickaxes Are The Same.

1 messages · Page 1 of 1 (latest)

verbal pulsar
#

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 :(. Can somebody help me?

mossy oracle
#

you're setting slot 8 to the pickaxe, so shouldn't you just use

on inventory click:
  slot = 8:

?

red silo
#

What

#

Youre setting the glass to the slot the pick is in

#

Not all the others

mossy oracle
#

yeah lol

#

is NOT player's tool

red silo
#

you could just set integers between a and b to the glass

#

then set the pick afterwards

verbal pulsar
#

Wdym

outer pier
#

im confused why you would set slot 8 to the pick and then immidiatly set it to glass

#

why not just

#

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

red silo
#

then set the pick in slot 8

#

the pick will override it

outer pier
#

nah hes trying to check if 2 picks are the same

#

the glass has nothing to do with it

red silo
#

well

#

he doesnt need to loop

#

could just check slot 8

#

or not check at all cause he set the slot to the tool

outer pier
#

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

    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

red silo
#

uhh

#

dont spoon feed

#

and that exactly what he has now

#

he sets the slot to the tool

#

so its exactly the same

#

durability, name lore, nbt, enchants, etc

outer pier
red silo
#

he just needs to solve the problem himself otherwise he gets in the habbit of asking others to do it

verbal pulsar
#

Yeah But The Issue Rn Is Even Though It Is The Same Pickaxe, It Still Doesn't Seem To Recognize Them As The Same

red silo
#

well

#

you could just set it to green glass

#

cause it is the same

#

wether or not the skript knows it

verbal pulsar
#

That isn't what I am trying to do. This is basically a test skript to test if I can do this. I want to basically make the glass pane and then everything to the left/lower slot # green glass panes.

red silo
#

well

#

if the index > 8

#

set to green glass

outer pier
#

and its not "spoon feeding", its 3 lines of code

verbal pulsar
#

Never mind I found a way to compare it.

#

Thank you