RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[Runuo 2.0 RC2] Xanthos MOTD

Lachuille

Sorceror
[Runuo 2.0 RC2] Xanthos MOTD

Another one of Xanthos great scripts. I just updated it to work for RC2.

This needs no Distro edits, just download it and place it in you Scripts folder for it to work.

Enjoy.
 

Attachments

  • motd.cs
    18.2 KB · Views: 662

Tylius

Sorceror
This is also the exact same file as Xanthos has posted in his Utilities packages, where are these updates for RC2?

(I'm also under the impression that the MoTD worked just fine under RC2)
 

sohtnax

Sorceror
Glad to see my code is still in use - I have been gone for a while. One day I will move them forward again - please let me know what you would like to see.
 

test444

Wanderer
its good, but it doesnt works for me as it is now... gump doesnt pops when client login in.... i had it change it this way, to get it work..

instead of this code:

Code:
		private static void SetAllTags( Mobile from, bool toTrue )
		{
			if ( kAlwaysShowMotdOnLogin )	// No need to tag if we are always showing
				return;

			string boolValue = toTrue.ToString();
			Account account;

			foreach ( Mobile mobile in World.Mobiles.Values )
			{
				if ( null == mobile || !( mobile is PlayerMobile ) )
					continue;

				if( null == ( account = (Account)from.Account ) )
					continue;

				account.SetTag( "motd", boolValue );
			}

			from.SendMessage( kLabelColor, "All players" + ( true == toTrue ? " will " : " will not ") + "see the MOTD Message at next login." );
		}

i am using this code:

Code:
		private static void SetAllTags( Mobile from, bool toTrue )
		{
			if ( kAlwaysShowMotdOnLogin )	// No need to tag if we are always showing
				return;

			string boolValue = toTrue.ToString();
                      foreach (Account account in Accounts.GetAccounts())
                     {
				account.SetTag( "motd", boolValue );
                     }
			from.SendMessage( kLabelColor, "All players" + ( true == toTrue ? " will " : " will not ") + "see the MOTD Message at next login." );
		}
 
actualy the only line you had to change was thios one:
account.SetTag( "motd", boolValue );
to
account = (Account)mobile.Account;
account.SetTag( "motd", boolValue );
 

test444

Wanderer
ye i see, but my code is more elegant anyway... but what is really funny that nobody complained about that, although the code isnt working, lol :D

Lord_Greywolf;784329 said:
actualy the only line you had to change was thios one:
account.SetTag( "motd", boolValue );
to
account = (Account)mobile.Account;
account.SetTag( "motd", boolValue );
 
well hard to know if other players get it or not :)
because the code automaticaly did noit send to the person doing it (the line with the from in it was for that)
also up until a few days ago, i had it so it always came on on their restart
so i would not have noticed thatr not working until the change to not always be on :)

but anyways, both methods work, one is a simple change, one is more complex
 

test444

Wanderer
yes, but i wanted have it of course the way, that it pops only once, and just when i reload motd as admin ;)

there also still some error, when you try archive the motd, it writes in chat error, that motd.txt doesnt exists, after this file is back uped to archives... :) have you noticed?
 
you have to have a "next.txt" or something liek that to takes its place - look in the script - it says the name to use for it that then replaces the current motd.txt file when it archives it
 

KnitePrince

Sorceror
Sorry to necro, but is there a way to change this from within the game as an admin or owner? Or do I have to physically add a new text file every time i want it changed?
i am asking, because eventually this will be running on a server that will be at my buisness location, and not in my home.. i can probably still do it through the remote access on the server, But i would like for my Head Admin to be able to change it as well.
 

sohtnax

Sorceror
I wrote this so long ago I do not remember. I think my intention was to use a file so I would not have to deal with creating a full word processor in game. Get comfortable with a ftp client - once you set it up it will take one or two clicks to publish a new file. Faster than in game!
 

Red_Satiin

Sorceror
How hard would it be to Edit this So guilds can have an motd for their guild members.. I'm not very good at writing scripts.. But I think a message that pops up for guild members would be nice.. Then the Guildmaster could assign like a Newsletter editor that would use a command to write the motd.. Giving Guild event news and things like that.. This would then pop up if it was new for each member of that guild..

Personally I wish I knew enough about scripting to do this myself.. but I'm just a tard ... lol... I'm very good at Script Logic.. But no good at all at the Language.. lol i was thinking this because It's hard to send an entire guild a message. You either have to do it by individual PM's or hope everyone shows for meetings. lol

Specifics:

1. One User is given Rank or Newletter Editor only that user and the guildmaster have access to the Guild MOTD commands.

2. Editor can add or remove from the Guild MOTD via a command. Perhaps: [GMotdEdit

3. If the Guild MOTD is new then it auto pops up for all members. If not a guild member can See old news by typing [GMotd

4. Admin can access all Guild Motds by using [gmotdReview Which would give them a list of guilds with an MOTD

I'm not sure if someone would be willing to help me create this or would be willing to do it themselves.. But either way I would be appreciative lol

(I'm sorry If I posted this is the wrong place.. I'm just not sure where to place it.)

Thank you.
Red.
 
Top