Hello, I narrate or announce "<&[emphasis]><player.name><&r>" alot. I find this kinda annoying and I thought would there be a way to write a format that can do that for me. So if <player.name>, <player.flag[exampleflag]> or <server.flag[exampleflag]> are in the text, color them with <&[emphasis]> and then <&r> after that. I would like to know if it would be even possible, and if it is, how I could do it.
#(cilpsthepu) Color specific tags with a format script
14 messages · Page 1 of 1 (latest)
(cilpsthepu) Color specific tags with a format
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.
(cilpsthepu) Color specific tags with a format script
!lang format script
Format script containers are very simple script containers used for formatting messages, usually with the 'narrate' command.
Format_Script_Name:
type: format
# The only key is the format. The format can use '<[text]>' as a special def to contain the message being sent.
# '<[name]>' is available as a special def as well for use with the 'on player chats' event to fill the player's name properly.
# Note that 'special' means special: these tags behave a little funny in certain circumstances.
# In particular, these can't be used as real tags in some cases, including for example when using a format script as a determine in the 'player chats' event.
# | All format scripts MUST have this key!
format: <[name]> says <[text]>
Group
Script Container System
You may be interested in this^? Does tgis do what you need?
Can use this & a procedure script you pass the text def to if you want to color certain tags as well
Take note of this though
# Note that 'special' means special: these tags behave a little funny in certain circumstances.
# In particular, these can't be used as real tags in some cases, including for example when using a format script as a determine in the 'player chats' event.```
Another way would be to define the text beforehand, modify it and then narrate
From the little testing I did this seems to work fine for just narrating
test_format:
type: format
format: <[text].proc[t_proc]>
t_proc:
type: procedure
definitions: text
script:
- determine <[text].replace_text[<server.flag[a]>].with[<&c><server.flag[a]><&r>]>```
Wow thank you, I will close this with my second account tomorrow. I do not have access to that account on my PC lol.