Enabling GM commands on ROW SOURCE

Results 1 to 12 of 12
  1. #1
    Registered nfi is online now
    MemberRank
    May 2014 Join Date
    22Posts

    idea Enabling GM commands on ROW SOURCE

    Hi guys,

    I am not sure how many of you went through the source, but you might have noticed that the GM commands do not work. Even after compiling with different settings, using preprocessor and what not - it still does not work.

    To get this going you will need to have access to the client source and being able to compile it successfully. Make sure you can get in game and write down the UID of your account. Then go and add your UID to AdminList and set a Level. The choices are 1, 2, 3, 4 and 5 (should be familiar).

    Now this is probably as far as most people got, but the actual reason that the commands do not work is related to the source misinterpreting the actual levels. The variable "m_wAdminMode" determines which level is going to be used, however - if you actually debug it, you notice that its value changes constantly, so it not reliable. If you check the actual chat functions, you will notice that it evaluates "m_wAdminMode" and then decides what to do. The values it expects are the ones set in RYLClientMain (1 ~ 5), but the actual value is way different than that - so it is obvious why it doesn't work, riite?

    Now in my search of finding out why this is happening I stumbled upon a function called ParseUserLogin in AuthHandler. Here "m_wAdminMode" is set, but not in a correct way. I did, however - notice a variable called "nPlayTime". This variable can have up to 6 different values and it actually defines which admin level is used.

    So if you take this in consideration - then you can fix your problems. I wrote a small function that does this for me.
    Code:
    /** 
     * NOTE: wAdminLevel to set wAdminMode is not constant.
     * However, nPlayTime shows a difference in the last two digits, so we can use that to identify a GM account.
     */
    unsigned getAdminLevelFromPlayTime(unsigned t_PlayTime) {
        // current known levels
        const unsigned int DEV = 5111813;
        const unsigned int GM_LV3 = 5111812;
        const unsigned int GM_LV2 = 5111811;
        const unsigned int GM_LV1 = 5111810;
        const unsigned int GM_SUPPORT = 5111809;
        const unsigned int PLAYER = 5111808;
    
        switch (t_PlayTime) {
            case DEV:           return ADMIN_DEV;
            case GM_LV3:        return ADMIN_L3;
            case GM_LV2:        return ADMIN_L2;
            case GM_LV1:        return ADMIN_L1;
            case GM_SUPPORT:    return SUPPORTER;
            default:            return ADMIN_NONE;
        }
    }
    If you use this function to set "g_ClientMain.m_wAdminMode" in AuthHandler then you are all set. This also fixes another bug which causes normal players to have a yellow HP-bar floating above their character. This is also caused by the source misinterpreting the difference between an admin and player char.

    I know people have mentioned in the past that only a certain level will work - but this is nonsense. They all work. The only thing that is missing is that lots of ADMIN_DEV GM commands are commented out. Getting them to work is peanuts, but why would you? Most are rather useless so it is up to you what to use and what not.

    Enjoy!



  2. #2
    Member Bonekrasher is offline
    MemberRank
    Nov 2008 Join Date
    83Posts

    Re: Enabling GM commands on ROW SOURCE

    The bug is that the server & client side store "m_wAdminMode" as 2 different variable types. That is why it "changes constantly". Set them to both the same datatype and it will correctly load from DB. So much hustle for this small bug :D, but it shows you put effort in stuff.

    Good luck with more stuff.

  3. #3
    Registered nfi is online now
    MemberRank
    May 2014 Join Date
    22Posts

    Re: Enabling GM commands on ROW SOURCE

    Oh, that makes sense. I looked around and the only difference was an unsigned short/char, but that didn't do much good.

    Someone must have screwed around with the source before leaking it. I doubt these bugs are caused by conversion errors done by VS.

  4. #4
    Member Bonekrasher is offline
    MemberRank
    Nov 2008 Join Date
    83Posts

    Re: Enabling GM commands on ROW SOURCE

    Quote Originally Posted by nfi View Post
    Oh, that makes sense. I looked around and the only difference was an unsigned short/char, but that didn't do much good.

    Someone must have screwed around with the source before leaking it. I doubt these bugs are caused by conversion errors done by VS.
    That is the exact problem.
    1 char = 1 byte in size.
    1 short = 2 byte in size.
    Set them both to char or short and it's fine.
    The whole source has bugs like this.
    Gamasoft / Youxiland just didn't fix those bugs.
    These bugs are 100% human made and not made by conversions.

  5. #5
    Registered nfi is online now
    MemberRank
    May 2014 Join Date
    22Posts

    Re: Enabling GM commands on ROW SOURCE

    But what I meant was if the source (as how it was leaked here) was compiled (good luck with that) and ran on a live server - then no GM commands would work, but from all the official ROW I played - none had these issues.

    Isn't it safe to presume that from stealing source till leaking it on ragezone, that someone messed around and with intent modified the source to let it appear broken?

  6. #6
    Member Bonekrasher is offline
    MemberRank
    Nov 2008 Join Date
    83Posts

    Re: Enabling GM commands on ROW SOURCE

    Quote Originally Posted by nfi View Post
    But what I meant was if the source (as how it was leaked here) was compiled (good luck with that) and ran on a live server - then no GM commands would work, but from all the official ROW I played - none had these issues.

    Isn't it safe to presume that from stealing source till leaking it on ragezone, that someone messed around and with intent modified the source to let it appear broken?
    Either this, or it wasn't the source that was used in production.
    But it doesn't matter anyway.
    Surely you can mess around and have some fun in your local server, but the RYL scene is polluted with really bad server. They close really soon or they are polluted with ugly skins stupid mods.
    Since the source is leaked almost all bugs are also public. Even the official ROW didn't fix the medal exploit and made all farming useless.

    The compiling itself wasn't that much of a hustle if you have experience in C++ projects. 99% are just linker errors which are fixed by setting the correct include paths.

  7. #7
    Registered nfi is online now
    MemberRank
    May 2014 Join Date
    22Posts

    Re: Enabling GM commands on ROW SOURCE

    Yup, I noticed that too. Pretty much the reason I quit playing was a. the community (or what was left) and b. all the shit servers. Ruins was rather unique, but if they had access to source (while the rest didn't) then it is no surprise that they were capable of doing great things.

    In my spare time I develop the local server to be a somewhat "how-it-was-meant-to-be" RYL and so far I am having fun. Maybe in the future I will release it as a "completed" project, but we will see. Nothing to gain anyways.

    I still get a laugh from seeing any code related to upgrading. We always thought that we had to upgrade when no one was around, or use a combination of different items to get +10. How wrong we were!

  8. #8
    Member Bonekrasher is offline
    MemberRank
    Nov 2008 Join Date
    83Posts

    Re: Enabling GM commands on ROW SOURCE

    Quote Originally Posted by nfi View Post
    Yup, I noticed that too. Pretty much the reason I quit playing was a. the community (or what was left) and b. all the shit servers. Ruins was rather unique, but if they had access to source (while the rest didn't) then it is no surprise that they were capable of doing great things.

    In my spare time I develop the local server to be a somewhat "how-it-was-meant-to-be" RYL and so far I am having fun. Maybe in the future I will release it as a "completed" project, but we will see. Nothing to gain anyways.

    I still get a laugh from seeing any code related to upgrading. We always thought that we had to upgrade when no one was around, or use a combination of different items to get +10. How wrong we were!
    Those myths exist in any game where randoms are at play. People make up their own stuff why things work the way they do.
    Yes indeed. Theres not much left of a proper community to even start a serious project. Everyone just wants instant max items to enjoy unbalanced pvp. Sad to see.

  9. #9
    Registered nfi is online now
    MemberRank
    May 2014 Join Date
    22Posts

    Re: Enabling GM commands on ROW SOURCE

    Did you play any older (official) server? I am wondering if we ever played together. You can PM me if you do not want to share it publicly. I am curious - that is all.

  10. #10
    Member Bonekrasher is offline
    MemberRank
    Nov 2008 Join Date
    83Posts

    Re: Enabling GM commands on ROW SOURCE

    Quote Originally Posted by nfi View Post
    Did you play any older (official) server? I am wondering if we ever played together. You can PM me if you do not want to share it publicly. I am curious - that is all.
    Sure, check your pm.

  11. #11
    Member dedyucok is offline
    MemberRank
    Jan 2012 Join Date
    IndonesianLocation
    72Posts

    Re: Enabling GM commands on ROW SOURCE

    what you guys talking about :D
    ROW [Developer]

  12. #12
    Registered nfi is online now
    MemberRank
    May 2014 Join Date
    22Posts

    Re: Enabling GM commands on ROW SOURCE

    Random chit-chat.



Advertisement