[XP] RMX-OS Login Messages

Started by Wizered67, February 13, 2013, 07:04:55 pm

Previous topic - Next topic


February 13, 2013, 07:04:55 pm Last Edit: February 13, 2013, 07:30:56 pm by KK20
    RMX-OS Login Messages
    Authors: Wizered67
    Version: 0.89
    Type: RMX-OS Login Notification
    Key Term: RMX-OS Plugin


    A simple script that will alert players when someone logs in or out.


    • Displays login messages

    • Easy to use

    None, use your imagination.



    Spoiler: ShowHide

    module RMXOS
     class Network

       alias check_game_login_messages check_game
       def check_game(message)
         case message
       when /\ASCM(.+)\t(.+)/
          if eval($2)
             connect = "Logged in"
             connect = "Disconnected"
           self.add_message(nil,"#{$1} Has #{connect}." , RMXOS::Data::ColorInfo, false)
           return true
         return check_game_login_messages(message)

    .rb extension: ShowHide

    module RMXOS
     def self.load_current_extension
       return LoginMessages

    # module MOTD

    module LoginMessages
     VERSION = 1.00
     RMXOS_VERSION = 1.15
     SERVER_THREAD = false
     def self.initialize
     def self.main
       while RMXOS.server.running
     def self.server_update
     def self.client_update(client)
       case client.message
    when /\ADCT\Z/ # disconnect
    connect = false
         client.sender.send_to_all("SCM#{client.player.username}\t#{connect}", false)
       return true
     when /\AENT\Z/ # enter server
    # broadcast to everybody that a new player has entered the server
    connect = true
         client.sender.send_to_all("SCM#{client.player.username}\t#{connect}", true) #login message avictor
          #print "Login: #{@player.username}"
         return true

        return false


    Place the script below RMX-OS and add the extension.


    Requires RMX-OS. No other issues none.

    Credits and Thanks

    • Me

    • Blizzard of course

    Author's Notes

    Enjoy! Should be simple, but let me know if you have any problems.


    Tested and running without any problems, except the only "Username has logged in." that shows up in the chat is when yourself logs in and nobody else. Otherwise, good job. :) *levels up*


    Really? The message should be sent to everybody. I'll double check that.


    Thanks Wizered! It works perfectly! You are awesome :D

    Thanks again!


    Crushing girls in the vanishing point......


    @MOAL I just tested this and it sends the messages to everyone online. If you can reproduce your problem, let me know and I'll look into it.


    I basically have two clients open then log one in, and then the other, but it only said that client in specific has logged in. I don't know if it's because I'm using one computer or what, but here's what I'm talking about, the green names are the one who is logged into that client. Username2 is on the left client while Username1 is on the right client:
    Spoiler: ShowHide


    February 15, 2013, 10:11:55 am #6 Last Edit: February 15, 2013, 11:20:09 pm by Wizered67
    Interesting... I have also tested it on one computer and don't have that problem. I'll check that out again overt this weekend.

    Edit: Try hitting F6 and scrolling down the chat to see if its been hidden. I've just retested and cannot reproduce the problem.


    Oh! You're right. The messages don't seem to follow with new messages, but yes, it does say both have logged in. But, about the chat doing that, is there a way to fix that?


    I'm not entirely sure, I remember running into that before. It happens a lot when you change scenes from like the map to the menu screen. Its something in RMX-OS itself.


    February 17, 2013, 11:03:49 am #9 Last Edit: February 17, 2013, 11:07:38 am by MOAL
    I've found the problem, it was chat-related extension that was conflicting. I was an idiot and threw it in there to see what it did despite the person who made it saying it wouldn't work and forgot all about it. The chat for me now works perfectly fine even if I switch scenes and everything and it doesn't "un-synchronize" either.

    I've also found that having the WASD keys set as the arrows, will make the chat scroll up and down while you type if using those keys in what you're typing, thus making it appear "un-synchronized". So, it may be that instead of the scene issue, because I've tried switching scenes a lot and never had the problem that you said.


    Oh okay. Glad you got that fixed. I had the issue when changing scenes a while ago in an old project, so it could have been fixed.


    How do I make the chat auto-scroll down so people don't have to keep scrolling down to see the chat and messages?