RMX-OS Daily Messages
Authors: Wizered67
Version: 1.00
Type: Message of the day system
Key Term: RMX-OS Plugin
IntroductionThis script adds a new feature to RMX-OS that allows a message to be displayed upon logging in. It's pretty much the same thing as a "message of the day", but I called it daily messages so that it's shorter.

All you have to do is add the script and .rb extension and make a text file called "MOTD" (can be configured) that contains the message.
Features
- Displays important messages upon logging in
- Easy to use
- Server does not require a restart after changing the message so you can change it as much as you want.
ScreenshotsNone, its just a message....
DemoN/A
ScriptClient Side (RMX-OS 2.0 Compatible): ShowHide
#------------------------------------------------------------------------------#
# RMX-OS Daily Messages #
# by Wizered67 #
# V 1.00 #
# All errors should be reported at www.chaos-project.com. #
#------------------------------------------------------------------------------#
class Scene_Loading < Scene_Network
alias load_game_motd load_game
def load_game
$network.send('GDM')
load_game_motd
end
end
#------------------------------------------------------------------------------
# RMX-OS Daily Messages
# by Wizered67
# V 1.00
# All errors should be reported at www.chaos-project.com.
#------------------------------------------------------------------------------
module RMXOS
def self.load_current_extension
return MOTD
end
end
#======================================================================
# module MOTD
#======================================================================
module MOTD
VERSION = 1.00
RMXOS_VERSION = 1.15
SERVER_THREAD = false
FILE_NAME = './MOTD.txt'
def self.initialize
end
def self.main
while RMXOS.server.running
self.server_update
sleep(0.1)
end
end
def self.server_update
end
def self.client_update(client)
case client.message
when /\AGDM\Z/
#set the message to empty
message = []
#get message from file
file = File.open(FILE_NAME , 'r')
#add each line to the message array.
file.each_line {|line| message.push(line)
}
#close file
file.close
# prepare final message
final_message = ''
for i in 0...message.size
final_message = final_message + message[i]
end
client.send("CHT#{RMXOS::Data::ColorInfo}\t0\tMOTD: #{final_message}")
return true
end
return false
end
end
module RMXOS
#------------------------------------------------------------------
# Passes the extension's main module to RMX-OS on the top
# level so it can handle this extension.
# Returns: Module of this extension for update.
#------------------------------------------------------------------
def self.load_current_extension
return MOTD
end
end
#======================================================================
# module MOTD
#======================================================================
module MOTD
# extension version
VERSION = 1.0
# required RMX-OS version
RMXOS_VERSION = 2.0
# whether the server should update this extension in an idividual thread or not
SERVER_THREAD = true
# the extension's name/identifier
IDENTIFIER = 'MOTD'
FILE_NAME = './MOTD.txt'
# :::: START Configuration
# - YOUR CONFIGURATION HERE
# :::: END Configuration
#------------------------------------------------------------------
# Initializes the extension (i.e. instantiation of classes).
#------------------------------------------------------------------
def self.initialize
# create mutex
@mutex = Mutex.new
end
#------------------------------------------------------------------
# Gets the local extension mutex.
#------------------------------------------------------------------
def self.mutex
return @mutex
end
#------------------------------------------------------------------
# Calls constant updating on the server.
#------------------------------------------------------------------
def self.main
# while server is running
while RMXOS.server.running
@mutex.synchronize {
self.server_update
}
sleep(0.1) # 0.1 seconds pause, decreases server load
end
end
#------------------------------------------------------------------
# Handles the server update.
#------------------------------------------------------------------
def self.server_update
# - YOUR SERVER CODE HERE
end
#------------------------------------------------------------------
# Handles updating from a client.
# client - Client instance (from Client.rb)
# Returns: Whether to stop check the message or not.
#------------------------------------------------------------------
def self.client_update(client)
case client.message
when /\AGDM\Z/
#set the message to empty
message = []
#get message from file
file = File.open(FILE_NAME , 'r')
#add each line to the message array.
file.each_line {|line| message.push(line)
}
#close file
file.close
# prepare final message
final_message = ''
for i in 0...message.size
final_message = final_message + message[i]
end
client.send("CHT\t#{RMXOS::Data::ColorInfo}\t0\tMOTD: #{final_message}")
return true
end
return false
end
end
InstructionsPlace the script below RMX-OS and add the extension. Create a neq text document called MOTD in the
RMX-OS server folder with the message.
CompatibilityRequires RMX-OS. No other issues none.
Credits and Thanks
- Me
- Blizzard for making RMX-OS
Author's NotesThe only error I couldn't fix had to do with multiple lines in the message. Therefore, keep the message only one line long until I get this fixed. Feel free to report errors. I know it's a small script, but enjoy.