#Iterate through tags

10 messages · Page 1 of 1 (latest)

slow schooner
#

I want to iterate through every tag during ServerEvents.tags(...) but I can't figure out how

broken crowBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

sleek portal
#

What for hmmm

slow schooner
#

I guess I want to iterate through every item and add a tag rather, there's lots of mods that have ores that aren't part of the universal c:ores tag and I want to find every item with an id ending in _ore and add them to c:ores

sleek portal
#

that doesnt like something that requires all the tags thinking_lex

#

sounds like you need regex maybe

slow schooner
#

How would you do it with regex, it wouldn't be as simple as event.get('#c:ores').add('/[A-z]+_ore/') would it?

sleek portal
#

you should be able to something like

event.add('c:ores', /.+_ore/)

youre gonna have to test it a little and see if you need to change the regex tho

slow schooner
#

it worked with

event.get('c:ores').add('/.+_ore/')

I tried it yesterday but did #c:ores and messed it up
didn't realize the power of regex!