readYAML: type: command debug: false name: readyaml description: Shows the entries of a YAML file in chat. usage: /readyaml <<>yamlID<>> tab complete: - define yamlList "" - if "": - determine li@ - if "" > "1": - determine li@ - define yamlID "" - determine "]]>" script: - define yamlList "" - if "": - narrate "<&6>There are no YAML files loaded." - queue clear - define yamlID "" - if "" == null: - narrate "<&6>Specify the ID of the file you wish to view." - narrate "<&6>Usage<&co> <&c><&dq>/readyaml <<>yamlID<>><&dq><&6>." - queue clear - if "].not>": - narrate "<&6>There is no loaded file by the name of <&c><&dq><&dq><&6>." - queue clear - define keys "].list_keys[]>" - if "": - narrate "<&6>The file specified exists, but is empty." - queue clear - define deep_keys "].list_deep_keys[]>" - foreach "": - define key "" - define subkeys "]]>" - define subkeys "" - foreach "": - define subkey "" - define sp "]>" - define subkey_formatted "" - if "": - define subkey_formatted "" - define aux "]]>" - define aux "]]>" - if "" > "1": - narrate "<&a><&co>" - else: - define value "].read[]>" - if "" == "List": - narrate "<&a><&co>" - foreach "": - narrate " <&7>- <&f>" - else: - narrate "<&a><&co> <&f>"