Posted January 16, 2017 (edited) I am trying to make a server modification to create a new chat channel at player login. I would like to display some info about the server and such in it. I would prefer it if the channel was strictly informative and chat was disabled. I tried going through some of the wurmxxxx.db files and could not find anything useful. If anyone would be so kind as to pint me in the right direction I would greatly appreciate it. Thank you. Edited January 16, 2017 by Governor Share this post Link to post Share on other sites
Posted January 16, 2017 Check out Sindusk's server mod. It has an event tab that might do what you want or perhaps would give you a starting point. 1 Share this post Link to post Share on other sites
Posted January 20, 2017 Thank you. I will take a look at it this weekend. Share this post Link to post Share on other sites
Posted February 18, 2017 On 2017-01-20 at 3:01 PM, Governor said: Thank you. I will take a look at it this weekend. Any progress? Share this post Link to post Share on other sites
Posted February 27, 2017 On 2/18/2017 at 7:10 AM, Elsa said: Any progress? Not as of yet Share this post Link to post Share on other sites
Posted January 23, 2018 I have seen this on some servers, anybody know which mod facilitates this or is it custom code by the admins? Share this post Link to post Share on other sites
Posted January 23, 2018 I don't have a readymade mod for this, but if anyone wants to write one... In your mod class you'll need to implement PlayerLoginListener and from there send your stuff to the player like this: player.getCommunicator().sendMessage(new Message(player, (byte) 0, "ChannelName", "text goes here", r, g, b)); Also for good measure, implement PlayerMessageListener and do something like this to prevent sending messages to this channel: @Override public MessagePolicy onPlayerMessage(Communicator communicator, String message, String title) { if (title.equals("ChannelName") && !message.startsWith("#") && !message.startsWith("/")) { return MessagePolicy.DISCARD; } else { return MessagePolicy.PASS; } } 1 Share this post Link to post Share on other sites
Posted January 23, 2018 Thanks bdew, I have been a programmer for a long time but never in Java, I got the IntelliJ IDE and have been poking around... bit of a learning curve for me but it would be very cool to do one, guess I'll try this... thank you 1 Share this post Link to post Share on other sites
Posted January 23, 2018 I got a script that makes a "PM" window in the chat with info and etc... Share this post Link to post Share on other sites
Posted January 23, 2018 That sounds good Elsa, would you be willing to share it? Share this post Link to post Share on other sites
Posted January 24, 2018 Got it working, wrote my first really simple mod! Now I'll keep playing with it to make use of the properties file so it is not hard coded. too much fun! Thanks bdew for the pointers! Share this post Link to post Share on other sites
Posted January 24, 2018 (edited) .... Edited January 24, 2018 by Elsa Share this post Link to post Share on other sites
Posted January 24, 2018 20 hours ago, Worfeus said: That sounds good Elsa, would you be willing to share it? sure here https://www.dropbox.com/s/e78qgj2ykdoziwj/greet.zip?dl=0 2 Share this post Link to post Share on other sites
Posted January 24, 2018 (edited) Wonderfull dear Elsa =) where are you copying this file? Eject Edited January 24, 2018 by Eject Share this post Link to post Share on other sites
Posted January 24, 2018 1 hour ago, Eject said: Wonderfull dear Elsa =) where are you copying this file? Eject What you mean? You put it in scriptrunner in playerLogin Share this post Link to post Share on other sites
Posted January 24, 2018 Not me who made it throu, got it from another person.. Share this post Link to post Share on other sites
Posted January 26, 2018 On 2018-01-25 at 0:18 PM, Worfeus said: Thank you Elsa Np. Share this post Link to post Share on other sites
Posted February 4, 2018 On 1/24/2018 at 11:48 AM, Elsa said: What you mean? You put it in scriptrunner in playerLogin Can you please help me be very sure where? Is it here: mods/scriptrunner/scripts/onPlayerLogin I already have 2 files in there: greet.js.example make-all-admins.js.example Do I delete these ones and put the greet file there? Or just drop the new greet file in with the other 2 files? Share this post Link to post Share on other sites
Posted February 4, 2018 6 hours ago, Batta said: Can you please help me be very sure where? Is it here: mods/scriptrunner/scripts/onPlayerLogin I already have 2 files in there: greet.js.example make-all-admins.js.example Do I delete these ones and put the greet file there? Or just drop the new greet file in with the other 2 files? YOu can keep the exapmles there. And yes in here in onplayerslogin 1 Share this post Link to post Share on other sites
Posted February 4, 2018 YOu can also make a copy of the file and write something else in it like event info or what you like. 1 Share this post Link to post Share on other sites
Posted February 5, 2018 (edited) 10 hours ago, Elsa said: YOu can also make a copy of the file and write something else in it like event info or what you like. Where do I write something else? The greet file is a java file. Do I need to find a way to open it? Never mind, I just discovered I can drag and drop it into Notepad++. :-) Edited February 5, 2018 by Batta 1 Share this post Link to post Share on other sites
Posted June 30, 2018 The dropbox link is broken. Anyone have the files for this? Share this post Link to post Share on other sites
Posted June 30, 2018 12 minutes ago, WittleBunnBun said: The dropbox link is broken. Anyone have the files for this? https://www.dropbox.com/s/21zfnfgotc9q6vm/greet.js?dl=0 Here is a new one. 1 Share this post Link to post Share on other sites