Posted February 13, 2016 (edited) This is a small tool to send commands to WU servers using their Java RMI interface, intended for use from scripts, cronjobs, etc. RMI must be enabled in server config, and you need to know the IntraServer password. Currently available commands: Shut down server: java -jar rmitool.jar <Server IP> <RMI port> <IntraServer Password> shutdown <Name> <Seconds> "<Message>" Name is purely for logging, users will not see it Seconds - Time until shutdown, in seconds Message - Reason that the users will see, if it has spaces it needs to be quoted Broadcast message: java -jar rmitool.jar <Server IP> <RMI port> <IntraServer Password> broadcast "<Message>" Message - Message to broadcast, if it has spaces it needs to be quoted Check if server is running: java -jar rmitool.jar <Server IP> <RMI port> <IntraServer Password> isrunning Exit code will be 0 if the server is running and can be cotacted by RMI, otherwise it will be 1. Check number of players on server: java -jar rmitool.jar <Server IP> <RMI port> <IntraServer Password> playercount The number of players will be printed to STDOUT (everything else goes to STDERR) Add money to player bank: java -jar rmitool.jar <Server IP> <RMI port> <IntraServer Password> addmoney <Name> <Amount> [Reason] Name is player name Amount is how much money to add, in irons Reason is optional, and does nothing with current WU implementation On success exit code is 0 and a summary will be printed to stdout ("An amount of 1 silver has been added to the account. Current balance is 31 silver, 85 copper and 76 iron.") On failure exit code is 1 and an error will be printed to stderr On success the exit code will be 0 otherwise it will be 1 and a human readable (YMMV) error message will be written to stderr. More stuff will be added in the future. If you have any specific ideas - post them here. See here for what can be done in theory with the RMI interface. Downloads and source code: https://github.com/bdew-wurm/rmitool/releases Edited October 7, 2016 by bdew 2 Share this post Link to post Share on other sites
Posted March 24, 2016 (edited) Nevermind! Edited March 24, 2016 by drdysdy Share this post Link to post Share on other sites
Posted May 22, 2016 Added 2 new commands: Check if server is running: java -jar rmitool.jar <Server IP> <RMI port> <IntraServer Password> isrunning Exit code will be 0 if the server is running and can be cotacted by RMI, otherwise it will be 1. Check number of players on server: java -jar rmitool.jar <Server IP> <RMI port> <IntraServer Password> playercount The number of players will be printed to STDOUT (everything else goes to STDERR) Share this post Link to post Share on other sites
Posted May 22, 2016 Hey Bdew awesome work. Have you looked at the web tool that coolboy made to see if you could get any ideas from it? 1 Share this post Link to post Share on other sites
Posted October 7, 2016 (edited) Added new command: Add money to player bank: java -jar rmitool.jar <Server IP> <RMI port> <IntraServer Password> addmoney <Name> <Amount> [Reason] Name is player name Amount is how much money to add, in irons Reason is optional, and does nothing with current WU implementation On success exit code is 0 and a summary will be printed to stdout ("An amount of 1 silver has been added to the account. Current balance is 31 silver, 85 copper and 76 iron.") On failure exit code is 1 and an error will be printed to stderr Thanks to Parsiuk for initial implementation. Edited October 7, 2016 by bdew 1 Share this post Link to post Share on other sites
Posted January 17, 2017 i believe its a command line (ie the DOS type box started via the Start/Run CMD). not actually a Program/App. It will not work on a citadel hosted server as they block the RMI ports from the outside. Share this post Link to post Share on other sites
Posted January 19, 2017 Has anyone implemented the getPlayersForDeed? I've tried to get it to work, but not sure the final int p1 parameter. Map<String, Long> getPlayersForDeed(final String p0, final int p1) throws RemoteException; It seems like all players get returned under p1 = 1 regardless of their actual deed membership in game. Share this post Link to post Share on other sites
Posted January 21, 2017 On 2017-01-17 at 2:44 PM, bigsteve said: i believe its a command line (ie the DOS type box started via the Start/Run CMD). not actually a Program/App. It will not work on a citadel hosted server as they block the RMI ports from the outside. Ooh i see. Share this post Link to post Share on other sites