Hey there, I have a list of food items vampire players can eat without getting sick however upon consuming the item, it keeps comparing the itemtag (i@blahblah) rather the item name to the list. I resolved this once with a similar list and materials (context.material.name) but items do not have the same subtag possibility it looks like and I'm losing my mind hahaha let me know
#(calaritooo) getting item name from ItemTag
30 messages · Page 1 of 1 (latest)
(calaritooo) getting item name from ItemTag
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
!paste
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
Content of Denizen Script Paste #126464: Unnamed Denizen Script Paste... pasted 2024/09/12 11:36:11 UTC-07:00, Paste length: 382 characters across 5 lines, Content: after player consumes item permission:bloods.passives.vampire: - if <context.item> !in ...
I'm loosing my mind too. Could you provide the whole script please.
The former was a joke to be clear.
ope
yesss here ya go
Content of Denizen Script Paste #126467: vampscript... pasted 2024/09/12 13:35:40 UTC-07:00, Paste length: 2345 characters across 41 lines, Content: vampire_passives_1: type: world
Content of Denizen Script Paste #126468: data script... pasted 2024/09/12 13:37:21 UTC-07:00, Paste length: 1504 characters across 85 lines, Content: misclists: type: data
i just started using very basic lists from data scripts cuz i dont know a better way, neither parsed_key nor data_key resolves the issue and i can't find a way to get that <context.item> to return "potion" without the "i@" in front
You're doing context.item in LIST which is comparing elements. I believe the correct method is matches not in
lemme give that a go !
it works perfectly
another question… or should i make a separate thread?
if i have <context.entity> in LIST and it returns true for pig, cow, chicken but not player…
bc <context.entity> returns specific entitytags and so it works UNTIL the entity is a player
in the LIST i have - player just like i do - cow - pig - chicken and it detects the animals but never a player
i resolved it by making two events one for entities and one for players but id like to know how to put them together if possible
can you debug that
!debug
If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!