#(zyphhh) Finding Items in Multiple inventory slots at the same time

19 messages · Page 1 of 1 (latest)

cunning token
#

Want to make a system where the game checks your armor then flags you if you're wearing a full set.

golem_full_set_equip:
    type: world
    events:
        on player inventory slot changes from:!golem_helmet|golem_chestplate|golem_leggings|golem_boots to:golem_helmet|golem_chestplate|golem_leggings|golem_boots slot:helmet|chestplate|leggings|boots:
        - if <player.inventory.find_item[golem_helmet]>: == 40
            - narrate passed

While this kinda works there is 2 main issues 1. It will fail to pass if you have multiple helms in your inventory as it only checks for the numerical first one

Secondly I would like a tag that could match multiple items at the same time rather than checking individually.

Something like this is what I'm looking for:
/ex if <player.inventory.contains_item[golem_helmet|golem_chestplate|_golem_leggings|golem_boots].slot[x]>
But that doesn't work

spark dockBOT
#

(zyphhh) Finding Multiple inventory slots at the same time

spark 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.

cunning token
#

(zyphhh) Finding Items in Multiple inventory slots at the same time

jaunty palm
#

!t player.has_equipped

unkempt gardenBOT
jaunty palm
#

!t entity.equipment_map

unkempt gardenBOT
jaunty palm
#

There are tags to check if a player wears armor

cunning token
tall raftBOT
#

Tag parse results for <player.equipment_map>: https://paste.denizenscript.com/View/125954

player.equipment_map
Had error: Tag <player.equipment_map> is invalid!
Had error: Unfilled or unrecognized sub-tag(s) 'equipment_map' for tag <player.equipment_map>!
Had error: The returned value from initial tag fragment 'player' was: 'p@460e96b9-7a0e-416d-b2c3-4508164b8b1b'.
jaunty palm
#

This returns a MapTag ^ - you could get the values to return a list of equipped armor.

#

!t maptag.values

unkempt gardenBOT
jaunty palm
#

then you could parse the script name and compare it to the list

jaunty palm
# unkempt garden

I would write a procedure that checks if a player wears a full set with ^

cunning token
#

thanks so much :D