Namechange command for GM`s ... (change any players name to the name u want ...

Junior Spellweaver
Joined
Feb 8, 2009
Messages
128
Reaction score
0
how the tittle says ...

PHP:
} else if (splitted[0].equals("!changename")) {
            ChannelServer cserv = c.getChannelServer();
            cserv.getPlayerStorage().getCharacterByName(splitted[1]).setName((splitted[2]));


This is o pretty simple ... but ppl may need it ...

after changing channel it take effect ...

--- Feel free to add a reload function ... (addplayer(splitted[1]) , and removeplayer(splitted[2]) , and ,may getCharInfo(splitted[1]).

PHP:
new CommandDefinition("changename", "", "", 21378234728373428723482374823),

have fun.


a little note :
i know this a fucking nooby release , i dunno this shit has been released b4 , so i dont take credits or shit like that. :rolleyes:
 
Pretty good... This would be helpful sometimes. Is there a way to make the namechange in the cash shop work like this? Because right now it doesnt work.
 
Fck of xotic )=

PHP:
} else if (splitted[0].equalsIgnoreCase("!setname")) {
            if (splitted.length != 3) {
                return;
            }
            MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
            String newname = splitted[2];
            if (splitted.length == 3) {
                if (MapleCharacter.getIdByName(newname, 0) == -1) {
                    if (victim != null) {
                        victim.getClient().disconnect();
                        victim.getClient().getSession().close();
                        victim.setName(newname, true);
                        mc.dropMessage(splitted[1] + " is now named " + newname + "");
                    } else {
                        mc.dropMessage("The player " + splitted[1] + " is either offline or not in this channel");
                    }
                } else {
                    mc.dropMessage("Character name in use.");
                }
            } else {
                mc.dropMessage("Incorrect syntax !");
            }
 
Back