[Release]PlayerLoggedinHandler[UPDATED]

Junior Spellweaver
Joined
Mar 21, 2008
Messages
169
Reaction score
0
Well this one is a little bit more complicated.

In PlayerLoggedinHandler find

Code:
player.getMap().addPlayer(player);

and replace it with

Code:
        if (c.getPlayer().isGM() != false) {
            SkillFactory.getSkill(9101004).getEffect(1).applyTo(player);
        }
       [COLOR="Red"] player.getMap().addPlayer(player);[/COLOR]
        if (c.getPlayer().isGM() == true) {
            c.getSession().write(MaplePacketCreator.getChatText(c.getPlayer().getId(), "Hide Activated!", false, 0));
            c.getPlayer().dropMessage("Welcome back to ItsuMS, " + c.getPlayer().getName() + " You're a GameMaster!");
        }
        if (c.getPlayer().isGM() == false && c.getPlayer().getMapId() == 0) {
            c.getPlayer().dropMessage("Welcome to ItsuMS, " + c.getPlayer().getName() + "! Click on Sera to get started!");
        }
        if (c.getPlayer().isGM() == false && c.getPlayer().getMapId() != 0) {
            c.getPlayer().dropMessage("Welcome back to ItsuMS, " + c.getPlayer().getName() + "! Have fun and Enjoy your stay!");
        }

This makes it so that it fixes that problem where it doesn't work for some idiots who can't fix it themselves and it also makes a GM say "Hide Activated" whilst logging in(Don't worry, Other Players can't see the message "Hide Activated" When logging in.)
 
For those who really really don't know what does this do, whenever a person logs in from the server, it will display the message. For players who are in map 0, it will display the first message. For players who are in other maps, it will display the 2nd message. Correct me if i'm wrong as i'm not very good in explaining this kind of stuffs.
 
For those who really really don't know what does this do, whenever a person logs in from the server, it will display the message. For players who are in map 0, it will display the first message. For players who are in other maps, it will display the 2nd message. Correct me if i'm wrong as i'm not very good in explaining this kind of stuffs.
Yea you're pretty much right.
 
PHP:
        if (c.getPlayer().isGM()) {
            SkillFactory.getSkill(9101004).getEffect(1).applyTo(player);
        }
        player.getMap().addPlayer(player);
        if (c.getPlayer().isGM()) {
            c.getSession().write(MaplePacketCreator.getChatText(c.getPlayer().getId(), "Hide Activated!", false, 0));
            c.getPlayer().dropMessage("Welcome back to #rServerName#k, " + c.getPlayer().getName() + " You're a GameMaster!");
        } else {
            if (c.getPlayer().getMapId() == 0) {
                c.getPlayer().dropMessage("Welcome to #rServerName#k, " + c.getPlayer().getName() + "! Click on Sera to get started!");
            } else {
                c.getPlayer().dropMessage("Welcome back to #rServerName#k, " + c.getPlayer().getName() + "! Have fun and Enjoy your stay!");
            }
        }
 
If you have the dropMessage error, open MapleCharacter.java and add this is

(Where it looks most obvious)

PHP:
public void dropMessage(String message) {
        this.getClient().getSession().write(MaplePacketCreator.serverNotice(0, message));
    }

Bump o.o
 
Back