Author Topic: [XP] RMX-OS Online List  (Read 10562 times)

Offline Wizered67

  • Astral Trancist
  • *****
  • Posts: 512
  • LV: 16
    • View Profile
[XP] RMX-OS Online List
« on: December 21, 2010, 04:03:27 AM »
RMX-OS Online List
Authors: Wizered67
Version: 1.00
Type: RMX-OS Add-on
Key Term: RMX-OS Plugin

Introduction

Adding this script will add a new command for RMX-OS called "/online". By using this command it will give the player a list of all players online. This script requires Blizzard's User Logger for RMX-OS.

Features

  • Simple add-on that is easy to use
  • Makes it easy for any player to find out who is online.

Screenshots
(click to show/hide)

Demo
N/A

Script

(click to show/hide)

.rb server extension

(click to show/hide)

Instructions
Just put in the script below RMX-OS and add the .rb add-on to extension to the extensions list.
Make sure it comes after the user logger in  the server config.

Compatibility

Requires RMX-OS and Blizzard's User Logger.

Credits and Thanks

  • Wizered67
  • Blizzard for making RMX-OS and his user logger.

Author's Notes

If you have any problems, just report them. I may have missed something.
« Last Edit: December 29, 2010, 02:10:52 AM by game_guy »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: RMX-OS Online List
« Reply #1 on: December 21, 2010, 09:27:18 AM »
Authors:Wizered67

Authors: <AUTHORS, NO SPECIAL THANKS HERE>

Play VERY close attention to the template. There is a space between : and the name of the authors.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Wizered67

  • Astral Trancist
  • *****
  • Posts: 512
  • LV: 16
    • View Profile
Re: RMX-OS Online List
« Reply #2 on: December 21, 2010, 06:03:18 PM »
Sorry about that. I fixed it.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] RMX-OS Online List
« Reply #3 on: December 21, 2010, 08:18:31 PM »
Please try to pay more attention in the future. Thanks.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Griver03

  • Transcended Spirit
  • ***
  • Posts: 112
  • LV: 3
  • Gender: Male
  • why my avatar cant be dispayed...
    • View Profile
Re: [XP] RMX-OS Online List
« Reply #4 on: February 11, 2011, 04:16:45 PM »
i got this error with rmx-os 1.17 with 1.15 all wotks fine ...
http://img827.imageshack.us/i/onlinelisterror.png/
thx in advance
My most wanted games...



Offline Wizered67

  • Astral Trancist
  • *****
  • Posts: 512
  • LV: 16
    • View Profile
Re: [XP] RMX-OS Online List
« Reply #5 on: February 11, 2011, 05:24:32 PM »
When do you get that error? I need more information to help you.

Offline Griver03

  • Transcended Spirit
  • ***
  • Posts: 112
  • LV: 3
  • Gender: Male
  • why my avatar cant be dispayed...
    • View Profile
Re: [XP] RMX-OS Online List
« Reply #6 on: February 11, 2011, 06:17:20 PM »
when i wrote the command "online" and ten press enter the error message comes up  :???:
My most wanted games...



Offline Wizered67

  • Astral Trancist
  • *****
  • Posts: 512
  • LV: 16
    • View Profile
Re: [XP] RMX-OS Online List
« Reply #7 on: February 11, 2011, 10:35:49 PM »
Is there an error in the server log? Also, make sure you have the extension for this and blizzards user logger.

Offline Griver03

  • Transcended Spirit
  • ***
  • Posts: 112
  • LV: 3
  • Gender: Male
  • why my avatar cant be dispayed...
    • View Profile
Re: [XP] RMX-OS Online List
« Reply #8 on: February 13, 2011, 05:38:56 PM »
no there are now errors with the user logger so idk with 1.15 it works with 1.17 not ...
My most wanted games...



Offline Wizered67

  • Astral Trancist
  • *****
  • Posts: 512
  • LV: 16
    • View Profile
Re: [XP] RMX-OS Online List
« Reply #9 on: February 13, 2011, 06:01:44 PM »
I can try to help you, but off of what you've given me, I don't know what I can do to help.

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5135
  • LV: 198
  • Gender: Female
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] RMX-OS Online List
« Reply #10 on: February 13, 2011, 10:42:43 PM »
at some point in a recent version of RMX-OS Blizz changed how communication worked. that is likely the root of this problem.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] RMX-OS Online List
« Reply #11 on: February 13, 2011, 11:29:20 PM »
When I take a look at this script, you should be able to make this a lot easier. Just iterate through the $clients hash.

Code: [Select]
usernames = []
$clients.each_value {|c| usernames.push(c.player.username) if c.player.user_id > 0}
onlinelist = usernames.join(',')

Then just send onlinelist over the network. This should work.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Griver03

  • Transcended Spirit
  • ***
  • Posts: 112
  • LV: 3
  • Gender: Male
  • why my avatar cant be dispayed...
    • View Profile
Re: [XP] RMX-OS Online List
« Reply #12 on: February 14, 2011, 05:00:51 PM »
hmmm so its actually a bug right?! do you change it pls  :roll:
My most wanted games...



Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] RMX-OS Online List
« Reply #13 on: February 14, 2011, 07:27:14 PM »
Not really a bug, just something that may need to be added to accomodate for a new version of RMX-OS. It would only have to be a if..else statement to check for the RMX-OS version, or if Blizzard's suggestion works with all versions, simply replace the troublesome part with the error-safe way.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Wizered67

  • Astral Trancist
  • *****
  • Posts: 512
  • LV: 16
    • View Profile
Re: [XP] RMX-OS Online List
« Reply #14 on: February 14, 2011, 08:22:05 PM »
Okay, so its caused by changes in RMX-OS. I'll try to update this script as soon as I can. What exactly was wrong with the old version though that made it not work with the new RMX-OS?

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] RMX-OS Online List
« Reply #15 on: February 14, 2011, 08:26:35 PM »
I'm not even sure. Your code looks alright to me at first sight.
You should check the methods you have aliased. One may be called now differently or something like that.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Wizered67

  • Astral Trancist
  • *****
  • Posts: 512
  • LV: 16
    • View Profile
Re: [XP] RMX-OS Online List
« Reply #16 on: February 15, 2011, 06:29:59 AM »
I just tested this with the new RMX-OS and had no problems. That leads me to believe you are doing something wrong. Make sure you have the extension for this and the user logger. That's all I can think would be wrong.

Offline Vaelen

  • Trained Member
  • *
  • Posts: 20
  • LV: 1
  • Gender: Male
    • View Profile
    • datenfarm.net
Re: [XP] RMX-OS Online List
« Reply #17 on: June 04, 2011, 06:44:34 AM »
Hello my Heros ;)

I get the same error if i use /online.

Error Log:
(click to show/hide)

Thats my Extension Order:
GlobalDay-and-Night
GlobalSwitches
UserLogger
OnlineList
Report
Versioning

Screen of script editor (.[img] doesn'tshow the picture :/ )
http://imageshack.us/photo/my-images/163/screenxu.png/


I use rmxp 1.04 and the latest scripts. Hope you can find the bug.
thx blizz for the great work (I don't have to do) ;)
RMX-OS gonna be legen.... wait-for-it... www.youtube.com/watch?v=Dqf1BmN4Dag

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] RMX-OS Online List
« Reply #18 on: June 04, 2011, 08:22:38 AM »
The file OnlineList.rb is either mislabeled, not where it is supposed to be, or straight missing.
It should be named just like that and located in the Extensions folder.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Vaelen

  • Trained Member
  • *
  • Posts: 20
  • LV: 1
  • Gender: Male
    • View Profile
    • datenfarm.net
Re: [XP] RMX-OS Online List
« Reply #19 on: June 04, 2011, 04:04:22 PM »
It is in the extension Folder.  But I give file names like I want.. (you see at the screenshot). All other Scripts are running so I don't think that the file name must be the same like the script name  :???:  and I write the file names in the Extension array (cfg.ini).
When I start the server the extensions are loaded correctly.

But I will check it again. I'm not home at the moment. Maybe I made a mistake.. it was 5am  :zzz:



Edit:
I checked all, the script is loaded after User Logger by the server. In rmxp the Script is below RMX-OS..  no errors. Then /online and crash.. its not working.. I don't think its my failure because all other extensions work.. the documentation is a bit short.. only that User Logger must load before.
« Last Edit: June 05, 2011, 01:52:06 AM by Vaelen »
thx blizz for the great work (I don't have to do) ;)
RMX-OS gonna be legen.... wait-for-it... www.youtube.com/watch?v=Dqf1BmN4Dag