Server Information Announcer

Author Topic: Server Information Announcer  (Read 4584 times)

some people requested this to be released so I did

This add-on reads out server information in chat, similar to other server info add-ons. However, unlike other add-ons, it reads the information out of a .txt file, allowing for even thousands of lines if you wanted to.
This add-on was originally created in 2013 as part of a bigger add-on, but now I've repackaged it and edited it a bit.
Most of the code was done by Swollow, so huge thanks to himher.

PREFS:
$Pref::Server::ServerInfo_FileLocation - To change the location of the .txt file.
$Pref::Server::ServerInfo_Delay - To change the amount of time until it announces again. (in ms)

INSTRUCTIONS:
Install the add-on as usual, but then you need to make a .txt file in server/serverinfo/ called 'info.txt'. (It doesn't have to actually be this path, you can change the pref to move the location.)
To add info to display, just edit the .txt file, having each piece of information on seperate lines. The add-on should pick a random line and display it.
Examples:

(make sure not to have any lines with nothing on them, as it may pick those lines and display nothing instead)

DOWNLOAD

Extra notes:
I think formatting works (such as coloring text, fonts, etc), but I haven't tested it.
You can edit the .txt file while in-game, you don't need to restart every time you make an edit to it.
« Last Edit: July 30, 2016, 04:50:22 PM by K3k0m@n »

You keep making more and more file objects, but never delete them. You should fix that.

You keep making more and more file objects, but never delete them. You should fix that.
fixed

Thank you so much, needed this






TOO COMPLICATED 4 me
How is editing a text file complicated

make a .txt file in server/serverinfo/ called 'info.txt'.
How is editing a text file complicated
WHERE DO I FIND server/serverinfo???

WHERE DO I FIND server/serverinfo???
I believe it's the server folder in your Blockland/config directory where you have to make a folder named 'serverinfo' and make the 'info' text document

I tested this extensively on my server. Text codes work extremely well.

Also, is the delay between announce time in Milliseconds or Minutes?

Also, is the delay between announce time in Milliseconds or Minutes?
Milliseconds.

I believe it's the server folder in your Blockland/config directory where you have to make a folder named 'serverinfo' and make the 'info' text document
i made it, but it doesnt show in my server