[Solved] GM Skill - Hide v83

Results 1 to 13 of 13
  1. #1
    Valued Member Modify is offline
    MemberRank
    Dec 2013 Join Date
    636f6f6b696573Location
    140Posts

    [Solved] GM Skill - Hide v83

    Hi there...I recently noticed that players are unable to see GM's without the GM unhiding, then going back into that same map. I've tried looking in the following:


    • PlayerLoggedInHandler.java
    • WorldServer.java
    • Skill.java
    • SkillFactory.java
    • SkillMacro.java
    • MapleMap.java


    I'm not sure where else to look to resolve this issue. If there's a place where I can attempt to fix this, where should I look? Or how can I do this?


    Thanks in advance!
    Last edited by Modify; 21-11-14 at 02:23 AM.


  2. #2
    Member buttocks is offline
    MemberRank
    Mar 2014 Join Date
    91Posts

    Re: [Help] GM Skill - Hide v83

    What source are you using and does it happen in any map or only certain maps?

  3. #3
    Valued Member Modify is offline
    MemberRank
    Dec 2013 Join Date
    636f6f6b696573Location
    140Posts

    Re: [Help] GM Skill - Hide v83

    Thank you for replying so soon!

    I'm using HellyMS source, it happens in every single map on the server. o.o

  4. #4
    Account Upgraded | Title Enabled! Darter is offline
    MemberRank
    Feb 2008 Join Date
    253Posts

    Re: [Help] GM Skill - Hide v83

    Add a handler where when GM hide is cancelled, the GM is re-spawned into the map.

  5. #5
    Valued Member Modify is offline
    MemberRank
    Dec 2013 Join Date
    636f6f6b696573Location
    140Posts

    Re: [Help] GM Skill - Hide v83

    Quote Originally Posted by Darter View Post
    Add a handler where when GM hide is cancelled, the GM is re-spawned into the map.
    It sounds so simple, yet I have no idea what you mean when you say "add a handler" o.o

    Do you mean reload the GM at the map when he/she unhides?

  6. #6
    Moderator Eric is offline
    ModeratorRank
    Jan 2010 Join Date
    DEV CityLocation
    3,188Posts

    Re: [Help] GM Skill - Hide v83

    Quote Originally Posted by Darter View Post
    Add a handler where when GM hide is cancelled, the GM is re-spawned into the map.
    Why use a handler over cancelling an effect? (cancelEffect funcion via MapleCharacter should already handle this)
    @Modify it seems that you call a removePlayerFromMap Packet but never spawn the player back to NON-GM's. You could make hide in MapleStatEffect run a toggle method in MapleCharacter or something that enables/disables Hide as well as sends the spawn packet. Pretty much broadcast a map message packet to all Non-GMs with spawnPlayerMapObject(this).

  7. #7
    Valued Member Modify is offline
    MemberRank
    Dec 2013 Join Date
    636f6f6b696573Location
    140Posts

    Re: [Help] GM Skill - Hide v83

    I almost do not understand a single thing you're saying chunkarama..Sorry :/, but from what I see on your post, I looked into MapleCharacter and found

    Code:
        public void registerEffect(MapleStatEffect effect, long starttime, ScheduledFuture<?> schedule) {        if (effect.isHide() && gmLevel > 0) {
                this.hidden = true;
                this.getClient().getSession().write(MaplePacketCreator.getGMEffect(16, (byte) 1));
                getMap().broadcastNONGMMessage(this, MaplePacketCreator.removePlayerFromMap(id), false);
    I assume that it's only a one way (Don't know any other way to explain it), and there's no other option for when a GM unhides. I found

    Code:
            if (!overwrite) {            cancelPlayerBuffs(buffstats);
                if (effect.isHide() && (MapleCharacter) getMap().getMapObject(getObjectId()) != null) {
                    this.hidden = false;
                    this.getClient().getSession().write(MaplePacketCreator.getGMEffect(16, (byte) 0));
                    getMap().broadcastNONGMMessage(this, MaplePacketCreator.spawnPlayerMapobject(this), false);
                    for (int i = 0; pets[i] != null; i++) {
                        getMap().broadcastNONGMMessage(this, MaplePacketCreator.showPet(this, pets[i], false, false), false);
                    }
                }
            }
    EDIT: Based on trial and lots of errors:
    Code:
        public void registerEffect(MapleStatEffect effect, long starttime, ScheduledFuture<?> schedule) {        if (effect.isHide() && gmLevel > 0) {
                this.hidden = true;
                this.getClient().getSession().write(MaplePacketCreator.getGMEffect(16, (byte) 1));
                getMap().broadcastNONGMMessage(this, MaplePacketCreator.removePlayerFromMap(id), false);
                  if (effect.isHide() && (MapleCharacter) getMap().getMapObject(getObjectId()) != null) {
                    this.hidden = false;
                    this.getClient().getSession().write(MaplePacketCreator.getGMEffect(16, (byte) 0));
                    getMap().broadcastNONGMMessage(this, MaplePacketCreator.spawnPlayerMapobject(this), false);
                    for (int i = 0; pets[i] != null; i++) {
                        getMap().broadcastNONGMMessage(this, MaplePacketCreator.showPet(this, pets[i], false, false), false); }
                    }
                }
            }
    This works only once for GM hide. When you log on and unhide, it works once, but after that, you can't rehide. It keeps you unhided like it doesn't even work, but the buff icon appears on the top right corner. (I may have lost some "}" during the process of copy & pasting, but don't mind that if you can)


    From another HellyMS source, but I'm not sure if it's even correct or not to put in to unhide the GM correctly. I have tried putting that into the original and many bugs occur so I had to undo Anything involving it. Any suggestions? o.o
    Last edited by Modify; 20-11-14 at 02:30 AM.

  8. #8
    Moderator Eric is offline
    ModeratorRank
    Jan 2010 Join Date
    DEV CityLocation
    3,188Posts

    Re: [Help] GM Skill - Hide v83

    @Modify It seems you got the hint, good job. The only thing is, there should be a "cancelEffect" function. I'm not sure if that's where the !overwrite function is or not, but as you can see, that if (effect.isHide()) check is what needs to be sent when they unhide. This packet sent to the map was the spawnPlayerMapObject(this) I was talking about for NON-GMs.

    Anyways, as for the buff icon, you have to force cancel it. I think I had done that through MapleCharacter's dispelSkill(skillId) function. Pretty sure off the top of my head Hide is 9101004, but I could be wrong. Running dispelSkill(9101004) should fix that. However, like I previously said, using a simple toggle in the applyBuff of MapleStatEffect will apply and unapply GM hide without buffing the skill. This means you click the skill and hide is on, click the skill again and it's off. No more right-clicking on hide or whatever (I found right-clicking hide annoying lul).

  9. #9
    Valued Member Modify is offline
    MemberRank
    Dec 2013 Join Date
    636f6f6b696573Location
    140Posts

    Re: [Help] GM Skill - Hide v83

    Fixed! Thank you very much chunkarama~


    But, I've come across a new problem, I don't want to open up another help post for this since Hide is still involved. When a donor logs in (GM Level 1) they have Hide active similar to a GM, but to a regular player, they appear in Dark Sight. So basically the GM Hide effect doesn't apply for donors, but it's still active. Is there anyway to remove this?


    Thanks in advance!

  10. #10
    Moderator Eric is offline
    ModeratorRank
    Jan 2010 Join Date
    DEV CityLocation
    3,188Posts

    Re: [Help] GM Skill - Hide v83

    Quote Originally Posted by Modify View Post
    Fixed! Thank you very much chunkarama~


    But, I've come across a new problem, I don't want to open up another help post for this since Hide is still involved. When a donor logs in (GM Level 1) they have Hide active similar to a GM, but to a regular player, they appear in Dark Sight. So basically the GM Hide effect doesn't apply for donors, but it's still active. Is there anyway to remove this?


    Thanks in advance!
    I'm pretty sure this is because the packet you're sending when going into hide is called through broadcastToNONGMs and broadcastGMMessage, both of which require a function called isIntern or isGM, I forgot which. I had this when I first wanted it and ended up removing it. Hide shouldn't be given to Donators imo. If they had the same Hide as GMs, then they'd see GMs in hide (which renders Hide useless).

    Buut, if you do wish to have Hide for Donors, in MapleMap find broadcastGMMessage and the NONGM Message and make it so instead of isGM() it'd be like isDonator() and then create a isDonator() method in maplecharacter to return whatever gm level that is. (You said donor is 1 so it'd be return gmlevel >= 1)

  11. #11
    Valued Member Modify is offline
    MemberRank
    Dec 2013 Join Date
    636f6f6b696573Location
    140Posts

    Re: [Help] GM Skill - Hide v83

    Quote Originally Posted by chunkarama View Post
    I'm pretty sure this is because the packet you're sending when going into hide is called through broadcastToNONGMs and broadcastGMMessage, both of which require a function called isIntern or isGM, I forgot which. I had this when I first wanted it and ended up removing it. Hide shouldn't be given to Donators imo. If they had the same Hide as GMs, then they'd see GMs in hide (which renders Hide useless).

    Buut, if you do wish to have Hide for Donors, in MapleMap find broadcastGMMessage and the NONGM Message and make it so instead of isGM() it'd be like isDonator() and then create a isDonator() method in maplecharacter to return whatever gm level that is. (You said donor is 1 so it'd be return gmlevel >= 1)
    I must have explained it wrong, sorry for not clarifying it correctly. What I meant was donors currently have Hide when they log in similar to GM's, but I don't want that. How can I remove this? (Again, sorry for the bad/confusing explanation)

  12. #12
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,109Posts

    Re: [Help] GM Skill - Hide v83

    Quote Originally Posted by Modify View Post
    I must have explained it wrong, sorry for not clarifying it correctly. What I meant was donors currently have Hide when they log in similar to GM's, but I don't want that. How can I remove this? (Again, sorry for the bad/confusing explanation)
    Find where it first gives them the hide effect upon login and make it so it doesn't for them, duh

    probably in v83 in PlayerLoggedinHandler.java or w/e how it's spelled

  13. #13
    Valued Member Modify is offline
    MemberRank
    Dec 2013 Join Date
    636f6f6b696573Location
    140Posts

    Re: [Help] GM Skill - Hide v83

    Quote Originally Posted by sunnyboy View Post
    Find where it first gives them the hide effect upon login and make it so it doesn't for them, duh

    probably in v83 in PlayerLoggedinHandler.java or w/e how it's spelled
    Fixed! Thank you very much sunnyboy~
    Last edited by Modify; 21-11-14 at 02:22 AM.



Advertisement