1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MoTd

Discussion in 'Script Support' started by Rochaven, Feb 5, 2014.

  1. Rochaven
    Offline

    Rochaven Member

    Joined:
    Jan 21, 2014
    Messages:
    162
    Likes Received:
    1
    Publish Number:
    54
    Which .cs is this found it, i have checked serverlist.cs and a few others, yet to find it, thanks for the pointing =)
     
  2. Kalamus
    Offline

    Kalamus Active Member

    Joined:
    Apr 24, 2013
    Messages:
    288
    Likes Received:
    33
    WelcomeTimer.cs
    Code (C#):
    1. public class WelcomeTimer : Timer
    2. {
    3.     private static readonly string[] m_Messages = (TestCenter.Enabled ? new string[]
    4.     {
    5.         "Welcome to this test shard.  You are able to customize your character's stats and skills at anytime to anything you wish.  To see the commands to do this just say 'help'.",
    6.         "You will find a bank check worth 1,000,000 gold in your bank!",
    7.         "A spellbook and a bag of reagents has been placed into your bank box.",
    8.         "Various tools have been placed into your bank.",
    9.         "Various raw materials like ingots, logs, feathers, hides, bottles, etc, have been placed into your bank.",
    10.         "5 unmarked recall runes, 5 Felucca moonstones and 5 Trammel moonstones have been placed into your bank box.",
    11.         "One of each level of treasure map has been placed in your bank box.",
    12.         "You will find 9000 silver pieces deposited into your bank box.  Spend it as you see fit and enjoy yourself!",
    13.         "You will find 9000 gold pieces deposited into your bank box.  Spend it as you see fit and enjoy yourself!",
    14.         "A bag of PowerScrolls has been placed in your bank box."
    15.     } : new string[]
    16.         { //Yes, this message is a pathetic message, It's suggested that you change it.
    17.             "Welcome to this shard.",
    18.             "Please enjoy your stay."
    19.         });
    The top part is if you are running the server in TestCenter Mode. Bottom part is for normal shard.
     
  3. Kalamus
    Offline

    Kalamus Active Member

    Joined:
    Apr 24, 2013
    Messages:
    288
    Likes Received:
    33
    Hank pointed out to me on IRC that this might not be what you are referring to. I do remember helping you with Xanthos scripts so maybe that's the MoTD you are thinking of as ServUO doesn't have any built in MoTD gumps I'm aware of.

    If you are referring to the Xanthos MoTD then ignore what I said above as that's just a welcome message. I haven't used Xanthos at all so please forgive me if this is wrong but from what I can tell you create a new MoTD.txt in your 'ServUO-Master\MoTD' folder and put the text you want to appear on the gump in that file. Xanthos has a in game command '[motd' that brings up a gump that lets you reload that file or archive it. Again I don't use this system so take what I said with a grain of salt. Hope this is what you are looking for.
     
  4. Rochaven
    Offline

    Rochaven Member

    Joined:
    Jan 21, 2014
    Messages:
    162
    Likes Received:
    1
    Yep its in Xanthos , got the name to stick but to load new news [motd only brings up two options 1- Archive MoTD file or 2-Relado MoTD file. Tried both but i never used Xanthos . So now i have to figure out how to set the message of the day to let everyone know on which dates i will be doing events and such. lol I"m sure its just a command i am not familiar with is all. Thank you for the direction tho, at least the name is set and my younguns are not laughing at dad , for the moment lol
     

    Attached Files:

  5. Kalamus
    Offline

    Kalamus Active Member

    Joined:
    Apr 24, 2013
    Messages:
    288
    Likes Received:
    33
    Yeah like I said I'm not familiar with the system but if you create the motd.txt file and put the text inside you want to show up like I posted above then you can do the [motd command and select 'Reload motd File'.
     
  6. Rochaven
    Offline

    Rochaven Member

    Joined:
    Jan 21, 2014
    Messages:
    162
    Likes Received:
    1
    well i made a motd.txt and dropped in in master/data/motd/archieve and that fails.....hmm wondering if i have to put two in......One in motd AND one in archieve, then again, not sure i created the .txt file with the right format, just opened wordpad name black page motd.txt and pushed it to the file .
     
  7. Milva
    Offline

    Admin Moderator

    Joined:
    Mar 3, 2013
    Messages:
    3,803
    Likes Received:
    417
    From what I can remember the msg of the day txt file was just done in notepad and this was where you entered new text to show or removed all ones, then reload. You might have to go back and do more reading on it, was a very easy thing to use but has been a while. :)
     
  8. Milva
    Offline

    Admin Moderator

    Joined:
    Mar 3, 2013
    Messages:
    3,803
    Likes Received:
    417
    Try creating a folder named MOTD -if you have not then add the txt file in that folder. Once you create the txt in the txt folder also be sure to "save it" if this does not work then I'm not sure what could be up :)
     
  9. Kalamus
    Offline

    Kalamus Active Member

    Joined:
    Apr 24, 2013
    Messages:
    288
    Likes Received:
    33
    As I said above it should be ServUO/MOTD/Motd.txt or ServUO-Master/MOTD/Motd.txt how ever you have it called. I'm pretty sure it doesn't load from the Data Directory.
     
    • Disagree Disagree x 1
  10. Jay.Thirteen
    Offline

    Silver Donator

    Joined:
    Apr 22, 2016
    Messages:
    7
    Likes Received:
    2
    I'm not one to necro posts, usually, but here it is because I want it to use it.
    I want to make this auto-load in order to describe commands to new players upon login every time.

    What I want to know is how to make this auto-load upon every login for all users. If you can help that would be great!

    With that said, this is how to make it work:

    File one (motd.cs)--
    I keep my motd.cs at Scripts\Custom Items\Xanthos\Utilities but I do not think it matters.

    File two (motd.txt)--
    motd.txt goes into Data/Motd - parallel to the Data/Motd/Archive directory (if you do not have a Data/Motd/Archive directory, create one).

    Command = [motd

    If you want to change the top line in the gump you can do so via motd.cs around line 68. When you want to change the additional content: edit Data/Motd/motd.txt and choose the reload option via the [motd command on an account able to access the reload and/or archive gump. I have not tested the archive feature because if you have to have access to the drive location creating a backup via a gump is practically useless.

    Running ServUO Version 0.5, Build 6675.36081 and Ultima Online Classic Client 7.0.49.2.

    I have attached skeleton versions of motd.cs and motd.txt to this post.

    EDIT: I found when you make use of the archive button it removes the motd.txt file, so, don't.
     

    Attached Files:

    • motd.cs
      File size:
      18.6 KB
      Views:
      7
    • motd.txt
      File size:
      14 bytes
      Views:
      6
    #10 Jay.Thirteen, Apr 12, 2018
    Last edited: Apr 12, 2018
  11. Milva
    Offline

    Admin Moderator

    Joined:
    Mar 3, 2013
    Messages:
    3,803
    Likes Received:
    417
    I changed the true and false in these 2 lines, then the gump opens on login
    private static bool kAlwaysShowMotdOnLogin = true;// should be const, used static to get avoid compiler warning
    private static bool kTextInsteadOfGumpOnLogin = false; // should be const, used static to get avoid compiler warning
    ** it also states the motd tags an account so if not updated it shouldn't open again, but I didn't test this- but if you reload then it will
     
    • Thanks! Thanks! x 1
  12. Jay.Thirteen
    Offline

    Silver Donator

    Joined:
    Apr 22, 2016
    Messages:
    7
    Likes Received:
    2
    Well, this gets it half way there. I remember reading about a way to invoke a text command on login somewhere for another purpose. I haven't been able to find it but it shouldn't be difficult to call out a text command on login, I think. I just haven't yet found where to do it.

    Edit: Upon testing this does actually come up every time. I would still like to know how to invoke a text command upon login for toolbars and other things. It works! Thanks!
     
    #12 Jay.Thirteen, Apr 13, 2018
    Last edited: Apr 13, 2018
  13. Milva
    Offline

    Admin Moderator

    Joined:
    Mar 3, 2013
    Messages:
    3,803
    Likes Received:
    417
    I would post another thread for script support for help with a command for the other items -tool bar etc.Would think if you have a toolbar for players it would also have a command? :)
     
Similar Threads: MoTd
Forum Title Date
Script Support MotD Script, How it fix? Sep 25, 2016