#(cyouqh) Change ItemTag def
1 messages · Page 1 of 1 (latest)
(cyouqh) Change ItemTag def
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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
!xyproblem
Your question seems to be an XY Problem - you're asking about your attempted solution rather than your original problem.
Read in detail about the XY Problem here: http://xyproblem.info/
For an example of an XY Problem we've seen in Denizen, the question "how do I make an event for when a flag expires" has no answer, but the same question asked with full background detail will be something more like "I have this script: [LINK HERE], which sets a 3 minute cooldown flag on a player for when they use an ability. I want the player to be notified when the cooldown completes - how do I do this?" which we can then answer quite effectively (in this example, all that was needed was a simple wait command, no events or flag-listening or anything).
Could you provide more information than a test command?
I want player obtain an special event item from a menu, when player get it, it will add a lore "Obtained by playername at time"
So I trying to create a item script, then modify the lore of the item when obtain it (by command)
you can't adjust items like that
2 options here
either a:
- adjust def:anitem material:cobblestone
Please post your actual script
!paste
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
b:
- define anitem <[anitem].with[material=cobblestone]>
Work well for me! Thank you!
Why would you do that though
The syntax or the operation?
Like, wouldn’t the adjust def be easier
It all depends on the context
But the script wasn't posted so we can't know
With adjust, you can modify items stored in a definition(in 99% of cases better ways exist).
With .with[<mech>=<value>], you can modify an item stored in a definition or on the ItemTag itself.
With stick[(<mech>=<value>)], you create an ElementTag, but in most places (like commands) it will parsed as ItemTag.
With inventory adjust/flag, you modify an existing item inside an inventory.
With Item Scripts, you create templates for an Item. So /ex give item_script will always generate an Item from your item script called item_script.
Wait i thought the key value separator was = not :, i must be misremembering
Oh no It's typo.
Oh
Yeah that’s fair enough, was just saying that in that three line command script, adjust is probably the best approach
But obviously that’s just for that command script, they didn’t post their original script
Well anyway,
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@red viper