Sign in to follow this  
Governor

Custom Chat Channel Creation

Recommended Posts

YOu Edit it with notepad, and put it in scriptrunnt -> scripts->playersLogin 

Edited by Elsa

Share this post


Link to post
Share on other sites

Is there a way to use that PM script that @Elsa shared, but for a second tab?  I tried copying the original and editing it, but it still chose only one of the files.

Share this post


Link to post
Share on other sites
9 hours ago, Batta said:

Is there a way to use that PM script that @Elsa shared, but for a second tab?  I tried copying the original and editing it, but it still chose only one of the files.

Just copy the file and rename it. And rename  the tab name inside the file. 

Edited by Elsa

Share this post


Link to post
Share on other sites
4 hours ago, Elsa said:

Just copy the file and rename it. And rename  the tab name inside the file. 

When I do this, it just cancels the first one, and I still have only one new tab.

Oh wait, rename the file itself?  What would you call it, if not greet.js?

Edited by Batta

Share this post


Link to post
Share on other sites
1 hour ago, Batta said:

Oh wait, rename the file itself?  What would you call it, if not greet.js?

You can call it whatever you want as long as you keep the file extension .js

  • Like 1

Share this post


Link to post
Share on other sites
On 9/2/2018 at 6:43 PM, Batta said:

Oh wait, rename the file itself?  What would you call it, if not greet.js?

Depends on what you want the tab to be. The name of file doesn't matter, 

Quote

var titleWindow = "Donators";

this will change the name of the tab ingame. 

Edited by Elsa
  • Like 1

Share this post


Link to post
Share on other sites
On 9/4/2018 at 2:30 PM, Elsa said:

Depends on what you want the tab to be. The name of file doesn't matter, 

this will change the name of the tab ingame. 

Hello. I tried this and only the first showed up. I copied the file inside of the same folder and changed the contents, renamed it to rules.js. Am I missing something somewhere? Maybe need to edit another file to get it to pick up the second file??

Share this post


Link to post
Share on other sites
15 minutes ago, Etheria said:

Hello. I tried this and only the first showed up. I copied the file inside of the same folder and changed the contents, renamed it to rules.js. Am I missing something somewhere? Maybe need to edit another file to get it to pick up the second file??

Did you change the var titleWindow = " " ?

Share this post


Link to post
Share on other sites
4 hours ago, Elsa said:

Did you change the var titleWindow = " " ?

Yes- one is "Server Info" the other is "Rules". 

Share this post


Link to post
Share on other sites
24 minutes ago, Etheria said:

Yes- one is "Server Info" the other is "Rules". 

 

I'm having the same problem.  If I add a second one, only the second one shows up.

Share this post


Link to post
Share on other sites

Did you try to restart the server?

Should help to restart it, so the scripts gets loaded.

Share this post


Link to post
Share on other sites
10 hours ago, Elsa said:

Did you try to restart the server?

Should help to restart it, so the scripts gets loaded.

Restarted twice- same results. I think we're missing something. 

Share this post


Link to post
Share on other sites
8 hours ago, Etheria said:

Restarted twice- same results. I think we're missing something. 

Make sure you haven't missed a any symbole or somthing. If you miss and '"' or somthing the scripts wont run.

Share this post


Link to post
Share on other sites

Notepad++ shows no errors. Normally there would be a visual anomaly in the pattern of colours if something wasn't "closed". I've checked both files. Both check out.

Edited by Etheria
spelling

Share this post


Link to post
Share on other sites

Question, can this scriptrunner also pop open the alliance and village tabs on longin? If yes, could someone help me figure out exactly how to do this ? I know how to do it client side, but now server side.

Share this post


Link to post
Share on other sites
On 1/24/2018 at 1:18 AM, bdew said:

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;
        }
    }

 

Could someone please make or share the mod for this, I have no idea how to make mods yet.

Edited by Darkness1990

Share this post


Link to post
Share on other sites
On 1/23/2018 at 9:52 PM, Worfeus said:

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! 

Any luck on this yet?

Edited by WolfHunt
Didn't see Barfoot's post lol

Share this post


Link to post
Share on other sites

 

On 1/15/2017 at 8:18 PM, Governor said:

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.

https://github.com/Worfeus-Asgard/Wurm-ServerChatTab

Maybe this would work

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this