Remote Restart for RMX-OS
Authors: Blizzard
Version: 1.1
Type: RMX-OS Plugin
Key Term: RMX-OS Plugin
IntroductionThis script allows you to restart the RMX-OS server remotely from the login screen.
This script is to be distributed under the same terms and conditions like the script it was created for: RMX-OS.
Features
- remote restart server on button press
- very easy to use
ScreenshotsN/A for this sort of script.
DemoN/A
ScriptJust make a new script above main and paste this code into it.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Remote Restart for RMX-OS by Blizzard
# Version: 1.1
# Type: RMX-OS Plugin
# Date: 29.8.2009
# Date v1.01: 3.1.2010
# Date v1.02: 7.4.2013
# Date v1.1: 12.6.2013
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This script is to be distributed under the same terms and conditions like
# the script it was created for: RMX-OS.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Information:
#
# This script must be placed below RMX-OS and requires RMX-OS to work
# properly. This script allows you to restart the RMX-OS server remotely
# from the login screen or within the game if the game is run in $DEBUG mode.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
if !defined?(RMXOS) || RMXOS::VERSION < 2.0
raise 'ERROR: The "Remote Restart" requires RMX-OS 2.0 or higher.'
end
#==============================================================================
# module BlizzCFG
#==============================================================================
module BlizzCFG
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# the button to press
REMOTE_BUTTON = Input::Key['F11']
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
#==============================================================================
# module Input
#==============================================================================
module Input
class << Input
alias update_remoterestart_later update
end
def self.update
update_remoterestart_later
if $DEBUG && $network.connected? && self.trigger?(BlizzCFG::REMOTE_BUTTON)
$network.send('RSTRT')
$network.disconnect
$scene = Scene_Servers.new
end
end
end
Make a new file with an
.rb extension in the
Extensions folder of RMX-OS and copy-paste this script into it.
module RMXOS
def self.load_current_extension
return RemoteRestart
end
end
#======================================================================
# module RemoteRestart
#======================================================================
module RemoteRestart
VERSION = 1.1
RMXOS_VERSION = 2.0
SERVER_THREAD = false
def self.initialize
@mutex = Mutex.new
end
def self.mutex
return @mutex
end
def self.main
while RMXOS.server.running
@mutex.synchronize {
self.server_update
}
sleep(0.1)
end
end
def self.server_update
end
def self.client_update(client)
case client.message
when /\ARSTRT\Z/
RMXOS.server.shutdown
return true
end
return false
end
end
InstructionsIn the script in the first comment.
CompatibilityRequires RMX-OS to work.
Credits and Thanks
Author's NotesThis tool can be very useful during development, but is not recommended to use for the actual game.
Remember to activate the server extension by adding the server extension filename to the list in the configuration.
If you find any bugs, please report them here:
http://forum.chaos-project.comThat's it! N-Joy! =D