RMX-OS Login Messages
Authors: Wizered67
Version: 0.89
Type: RMX-OS Login Notification
Key Term: RMX-OS Plugin
IntroductionA simple script that will alert players when someone logs in or out.
Features
- Displays login messages
- Easy to use
ScreenshotsNone, use your imagination.
DemoN/A
Script[/list]
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"
else
connect = "Disconnected"
end
self.add_message(nil,"#{$1} Has #{connect}." , RMXOS::Data::ColorInfo, false)
return true
end
return check_game_login_messages(message)
end
end
end
#------------------------------------------------------------------------------
module RMXOS
def self.load_current_extension
return LoginMessages
end
end
#======================================================================
# module MOTD
#======================================================================
module LoginMessages
VERSION = 1.00
RMXOS_VERSION = 1.15
SERVER_THREAD = false
def self.initialize
end
def self.main
while RMXOS.server.running
self.server_update
sleep(0.1)
end
end
def self.server_update
end
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
end
return false
end
end
InstructionsPlace the script below RMX-OS and add the extension.
CompatibilityRequires RMX-OS. No other issues none.
Credits and Thanks
Author's NotesEnjoy! 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!
Regards
Aegis
@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:
(http://i48.tinypic.com/nzned2.jpg)
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.
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?