#(flazockt) adjust lore with inventory
126 messages · Page 1 of 1 (latest)
(flazockt) adjust lore with inventory
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.
can you be more specific? What exactly do you want to do
Lore is stored in a listtag format, just grab the current lore and use this tag to adjust a single line:
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
ListTag
# 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]>
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
i alwso need to know how to insert lore
and could you give me an example with - inventory adjust?
It's the same way you would adjust any other inventory mechanism
!c inventory adjust
!c inventory
item
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>)
Edits the inventory of a player, NPC, or chest.
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...
- inventory adjust slot:5 "lore:Item modified!"
so - inventory adjust slot:<[count]> "lore.listone: asdasdasd" d:<player.open_inventory>
how would i change the slot 2
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
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 #130873: Unnamed Denizen Script Paste... pasted 2025/02/14 09:15:26 UTC-08:00, Paste length: 3704 characters across 85 lines, Content: gotospelllvlmenu: type: item material: spyglass Display Name: <&c>LVL your Skills
you know what i want to do?
It's a little more complicated than that, it would probably be something like -inventory adjust slot:<[count]> lore:<player.inventory.slot[<[count]>].lore.set[(lore)].at[(line)]>
Also
!g don't script raw object
Did you mean to search for common mistakes - don't script raw locations?
!g don't script raw tags
Did you mean to search for common mistakes - don't script raw locations?
!g don't compare raw objects
View the guide page 'Common Mistakes - Don't Compare Raw Objects' at: https://guide.denizenscript.com/guides/troubleshooting/common-mistakes.html#don-t-compare-raw-objects
ok
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
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
hmm not sure but try "lore:..." instead of lore:....
kk
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
- inventory adjust slot:<[count]> "lore:<player.open_inventory.slot[<[count]>].lore.set["adasd"].at[4]>" that doesnt work
i have an idea
Might be inventory instead of open_inventory
no no that destroyed all of my items in my inventory xD
you only want to change slots in the players inventory and not in chests or other inventories right?
huh, that shouldnt happen lol
its in a gui
ah
ahh
lol
console doesnt give me denizen errors anymore idk why
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
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
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!
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
wait
You don't need the "get" tag, and you have to specify an "at" after you set the new text
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>
You don't need any quotes
ok
shouldnt at and set be the other way around too?
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
which quotes did you mean
the ones around lore: or in the .set
All, it's only one word
!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!
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]
kk
That... and that's not what I asked for...
Content of Server Log Paste #130875: Denizen Debug Logs From AAZwruneAA... pasted 2025/02/14 09:40:04 UTC-08:00, Paste length: 43543 characters across 219 lines, Content: Java Version: 21.0.3 Up-time: 1h 32m Denizen Version: Core: 1.91.0-SNAPSHOT (Build 1395), Spigot: 1.3.1-SNAPSHOT (build 7134-DEV) Script Containers: 367, Events: 124
what
uhm
And what's the exact command you're running?
Great to hear
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
but is there a way to insert it?
!t ListTag.insert