#custom item stats
1 messages · Page 1 of 1 (latest)
"please" and "thank you"
"please" and "thank you" and I will help 😄
show code
one moment
i guess its the nbt season everybody is using nbt
set {testnbtsword} to unbreakable wooden sword named "NBT Test" with lore "Damage: 5" with nbt of "{""minecraft:custom_data"":{meleedmg:2}}" with nbt from "{HideFlags:63}"
This is the item I'm testing the NBT with
do you have skbee
trigger:
set {_item} to player's tool
set {_testvalnbt} to int tag "CustomData:meleedmg" of custom nbt from {_item}
send "%{_testvalnbt}% nbt damage" to player
give player {testnbtsword}```
this is the testing command
https://skripthub.net/docs/?id=10694 this may be easier to do it like this
Get/set/delete the value of the specified tag of an NBT compound. Also supports getting nested tags using a semi colon as a delimiter.
If the return value is a list, you can use it as a list, as it will automatically split it for ya.
NOTES:
uuid tagwill set an int array tag (This is how MC stores uuids). On return it'll convert back to ...
it was easier for me
oh wait
you are doing it
i also need to use it for multiple values, like upwards of 10
but only for checking
you can try broadcasting the nbt which you are setting, and the nbt you are checking to see if its the same
if its not then you can see what to change
wdym
if by nbt i'm checking you mean the value that/s the issue, it won't set
it returns <none>
shouldnt the "give player {testnbtsword}" be before everything?
i'm just using that item for testing purposes, the command should be able to read the NBT from any item
it's not related other than it having an NBT string
you could try setting the nbt tags with the skbee syntax
like
set int tag "Damage" of nbt of player's tool to 100
one moment
dont copy that exact i just got it from docs
yeah i changed it
variable setting would be the same?
or just nbt instead of custom nbt
neither worked
rip
i will try fix this for you
okay thank you
is there any possibility that it's a compatibility issue with plugin versions? i have SkBee 3.11.1 and Skript 2.11.0
version 1.20.4
alr i think i found the problem
instead of doing "Customdata:meleedmg" try "meleedmg"
one moment
with this or the string i was using before?
actually ill try both rq
worked for the line you suggested, didn't work for the large string
in the command i mean
do you know if you could compress multiple of these into one line? i need to do alot of stat reading and don't want to have 500 lines lmao
yes i did that
so it broadcasts the value for you too?
yes
it broadcasts when i use the int tag line you suggested, doesn't for the one i was originally using
this is what i used
set {testnbtsword} to unbreakable wooden sword named "NBT Test" with lore "Damage: 5" with nbt of "{""minecraft:custom_data"":{meleedmg:2}}" with nbt from "{HideFlags:63}"
command /nbttest:
trigger:
broadcast custom nbt of player's tool
set {_testvalnbt} to int tag "meleedmg" of custom nbt from player's tool
send "%{_testvalnbt}% nbt damage" to player```
what does hideflags:63 do
hides all item flags, like durability
they get annoying when trying to make item lore
did this broadcast the number value in the "nbt damage" line? still showing <none> for me
@alpine raft does this work for you
set {testnbtsword} to unbreakable wooden sword named "NBT Test" with lore "Damage: 5" with all item flags
set int tag "meleedmg" of custom nbt of {testnbtsword} to 100
broadcast int tag "meleedmg" of custom nbt of {testnbtsword}
command /nbttest:
trigger:
give {testnbtsword} to player
send int tag "meleedmg" of custom nbt of {testnbtsword} to player```
yes this works, thank you so much
ive been trying to figure that out for like a day lol
yes
and skript changed the syntax so i dont even know if thats right i just found it
works perfectly