Another MOTD Plugin [Asphalt MDK]

7.7.X 7.6.X Another MOTD Plugin [Asphalt MDK] 1.2.0

No permission to download
Tested Version
, , , , ,
Contributors
Mari for the icon, Gabeux and Jagganot for the idea of making the mod
Dependencies
https://eco-mods.com/resources/asphalt-modkit-an-event-system-for-developers.47/
Hello, here I come for a new small plugin for server admin.
Let's see what add this plugins.

Welcome Message

With this plugin you can add a welcome UI for player that connect the first time on your server
The content of the UI is directly read from a text file
Here the content of the text file
Code:
Welcome {0} on our server.
You can make /rules command to see our server rules.
If you have any problems you can contact a admin.
Hope you will enjoy playing on our server.
What look in game

As you can see the "{0}" in the text file is replace by the username.

Rules Message

You can add rules too, a UI that show when user write /rules with the content of a file like the welcome message.

Automatic Message

You can add automatic message that show up in the chat for every user.
Here is what look the default config file.

JSON:
{
  "WelcomeMessage": {
    "uiTitle": "Welcome !",
    "filename": "Welcome.txt"
  },
  "Rules": {
    "uiTitle": "Rules",
    "filename": "Rules.txt"
  },
  "AutoMessage": {
    "isActive": true,
    "timerInSecond": 300.0,
    "isTemporary": false,
    "isRandomlySelected": false,
    "messages": [
      "[AutoMessage] First automatic message",
      "[AutoMessage] A second automatic message",
      "[AutoMessage] A third one"
    ]
  }
}

In the autoMessage part you can change some settings.

isActive - If set to false no more message will be show
timerInSecond - Time between 2 automatic message in seconds
isTemporary - Is the message fade off after 10 seconds or if the message stay in the chat.
isRandomlySelected - If set to true the message are randomly selected in the list
messages - You can add here as many lien you want remember to not add a ',' at the end of the last line.

After the config has been modified a admin can type /automessagereload command to load the news settings.

Scheduled Message


You can add scheduled message that show up in the chat for every user at a given server time.
Here is what look the default config file. (You need to run one time the server to write the default config)


JSON:
{
  "ScheduledMessage": {
    "isActive": true,
    "isTemporary": false,
    "messages": [
      {
        "time": "12:00 AM",
        "UITitle": "Scheduled message",
        "openUI": false,
        "message": "12AM"
      },
      {
        "time": "12:00 PM",
        "UITitle": "Scheduled message",
        "openUI": false,
        "message": "12PM"
      },
      {
        "time": "00:00",
        "UITitle": "Scheduled message",
        "openUI": false,
        "message": "00H00"
      },
      {
        "time": "12:00",
        "UITitle": "Scheduled message",
        "openUI": false,
        "message": "12H00"
      }
    ]
  }
}
As you can see you can set the time in US 12hours clock format with AM or PM. Or you can set the time in a 24 hours clock format.
If you want to set at 1 PM you need to write "01:00 PM" or "13:00".
The openUI set if the message is show in a UI.
The UITitle is ignored if openUI is set to false.
If you have any problem with the config please ask me.
You can't change theses config from game but you can reload it with reload command.

User Commands

This plugins add 3 user commands.

/rules that open the rules UI message.
/showwelcome that open the welcome UI message.
/servertime show the server date and time.

Admin Commands

This plugins come with 7 admin commands.
/broadcast <message>
This command send a message to all online players.

/broadcastui <title>,<message>
This command open a ui for all online players with the title and the message.
Useful when need to give a very important message.

/automessageon
Enable automatic message (change the isActive bool in the config file to true)

/automessageoff
Disable automatic message (change the isActive bool in the config file to false)

/automessageadd <new message>
Add a new message in the automatic message list (There is no command for remove a message)

/automessagesettimer <new time in seconds>
Change the time between 2 automatic messages

/automessagereload
Reload the config file.


Additional info

All the config files can be found in Mods/KirthosMods/AnotherMOTDPlugin folder
If you have any question or any idea don't hesitate to comment.
Thanks for download and test my mods.

Installation
You need to install the asphalt modkit :
https://eco-mods.com/resources/asphalt-modkit-an-event-system-for-developers.47/

Open the zip file and drag the content of the Mods folder in the Server Mods folder.
Restart the server and play.

Credits
Thank to Gabeux and Jagganot for the idea of making the mod.
Thank to Mari for making the mod icon.
My mod use the Asphalt modkit by Lordmampf & Kronox thanks to them.
  • Like
Reactions: Malenkei
Author
Kirthos
Downloads
133
Views
133
First release
Last update
Rating
5.00 star(s) 2 ratings

More resources from Kirthos

Latest updates

  1. Eco 7.7.1

    This mods was tested for Eco 7.7.1 and no bug was found. If you found any bug using this mod on...
  2. New eco update 7.6.0

    This mods was tested with Eco 7.6.0. No issue was found you can use this mods for Eco 7.6.0.
  3. New eco update 7.5.0

    The mod was tested for the 7.5.0 and no issue found. You can use Another MOTD Plugin 1.2.0 in...

Latest reviews

Great mod!
Perfect MOTD/Message Mod, been running on my server and being able to broadcast messages along with a pop-up broadcast is great. Scheduled messages now enable my players to be aware of my scheduled restarts. Thanks so much, Kirthos!
Top Bottom