I don't know how to create a config.yml like the one I've written

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Hello,
you could try this solution :emoji_slight_smile:

YML-Code
YAML:
options:
    max_warns: 4
    dissallowed_muted_cmds:
    - 'msg'
    - 'tell'
    - 'helpop'
messages:
    prefix: "&c&lSuperBans &8» &7"
    ban_screen_message:
    - '&7Sadly, you were &cBanned &7from &6ServerName&7. Apply on our forums if you want to dispute your ban!%nl%%nl%'
    - '%&7Banned by: &a%{sban.bannedby.%{_p}%}%%'

and here is the code for Skript :emoji_stuck_out_tongue:
code_language.skript:
on script load:
    set {superbans.options.max_warns} to yml value "options.max_warns" of file "plugins\Skript\scripts\messages.yml"
    set {superbans.options.disallowed_muted_cmds} to yml value "options.dissallowed_muted_cmds" of file "plugins\Skript\scripts\messages.yml"
    set {superbans.messages.prefix} to yml value "messages.prefix" of file "plugins\Skript\scripts\messages.yml"
    set {superbans.messages.ban_screen_message} to yml value "messages.ban_screen_message" of file "plugins\Skript\scripts\messages.yml"

On my test server, this worked fine :emoji_wink:

For this solution, you should have WildSkript installed :emoji_grinning:

With kind regards

CookieLand
 
Hello,
you could try this solution :emoji_slight_smile:

YML-Code
YAML:
options:
    max_warns: 4
    dissallowed_muted_cmds:
    - 'msg'
    - 'tell'
    - 'helpop'
messages:
    prefix: "&c&lSuperBans &8» &7"
    ban_screen_message:
    - '&7Sadly, you were &cBanned &7from &6ServerName&7. Apply on our forums if you want to dispute your ban!%nl%%nl%'
    - '%&7Banned by: &a%{sban.bannedby.%{_p}%}%%'

and here is the code for Skript :emoji_stuck_out_tongue:
code_language.skript:
on script load:
    set {superbans.options.max_warns} to yml value "options.max_warns" of file "plugins\Skript\scripts\messages.yml"
    set {superbans.options.disallowed_muted_cmds} to yml value "options.dissallowed_muted_cmds" of file "plugins\Skript\scripts\messages.yml"
    set {superbans.messages.prefix} to yml value "messages.prefix" of file "plugins\Skript\scripts\messages.yml"
    set {superbans.messages.ban_screen_message} to yml value "messages.ban_screen_message" of file "plugins\Skript\scripts\messages.yml"

On my test server, this worked fine :emoji_wink:

For this solution, you should have WildSkript installed :emoji_grinning:

With kind regards

CookieLand
Very useless solution. If you using YML - use direct returns, not basic variables, or use list variables.
 
Very useless solution. If you using YML - use direct returns, not basic variables, or use list variables.

If you use for example this:
YAML:
"&7Banned by: &a%{sban.bannedby.%{_p}%}%"

With direct returns for example:
code_language.skript:
message "%yml value ""XYZ"" of file ""etc\...""%"

You would see this in the Chat:

&7Banned by: &a%{sban.bannedby.%{_p}%}%

With no color formatting or the Variable is replaced with its actual content.

If you use for example a (Local) Variable, you can add color and make the variable return its actual content.

Best wishes
 
And @Snow-Pyon can tell you the diffrence between list and normal variables.
List variables are better because:
  • List variables can be looped.
  • Easier to delete, add and remove objects.
  • And other reasons I can't remember right now, the above ones are pretty much everything you want know anyways.
Also, if you're gonna use YML, you shouldn't use it like that, it'll be getting the value from the yml file every time it sends the message, and that isn't good.
 
Hello,
you could try this solution :emoji_slight_smile:

YML-Code
YAML:
options:
    max_warns: 4
    dissallowed_muted_cmds:
    - 'msg'
    - 'tell'
    - 'helpop'
messages:
    prefix: "&c&lSuperBans &8» &7"
    ban_screen_message:
    - '&7Sadly, you were &cBanned &7from &6ServerName&7. Apply on our forums if you want to dispute your ban!%nl%%nl%'
    - '%&7Banned by: &a%{sban.bannedby.%{_p}%}%%'

and here is the code for Skript :emoji_stuck_out_tongue:
code_language.skript:
on script load:
    set {superbans.options.max_warns} to yml value "options.max_warns" of file "plugins\Skript\scripts\messages.yml"
    set {superbans.options.disallowed_muted_cmds} to yml value "options.dissallowed_muted_cmds" of file "plugins\Skript\scripts\messages.yml"
    set {superbans.messages.prefix} to yml value "messages.prefix" of file "plugins\Skript\scripts\messages.yml"
    set {superbans.messages.ban_screen_message} to yml value "messages.ban_screen_message" of file "plugins\Skript\scripts\messages.yml"

On my test server, this worked fine :emoji_wink:

For this solution, you should have WildSkript installed :emoji_grinning:

With kind regards

CookieLand
Can I do this with other dependencies like Skutilities or any other that supports 1.8 to 1.12?
 
Status
Not open for further replies.