#(calaritooo) getting item name from ItemTag

30 messages · Page 1 of 1 (latest)

hallow gull
#

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

ivory groveBOT
#

(calaritooo) getting item name from ItemTag

ivory groveBOT
#

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.

hallow gull
#

!paste

signal nymphBOT
hallow gull
hazy fox
#

I'm loosing my mind too. Could you provide the whole script please.

#

The former was a joke to be clear.

hallow gull
#

ope

#

yesss here ya go

#

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

wary hearth
#

You're doing context.item in LIST which is comparing elements. I believe the correct method is matches not in

hallow gull
#

lemme give that a go !

hallow gull
#

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

hazy fox
#

uhm

#

why do you have different lists

#

ah different amount and saturation

signal nymphBOT
# hazy fox !debug
Info: 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!

hazy fox
#

Also make sure that you dont rely on <player> tag in this event

#

use <context.damager> and <context.entity> for this instead