Solved TXT Files, like Essentials

  • 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!

Wynnevir

Well-Known Member
Jul 9, 2017
1,015
62
48
30
Elsewhere
Category: Skript

Suggested name: SuperDuperHandyEssentialsTXT (lol jk it doesn't need a name)

What I want:
I don't know if this is possible, but the portion of Essentials that I miss when using an skript remake is the function of the txt files. Such as the book.txt, rules.txt and motd.txt, etc. If someone knows how and would like to make it, it'd be awesome and I'd definitely appreciate it!^-^

Ideas for commands: na

Ideas for permissions: na

When I'd like it by: Whenever
 
here's rules.txt. you should be able to figure out how to make the rest of the text files you want from this (needs skutilities)
code_language.skript:
on load:
    delete {rules::*}
    if file "plugins\\Skript\\rules.txt" exists:
        set {rules::*} to file contents of "plugins\\Skript\\rules.txt"
    else:
        create file "plugins\\Skript\\rules.txt"

command /rules:
    trigger:
        if {rules::*} is set:
            loop {rules::*}:
                send "%loop-value%"
        else:
            send "There are no rules!!!"
 
here's rules.txt. you should be able to figure out how to make the rest of the text files you want from this (needs skutilities)
code_language.skript:
on load:
    delete {rules::*}
    if file "plugins\\Skript\\rules.txt" exists:
        set {rules::*} to file contents of "plugins\\Skript\\rules.txt"
    else:
        create file "plugins\\Skript\\rules.txt"

command /rules:
    trigger:
        if {rules::*} is set:
            loop {rules::*}:
                send "%loop-value%"
        else:
            send "There are no rules!!!"
Oh, much simpler than I thought it'd be! Thanks so much^-^ <3
 
Im not sure if i understand correclty, but there its a expression?

code_language.skript:
command /test:
    trigger:
        create file "plugins\SomeThings\test.txt"
        wait a ticks
        set {_var::*} to file contents of "plugins\SomeThings\test.txt"
        broadcast "%{_var::*}%"

Sorry if that not what you need. (i didn't understand, what youre trying :s)

#Edit

Damn. im was to late.
 
  • Like
Reactions: Wynnevir