Skript Inventory Item Durability

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

Status
Not open for further replies.

Lordcre_

Supporter
May 7, 2017
22
3
0
Is it possible to create an item inside a GUI with a set durability? If so, how? I've looked through the docs for a while and didn't find anything.
 
[doublepost=1502787607,1502786809][/doublepost]
Is it possible to create an item inside a GUI with a set durability? If so, how? I've looked through the docs for a while and didn't find anything.

Warning:

In 1.13 they are changing the the complete item system with there id's and data values that means that this won't work.

my best guess is that its something like this then:

set slot 0 of player's current inventory to diamond sword:1 named "&cDiamond sword" with custom nbt "{Damage:1}"

1.12 or lower:

set slot 0 of player's current inventory to diamond sword:1 named "&cDiamond sword"
 
I've looked through the docs for a while

Yeah, no.

code_language.skript:
set slot 0 of current inventory of player to diamond sword named "&4fight"
add 1 to data value of slot 0 of current inventory of player

An addon is required for "current inventory of player" but i dont remember which one. You can also use the format slot or Tuske alternative. The idea is that you can perfectly add damage to an item using "data value of". And it will work perfectly past 1.13.
 
Yeah, no.

code_language.skript:
set slot 0 of current inventory of player to diamond sword named "&4fight"
add 1 to data value of slot 0 of current inventory of player

An addon is required for "current inventory of player" but i dont remember which one. You can also use the format slot or Tuske alternative. The idea is that you can perfectly add damage to an item using "data value of". And it will work perfectly past 1.13.
Not true on the 1.13 bit since not all damage values work even now. The new llama and parrot eggs for example(as I found out working with them earlier) will not differentiate with a damage value as the old eggs will. if they update all the items to work in the same fashion, they too will stop working that way.
 
Not true on the 1.13 bit since not all damage values work even now. The new llama and parrot eggs for example(as I found out working with them earlier) will not differentiate with a damage value as the old eggs will. if they update all the items to work in the same fashion, they too will stop working that way.

I'm pretty sure Bensku will change the code of Skript to change the nbt of the item instead of just adding durability the old way. That's why it's going to work on 1.13

Perhaps I'm being too optimistic but it'll need to be done eventually if he wants to conserve the syntax
 
  • Like
Reactions: Wynnevir
Status
Not open for further replies.