I'm using gsub like this to reformat my chat gsub('%[Guild%]', '(g)') and it works just fine, but there's one thing i really can't manage to do.
In my chat, every names are formatted like this [Name], i'm trying to remove the [] no matter what chat they're tying in
for example, someone typing in raid looks like (rl) [misterx]: test, and i want to have it like this (rl) misterx: test. Same goes for whispers, guild etc etc, anyone good with this ?
Or hmm actually what you suggest remove everything between any [] even if i type [test] in chat it won't appear. Any way to only remove the [] from players name ?
Just noticed an issue, when someone link at least 2 items in the same line, his name is correctly formatted, but the first item gets formatted aswell, the [] are removed from the first item, the second items is fine, with []
You can save many gsub if you simply change the strings Blizzard use to format chat messages. For example, try to execute this line in game, then chat with your guildmates:
I'm using gsub like this to reformat my chat gsub('%[Guild%]', '(g)') and it works just fine, but there's one thing i really can't manage to do.
In my chat, every names are formatted like this [Name], i'm trying to remove the [] no matter what chat they're tying in
for example, someone typing in raid looks like (rl) [misterx]: test, and i want to have it like this (rl) misterx: test. Same goes for whispers, guild etc etc, anyone good with this ?
That one doesn't work Arrow :|
Just noticed an issue, when someone link at least 2 items in the same line, his name is correctly formatted, but the first item gets formatted aswell, the [] are removed from the first item, the second items is fine, with []
Other pre-formatted string variables to toy with: