#(flazockt) adjust lore with inventory

126 messages · Page 1 of 1 (latest)

whole ocean
#

i need to change a specific line

zinc hawkBOT
#

(flazockt) adjust lore with inventory

zinc hawkBOT
#

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.

opaque skiff
#

can you be more specific? What exactly do you want to do

faint osprey
#

Lore is stored in a listtag format, just grab the current lore and use this tag to adjust a single line:

bronze solsticeBOT
# faint osprey !t ListTag.set.at

Returns a new ListTag with the items specified inserted to the specified location, replacing the object already at that location.
Note the index input options described at !objecttype listtag

Returns

ListTag

Examples
# Narrates a list of "one|potato|three"
- narrate <list[one|two|three].set[potato].at[2]>
# Narrates a list of "one|potato|taco|hotdog|three"
- narrate <list[one|two|three].set[potato|taco|hotdog].at[2]>
hot baneBOT
#
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.)

#

@whole ocean

whole ocean
#

i alwso need to know how to insert lore

#

and could you give me an example with - inventory adjust?

faint osprey
#

It's the same way you would adjust any other inventory mechanism

#

!c inventory adjust

bronze solsticeBOT
faint osprey
#

!c inventory

bronze solsticeBOT
# faint osprey !c inventory
Group

item

Syntax

inventory [open/close/copy/move/swap/set/keep/exclude/fill/clear/update/adjust <mechanism>:<value>/flag <name>(:<action>)[:<value>] (expire:<time>)] (destination:<inventory>) (origin:<inventory>/<item>|...) (slot:<slot>)

Short Description

Edits the inventory of a player, NPC, or chest.

Description

Use this command to edit the state of inventories.
By default, the destination inventory is the current attached player's inventory.

If you are copying, swapping, removing from (including via "keep" and "exclude"), adding to, moving, or filling inventories,
you'll need both destination and origin inventories.

Origin inventories may be specified as a list of ItemTags, but destinations must be actual InventoryTags.

Using "open", "clear", or "update" only require a destination.
"Update" also req...

faint osprey
#

- inventory adjust slot:5 "lore:Item modified!"

whole ocean
#

so - inventory adjust slot:<[count]> "lore.listone: asdasdasd" d:<player.open_inventory>

#

how would i change the slot 2

faint osprey
#

You could either use PlayerTag.held_item_slot if it's the one they currently have, or just use a static number if it's always going to be that

whole ocean
#

no no count is right

#

its a part of my scritp

#

wait ill sen

#

send

#

!haste

bronze solsticeBOT
whole ocean
#

you know what i want to do?

faint osprey
#

Also

#

!g don't script raw object

bronze solsticeBOT
#
Possible Confusion

Did you mean to search for common mistakes - don't script raw locations?

faint osprey
#

!g don't script raw tags

bronze solsticeBOT
#
Possible Confusion

Did you mean to search for common mistakes - don't script raw locations?

faint osprey
#

!g don't compare raw objects

whole ocean
#

ok

hot baneBOT
#
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.)

#

@whole ocean

whole ocean
#

ty :) ill will try it first

#
  • inventory adjust slot:<[count]> lore:<player.inventory.slot[<[count]>].lore.set["adasd"].at[4]>
#

so this should work?

#

it doesnt

#

hmm

#
  • inventory adjust slot:<[count]> lore:<player.open_inventory.slot[<[count]>].lore.set["adasd"].at[4]>
#

that also doesnt work

opaque skiff
#

hmm not sure but try "lore:..." instead of lore:....

whole ocean
#

kk

opaque skiff
#

I think the quotation marks are only if you want to set the lore to 1 thing (and not change 1 specific line) but not sure

whole ocean
#
  • inventory adjust slot:<[count]> "lore:<player.open_inventory.slot[<[count]>].lore.set["adasd"].at[4]>" that doesnt work
#

i have an idea

opaque skiff
#

Might be inventory instead of open_inventory

whole ocean
#

no no that destroyed all of my items in my inventory xD

opaque skiff
#

you only want to change slots in the players inventory and not in chests or other inventories right?

opaque skiff
whole ocean
#

its in a gui

opaque skiff
#

ah

whole ocean
#

that happens now

opaque skiff
#

ahh

whole ocean
#

too late XD

opaque skiff
#

lol

whole ocean
#

what could be the problem ;///

#

hmm

opaque skiff
#

run the debugger, what's the error

#

or check the console

whole ocean
#

console doesnt give me denizen errors anymore idk why

opaque skiff
#

uhh theres a command for that but not sure what it is anymore. Just run /denizen debug -r then

#

then once you run the command or whatever, /denizen submit

whole ocean
#

that also doesnt give me anything

opaque skiff
#

well it does

#

"invalid index:4, it only has 1 entries in it"

#

you can't get the 4th item in a list if it doesn't exist

whole ocean
#

ohh it does :o

#

18:30:56 Additional Error Info: Tag <player.open_inventory.slot[10].lore.get[4].set["adasd"]> is invalid!
18:30:56 Additional Error Info: Unfilled or unrecognized sub-tag(s) 'get[4].set["adasd"]' for tag <player.open_inventory.slot[<[count]>].lore.get[4].set["adasd"]>!
18:30:56 Additional Error Info: The returned value from initial tag fragment 'player.open_inventory.slot[10].lore' was: 'i@spyglass[display=Mana Blast;lore=li@Spell LVL: 9|;script=itemspell]'.
18:30:56 Additional Error Info: Almost matched but failed (possibly bad input?): get
18:30:56 ERROR in script 'tospelllvlmenu' in queue 'TOSPELLLVLMENU_67049_RadiusHenry' while executing command 'INVENTORY' in file '\scripts\spellslvl.dsc' on line '43' with player 'Flazockt'!
Error Message: Invalid index '4': list only has 1 entries in it. ... Enable debug on the script for more information.
18:30:56 Additional Error Info: Tag <player.open_inventory.slot[11].lore.get[4].set["adasd"]> is invalid!
18:30:56 Additional Error Info: Unfilled or unrecognized sub-tag(s) 'get[4].set["adasd"]' for tag <player.open_inventory.slot[<[count]>].lore.get[4].set["adasd"]>!
18:30:56 Additional Error Info: The returned value from initial tag fragment 'player.open_inventory.slot[11].lore' was: 'i@spyglass[display=Lifebloom;lore=li@Spell LVL: 21|;script=itemspell]'.
18:30:56 Additional Error Info: Almost matched but failed (possibly bad input?): get
18:30:56 ERROR in script 'tospelllvlmenu' in queue 'TOSPELLLVLMENU_67049_RadiusHenry' while executing command 'INVENTORY' in file '\scripts\spellslvl.dsc' on line '43' with player 'Flazockt'!
Error Message: Invalid index '4': list only has 1 entries in it. ... Enable debug on the script for more information.
18:30:56 Additional Error Info: Tag <player.open_inventory.slot[12].lore.get[4].set["adasd"]> is invalid!
18:30:56 Additional Error Info: Unfilled or unrecognized sub-tag(s) 'get[4].set["adasd"]' for tag <player.open_inventory.slot[<[count]>].lore.get[4].set["adasd"]>!
18:30:56 Additional Error Info: The returned value from initial tag fragment 'player.open_inventory.slot[12].lore' was: 'i@spyglass[display=Magic Frog Toss;lore=li@Spell LVL: 12|;script=itemspell]'.
18:30:56 Additional Error Info: Almost matched but failed (possibly bad input?): get
18:30:56 ERROR in script 'combat_xp_script32' in queue 'COMBAT_XP_SCRIPT32_67058_EverywhereXIdentified' while executing command 'IF' in file '\scripts\xp.dsc' on line '293' with NPC 'n@720 (Penguin Warrior LVL:13)'!
Error Message: Invalid context ID 'damager'! ... Enable debug on the script for more information.
18:30:56 Additional Error Info: Tag-base 'context' returned null.
18:30:56 Additional Error Info: Tag <context.damager.type> is invalid!

opaque skiff
#

The returned value from initial tag fragment 'player.open_inventory.slot[10].lore' was: 'i@spyglass[display=Mana Blast;lore=li@Spell LVL: 9|;script=itemspell]'.

#

so initially you only had 2 lines in lore

#

2 indexes

whole ocean
#

wait

faint osprey
#

You don't need the "get" tag, and you have to specify an "at" after you set the new text

whole ocean
#

stil ldoesnt work

#

ok

#

doesnt work

#
  • inventory adjust slot:<[count]> "lore:<player.open_inventory.slot[<[count]>].lore.at[4].set["adasd"]>" d:<player.open_inventory>
faint osprey
#

You don't need any quotes

whole ocean
#

ok

opaque skiff
#

shouldnt at and set be the other way around too?

whole ocean
#

how?

#

and where

opaque skiff
#

inventory adjust slot:<[count]> lore:<player.open_inventory.slot[<[count]>].lore.set[adasd].at[4]> d:<player.open_inventory>

#

wait dont copy that should be better?

#

idk where the quotes are supposed to go

opaque skiff
#

the ones around lore: or in the .set

faint osprey
#

All, it's only one word

whole ocean
#

dont work

faint osprey
#

!debug

bronze solsticeBOT
# faint osprey !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!

whole ocean
#

18:40:02 ERROR in script 'tospelllvlmenu' in queue 'TOSPELLLVLMENU_73768_ArrangementsPrevent' while executing command 'INVENTORY' in file '\scripts\spellslvl.dsc' on line '43' with player 'Flazockt'!
Error Message: Value of InventoryTag returning null. Invalid InventoryTag specified: script[contents=li@i@air|i@spyglass[display=Berserk;lore=li@Spell LVL: 12&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Holo Ramb;lore=li@Spell LVL:
7&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Explode;lore=li@Spell LVL: 2&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Runic Dash;lore=li@Spell LVL:
0&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Brucher Stab;lore=li@Spell LVL: 0&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Reoa´s Speed;lore=li@Spell LVL:
0&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=EXPLOSION;lore=li@Spell LVL: 12&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Aura Totem;lore=li@Spell LVL:
0&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Mana Blast;lore=li@Spell LVL: 9&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Lifebloom;lore=li@Spell LVL:
21&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Magic Frog Toss;lore=li@Spell LVL: 12&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@air|i@air|i@air|i@air|i@air|i@air|i@barrier[display=Back to Spell Main
Menu;script=spellmenuback]|i@ender_eye[display=Spellpoints: 4;script=howmanyspellpoints]|;holder=s@spelllvlmenu;size=27;title= --Level up Spells--;uniquifier=1107] ... Enable debug on the script for more information. 18:40:02 Additional Error Info: Value of InventoryTag returning null. Invalid InventoryTag specified: script[contents=li@i@air|i@spyglass[display=Berserk;lore=li@Spell LVL: 12&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Holo Ramb;lore=li@Spell LVL: 7&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Explode;lore=li@Spell LVL: 2&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Runic Dash;lore=li@Spell LVL: 0&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Brucher Stab;lore=li@Spell LVL: 0&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Reoa´s Speed;lore=li@Spell LVL: 0&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=EXPLOSION;lore=li@Spell LVL: 12&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Aura Totem;lore=li@Spell LVL: 0&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Mana Blast;lore=li@Spell LVL: 9&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Lifebloom;lore=li@Spell LVL: 21&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@spyglass[display=Magic Frog Toss;lore=li@Spell LVL: 12&pipea&pipeaction&pipeaction&pipeaction&pipeaaa&pipeaa&pipe;script=itemspell]|i@air|i@air|i@air|i@air|i@air|i@air|i@barrier[display=Back to Spell Main Menu;script=spellmenuback]|i@ender_eye[display=Spellpoints: 4;script=howmanyspellpoints]|;holder=s@spelllvlmenu;size=27;title= --Level up Spells--;uniquifier=1107]

opaque skiff
#

holy shit

#

use denizen paste

whole ocean
#

kk

faint osprey
#

That... and that's not what I asked for...

whole ocean
#

what

#

uhm

faint osprey
#

And what's the exact command you're running?

whole ocean
#

HAHAHA

#

i copied wrong

#

XD

#

there was a small little ´ at the end

#

it works :)

faint osprey
#

Great to hear

hot baneBOT
#
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.)

#

@whole ocean

whole ocean
#

but is there a way to insert it?

faint osprey
#

!t ListTag.insert

bronze solsticeBOT
whole ocean
#

works!

#

ty :)