GM.java
上传用户:gwt600
上传日期:2021-06-03
资源大小:704k
文件大小:73k
源码类别:

游戏

开发平台:

Java

  1. /*
  2. This file is part of the OdinMS Maple Story Server
  3. Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc> 
  4. Matthias Butz <matze@odinms.de>
  5. Jan Christian Meyer <vimes@odinms.de>
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU Affero General Public License version 3
  8. as published by the Free Software Foundation. You may not use, modify
  9. or distribute this program under any other version of the
  10. GNU Affero General Public License.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; withnout even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU Affero General Public License for more details.
  15. You should have received a copy of the GNU Affero General Public License
  16. along with this program.  If not, see <http://www.gnu.org/licenses/>.
  17.  */
  18. package net.sf.odinms.client.messages.commands;
  19. import java.awt.Point;
  20. import java.io.BufferedReader;
  21. import java.io.FileReader;
  22. import java.io.IOException;
  23. import java.rmi.RemoteException;
  24. import net.sf.odinms.client.MapleCharacter;
  25. import net.sf.odinms.client.MapleClient;
  26. import net.sf.odinms.client.MaplePet;
  27. import net.sf.odinms.client.MapleStat;
  28. import net.sf.odinms.client.messages.Command;
  29. import net.sf.odinms.client.messages.MessageCallback;
  30. import static net.sf.odinms.client.messages.CommandProcessor.joinAfterString;
  31. import net.sf.odinms.tools.MaplePacketCreator;
  32. import net.sf.odinms.net.channel.ChannelServer;
  33. import java.sql.Connection;
  34. import java.sql.PreparedStatement;
  35. import java.sql.ResultSet;
  36. import java.sql.SQLException;
  37. import java.text.DateFormat;
  38. import java.util.Arrays;
  39. import java.util.Calendar;
  40. import java.util.Collection;
  41. import java.util.HashMap;
  42. import java.util.LinkedList;
  43. import java.util.List;
  44. import java.util.Map;
  45. import net.sf.odinms.client.MapleCharacterUtil;
  46. import net.sf.odinms.client.MapleDisease;
  47. import net.sf.odinms.client.MapleJob;
  48. import net.sf.odinms.client.SkillFactory;
  49. import net.sf.odinms.database.DatabaseConnection;
  50. import net.sf.odinms.net.world.remote.CheaterData;
  51. import net.sf.odinms.server.MaplePortal;
  52. import net.sf.odinms.server.MapleShopFactory;
  53. import net.sf.odinms.server.life.MapleLifeFactory;
  54. import net.sf.odinms.server.life.MapleMonster;
  55. import net.sf.odinms.server.life.MobSkillFactory;
  56. import net.sf.odinms.server.maps.MapleMap;
  57. import net.sf.odinms.server.maps.MapleMapObject;
  58. import net.sf.odinms.server.maps.MapleMapObjectType;
  59. import net.sf.odinms.client.messages.CommandDefinition;
  60. import net.sf.odinms.net.MaplePacket;
  61. import net.sf.odinms.server.maps.FakeCharacter;
  62. import static net.sf.odinms.client.messages.CommandProcessor.getNamedIntArg;
  63. import static net.sf.odinms.client.messages.CommandProcessor.getOptionalIntArg;
  64. import net.sf.odinms.tools.StringUtil;
  65. public class GM implements Command {
  66.     private static String getBannedReason(String name) { // Very horrible way to do this, but works so ehh fuck you ;D
  67.         Connection con = DatabaseConnection.getConnection();
  68.         try {
  69.             PreparedStatement ps;
  70.             ResultSet rs;
  71.             ps = con.prepareStatement("SELECT name, banned, banreason, macs FROM accounts WHERE name = ?");
  72.             ps.setString(1, name);
  73.             rs = ps.executeQuery();
  74.             if (rs.next()) {
  75.                 if (rs.getInt("banned") > 0) {
  76.                     return "username: " + rs.getString("name") + " | banreason: " + rs.getString("banreason") + " | macs: " + rs.getString("macs");
  77.                 } else {
  78.                     return "Player is not banned";
  79.                 }
  80.             }
  81.             int accid;
  82.             ps = con.prepareStatement("SELECT accountid FROM characters WHERE name = ?");
  83.             ps.setString(1, name);
  84.             rs = ps.executeQuery();
  85.             if (!rs.next()) {
  86.                 return "This character / account does not exist.";
  87.             } else {
  88.                 accid = rs.getInt("accountid");
  89.             }
  90.             ps = con.prepareStatement("SELECT name, banned, banreason, macs FROM accounts WHERE id = ?");
  91.             ps.setInt(1, accid);
  92.             rs = ps.executeQuery();
  93.             if (rs.getInt("banned") > 0) {
  94.                 return "username: " + rs.getString("name") + " | banreason: " + rs.getString("banreason") + " | macs: " + rs.getString("macs");
  95.             } else {
  96.                 return "Player is not banned";
  97.             }
  98.         } catch (SQLException exe) {
  99.         }
  100.         return null;
  101.     }
  102.     @Override
  103.     public void execute(MapleClient c, MessageCallback mc, String[] splitted) throws Exception {
  104.         ChannelServer cserv = c.getChannelServer();
  105.         Collection<ChannelServer> cservs = ChannelServer.getAllInstances();
  106.         MapleCharacter player = c.getPlayer();
  107.         splitted[0] = splitted[0].toLowerCase();
  108.         String themapname = player.getMap().getMapName();
  109.         if (splitted[0].equalsIgnoreCase("!lowhp")) {
  110.             player.setHp(1);
  111.             player.updateSingleStat(MapleStat.HP, 1);
  112.         } else if (splitted[0].equalsIgnoreCase("!sp")) {
  113.             if (splitted.length != 2) {
  114.                 return;
  115.             }
  116.             int sp;
  117.             try {
  118.                 sp = Integer.parseInt(splitted[1]);
  119.             } catch (NumberFormatException asd) {
  120.                 return;
  121.             }
  122.             player.setRemainingSp(sp + player.getRemainingSp());
  123.             player.updateSingleStat(MapleStat.AVAILABLESP, player.getRemainingSp());
  124.         } else if (splitted[0].equalsIgnoreCase("!ap")) {
  125.             if (splitted.length != 2) {
  126.                 return;
  127.             }
  128.             int ap;
  129.             try {
  130.                 ap = Integer.parseInt(splitted[1]);
  131.             } catch (NumberFormatException asd) {
  132.                 return;
  133.             }
  134.             player.setRemainingAp(ap + player.getRemainingAp());
  135.             player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
  136.         } else if (splitted[0].equalsIgnoreCase("!job")) {
  137.             if (splitted.length != 2) {
  138.                 //return;
  139.                 mc.dropMessage("--------------职 业 代 码--------------");
  140.                 mc.dropMessage("0 新手,100 战士,200 法师,300 射手,400 飞侠,500 海盗 || 900 管理员,910 超级管理员 ");
  141.                 mc.dropMessage("110-112 英雄,120-122 圣骑,130-132 黑骑 || 210-212 火毒,220-222 冰雷,230-232 主教 ");
  142.                 mc.dropMessage("310-312 射手,320-322 游侠 || 410-412 隐士,420-422 侠盗 || 510-512 冲锋,520-522 船长");
  143.             }
  144.             int job;
  145.             try {
  146.                 job = Integer.parseInt(splitted[1]);
  147.             } catch (NumberFormatException asd) {
  148.                 return;
  149.             }
  150.             player.setJob(job);
  151.         } else if (splitted[0].equalsIgnoreCase("!whereami")) {
  152.             mc.dropMessage("You are on map " + player.getMap().getId());
  153.         
  154.         } else if (splitted[0].equalsIgnoreCase("!levelup")) {
  155.             player.levelUp();
  156.             player.setExp(0);
  157.             player.updateSingleStat(MapleStat.EXP, 0);
  158.         } else if (splitted[0].equalsIgnoreCase("!setmaxmp")) {
  159.             if (splitted.length != 2) {
  160.                 return;
  161.             }
  162.             int amt;
  163.             try {
  164.                 amt = Integer.parseInt(splitted[1]);
  165.             } catch (NumberFormatException asd) {
  166.                 return;
  167.             }
  168.             player.setMaxMp(amt);
  169.             player.updateSingleStat(MapleStat.MAXMP, player.getMaxMp());
  170.         } else if (splitted[0].equalsIgnoreCase("!setmaxhp")) {
  171.             if (splitted.length != 2) {
  172.                 return;
  173.             }
  174.             int amt;
  175.             try {
  176.                 amt = Integer.parseInt(splitted[1]);
  177.             } catch (NumberFormatException asd) {
  178.                 return;
  179.             }
  180.             player.setMaxHp(amt);
  181.             player.updateSingleStat(MapleStat.MAXHP, player.getMaxHp());
  182.         } else if (splitted[0].equalsIgnoreCase("!healmap")) {
  183.             for (MapleCharacter map : player.getMap().getCharacters()) {
  184.                 if (map != null) {
  185.                     map.setHp(map.getCurrentMaxHp());
  186.                     map.updateSingleStat(MapleStat.HP, map.getHp());
  187.                     map.setMp(map.getCurrentMaxMp());
  188.                     map.updateSingleStat(MapleStat.MP, map.getMp());
  189.                 }
  190.             }
  191.         
  192.         } else if (splitted[0].equalsIgnoreCase("!level")) {
  193.             if (splitted.length != 2) {
  194.                 return;
  195.             }
  196.             int level;
  197.             try {
  198.                 level = Integer.parseInt(splitted[1]);
  199.             } catch (NumberFormatException asd) {
  200.                 return;
  201.             }
  202.             player.setLevel(level);
  203.             player.levelUp();
  204.             player.setExp(0);
  205.             player.updateSingleStat(MapleStat.EXP, 0);
  206.         } else if (splitted[0].equalsIgnoreCase("!online")) {
  207.             int i = 0;
  208.             for (ChannelServer cs : ChannelServer.getAllInstances()) {
  209.                 if (cs.getPlayerStorage().getAllCharacters().size() > 0) {
  210.                     StringBuilder sb = new StringBuilder();
  211.                     mc.dropMessage("Channel " + cs.getChannel());
  212.                     for (MapleCharacter chr : cs.getPlayerStorage().getAllCharacters()) {
  213.                         i++;
  214.                         if (sb.length() > 150) { // Chars per line. Could be more or less
  215.                             mc.dropMessage(sb.toString());
  216.                             sb = new StringBuilder();
  217.                         }
  218.                         sb.append(MapleCharacterUtil.makeMapleReadable(chr.getName() + "   "));
  219.                     }
  220.                     mc.dropMessage(sb.toString());
  221.                 }
  222.             }
  223.         } else if (splitted[0].equalsIgnoreCase("!banreason")) {
  224.             if (splitted.length != 2) {
  225.                 return;
  226.             }
  227.             mc.dropMessage(getBannedReason(splitted[1]));
  228.         } else if (splitted[0].equalsIgnoreCase("!joinguild")) {
  229.             if (splitted.length != 2) {
  230.                 return;
  231.             }
  232.             Connection con = DatabaseConnection.getConnection();
  233.             try {
  234.                 PreparedStatement ps = con.prepareStatement("SELECT guildid FROM guilds WHERE name = ?");
  235.                 ps.setString(1, splitted[1]);
  236.                 ResultSet rs = ps.executeQuery();
  237.                 if (rs.next()) {
  238.                     if (player.getGuildId() > 0) {
  239.                         try {
  240.                             cserv.getWorldInterface().leaveGuild(player.getMGC());
  241.                         } catch (java.rmi.RemoteException re) {
  242.                             c.getSession().write(MaplePacketCreator.serverNotice(5, "Unable to connect to the World Server. Please try again later."));
  243.                             return;
  244.                         }
  245.                         c.getSession().write(MaplePacketCreator.showGuildInfo(null));
  246.                         player.setGuildId(0);
  247.                         player.saveGuildStatus();
  248.                     }
  249.                     player.setGuildId(rs.getInt("guildid"));
  250.                     player.setGuildRank(2); // Jr.master :D
  251.                     try {
  252.                         cserv.getWorldInterface().addGuildMember(player.getMGC());
  253.                     } catch (RemoteException e) {
  254.                         cserv.reconnectWorld();
  255.                     }
  256.                     c.getSession().write(MaplePacketCreator.showGuildInfo(player));
  257.                     player.getMap().broadcastMessage(player, MaplePacketCreator.removePlayerFromMap(player.getId()), false);
  258.                     player.getMap().broadcastMessage(player, MaplePacketCreator.spawnPlayerMapobject(player), false);
  259.                     if (player.getNoPets() > 0) {
  260.                         for (MaplePet pet : player.getPets()) {
  261.                             player.getMap().broadcastMessage(player, MaplePacketCreator.showPet(player, pet, false, false), false);
  262.                         }
  263.                     }
  264.                     player.saveGuildStatus();
  265.                 } else {
  266.                     mc.dropMessage("Guild name does not exist.");
  267.                 }
  268.                 rs.close();
  269.                 ps.close();
  270.             } catch (SQLException e) {
  271.                 return;
  272.             }
  273.         } else if (splitted[0].equalsIgnoreCase("!unbuffmap")) {
  274.             for (MapleCharacter map : player.getMap().getCharacters()) {
  275.                 if (map != null && map != player) {
  276.                     map.cancelAllBuffs();
  277.                 }
  278.             }
  279.         } else if (splitted[0].equalsIgnoreCase("!mxb")) {
  280.             if (splitted.length != 2) {
  281.                 return;
  282.             }
  283.             int meso;
  284.             try {
  285.                 meso = Integer.parseInt(splitted[1]);
  286.             } catch (NumberFormatException sex) {
  287.                 return;
  288.             }
  289.             player.setMeso(meso);
  290.         
  291.         } else if (splitted[0].equalsIgnoreCase("!ariantpq")) {
  292.             if (splitted.length < 2) {
  293.                 player.getMap().AriantPQStart();
  294.             } else {
  295.                 c.getSession().write(MaplePacketCreator.updateAriantPQRanking(splitted[1], 5, false));
  296.             }
  297.         } else if (splitted[0].equalsIgnoreCase("!scoreboard")) {
  298.             player.getMap().broadcastMessage(MaplePacketCreator.showAriantScoreBoard());
  299.         } else if (splitted[0].equalsIgnoreCase("!array")) {
  300.             if (splitted.length >= 2) {
  301.                 if (splitted[1].equalsIgnoreCase("*CLEAR")) {
  302.                     cserv.setArrayString("");
  303.                     mc.dropMessage("Array flushed.");
  304.                 } else {
  305.                     cserv.setArrayString(cserv.getArrayString() + StringUtil.joinStringFrom(splitted, 1));
  306.                     mc.dropMessage("Added " + StringUtil.joinStringFrom(splitted, 1) + " to the array. Use !array to check.");
  307.                 }
  308.             } else {
  309.                 mc.dropMessage("Array: " + cserv.getArrayString());
  310.             }
  311.         } else if (splitted[0].equalsIgnoreCase("!slap")) {
  312.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  313.             int damage;
  314.             try {
  315.                 damage = Integer.parseInt(splitted[2]);
  316.             } catch (NumberFormatException sex) {
  317.                 return;
  318.             }
  319.             if (victim.getHp() > damage) {
  320.                 victim.setHp(victim.getHp() - damage);
  321.                 victim.updateSingleStat(MapleStat.HP, victim.getHp());
  322.                 victim.dropMessage(5, player.getName() + " picked up a big fish and slapped you across the head. You've lost " + damage + " hp");
  323.                 mc.dropMessage(victim.getName() + " has " + victim.getHp() + " HP left");
  324.             } else {
  325.                 victim.setHp(0);
  326.                 victim.updateSingleStat(MapleStat.HP, 0);
  327.                 victim.dropMessage(5, player.getName() + " gave you a headshot with a fish (:");
  328.             }
  329.         } else if (splitted[0].equalsIgnoreCase("!rreactor")) {
  330.             player.getMap().resetReactors();
  331.         } else if (splitted[0].equalsIgnoreCase("!sha2")) {
  332.             String mapMessage = "";
  333.             MapleMap map = player.getMap();
  334.             double range = Double.POSITIVE_INFINITY;
  335.             if (splitted.length > 1) {
  336.                 int irange = Integer.parseInt(splitted[1]);
  337.                 if (splitted.length <= 2) {
  338.                     range = irange * irange;
  339.                 } else {
  340.                     map = cserv.getMapFactory().getMap(Integer.parseInt(splitted[2]));
  341.                     mapMessage = " in " + map.getStreetName() + " : " + map.getMapName();
  342.                 }
  343.             }
  344.             List<MapleMapObject> monsters = map.getMapObjectsInRange(player.getPosition(), range, Arrays.asList(MapleMapObjectType.MONSTER));
  345.             for (MapleMapObject monstermo : monsters) {
  346.                 MapleMonster monster = (MapleMonster) monstermo;
  347.                 map.killMonster(monster, player, false);
  348.             }
  349.             mc.dropMessage("杀死了 " + monsters.size() + " 只怪物" + mapMessage + ".");
  350.         } else if (splitted[0].equals("!sha") || splitted[0].equals("!monsterdebug")) {
  351.             MapleMap map = c.getPlayer().getMap();
  352.             double range = Double.POSITIVE_INFINITY;
  353.             List<MapleMapObject> monsters = map.getMapObjectsInRange(c.getPlayer().getPosition(), range, Arrays.asList(MapleMapObjectType.MONSTER));
  354.             boolean kill = splitted[0].equals("!sha");
  355.             for (MapleMapObject monstermo : monsters) {
  356.                 MapleMonster monster = (MapleMonster) monstermo;
  357.                 if (kill) {
  358.                     map.killMonster(monster, c.getPlayer(), true);
  359.                     monster.giveExpToCharacter(c.getPlayer(), monster.getExp(), true, 1);
  360.                 } else {
  361.                     mc.dropMessage("怪物 " + monster.toString());
  362.                 }
  363.             }
  364.             if (kill) {
  365.                 mc.dropMessage("杀死了 " + monsters.size() + " 只怪物.");
  366.             }
  367.         } else if (splitted[0].equalsIgnoreCase("!say")) {
  368.             if (splitted.length > 1) {
  369.                 try {
  370.                     cserv.getWorldInterface().broadcastMessage(player.getName(), MaplePacketCreator.serverNotice(6, "[" + player.getName() + "] " + StringUtil.joinStringFrom(splitted, 1)).getBytes());
  371.                 } catch (RemoteException e) {
  372.                     cserv.reconnectWorld();
  373.                 }
  374.             } else {
  375.                 mc.dropMessage("Syntax: !say <message>");
  376.             }
  377.         } else if (splitted[0].equalsIgnoreCase("!gender")) {
  378.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  379.             if (victim != null) {
  380.                 victim.setGender(victim.getGender() == 1 ? 0 : 1);
  381.                 victim.getClient().getSession().write(MaplePacketCreator.getCharInfo(victim));
  382.                 victim.getMap().removePlayer(victim);
  383.                 victim.getMap().addPlayer(victim);
  384.             } else {
  385.                 mc.dropMessage("Player is not on.");
  386.             }
  387.         } else if (splitted[0].equalsIgnoreCase("!spy")) {
  388.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  389.             if (victim != null) {
  390.                 mc.dropMessage("Players stats are:");
  391.                 mc.dropMessage("Level: " + victim.getLevel() + "  ||  Rebirthed: " + victim.getReborns());
  392.                 mc.dropMessage("Fame: " + victim.getFame());
  393.                 mc.dropMessage("Str: " + victim.getStr() + "  ||  Dex: " + victim.getDex() + "  ||  Int: " + victim.getInt() + "  ||  Luk: " + victim.getLuk());
  394.                 mc.dropMessage("Player has " + victim.getMeso() + " mesos.");
  395.                 mc.dropMessage("Hp: " + victim.getHp() + "/" + victim.getCurrentMaxHp() + "  ||  Mp: " + victim.getMp() + "/" + victim.getCurrentMaxMp());
  396.                 mc.dropMessage("NX Cash: " + victim.getCSPoints(0));
  397.             } else {
  398.                 mc.dropMessage("Player not found.");
  399.             }
  400.         
  401.         } else if (splitted[0].equalsIgnoreCase("!skill")) {
  402.             int skill;
  403.             try {
  404.                 skill = Integer.parseInt(splitted[1]);
  405.             } catch (NumberFormatException asd) {
  406.                 return;
  407.             }
  408.             int maxlevel = SkillFactory.getSkill(skill).getMaxLevel();
  409.             int level = getOptionalIntArg(splitted, 2, maxlevel);
  410.             int masterlevel = getOptionalIntArg(splitted, 3, maxlevel);
  411.             if (splitted.length == 4) {
  412.                 player.changeSkillLevel(SkillFactory.getSkill(skill), level, masterlevel);
  413.             } else if (splitted.length == 5) {
  414.                 MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[4]);
  415.                 if (victim != null) {
  416.                     victim.changeSkillLevel(SkillFactory.getSkill(skill), level, masterlevel);
  417.                 } else {
  418.                     mc.dropMessage("Victim was not found.");
  419.                 }
  420.             }
  421.         
  422.         } else if (splitted[0].equalsIgnoreCase("!maxskills")) {
  423.             player.maxAllSkills();
  424.         
  425.         } else if (splitted[0].equalsIgnoreCase("!unhide")) {
  426.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  427.             if (victim != null) {
  428.                 victim.dispelSkill(9101004);
  429.             } else {
  430.                 mc.dropMessage("Player not found");
  431.             }
  432.         } else if (splitted[0].equalsIgnoreCase("!heal")) {
  433.             MapleCharacter heal = null;
  434.             if (splitted.length == 2) {
  435.                 heal = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  436.                 if (heal == null) {
  437.                     mc.dropMessage("Player was not found");
  438.                 }
  439.             } else {
  440.                 heal = player;
  441.             }
  442.             heal.setHp(heal.getCurrentMaxHp());
  443.             heal.setMp(heal.getCurrentMaxMp());
  444.             heal.updateSingleStat(MapleStat.HP, heal.getCurrentMaxHp());
  445.             heal.updateSingleStat(MapleStat.MP, heal.getCurrentMaxMp());
  446.         } else if (splitted[0].equalsIgnoreCase("!unbuff")) {
  447.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  448.             if (victim != null) {
  449.                 victim.cancelAllBuffs();
  450.             } else {
  451.                 mc.dropMessage("Player not found");
  452.             }
  453.         } else if (splitted[0].equalsIgnoreCase("!sendhint")) {
  454.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  455.             if (victim != null) {
  456.                 String message = StringUtil.joinStringFrom(splitted, 2);
  457.                 victim.getMap().broadcastMessage(victim, MaplePacketCreator.sendHint(message, 0, 0), false);
  458.             } else {
  459.                 mc.dropMessage("Player not found");
  460.             }
  461.         } else if (splitted[0].equalsIgnoreCase("!smega")) {
  462.             if (splitted.length > 3) {
  463.                 MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  464.                 if (victim != null) {
  465.                     String type = splitted[2];
  466.                     String text = StringUtil.joinStringFrom(splitted, 3);
  467.                     int itemID = 5390002; // default.
  468.                     if (type.equalsIgnoreCase("love")) {
  469.                         itemID = 5390002;
  470.                     } else if (type.equalsIgnoreCase("cloud")) {
  471.                         itemID = 5390001;
  472.                     } else if (type.equalsIgnoreCase("diablo")) {
  473.                         itemID = 5390000;
  474.                     }
  475.                     String[] lines = {"", "", "", ""};
  476.                     if (text.length() > 30) {
  477.                         lines[0] = text.substring(0, 10);
  478.                         lines[1] = text.substring(10, 20);
  479.                         lines[2] = text.substring(20, 30);
  480.                         lines[3] = text.substring(30);
  481.                     } else if (text.length() > 20) {
  482.                         lines[0] = text.substring(0, 10);
  483.                         lines[1] = text.substring(10, 20);
  484.                         lines[2] = text.substring(20);
  485.                     } else if (text.length() > 10) {
  486.                         lines[0] = text.substring(0, 10);
  487.                         lines[1] = text.substring(10);
  488.                     } else if (text.length() <= 10) {
  489.                         lines[0] = text;
  490.                     }
  491.                     LinkedList<String> list = new LinkedList<String>();
  492.                     list.add(lines[0]);
  493.                     list.add(lines[1]);
  494.                     list.add(lines[2]);
  495.                     list.add(lines[3]);
  496.                     try {
  497.                         victim.getClient().getChannelServer().getWorldInterface().broadcastSMega(null, MaplePacketCreator.getAvatarMega(victim, c.getChannel(), itemID, list, false).getBytes());
  498.                     } catch (RemoteException e) {
  499.                         cserv.reconnectWorld();
  500.                     }
  501.                 } else {
  502.                     mc.dropMessage("Player not found.");
  503.                 }
  504.             } else {
  505.                 mc.dropMessage("Syntax: !smega <player> <love/diablo/cloud> text");
  506.             }
  507.         } else if (splitted[0].equalsIgnoreCase("!mutesmega")) {
  508.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  509.             if (victim != null) {
  510.                 victim.setCanSmega(!victim.getCanSmega());
  511.                 victim.dropMessage(5, "Your smega ability is now " + (victim.getCanSmega() ? "on" : "off"));
  512.                 player.dropMessage(6, "Player's smega ability is now set to " + victim.getCanSmega());
  513.             } else {
  514.                 mc.dropMessage("Player not found");
  515.             }
  516.         } else if (splitted[0].equalsIgnoreCase("!mute")) {
  517.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  518.             if (victim != null) {
  519.                 victim.canTalk(!victim.getCanTalk());
  520.                 victim.dropMessage(5, "Your chatting ability is now " + (victim.getCanTalk() ? "on" : "off"));
  521.                 player.dropMessage(6, "Player's chatting ability is now set to " + victim.getCanTalk());
  522.             } else {
  523.                 mc.dropMessage("Player not found");
  524.             }
  525.         } else if (splitted[0].equalsIgnoreCase("!givedisease")) {
  526.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  527.             int type;
  528.             if (splitted[2].equalsIgnoreCase("SEAL")) {
  529.                 type = 120;
  530.             } else if (splitted[2].equalsIgnoreCase("DARKNESS")) {
  531.                 type = 121;
  532.             } else if (splitted[2].equalsIgnoreCase("WEAKEN")) {
  533.                 type = 122;
  534.             } else if (splitted[2].equalsIgnoreCase("STUN")) {
  535.                 type = 123;
  536.             } else if (splitted[2].equalsIgnoreCase("POISON")) {
  537.                 type = 125;
  538.             } else if (splitted[2].equalsIgnoreCase("SEDUCE")) {
  539.                 type = 128;
  540.             } else {
  541.                 mc.dropMessage("ERROR.");
  542.                 return;
  543.             }
  544.             victim.giveDebuff(MapleDisease.getType(type), MobSkillFactory.getMobSkill(type, 1));
  545.         } else if (splitted[0].equalsIgnoreCase("!dc")) {
  546.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  547.             victim.getClient().disconnect();
  548.             victim.getClient().getSession().close();
  549.         } else if (splitted[0].equalsIgnoreCase("!charinfo")) {
  550.             StringBuilder builder = new StringBuilder();
  551.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  552.             if (victim == null) {
  553.                 return;
  554.             }
  555.             builder.append(MapleClient.getLogMessage(victim, "")); // Could use null i think ?
  556.             mc.dropMessage(builder.toString());
  557.             builder = new StringBuilder();
  558.             builder.append("Positions: X: ");
  559.             builder.append(victim.getPosition().x);
  560.             builder.append(" Y: ");
  561.             builder.append(victim.getPosition().y);
  562.             builder.append(" | RX0: ");
  563.             builder.append(victim.getPosition().x + 50);
  564.             builder.append(" | RX1: ");
  565.             builder.append(victim.getPosition().x - 50);
  566.             builder.append(" | FH: ");
  567.             builder.append(victim.getMap().getFootholds().findBelow(player.getPosition()).getId());
  568.             mc.dropMessage(builder.toString());
  569.             builder = new StringBuilder();
  570.             builder.append("HP: ");
  571.             builder.append(victim.getHp());
  572.             builder.append("/");
  573.             builder.append(victim.getCurrentMaxHp());
  574.             builder.append(" | MP: ");
  575.             builder.append(victim.getMp());
  576.             builder.append("/");
  577.             builder.append(victim.getCurrentMaxMp());
  578.             builder.append(" | EXP: ");
  579.             builder.append(victim.getExp());
  580.             builder.append(" | In a Party: ");
  581.             builder.append(victim.getParty() != null);
  582.             builder.append(" | In a Trade: ");
  583.             builder.append(victim.getTrade() != null);
  584.             mc.dropMessage(builder.toString());
  585.             builder = new StringBuilder();
  586.             builder.append("Remote Address: ");
  587.             builder.append(victim.getClient().getSession().getRemoteAddress());
  588.             mc.dropMessage(builder.toString());
  589.             victim.getClient().dropDebugMessage(mc);
  590.         } else if (splitted[0].equalsIgnoreCase("!connected")) {
  591.             try {
  592.                 Map<Integer, Integer> connected = cserv.getWorldInterface().getConnected();
  593.                 StringBuilder conStr = new StringBuilder();
  594.                 mc.dropMessage("Connected Clients: ");
  595.                 for (int i : connected.keySet()) {
  596.                     if (i == 0) {
  597.                         conStr.append("Total: "); // I HAVE NO CLUE WHY.
  598.                         conStr.append(connected.get(i));
  599.                     } else {
  600.                         conStr.append("Channel ");
  601.                         conStr.append(i);
  602.                         conStr.append(": ");
  603.                         conStr.append(connected.get(i));
  604.                     }
  605.                 }
  606.                 mc.dropMessage(conStr.toString());
  607.             } catch (RemoteException e) {
  608.                 cserv.reconnectWorld();
  609.             }
  610.         } else if (splitted[0].equalsIgnoreCase("!clock")) {
  611.             player.getMap().broadcastMessage(MaplePacketCreator.getClock(getOptionalIntArg(splitted, 1, 60)));
  612.         
  613.         } else if (splitted[0].equalsIgnoreCase("!jail")) {
  614.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  615.             if (victim != null) {
  616.                 victim.changeMap(980000404, 0);
  617.                 mc.dropMessage(victim.getName() + " was jailed!");
  618.                 victim.dropMessage("You've been jailed bitch.");
  619.             } else {
  620.                 mc.dropMessage(splitted[1] + " not found!");
  621.             }
  622.         } else if (splitted[0].equalsIgnoreCase("!goto")) {
  623.             Map<String, Integer> maps = new HashMap<String, Integer>();
  624.             maps.put("gmmap", 180000000);
  625.             maps.put("southperry", 60000);
  626.             maps.put("amherst", 1010000);
  627.             maps.put("henesys", 100000000);
  628.             maps.put("ellinia", 101000000);
  629.             maps.put("perion", 102000000);
  630.             maps.put("kerning", 103000000);
  631.             maps.put("lith", 104000000);
  632.             maps.put("sleepywood", 105040300);
  633.             maps.put("florina", 110000000);
  634.             maps.put("orbis", 200000000);
  635.             maps.put("happy", 209000000);
  636.             maps.put("elnath", 211000000);
  637.             maps.put("ludi", 220000000);
  638.             maps.put("aqua", 230000000);
  639.             maps.put("leafre", 240000000);
  640.             maps.put("mulung", 250000000);
  641.             maps.put("herb", 251000000);
  642.             maps.put("omega", 221000000);
  643.             maps.put("korean", 222000000);
  644.             maps.put("nlc", 600000000);
  645.             maps.put("excavation", 990000000);
  646.             maps.put("pianus", 230040420);
  647.             maps.put("horntail", 240060200);
  648.             maps.put("mushmom", 100000005);
  649.             maps.put("griffey", 240020101);
  650.             maps.put("manon", 240020401);
  651.             maps.put("headless", 682000001);
  652.             maps.put("balrog", 105090900);
  653.             maps.put("zakum", 280030000);
  654.             maps.put("papu", 220080001);
  655.             maps.put("showa", 801000000);
  656.             maps.put("guild", 200000301);
  657.             maps.put("shrine", 800000000);
  658.             maps.put("fm", 910000000);
  659.             maps.put("skelegon", 240040511);
  660.             maps.put("ariant", 260000100);
  661.             //Function
  662.             if (splitted.length < 2) { //If no arguments, list options.
  663.                 mc.dropMessage("Syntax: !goto <mapname> <optional_target>, where target is char name and mapname is one of:");
  664.                 StringBuilder builder = new StringBuilder();
  665.                 int i = 0;
  666.                 for (String mapss : maps.keySet()) {
  667.                     if (1 % 10 == 0) {// 10 maps per line
  668.                         mc.dropMessage(builder.toString());
  669.                     } else {
  670.                         builder.append(mapss + ", ");
  671.                     }
  672.                 }
  673.                 mc.dropMessage(builder.toString());
  674.             } else {
  675.                 String message = splitted[1];
  676.                 if (maps.containsKey(message)) {
  677.                     if (splitted.length == 2) { //If no target name, continue
  678.                         player.changeMap(maps.get(message));
  679.                     } else if (splitted.length == 3) { //If target name, new target
  680.                         MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[2]);
  681.                         victim.changeMap(maps.get(message));
  682.                     }
  683.                 } else {
  684.                     mc.dropMessage("Could not find map");
  685.                 }
  686.             }
  687.             maps.clear();
  688.         
  689.         } else if (splitted[0].equalsIgnoreCase("!servermessage")) {
  690.             String outputMessage = StringUtil.joinStringFrom(splitted, 1);
  691.             if (outputMessage.equalsIgnoreCase("!array")) {
  692.                 outputMessage = cserv.getArrayString();
  693.             }
  694.             cserv.setServerMessage(outputMessage);
  695.         } else if (splitted[0].equals("!gmsay")) { try { 
  696.                           BufferedReader in = new BufferedReader( 
  697.                           new FileReader("D:\gmsay.txt")); 
  698.                           String s1 , s = new String(); 
  699.                           while( (s1 = in.readLine()) != null ){ 
  700.                           s += s1 ; 
  701.                           } 
  702.                           String[] contents = s.split(("\*")); 
  703.                           for (int i = 0; i < contents.length; i++) { 
  704.                           if (splitted[1].equals(""+(i+1))) { 
  705.                           MaplePacket packet = MaplePacketCreator.serverNotice(6,"[系统公告] " + contents[i] ); 
  706.                           try { 
  707.                           ChannelServer.getInstance(c.getChannel()).getWorldInterface().broadcastMessage( 
  708.                           c.getPlayer().getName(), packet.getBytes()); 
  709.                           } catch (RemoteException e) { 
  710.                           c.getChannelServer().reconnectWorld(); 
  711.                           } 
  712.                          mc.dropMessage("[管理员公告] " + contents[i]); 
  713.                           } 
  714.                           } 
  715.                           } catch (IOException e) { 
  716.                           System.err.println(e); 
  717.                         }    
  718.         } else if (splitted[0].equalsIgnoreCase("!whosthere")) {
  719.             StringBuilder builder = new StringBuilder();
  720.             mc.dropMessage("Players on Map: ");
  721.             for (MapleCharacter chr : player.getMap().getCharacters()) {
  722.                 if (builder.length() > 150) { // wild guess :o
  723.                     mc.dropMessage(builder.toString());
  724.                     builder = new StringBuilder();
  725.                 }
  726.                 builder.append(MapleCharacterUtil.makeMapleReadable(chr.getName()));
  727.                 builder.append(", ");
  728.             }
  729.             player.dropMessage(6, builder.toString());
  730.         } else if (splitted[0].equalsIgnoreCase("!cheaters")) {
  731.             try {
  732.                 List<CheaterData> cheaters = cserv.getWorldInterface().getCheaters();
  733.                 for (CheaterData cheater : cheaters) {
  734.                     mc.dropMessage(cheater.getInfo());
  735.                 }
  736.             } catch (RemoteException e) {
  737.                 cserv.reconnectWorld();
  738.             }
  739.         
  740.         } else if (splitted[0].equalsIgnoreCase("!nearestPortal")) {
  741.             final MaplePortal portal = player.getMap().findClosestSpawnpoint(player.getPosition());
  742.             mc.dropMessage(portal.getName() + " id: " + portal.getId() + " script: " + portal.getScriptName());
  743.         } else if (splitted[0].equalsIgnoreCase("!unban")) {
  744.             if (MapleCharacter.unban(splitted[1])) {
  745.                 mc.dropMessage("Sucess!");
  746.             } else {
  747.                 mc.dropMessage("Error while unbanning.");
  748.             }
  749.         
  750.         } else if (splitted[0].equals("!ban")) {
  751.             String originalReason = StringUtil.joinStringFrom(splitted, 2);
  752.             String reason = player.getName() + " banned " + splitted[1] + ": " + originalReason;
  753.             MapleCharacter target = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  754.             if (target != null) {
  755.                 if (!target.isGM() || player.getGMLevel() > 3) {
  756.                     String readableTargetName = MapleCharacterUtil.makeMapleReadable(target.getName());
  757.                     String ip = target.getClient().getSession().getRemoteAddress().toString().split(":")[0];
  758.                     reason += "  IP: " + ip;
  759.                     target.ban(reason, false);
  760.                     try {
  761.                         cserv.getWorldInterface().broadcastMessage(null, MaplePacketCreator.serverNotice(6, readableTargetName + " has been banned for " + originalReason).getBytes());
  762.                     } catch (RemoteException e) {
  763.                         cserv.reconnectWorld();
  764.                     }
  765.                 } else {
  766.                     mc.dropMessage("Please dont ban " + cserv.getServerName() + " GMs");
  767.                 }
  768.             } else {
  769.                 if (MapleCharacter.ban(splitted[1], reason, false)) {
  770.                     String readableTargetName = MapleCharacterUtil.makeMapleReadable(target.getName());
  771.                     String ip = target.getClient().getSession().getRemoteAddress().toString().split(":")[0];
  772.                     reason += " (IP: " + ip + ")";
  773.                     try {
  774.                         cserv.getWorldInterface().broadcastMessage(null, MaplePacketCreator.serverNotice(6, readableTargetName + " has been banned for " + originalReason).getBytes());
  775.                     } catch (RemoteException e) {
  776.                         cserv.reconnectWorld();
  777.                     }
  778.                 } else {
  779.                     mc.dropMessage("Failed to ban " + splitted[1]);
  780.                 }
  781.             }
  782.         } else if (splitted[0].equals("!tempban")) {
  783.             Calendar tempB = Calendar.getInstance();
  784.             String originalReason = joinAfterString(splitted, ":");
  785.             if (splitted.length < 4 || originalReason == null) {
  786.                 mc.dropMessage("Syntax helper: !tempban <name> [i / m / w / d / h] <amount> [r [reason id] : Text Reason");
  787.                 return;
  788.             }
  789.             int yChange = getNamedIntArg(splitted, 1, "y", 0);
  790.             int mChange = getNamedIntArg(splitted, 1, "m", 0);
  791.             int wChange = getNamedIntArg(splitted, 1, "w", 0);
  792.             int dChange = getNamedIntArg(splitted, 1, "d", 0);
  793.             int hChange = getNamedIntArg(splitted, 1, "h", 0);
  794.             int iChange = getNamedIntArg(splitted, 1, "i", 0);
  795.             int gReason = getNamedIntArg(splitted, 1, "r", 7);
  796.             String reason = player.getName() + " tempbanned " + splitted[1] + ": " + originalReason;
  797.             if (gReason > 14) {
  798.                 mc.dropMessage("You have entered an incorrect ban reason ID, please try again.");
  799.                 return;
  800.             }
  801.             DateFormat df = DateFormat.getInstance();
  802.             tempB.set(tempB.get(Calendar.YEAR) + yChange, tempB.get(Calendar.MONTH) + mChange, tempB.get(Calendar.DATE) +
  803.                     (wChange * 7) + dChange, tempB.get(Calendar.HOUR_OF_DAY) + hChange, tempB.get(Calendar.MINUTE) +
  804.                     iChange);
  805.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  806.             if (victim == null) {
  807.                 int accId = MapleClient.findAccIdForCharacterName(splitted[1]);
  808.                 if (accId >= 0 && MapleCharacter.tempban(reason, tempB, gReason, accId)) {
  809.                     String readableTargetName = MapleCharacterUtil.makeMapleReadable(victim.getName());
  810.                     cserv.broadcastPacket(MaplePacketCreator.serverNotice(6, readableTargetName + " has been banned for " + originalReason));
  811.                 } else {
  812.                     mc.dropMessage("There was a problem offline banning character " + splitted[1] + ".");
  813.                 }
  814.             } else {
  815.                 victim.tempban(reason, tempB, gReason);
  816.                 mc.dropMessage("The character " + splitted[1] + " has been successfully tempbanned till " + df.format(tempB.getTime()));
  817.             }
  818.         
  819.         } else if (splitted[0].equalsIgnoreCase("!mynpcpos")) {
  820.             Point pos = player.getPosition();
  821.             mc.dropMessage("X: " + pos.x + " | Y: " + pos.y + "  | RX0: " + (pos.x + 50) + " | RX1: " + (pos.x - 50) + " | FH: " + player.getMap().getFootholds().findBelow(pos).getId());
  822.         } else if (splitted[0].equalsIgnoreCase("!qingchu")||splitted[0].equalsIgnoreCase("!laji")) {
  823.             MapleMap map = player.getMap();
  824.             double range = Double.POSITIVE_INFINITY;
  825.             java.util.List<MapleMapObject> items = map.getMapObjectsInRange(player.getPosition(), range, Arrays.asList(MapleMapObjectType.ITEM));
  826.             for (MapleMapObject itemmo : items) {
  827.                 map.removeMapObject(itemmo);
  828.                 map.broadcastMessage(MaplePacketCreator.removeItemFromMap(itemmo.getObjectId(), 0, player.getId()));
  829.             }
  830.             mc.dropMessage("You have destroyed " + items.size() + " items on the ground.");
  831.         } else if (splitted[0].equalsIgnoreCase("!chongzhishangdian")) {
  832.             MapleShopFactory.getInstance().clear();
  833.         } else if (splitted[0].equalsIgnoreCase("!chongzhishijian")) {
  834.             for (ChannelServer instance : ChannelServer.getAllInstances()) {
  835.                 instance.reloadEvents();
  836.             }
  837.         } else if (splitted[0].equalsIgnoreCase("!feng")) {
  838.             String name = splitted[1];
  839.             String reason = StringUtil.joinStringFrom(splitted, 2);
  840.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(name);
  841.             if (victim != null) {
  842.                 if (!victim.isGM()) {
  843.                     victim.ban(reason, true);
  844.                     mc.dropMessage("成功!此角色已经被封!");
  845.                 } else {
  846.                     mc.dropMessage("你不能封GM!");
  847.                 }
  848.             } else {
  849.                 if (MapleCharacter.ban(name, reason, false)) {
  850.                     mc.dropMessage("Permanently banned sucessfully");
  851.                 } else {
  852.                     mc.dropMessage("Error while banning.");
  853.                 }
  854.             }
  855.         } else if (splitted[0].equalsIgnoreCase("!emote")) {
  856.             String name = splitted[1];
  857.             int emote;
  858.             try {
  859.                 emote = Integer.parseInt(splitted[2]);
  860.             } catch (NumberFormatException nfe) {
  861.                 return;
  862.             }
  863.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(name);
  864.             if (victim != null) {
  865.                 victim.getMap().broadcastMessage(victim, MaplePacketCreator.facialExpression(victim, emote), victim.getPosition());
  866.             } else {
  867.                 mc.dropMessage("Player was not found");
  868.             }
  869.         
  870.         } else if (splitted[0].equals("!addclones")) {
  871.             if (splitted.length < 2) {
  872.                 return;
  873.             }
  874.             int clones;
  875.             try {
  876.                 clones = getOptionalIntArg(splitted, 1, 1);
  877.             } catch (NumberFormatException asdasd) {
  878.                 return;
  879.             }
  880.             if (player.getFakeChars().size() >= 5) {
  881.                 mc.dropMessage("You are not allowed to clone yourself over 5 times.");
  882.             } else {
  883.                 for (int i = 0; i < clones && i + player.getFakeChars().size() <= 6; i++) {
  884.                     FakeCharacter fc = new FakeCharacter(player, player.getId() + player.getFakeChars().size() + clones + i);
  885.                     player.getFakeChars().add(fc);
  886.                     c.getChannelServer().addClone(fc);
  887.                 }
  888.                 mc.dropMessage("You have cloned yourself " + player.getFakeChars().size() + " times so far.");
  889.             }
  890.         } else if (splitted[0].equals("!removeclones")) {
  891.             for (FakeCharacter fc : player.getFakeChars()) {
  892.                 if (fc.getFakeChar().getMap() == player.getMap()) {
  893.                     c.getChannelServer().getAllClones().remove(fc);
  894.                     player.getMap().removePlayer(fc.getFakeChar());
  895.                 }
  896.             }
  897.             player.getFakeChars().clear();
  898.             mc.dropMessage("All your clones in the map removed.");
  899.         } else if (splitted[0].equals("!removeallclones")) {
  900.             for (FakeCharacter fc : c.getChannelServer().getAllClones()) {
  901.                 if (fc.getOwner() != null) {
  902.                     fc.getOwner().getFakeChars().remove(fc);
  903.                 }
  904.                 fc.getFakeChar().getMap().removePlayer(fc.getFakeChar());
  905.             }
  906.             c.getChannelServer().getAllClones().clear();
  907.             mc.dropMessage("ALL clones have been removed.");
  908.         } else if (splitted[0].equals("!follow")) {
  909.             int slot = Integer.parseInt(splitted[1]);
  910.             FakeCharacter fc = player.getFakeChars().get(slot);
  911.             if (fc == null) {
  912.                 mc.dropMessage("Clone does not exist.");
  913.             } else {
  914.                 fc.setFollow(true);
  915.             }
  916.         } else if (splitted[0].equals("!pause")) {
  917.             int slot = Integer.parseInt(splitted[1]);
  918.             FakeCharacter fc = player.getFakeChars().get(slot);
  919.             if (fc == null) {
  920.                 mc.dropMessage("Clone does not exist.");
  921.             } else {
  922.                 fc.setFollow(false);
  923.             }
  924.         } else if (splitted[0].equals("!stance")) {
  925.             if (splitted.length == 3) {
  926.                 int slot = Integer.parseInt(splitted[1]);
  927.                 int stance = Integer.parseInt(splitted[2]);
  928.                 player.getFakeChars().get(slot).getFakeChar().setStance(stance);
  929.             }
  930.         } else if (splitted[0].equalsIgnoreCase("!killmonster")) {
  931.             if (splitted.length == 2) {
  932.                 MapleMap map = c.getPlayer().getMap();
  933.                 int targetId = Integer.parseInt(splitted[1]);
  934.                 List<MapleMapObject> monsters = map.getMapObjectsInRange(c.getPlayer().getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.MONSTER));
  935.                 for (MapleMapObject monsterm : monsters) {
  936.                     MapleMonster monster = (MapleMonster) monsterm;
  937.                     if (monster.getId() == targetId) {
  938.                         map.killMonster(monster, player, false);
  939.                         break;
  940.                     }
  941.                 }
  942.             }
  943.         } else if (splitted[0].equalsIgnoreCase("!removeoid")) {
  944.             if (splitted.length == 2) {
  945.                 MapleMap map = c.getPlayer().getMap();
  946.                 int oid = Integer.parseInt(splitted[1]);
  947.                 MapleMapObject obj = map.getMapObject(oid);
  948.                 if (obj == null) {
  949.                     mc.dropMessage("This oid does not exist.");
  950.                 } else {
  951.                     map.removeMapObject(obj);
  952.                 }
  953.             }
  954.         
  955.         } else if (splitted[0].equalsIgnoreCase("!currentdate")) {
  956.             Calendar cal = Calendar.getInstance();
  957.             int day = cal.get(Calendar.DATE);
  958.             int month = cal.get(Calendar.MONTH) + 1; // its an array of months.
  959.             int year = cal.get(Calendar.YEAR);
  960.             mc.dropMessage(day + "/" + month + "/" + year);
  961.         } else if (splitted[0].equalsIgnoreCase("!maxmesos")) {
  962.             player.gainMeso(Integer.MAX_VALUE - player.getMeso());
  963.         } else if (splitted[0].equalsIgnoreCase("!fullcharge")) {
  964.             player.setEnergyBar(10000);
  965.             c.getSession().write(MaplePacketCreator.giveEnergyCharge(10000));
  966.         } else if (splitted[0].equals("!youlose")) {
  967.             for (MapleCharacter victim : player.getMap().getCharacters()) {
  968.                 if (victim != null) {
  969.                     if (victim.getHp() <= 0) {
  970.                         victim.dropMessage("You have lost the event.");
  971.                         victim.changeMap(100000000);
  972.                     } else {
  973.                         victim.setHp(victim.getCurrentMaxHp());
  974.                         victim.updateSingleStat(MapleStat.HP, victim.getHp());
  975.                         victim.setMp(victim.getCurrentMaxMp());
  976.                         victim.updateSingleStat(MapleStat.MP, victim.getMp());
  977.                     }
  978.                 }
  979.             }
  980.             
  981.         } else if (splitted[0].equals("!changejob")) {
  982.             //change this command to public if u want.
  983.             int id = c.getPlayer().getId();
  984.             int job = Integer.parseInt(splitted[1]);
  985.             Connection con = DatabaseConnection.getConnection();
  986.             PreparedStatement ps;
  987.             try {
  988.                 ps = con.prepareStatement("select * from jobs where characterid = ? and jobid = ?");
  989.                 ps.setInt(1, id);
  990.                 ps.setInt(2, job);
  991.                 ResultSet rs = ps.executeQuery();
  992.                 if (!rs.next()) {
  993.                     mc.dropMessage("You don't have the following job before you rebirthed.");
  994.                     ps.close();
  995.                 }
  996.                 job = rs.getInt("jobid");
  997.                 c.getPlayer().changeJob(MapleJob.getById(job));
  998.                 ps.close();
  999.             } catch (SQLException e) {
  1000.                 System.out.println("SQL Exception: " + e);
  1001.             }
  1002.         } else if (splitted[0].equalsIgnoreCase("!coke")) {
  1003.             int[] ids = {9500144, 9500151, 9500152, 9500153, 9500154, 9500143, 9500145, 9500149, 9500147};
  1004.             for (int a : ids) {
  1005.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(a), player.getPosition());
  1006.             }
  1007.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意: 可乐怪已经召唤,请大家速度到<" + themapname + ">集合."));
  1008.         } else if (splitted[0].equals("!balrog")) {
  1009.             int[] ids = {8130100, 8150000, 9400536};
  1010.             for (int a : ids) {
  1011.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(a), player.getPosition());
  1012.             }
  1013.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意: 蝙蝠怪已经召唤,请大家速度到<" + themapname + ">集合."));
  1014.         } else if (splitted[0].equals("!mushmom")) {//蘑菇群
  1015.             int[] ids = {6130101, 6300005, 9400205};
  1016.             for (int a : ids) {
  1017.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(a), player.getPosition());
  1018.             }
  1019.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,蘑菇群已经召唤,请大家速度到<" + themapname + ">集合."));
  1020.         } else if (splitted[0].equals("!shuyao")) {
  1021.             int[] ids = {2130100, 1110101, 1130100, 130100, 1140100, 3220000, 3220000, 3220000};
  1022.             for (int a : ids) {
  1023.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(a), player.getPosition());
  1024.             }
  1025.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,树王已经召唤,请大家速度到<" + themapname + ">集合."));
  1026.         } else if (splitted[0].equals("!dragon")) {
  1027.             int[] ids = {8150300, 8150301, 8150302};
  1028.             for (int a : ids) {
  1029.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(a), player.getPosition());
  1030.             }
  1031.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,飞龙群已经召唤,请大家速度到<" + themapname + ">集合."));
  1032.         } else if (splitted[0].equals("!pianus")) {
  1033.             player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(8510000), player.getPosition());
  1034.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,鱼王右已经召唤,请大家速度到<" + themapname + ">集合."));
  1035.         } else if (splitted[0].equals("!pianus2")) {
  1036.             player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(8520000), player.getPosition());
  1037.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,鱼王左已经召唤,请大家速度到<" + themapname + ">集合."));
  1038.         } else if (splitted[0].equals("!anego")) {
  1039.             int[] ids = {9400121, 9400120, 9400122, 9400110, 9400111, 9400103, 9400102, 9400101, 9400100};
  1040.             for (int a : ids) {
  1041.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(a), player.getPosition());
  1042.             }
  1043.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,日本御姐已经召唤,请大家速度到<" + themapname + ">集合."));
  1044.         } else if (splitted[0].equals("!blackcrow")) {
  1045.             for (int amnt = getOptionalIntArg(splitted, 1, 1); amnt > 0; amnt--) {
  1046.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(9400567), player.getPosition());
  1047.             }
  1048.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,天狗已经召唤,请大家速度到<" + themapname + ">集合."));
  1049.         } else if (splitted[0].equals("!papu")) {//闹钟
  1050.             for (int amnt = getOptionalIntArg(splitted, 1, 1); amnt > 0; amnt--) {
  1051.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(8500001), player.getPosition());
  1052.             }
  1053.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,闹钟已经召唤,请大家速度到<" + themapname + ">集合."));
  1054.         } else if (splitted[0].equals("!papu2")) {
  1055.             player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(8500000), player.getPosition());
  1056.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,闹钟的保护罩已经召唤,打破它即可挑战闹钟,请大家速度到<" + themapname + ">集合."));
  1057.         } else if (splitted[0].equals("!ludimini")) {//时间门神
  1058.             for (int amnt = getOptionalIntArg(splitted, 1, 1); amnt > 0; amnt--) {
  1059.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(8160000), player.getPosition());
  1060.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(8170000), player.getPosition());
  1061.             }
  1062.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,时间门神已经召唤,打破它即可挑战闹钟,请大家速度到<" + themapname + ">集合."));
  1063.         } else if (splitted[0].equals("!baobiao")) {
  1064.             player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(9400112), player.getPosition());
  1065.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,保镖A 已经召唤,杀死它一次,就会变身成保镖B,再杀死一次,它就会变身成冒险岛里最厉害的BOSS恶僧,请大家速度到<" + themapname + ">集合."));
  1066.         } else if (splitted[0].equals("!theboss")) {//恶僧
  1067.             for (int amnt = getOptionalIntArg(splitted, 1, 1); amnt > 0; amnt--) {
  1068.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(9400300), player.getPosition());
  1069.             }
  1070.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,恶僧已经召唤,请大家速度到<" + themapname + ">集合."));
  1071.         } else if (splitted[0].equals("!ergoth")) {//死灵法师
  1072.             for (int amnt = getOptionalIntArg(splitted, 1, 1); amnt > 0; amnt--) {
  1073.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(9300028), player.getPosition());
  1074.             }
  1075.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,死灵法师已经召唤,请大家速度到<" + themapname + ">集合."));
  1076.         } else if (splitted[0].equals("!pirate")) {//海盗
  1077.             int[] ids = {9300119, 9300107, 9300105, 9300106};
  1078.             for (int a : ids) {
  1079.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(a), player.getPosition());
  1080.             }
  1081.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,海盗已经召唤,请大家速度到<" + themapname + ">集合."));
  1082.         } else if (splitted[0].equals("!bird")) {//凤凰
  1083.             player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(9300090), player.getPosition());
  1084.             player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(9300089), player.getPosition());
  1085.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,凤凰已经召唤,请大家速度到<" + themapname + ">集合."));
  1086.         } else if (splitted[0].equals("!jinzhu")) {
  1087.             for (int amnt = getOptionalIntArg(splitted, 1, 1); amnt > 0; amnt--) {
  1088.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(9500167), player.getPosition());
  1089.             }
  1090.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,黄金猪猪已经召唤,请大家速度到<" + themapname + ">集合."));
  1091.         } else if (splitted[0].equals("!xueren")) {
  1092.             player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(9400708), player.getPosition());
  1093.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,雪人已经召唤,请大家速度到<" + themapname + ">集合."));
  1094.         } else if (splitted[0].equals("!bob")) {//超级蜗牛
  1095.             player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(9400551), player.getPosition());
  1096.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,超级蜗牛已经召唤,请大家速度到<" + themapname + ">集合."));
  1097.         } else if (splitted[0].equals("!clone")) {//五职业教官
  1098.             int[] ids = {9001002, 9001000, 9001003, 9001001};
  1099.             for (int a : ids) {
  1100.                 player.getMap().spawnMonsterOnGroudBelow(MapleLifeFactory.getMonster(a), player.getPosition());
  1101.             }
  1102.             player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(0, "请注意,五职业教官已经召唤,请大家速度到<" + themapname + ">集合."));
  1103.        
  1104.         } else if (splitted[0].equals("!daima")) {
  1105. mc.dropMessage("GM指令[查代码] !daima");
  1106. mc.dropMessage("--------------职 业 代 码--------------");
  1107. mc.dropMessage("0 新手,100 战士,200 法师,300 射手,400 飞侠,500 海盗 || 900 管理员,910 超级管理员 ");
  1108. mc.dropMessage("110-112 英雄,120-122 圣骑,130-132 黑骑 || 210-212 火毒,220-222 冰雷,230-232 主教 ");
  1109. mc.dropMessage("310-312 射手,320-322 游侠 || 410-412 隐士,420-422 侠盗 || 510-512 冲锋,520-522 船长");
  1110. mc.dropMessage("--------------地 图 代 码--------------");
  1111. mc.dropMessage("10000 新手训练(老版),2 新手训练(新版)");
  1112. mc.dropMessage("209000000 幸福村,209000001-15 幸福村隐藏地图");
  1113. mc.dropMessage("180000000 GM地图,200000301 家族中心,109030001 封号地图");
  1114. mc.dropMessage("--------------椅 子 代 码--------------");
  1115. mc.dropMessage("3010009 粉色爱心马桶,3010007 粉色海狗靠垫,3010012  蓝色高靠背椅,3010003 红色時尚转椅");
  1116. mc.dropMessage("3011000 钓鱼椅,3010013 悠长假期,3010014 月亮弯弯");
  1117. mc.dropMessage("--------------装 备 代 码--------------");
  1118. mc.dropMessage("1002140 维泽特帽,1322013 维泽特提包,1042003 维泽特西装,1062007 维泽特西裤");
  1119. mc.dropMessage("1002562 新手帽子,1052081 新手衣服,1082230 白色闪光手套");
  1120. mc.dropMessage("1122000 黑龙项链,  2041200 暗黑龙王石(给黑龙项链升级)"); 
  1121. mc.dropMessage("1002357 扎昆头盔1,  1002390 扎昆头盔2,1002430 扎昆头盔3"); 
  1122. mc.dropMessage("1032053 四叶草耳环,1032038 雪花耳钉,1032029 925银耳环,1102142 火焰披风");
  1123. mc.dropMessage("1092033 四叶草盾牌,1092044 爱慢速变化球,1092031 瓢虫盾,1092008 锅盖");
  1124. mc.dropMessage("1092021 光子盾,  1092029 电磁光盾,  1092045 冒险岛魔法师盾牌,");
  1125. mc.dropMessage("1092018-20 飞侠盾牌,1092049 热情剑盾,1092050 冷艳剑盾,1092047 冒险岛飞侠盾牌");
  1126. mc.dropMessage("1032019 水仙耳环,1032042 冒险岛耳环,1032030 勇气耳环,1032031 坚毅耳环");
  1127. mc.dropMessage("--------------玩具武器代码--------------");
  1128. mc.dropMessage("1302063 燃烧的火焰刀,1402044 南瓜灯笼,1422036 玩具匠人的锤子,1382016 香菇,1402029 鬼刺狼牙棒");
  1129. mc.dropMessage("1442018 冻冻鱼,1432039 钓鱼竿,1442023 黑拖把,1302013 红鞭子,1432009 木精灵枪,");
  1130. mc.dropMessage("1302058 冒险岛伞,1302066 枫叶庆典旗,1302049 光线鞭子,1322051 七夕,1372017 领路灯");
  1131. mc.dropMessage("1322026 彩虹游泳圈,1332020 太极扇,1332053 野外烧烤串,1332054 闪电飞刀,1402017 船长佩剑");
  1132. mc.dropMessage("1442046 超级雪板,1442061 仙人掌之矛,1432046 圣诞枪,1302080 闪光彩灯鞭");
  1133. mc.dropMessage("1452054-6 鸟弓,1462047-9 鸟弩,1472065-7 鸟拳,1442047-50 玫瑰");
  1134. mc.dropMessage("--------------现金武器代码--------------");
  1135. mc.dropMessage("1702165 同班男生,1702169 同班女生,1702174 蝴蝶扇,1702114 荷叶青蛙,1702140 花");
  1136. mc.dropMessage("1702179 云彩9枕头,1702000 双刃激光剑(短剑),1702034 关公大刀,1702155 星星");
  1137. mc.dropMessage("1702081 紫色燃烧的剑,1702151 绿色的杖,1702025 蓝色的竖琴(弓),1702161 狗(拳套)");
  1138. mc.dropMessage("1082229 飘飘手套,1082227 海盗手套,1102159 猴子气球");
  1139. mc.dropMessage("--------------职业武器代码--------------");
  1140. mc.dropMessage("1302056 一刀两段(单手剑),1402037 龙背刃,1402005 斩魔刀,1402035 斩天刀");
  1141. mc.dropMessage("1312015 战魂之斧,  1312031 狂龙怒斩斧,1412010 项羽之斧    1322052 狂龙地锤");
  1142. mc.dropMessage("1432011 寒冰破魔枪,1432030 红莲落神枪,1432038 盘龙七冲枪,1442045 血龙神斧");
  1143. mc.dropMessage("1452044 金龙震翅弓,1462039 黄金飞龙弩,1452019 天鹰弓白,  1462015 光圣鹞弩白");
  1144. mc.dropMessage("1372031 圣贤短杖,1382037 偃月之杖,1382035 冰肌玲珑杖,1382036 黑精灵王杖");
  1145. mc.dropMessage("1332050 半月龙鳞裂,1472051 寒木升龙拳,2070006 齿轮镖,2070007 月牙镖,2070016 水晶齿轮");
  1146. mc.dropMessage("--------------物 品 代 码--------------");
  1147. mc.dropMessage("1912000 皮鞍子,1902000-2 骑宠,!skill 1004 0 骑宠技能, 1932000 海盗船(MFC060版)");
  1148. mc.dropMessage("4001017 火眼,4031179 D片,4006000 魔法石,4006001 召回石,4001129 纪念币");  
  1149. mc.dropMessage("4030000-09 换取棋盘的材料, 4030010-16 记忆大考验, 4080000-11 五子棋"); 
  1150. mc.dropMessage("2000005 超级药水,2050004 万能药水,2022199 全恢复,2050006 恢复视野药水");
  1151. mc.dropMessage("5300000 蘑菇变身卡,5300001 漂漂猪变身卡,5300002 外星人变身卡"); 
  1152. mc.dropMessage("5390000 炽热情景喇叭,5390001 绚烂情景喇叭,5390002 爱心情景喇叭");
  1153. mc.dropMessage("VIP兑换道具代码:4001120(普通), 4001121(高级)");
  1154. mc.dropMessage("============GM常用代码查看1=============");
  1155. } else if (splitted[0].equals("!daima2")) {
  1156. mc.dropMessage("GM指令[查代码2] !daima2  (059版新代码)");
  1157. mc.dropMessage("--------------装 备 代 码--------------");
  1158. mc.dropMessage("1382060 红杖,1432048 沙僧,1442068 关羽,1302088-94 玩具蝙蝠 || 1022058 狸猫面具");
  1159. mc.dropMessage("1482023 指节,1492013 手枪,2330005 子弹,2331000 火方块,2332000 冰方块");
  1160. mc.dropMessage("1702180 黑球(83 黄 84白 85橙 87彩 88紫)");
  1161. mc.dropMessage("--------------物 品 代 码--------------");
  1162. mc.dropMessage("2210000-03 && 2210005-12 变身药水");
  1163. mc.dropMessage("============GM常用代码查看2=============");
  1164.         } else if (splitted[0].equals("!back3")) {
  1165.             MapleMap target = cserv.getMapFactory().getMap(100000000);
  1166.             MaplePortal targetPortal = target.getPortal(0);
  1167.             player.changeMap(target, targetPortal);        
  1168.         } else if (splitted[0].equals("!testcom3")) {
  1169.             mc.dropMessage("If this works, then GM Commands work.");
  1170.         }
  1171.     }
  1172.     @Override
  1173.     public CommandDefinition[] getDefinition() {
  1174.         return new CommandDefinition[]{
  1175.                     new CommandDefinition("lowhp", 3, "血降到1."),
  1176.                     new CommandDefinition("sp", 3, "<数量> - 增加技能点"),
  1177.                     new CommandDefinition("ap", 3, "<数量> - 增加属性点"),
  1178.                     new CommandDefinition("job", 3, "<职业ID> - 转成指定职业"),
  1179.                     new CommandDefinition("whereami", 3, "查看本地图ID"),
  1180.                     new CommandDefinition("levelup", 3, "升级了"),
  1181.                     new CommandDefinition("setmaxmp", 3, "设置MP上限"),
  1182.                     new CommandDefinition("setmaxhp", 3, "设置HP上限"),
  1183.                     new CommandDefinition("healmap", 3, "治疗该地图的玩家"),
  1184.                     new CommandDefinition("level", 3, "<数值> 设置自己的等级"),
  1185.                     new CommandDefinition("online", 3, "查看在线玩家"),
  1186.                     new CommandDefinition("banreason", 3),
  1187.                     new CommandDefinition("whitechat", 3),
  1188.                     new CommandDefinition("joinguild", 3),
  1189.                     new CommandDefinition("unbuffmap", 3),
  1190.                     new CommandDefinition("mxb", 3, "<数值> 设置自己的金钱"),
  1191.                     new CommandDefinition("ariantpq", 3),
  1192.                     new CommandDefinition("scoreboard", 3),
  1193.                     new CommandDefinition("array", 3),
  1194.                     new CommandDefinition("slap", 3, "<玩家名字> <数值> 让某玩家丢失指定数值的HP"),
  1195.                     new CommandDefinition("rreactor", 3),
  1196.                     new CommandDefinition("sha2", 3, "杀死该地图全部怪物"),
  1197.                     new CommandDefinition("sha", 3, "杀死该地图全部怪物并获得经念和物品"),
  1198.                     new CommandDefinition("say", 3, "<内容> 发送蓝字公告"),
  1199.                     new CommandDefinition("gender", 3, "<玩家名字> <数值0或1> 改变玩家性别"),
  1200.                     new CommandDefinition("spy", 3, "<玩家名字> 查看玩家属性和一些资料"),
  1201.                     new CommandDefinition("skill", 3, "<技能ID> <等级> <技能等级> - 增加技能"),
  1202.                     new CommandDefinition("maxskills", 3, "技能全部学会"),
  1203.                     new CommandDefinition("unhide", 3, "<玩家名字> 使某玩家取消隐身状态"),
  1204.                     new CommandDefinition("heal", 3, "<玩家名字||null> 恢复自己的HP和MP"),
  1205.                     new CommandDefinition("unbuff", 3, "<玩家名字> 去掉某玩家的辅助状态"),
  1206.                     new CommandDefinition("sendhint", 3, "<玩家名字> <内容> 给某玩家发送信息(貌似无效)"),
  1207.                     new CommandDefinition("smega", 3, "<玩家名字> <喇叭类型:love,cloud,diablo> <信息> 刷喇叭"),
  1208.                     new CommandDefinition("mutesmega", 3, "<玩家名字> 开启或关闭某玩家能否使用情景喇叭喊话"),
  1209.                     new CommandDefinition("mute", 3, "<玩家名字> 开启或关闭某玩家能否使用小喇叭喊话"),
  1210.                     new CommandDefinition("givedisease", 3),
  1211.                     new CommandDefinition("dc", 3, "<玩家名字> 踢某玩家下线"),
  1212.                     new CommandDefinition("charinfo", 3, "<玩家名字> 查看某玩家坐标值之类的"),
  1213.                     new CommandDefinition("connected", 3, "显示连接数"),
  1214.                     new CommandDefinition("clock", 3, "<数值||null> 在地图上设置一个时间"),
  1215.                     new CommandDefinition("jail", 3, "<玩家名字> 将某玩家关进监狱"),
  1216.                     new CommandDefinition("goto", 3, "<预设地图名> 传送到预设的地图名"),
  1217.                     new CommandDefinition("servermessage", 3, "<信息> 更改系统公告"),
  1218.                     new CommandDefinition("gmsay", 3, "<D盘gmsay.txt所需发布公告的行数> - 发布系统公告"),
  1219.                     new CommandDefinition("whosthere", 3, "查看该地图的玩家"),
  1220.                     new CommandDefinition("cheaters", 3, "方便查看使用吸怪的玩家"),
  1221.                     new CommandDefinition("nearestportal", 3),
  1222.                     new CommandDefinition("unban", 3, "<玩家名字> 解封"),
  1223.                     new CommandDefinition("ban", 3, "<玩家名字> <封IP理由>"),
  1224.                     new CommandDefinition("tempban", 3),
  1225.                     new CommandDefinition("mynpcpos", 3, "我的坐标"),
  1226.                     new CommandDefinition("qingchu", 3, "清除地上物品"),
  1227.                     new CommandDefinition("laji", 3, "清除地上物品"),
  1228.                     new CommandDefinition("chongzhishangdian", 3),
  1229.                     new CommandDefinition("chongzhishijian", 3, "重置所有事件"),
  1230.                     new CommandDefinition("feng", 3, "<玩家名字> <封号理由>"),
  1231.                     new CommandDefinition("emote", 3),
  1232.                     new CommandDefinition("addclones", 3, "克隆人,貌似未生效"),
  1233.                     new CommandDefinition("removeclones", 3, "移除克隆人,貌似未生效"),
  1234.                     new CommandDefinition("removeallclones", 3, "移除所有人的克隆人,貌似未生效"),
  1235.                     new CommandDefinition("follow", 3, "和克隆人相关的,貌似未生效"),
  1236.                     new CommandDefinition("pause", 3, "和克隆人相关的,貌似未生效"),
  1237.                     new CommandDefinition("stance", 3, "和克隆人相关的,貌似未生效"),
  1238.                     new CommandDefinition("killmonster", 3, "<怪物ID> 杀死指定ID的怪物"),
  1239.                     new CommandDefinition("removeoid", 3),
  1240.                     new CommandDefinition("currentdate", 3, "显示日期"),
  1241.                     new CommandDefinition("maxmesos", 3, "把自己的金钱加满"),
  1242.                     new CommandDefinition("fullcharge", 3, "把海盗的能量获取加满"),
  1243.                     new CommandDefinition("youlose", 3, "输了,HP=0时传送到射手村并加满血和蓝"),
  1244.                     new CommandDefinition("changejob", 3, "<职业ID> - 转成指定职业"),
  1245.                     new CommandDefinition("coke", 3, "召唤可乐怪"),
  1246.                     new CommandDefinition("balrog", 3, "召唤蝙蝠怪"),
  1247.                     new CommandDefinition("mushmom", 3, "召唤蘑菇王"),
  1248.                     new CommandDefinition("shuyao", 3, "召唤树妖王"),
  1249.                     new CommandDefinition("dragon", 3, "召唤飞龙"),
  1250.                     new CommandDefinition("pianus", 3, "召唤鱼王(右)"),
  1251.                     new CommandDefinition("pianus2", 3, "召唤鱼王(左)"),
  1252.                     new CommandDefinition("anego", 3, "召唤日本御姐"),
  1253.                     new CommandDefinition("blackcrow", 3, "召唤天狗"),
  1254.                     new CommandDefinition("papu", 3, "召唤闹钟"),
  1255.                     new CommandDefinition("papu2", 3, "召唤闹钟的封印石"),
  1256.                     new CommandDefinition("ludimini", 3, "召唤时间门神"),
  1257.                     new CommandDefinition("baobiao", 3, "召唤保镖A(打死2次后变身成恶僧)"),
  1258.                     new CommandDefinition("theboss", 3, "召唤恶僧"),
  1259.                     new CommandDefinition("ergoth", 3, "召唤死灵法师"),
  1260.                     new CommandDefinition("pirate", 3, "召唤海盗"),
  1261.                     new CommandDefinition("bird", 3, "召唤凤凰"),
  1262.                     new CommandDefinition("jinzhu", 3, "召唤金猪"),
  1263.                     new CommandDefinition("xueren", 3, "召唤雪人"),
  1264.                     new CommandDefinition("bob", 3, "召唤超级蜗牛"),
  1265.                     new CommandDefinition("clone", 3, "召唤5职业教练"),
  1266.                     new CommandDefinition("back3", 3, "回射手村"),
  1267.                     new CommandDefinition("daima", 3, "查看常用代码"),
  1268.                     new CommandDefinition("daima2", 3, "查看常用代码2"),
  1269.                     new CommandDefinition("testcom3", 3)
  1270.                 };
  1271.     }
  1272. }