#(cyouqh) Change ItemTag def

1 messages · Page 1 of 1 (latest)

red viper
#

I have some simple command like this, I thought it should give me a cobblestone, but it still giving stone, and I tried change other mech like lore, ... but it not work too. Could some one help me where I did it wrong?

trim dockBOT
#

(cyouqh) Change ItemTag def

trim dockBOT
#

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>

wispy stirrup
#

!xyproblem

acoustic irisBOT
# wispy stirrup !xyproblem
Info: 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).

wispy stirrup
#

Could you provide more information than a test command?

red viper
#

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)

olive fox
#

you can't adjust items like that

#

2 options here

#

either a:
- adjust def:anitem material:cobblestone

wispy stirrup
#

!paste

acoustic irisBOT
olive fox
#

b:
- define anitem <[anitem].with[material=cobblestone]>

red viper
glossy minnow
olive fox
#

The syntax or the operation?

glossy minnow
#

Like, wouldn’t the adjust def be easier

wispy stirrup
#

But the script wasn't posted so we can't know

glossy minnow
#

Could you provide an example of when the define method would be better

#

True

wispy stirrup
# glossy minnow Could you provide an example of when the define method would be better

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.

glossy minnow
#

Wait i thought the key value separator was = not :, i must be misremembering

wispy stirrup
#

Oh no It's typo.

glossy minnow
#

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

wispy stirrup
#

Well anyway,

wraith rampartBOT
#
Thread Closing Reminder

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