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

游戏

开发平台:

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; without 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.File;
  22. import java.io.IOException;
  23. import java.io.InputStreamReader;
  24. import java.net.InetAddress;
  25. import java.net.MalformedURLException;
  26. import java.net.URL;
  27. import java.net.URLConnection;
  28. import java.rmi.RemoteException;
  29. import net.sf.odinms.client.IItem;
  30. import net.sf.odinms.client.MapleCharacter;
  31. import net.sf.odinms.client.MapleClient;
  32. import net.sf.odinms.client.MapleInventoryType;
  33. import net.sf.odinms.client.MaplePet;
  34. import net.sf.odinms.client.MapleStat;
  35. import net.sf.odinms.client.Equip;
  36. import net.sf.odinms.client.messages.Command;
  37. import net.sf.odinms.client.messages.MessageCallback;
  38. import net.sf.odinms.server.MapleInventoryManipulator;
  39. import net.sf.odinms.server.MapleItemInformationProvider;
  40. import net.sf.odinms.tools.MaplePacketCreator;
  41. import net.sf.odinms.net.channel.ChannelServer;
  42. import java.sql.Connection;
  43. import java.sql.PreparedStatement;
  44. import java.sql.ResultSet;
  45. import java.sql.SQLException;
  46. import java.util.ArrayList;
  47. import java.util.Arrays;
  48. import java.util.Collection;
  49. import java.util.LinkedList;
  50. import java.util.List;
  51. import net.sf.odinms.client.Item;
  52. import net.sf.odinms.client.MapleCharacterUtil;
  53. import net.sf.odinms.database.DatabaseConnection;
  54. import net.sf.odinms.provider.MapleData;
  55. import net.sf.odinms.provider.MapleDataProvider;
  56. import net.sf.odinms.provider.MapleDataProviderFactory;
  57. import net.sf.odinms.provider.MapleDataTool;
  58. import net.sf.odinms.scripting.npc.NPCScriptManager;
  59. import net.sf.odinms.server.MapleShopFactory;
  60. import net.sf.odinms.server.life.MapleLifeFactory;
  61. import net.sf.odinms.server.life.MapleMonster;
  62. import net.sf.odinms.server.life.MapleNPC;
  63. import net.sf.odinms.server.maps.MapleMap;
  64. import net.sf.odinms.server.maps.MapleMapObject;
  65. import net.sf.odinms.server.maps.MapleMapObjectType;
  66. import net.sf.odinms.tools.Pair;
  67. import net.sf.odinms.client.messages.CommandDefinition;
  68. import net.sf.odinms.client.messages.CommandProcessor;
  69. import net.sf.odinms.net.channel.handler.ChangeChannelHandler;
  70. import net.sf.odinms.net.world.remote.WorldChannelInterface;
  71. import net.sf.odinms.net.world.remote.WorldLocation;
  72. import net.sf.odinms.server.MaplePortal;
  73. import net.sf.odinms.server.MapleShop;
  74. import net.sf.odinms.server.MapleTrade;
  75. import net.sf.odinms.server.maps.PlayerNPCs;
  76. import static net.sf.odinms.client.messages.CommandProcessor.getOptionalIntArg;
  77. import net.sf.odinms.tools.StringUtil;
  78. public class Admins implements Command {
  79.     
  80.     public void clearSlot(MapleClient c, int type) {
  81.         MapleInventoryType invent;
  82.         if (type == 1) {
  83.             invent = MapleInventoryType.EQUIP;
  84.         } else if (type == 2) {
  85.             invent = MapleInventoryType.USE;
  86.         } else if (type == 3) {
  87.             invent = MapleInventoryType.ETC;
  88.         } else if (type == 4) {
  89.             invent = MapleInventoryType.SETUP;
  90.         } else {
  91.             invent = MapleInventoryType.CASH;
  92.         }
  93.         List<Integer> itemMap = new LinkedList<Integer>();
  94.         for (IItem item : c.getPlayer().getInventory(invent).list()) {
  95.             itemMap.add(item.getItemId());
  96.         }
  97.         for (int itemid : itemMap) {
  98.             MapleInventoryManipulator.removeAllById(c, itemid, false);
  99.         }
  100.     }
  101.     @Override
  102.     public void execute(MapleClient c, MessageCallback mc, String[] splitted) throws Exception {
  103.         ChannelServer cserv = c.getChannelServer();
  104.         Collection<ChannelServer> cservs = ChannelServer.getAllInstances();
  105.         splitted[0] = splitted[0].toLowerCase();
  106.         MapleCharacter player = c.getPlayer();
  107.         if (splitted[0].equalsIgnoreCase("!writecommands")) {
  108.             CommandProcessor.getInstance().writeCommandList();
  109.         } else if (splitted[0].equals("!setvip")) {
  110.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  111.             victim.setVip(Integer.parseInt(splitted[2]));
  112.             mc.dropMessage("你现在的VIP级别为:" + player.getVip());
  113.         } else if (splitted[0].equals("!setgm")) {
  114.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  115.             victim.setGMLevel(Integer.parseInt(splitted[2]));
  116.             mc.dropMessage("你现在的GM级别为:" + player.getGMLevel());
  117.         } else if (splitted[0].equalsIgnoreCase("!gmperson")) {
  118.             if (splitted.length == 3) {
  119.                 MapleCharacter victim = c.getChannelServer().getPlayerStorage().getCharacterByName(splitted[1]);
  120.                 if (victim != null) {
  121.                     int level;
  122.                     try {
  123.                         level = Integer.parseInt(splitted[2]);
  124.                     } catch (NumberFormatException blackness) {
  125.                         return;
  126.                     }
  127.                     victim.setGM(level);
  128.                     if (victim.isGM()) {
  129.                         victim.dropMessage(5, "你现在的GM等级为: " + level + " 级别!");
  130.                     }
  131.                 } else {
  132.                     mc.dropMessage("这个玩家 " + splitted[1] + " 离线或者不在这个频道!");
  133.                 }
  134.             }
  135.        } else if (splitted[0].equalsIgnoreCase("!setaccgm")) {
  136.             int accountid;
  137.             Connection con = DatabaseConnection.getConnection();
  138.             try {
  139.                 PreparedStatement ps = con.prepareStatement("SELECT accountid FROM characters WHERE name = ?");
  140.                 ps.setString(1, splitted[1]);
  141.                 ResultSet rs = ps.executeQuery();
  142.                 if (rs.next()) {
  143.                     accountid = rs.getInt("accountid");
  144.                     ps.close();
  145.                     ps = con.prepareStatement("UPDATE accounts SET gm = ? WHERE id = ?");
  146.                     ps.setInt(1, 1);
  147.                     ps.setInt(2, accountid);
  148.                     ps.executeUpdate();
  149.                 } else {
  150.                     mc.dropMessage("没有发现这个玩家!.");
  151.                 }
  152.                 ps.close();
  153.                 rs.close();
  154.             } catch (SQLException se) {
  155.             }
  156.        } else if (splitted[0].equalsIgnoreCase("!mesoperson")) {
  157.             int mesos;
  158.             try {
  159.                 mesos = Integer.parseInt(splitted[2]);
  160.             } catch (NumberFormatException blackness) {
  161.                 return;
  162.             }
  163.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  164.             if (victim != null) {
  165.                 victim.gainMeso(mesos, true, true, true);
  166.             } else {
  167.                 mc.dropMessage("没有发现这个玩家!");
  168.             }
  169.        } else if (splitted[0].equalsIgnoreCase("!itemperson")) {
  170.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  171.             int item;
  172.             try {
  173.                 item = Integer.parseInt(splitted[2]);
  174.             } catch (NumberFormatException blackness) {
  175.                 return;
  176.             }
  177.             short quantity = (short) getOptionalIntArg(splitted, 3, 1);
  178.             if (victim != null) {
  179.                 MapleInventoryManipulator.addById(victim.getClient(), item, quantity);
  180.             } else {
  181.                 mc.dropMessage("没有发现这个玩家!");
  182.             }
  183.         } else if (splitted[0].equals("!diu")) {
  184.             MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
  185.             int itemId = Integer.parseInt(splitted[1]);
  186.             short quantity = (short) getOptionalIntArg(splitted, 2, 1);
  187.             IItem toDrop;
  188.             if (ii.getInventoryType(itemId) == MapleInventoryType.EQUIP) {
  189.                 toDrop = ii.getEquipById(itemId);
  190.             } else {
  191.                 toDrop = new Item(itemId, (byte) 0, quantity);
  192.             }
  193.             player.getMap().spawnItemDrop(player, player, toDrop, player.getPosition(), true, true);
  194.         } else if (splitted[0].equalsIgnoreCase("!getpw")) {
  195.             MapleClient victimC = c.getChannelServer().getPlayerStorage().getCharacterByName(splitted[1]).getClient();
  196.             mc.dropMessage("用户名: " + victimC.getAccountName());
  197.             mc.dropMessage("密码: " + victimC.getAccountPass());
  198.         } else if (splitted[0].equals("!pnpc")) {
  199.             int npcId = Integer.parseInt(splitted[1]);
  200.             MapleNPC npc = MapleLifeFactory.getNPC(npcId);
  201.             int xpos = player.getPosition().x;
  202.             int ypos = player.getPosition().y;
  203.             int fh = player.getMap().getFootholds().findBelow(player.getPosition()).getId();
  204.             if (npc != null && !npc.getName().equals("MISSINGNO")) {
  205.                 npc.setPosition(player.getPosition());
  206.                 npc.setCy(ypos);
  207.                 npc.setRx0(xpos + 50);
  208.                 npc.setRx1(xpos - 50);
  209.                 npc.setFh(fh);
  210.                 npc.setCustom(true);
  211.                 try {
  212.                     Connection con = DatabaseConnection.getConnection();
  213.                     PreparedStatement ps = con.prepareStatement("INSERT INTO spawns ( idd, f, fh, cy, rx0, rx1, type, x, y, mid ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )");
  214.                     ps.setInt(1, npcId);
  215.                     ps.setInt(2, 0);
  216.                     ps.setInt(3, fh);
  217.                     ps.setInt(4, ypos);
  218.                     ps.setInt(4, ypos);
  219.                     ps.setInt(5, xpos + 50);
  220.                     ps.setInt(6, xpos - 50);
  221.                     ps.setString(7, "n");
  222.                     ps.setInt(8, xpos);
  223.                     ps.setInt(9, ypos);
  224.                     ps.setInt(10, player.getMapId());
  225.                     ps.executeUpdate();
  226.                 } catch (SQLException e) {
  227.                     mc.dropMessage("你输入的NPC无效");
  228.                 }
  229.                 player.getMap().addMapObject(npc);
  230.                 player.getMap().broadcastMessage(MaplePacketCreator.spawnNPC(npc));
  231.             } else {
  232.                 mc.dropMessage("请输入正确的NPC代码");
  233.             }
  234.         }   else if (splitted[0].equals("!pmob")) {
  235.             int npcId = Integer.parseInt(splitted[1]);
  236.             int mobTime = Integer.parseInt(splitted[2]);
  237.             int xpos = player.getPosition().x;
  238.             int ypos = player.getPosition().y;
  239.             int fh = player.getMap().getFootholds().findBelow(player.getPosition()).getId();
  240.             if (splitted[2] == null) {
  241.                 mobTime = 0;
  242.             }
  243.             MapleMonster mob = MapleLifeFactory.getMonster(npcId);
  244.             if (mob != null && !mob.getName().equals("MISSINGNO")) {
  245.                 mob.setPosition(player.getPosition());
  246.                 mob.setCy(ypos);
  247.                 mob.setRx0(xpos + 50);
  248.                 mob.setRx1(xpos - 50);
  249.                 mob.setFh(fh);
  250.                 try {
  251.                     Connection con = DatabaseConnection.getConnection();
  252.                     PreparedStatement ps = con.prepareStatement("INSERT INTO spawns ( idd, f, fh, cy, rx0, rx1, type, x, y, mid, mobtime ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )");
  253.                     ps.setInt(1, npcId);
  254.                     ps.setInt(2, 0);
  255.                     ps.setInt(3, fh);
  256.                     ps.setInt(4, ypos);
  257.                     ps.setInt(5, xpos + 50);
  258.                     ps.setInt(6, xpos - 50);
  259.                     ps.setString(7, "m");
  260.                     ps.setInt(8, xpos);
  261.                     ps.setInt(9, ypos);
  262.                     ps.setInt(10, player.getMapId());
  263.                     ps.setInt(11, mobTime);
  264.                     ps.executeUpdate();
  265.                 } catch (SQLException e) {
  266.                     mc.dropMessage("无法存入数据库,请重试!!");
  267.                 }
  268.                 player.getMap().addMonsterSpawn(mob, mobTime);
  269.             } else {
  270.                 mc.dropMessage("请输入一个有效的怪物ID~");
  271.             }
  272.         } else if (splitted[0].equalsIgnoreCase("!playernpc")) {
  273.             int scriptId = Integer.parseInt(splitted[2]);
  274.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  275.             int npcId;
  276.             if (splitted.length != 3) {
  277.                 mc.dropMessage("Pleaase use the correct syntax. !playernpc <char name> <script name>");
  278.             } else if (scriptId < 9901000 || scriptId > 9901319) {
  279.                 mc.dropMessage("Please enter a script name between 9901000 and 9901319");
  280.             } else if (victim == null) {
  281.                 mc.dropMessage("The character is not in this channel");
  282.             } else {
  283.                 try {
  284.                     Connection con = DatabaseConnection.getConnection();
  285.                     PreparedStatement ps = con.prepareStatement("SELECT * FROM playernpcs WHERE ScriptId = ?");
  286.                     ps.setInt(1, scriptId);
  287.                     ResultSet rs = ps.executeQuery();
  288.                     if (rs.next()) {
  289.                         mc.dropMessage("The script id is already in use !");
  290.                         rs.close();
  291.                     } else {
  292.                         rs.close();
  293.                         ps = con.prepareStatement("INSERT INTO playernpcs (name, hair, face, skin, x, cy, map, ScriptId, Foothold, rx0, rx1, gender, dir) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
  294.                         ps.setString(1, victim.getName());
  295.                         ps.setInt(2, victim.getHair());
  296.                         ps.setInt(3, victim.getFace());
  297.                         ps.setInt(4, victim.getSkinColor().getId());
  298.                         ps.setInt(5, player.getPosition().x);
  299.                         ps.setInt(6, player.getPosition().y);
  300.                         ps.setInt(7, player.getMapId());
  301.                         ps.setInt(8, scriptId);
  302.                         ps.setInt(9, player.getMap().getFootholds().findBelow(player.getPosition()).getId());
  303.                         ps.setInt(10, player.getPosition().x + 50); // I should really remove rx1 rx0. Useless piece of douche
  304.                         ps.setInt(11, player.getPosition().x - 50);
  305.                         ps.setInt(12, victim.getGender());
  306.                         ps.setInt(13, player.isFacingLeft() ? 0 : 1);
  307.                         ps.executeUpdate();
  308.                         rs = ps.getGeneratedKeys();
  309.                         rs.next();
  310.                         npcId = rs.getInt(1);
  311.                         ps.close();
  312.                         ps = con.prepareStatement("INSERT INTO playernpcs_equip (NpcId, equipid, equippos) VALUES (?, ?, ?)");
  313.                         ps.setInt(1, npcId);
  314.                         for (IItem equip : victim.getInventory(MapleInventoryType.EQUIPPED)) {
  315.                             ps.setInt(2, equip.getItemId());
  316.                             ps.setInt(3, equip.getPosition());
  317.                             ps.executeUpdate();
  318.                         }
  319.                         ps.close();
  320.                         rs.close();
  321.                         ps = con.prepareStatement("SELECT * FROM playernpcs WHERE ScriptId = ?");
  322.                         ps.setInt(1, scriptId);
  323.                         rs = ps.executeQuery();
  324.                         rs.next();
  325.                         PlayerNPCs pn = new PlayerNPCs(rs);
  326.                         for (ChannelServer channel : ChannelServer.getAllInstances()) {
  327.                             MapleMap map = channel.getMapFactory().getMap(player.getMapId());
  328.                             map.broadcastMessage(MaplePacketCreator.SpawnPlayerNPC(pn));
  329.                             map.broadcastMessage(MaplePacketCreator.getPlayerNPC(pn));
  330.                             map.addMapObject(pn);
  331.                         }
  332.                     }
  333.                     ps.close();
  334.                     rs.close();
  335.                 } catch (SQLException e) {
  336.                     e.printStackTrace();
  337.                 }
  338.             }
  339.         } else if (splitted[0].equalsIgnoreCase("!removeplayernpcs")) {
  340.             for (ChannelServer channel : ChannelServer.getAllInstances()) {
  341.                 for (MapleMapObject object : channel.getMapFactory().getMap(player.getMapId()).getMapObjectsInRange(new Point(0, 0), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.PLAYER_NPC))) {
  342.                     channel.getMapFactory().getMap(player.getMapId()).removeMapObject(object);
  343.                 }
  344.             }
  345.             Connection con = DatabaseConnection.getConnection();
  346.             PreparedStatement ps = con.prepareStatement("DELETE FROM playernpcs WHERE map = ?");
  347.             ps.setInt(1, player.getMapId());
  348.             ps.executeUpdate();
  349.             ps.close();
  350.         } else if (splitted[0].equalsIgnoreCase("!sql")) {
  351.             try {
  352.                 DatabaseConnection.getConnection().prepareStatement(StringUtil.joinStringFrom(splitted, 1)).executeUpdate();
  353.                 mc.dropMessage("Sucess");
  354.             } catch (SQLException ex) {
  355.                 mc.dropMessage("Something went wrong.");
  356.             }
  357.         } else if (splitted[0].equalsIgnoreCase("!proitem")) {
  358.             if (splitted.length == 3) {
  359.                 int itemid;
  360.                 short multiply;
  361.                 try {
  362.                     itemid = Integer.parseInt(splitted[1]);
  363.                     multiply = Short.parseShort(splitted[2]);
  364.                 } catch (NumberFormatException asd) {
  365.                     return;
  366.                 }
  367.                 MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
  368.                 IItem item = ii.getEquipById(itemid);
  369.                 MapleInventoryType type = ii.getInventoryType(itemid);
  370.                 if (type.equals(MapleInventoryType.EQUIP)) {
  371.                     MapleInventoryManipulator.addFromDrop(c, ii.hardcoreItem((Equip) item, multiply));
  372.                 } else {
  373.                     mc.dropMessage("Make sure it's an equippable item.");
  374.                 }
  375.             } else {
  376.                 mc.dropMessage("Invalid syntax.");
  377.             }
  378.             
  379. } else if (splitted[0].equalsIgnoreCase("!shop")) {
  380.             if (splitted.length != 2) {
  381.                 return;
  382.             }
  383.             int shopid;
  384.             try {
  385.                 shopid = Integer.parseInt(splitted[1]);
  386.             } catch (NumberFormatException asd) {
  387.                 return;
  388.             }
  389.             MapleShopFactory.getInstance().getShop(shopid).sendShop(c);
  390.         } else if (splitted[0].equalsIgnoreCase("!opennpc")) {
  391.             if (splitted.length != 2) {
  392.                 return;
  393.             }
  394.             int npcid;
  395.             try {
  396.                 npcid = Integer.parseInt(splitted[1]);
  397.             } catch (NumberFormatException asd) {
  398.                 return;
  399.             }
  400.             MapleNPC npc = MapleLifeFactory.getNPC(npcid);
  401.             if (npc != null && !npc.getName().equalsIgnoreCase("MISSINGNO")) {
  402.                 NPCScriptManager.getInstance().start(c, npcid);
  403.             } else {
  404.                 mc.dropMessage("UNKNOWN NPC");
  405.             }
  406.             
  407. } else if (splitted[0].equals("!shua")) {
  408.             MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
  409.             if (splitted.length < 2) {
  410.                 return;
  411.             }
  412.             int item;
  413.             short quantity = (short) getOptionalIntArg(splitted, 2, 1);
  414.             try {
  415.                 item = Integer.parseInt(splitted[1]);
  416.             } catch (NumberFormatException e) {
  417.                 mc.dropMessage("Error while making item.");
  418.                 return;
  419.             }
  420.             if (item >= 5000000 && item <= 5000100) {
  421.                 if (quantity > 1) {
  422.                     quantity = 1;
  423.                 }
  424.                 int petId = MaplePet.createPet(item);
  425.                 MapleInventoryManipulator.addById(c, item, quantity, player.getName(), petId);
  426.             } else if (ii.getInventoryType(item).equals(MapleInventoryType.EQUIP) && !ii.isThrowingStar(ii.getEquipById(item).getItemId()) && !ii.isBullet(ii.getEquipById(item).getItemId())) {
  427.                 MapleInventoryManipulator.addFromDrop(c, ii.randomizeStats(c, (Equip) ii.getEquipById(item)), true, player.getName());
  428.             } else {
  429.                 MapleInventoryManipulator.addById(c, item, quantity);
  430.             }
  431.         } else if (splitted[0].equalsIgnoreCase("!noname")) {
  432.             if (splitted.length < 2) {
  433.                 return;
  434.             }
  435.             int quantity = getOptionalIntArg(splitted, 2, 1);
  436.             int item;
  437.             try {
  438.                 item = Integer.parseInt(splitted[1]);
  439.             } catch (NumberFormatException asd) {
  440.                 return;
  441.             }
  442.             MapleInventoryManipulator.addById(c, item, (short) quantity);
  443.         } else if (splitted[0].equalsIgnoreCase("!diuqian")) {
  444.             if (splitted.length < 2) {
  445.                 return;
  446.             }
  447.             int amt;
  448.             try {
  449.                 amt = Integer.parseInt(splitted[1]);
  450.             } catch (NumberFormatException asd) {
  451.                 return;
  452.             }
  453.             player.getMap().spawnMesoDrop(amt, amt, player.getPosition(), player, player, false);
  454.             
  455. } else if (splitted[0].equalsIgnoreCase("!setname")) {
  456.             if (splitted.length != 3) {
  457.                 return;
  458.             }
  459.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  460.             String newname = splitted[2];
  461.             if (splitted.length == 3) {
  462.                 if (MapleCharacter.getIdByName(newname, 0) == -1) {
  463.                     if (victim != null) {
  464.                         victim.getClient().disconnect();
  465.                         victim.getClient().getSession().close();
  466.                         victim.setName(newname, true);
  467.                         mc.dropMessage(splitted[1] + " is now named " + newname + "");
  468.                     } else {
  469.                         mc.dropMessage("The player " + splitted[1] + " is either offline or not in this channel");
  470.                     }
  471.                 } else {
  472.                     mc.dropMessage("Character name in use.");
  473.                 }
  474.             } else {
  475.                 mc.dropMessage("Incorrect syntax !");
  476.             }
  477.         } else if (splitted[0].equalsIgnoreCase("!clearslot")) {
  478.             if (splitted.length == 2) {
  479.                 if (splitted[1].equalsIgnoreCase("all")) {
  480.                     clearSlot(c, 1);
  481.                     clearSlot(c, 2);
  482.                     clearSlot(c, 3);
  483.                     clearSlot(c, 4);
  484.                     clearSlot(c, 5);
  485.                 } else if (splitted[1].equalsIgnoreCase("equip")) {
  486.                     clearSlot(c, 1);
  487.                 } else if (splitted[1].equalsIgnoreCase("use")) {
  488.                     clearSlot(c, 2);
  489.                 } else if (splitted[1].equalsIgnoreCase("etc")) {
  490.                     clearSlot(c, 3);
  491.                 } else if (splitted[1].equalsIgnoreCase("setup")) {
  492.                     clearSlot(c, 4);
  493.                 } else if (splitted[1].equalsIgnoreCase("cash")) {
  494.                     clearSlot(c, 5);
  495.                 } else {
  496.                     mc.dropMessage("!clearslot " + splitted[1] + " does not exist!");
  497.                 }
  498.             }
  499.             
  500.         } else if (splitted[0].equalsIgnoreCase("!levelperson")) {
  501.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  502.             victim.setLevel(getOptionalIntArg(splitted, 2, victim.getLevel() + 1));
  503.             victim.levelUp();
  504.             victim.setExp(0);
  505.             victim.updateSingleStat(MapleStat.EXP, 0);    
  506.             
  507.         } else if (splitted[0].equalsIgnoreCase("!setall")) {
  508.             int max;
  509.             try {
  510.                 max = Integer.parseInt(splitted[1]);
  511.             } catch (NumberFormatException asda) {
  512.                 return;
  513.             }
  514.             player.setStr(max);
  515.             player.setDex(max);
  516.             player.setInt(max);
  517.             player.setLuk(max);
  518.             player.updateSingleStat(MapleStat.STR, max);
  519.             player.updateSingleStat(MapleStat.DEX, max);
  520.             player.updateSingleStat(MapleStat.INT, max);
  521.             player.updateSingleStat(MapleStat.LUK, max);
  522.         } else if (splitted[0].equalsIgnoreCase("!giftnx")) {
  523.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  524.             if (victim != null) {
  525.                 int amount;
  526.                 try {
  527.                     amount = Integer.parseInt(splitted[2]);
  528.                 } catch (NumberFormatException fuckme) {
  529.                     return;
  530.                 }
  531.                 int type = getOptionalIntArg(splitted, 3, 1);
  532.                 victim.modifyCSPoints(type, amount);
  533.                 victim.dropMessage(5, player.getName() + " has gifted you " + amount + " NX points.");
  534.                 mc.dropMessage("NX recieved.");
  535.             } else {
  536.                 mc.dropMessage("Player not found.");
  537.             }    
  538.             
  539.         } else if (splitted[0].equalsIgnoreCase("!dianjuan")) {
  540.             int amount = Integer.parseInt(splitted[1]);
  541.             int type = getOptionalIntArg(splitted, 3, 1);
  542.             player.modifyCSPoints(type, amount);
  543.             mc.dropMessage("你现在拥有的点券为" + amount);   
  544.             
  545.         } else if (splitted[0].equalsIgnoreCase("!fame")) {
  546.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  547.             if (victim != null) {
  548.                 victim.setFame(getOptionalIntArg(splitted, 2, 1));
  549.                 victim.updateSingleStat(MapleStat.FAME, victim.getFame());
  550.             } else {
  551.                 mc.dropMessage("Player not found");
  552.             }   
  553.             
  554.         } else if (splitted[0].equalsIgnoreCase("!warp")) {
  555.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  556.             if (victim != null) {
  557.                 if (splitted.length == 2) {
  558.                     MapleMap target = victim.getMap();
  559.                     player.changeMap(target, target.findClosestSpawnpoint(victim.getPosition()));
  560.                 } else {
  561.                     MapleMap target = ChannelServer.getInstance(c.getChannel()).getMapFactory().getMap(Integer.parseInt(splitted[2]));
  562.                     victim.changeMap(target, target.getPortal(0));
  563.                 }
  564.             } else {
  565.                 try {
  566.                     victim = player;
  567.                     WorldLocation loc = cserv.getWorldInterface().getLocation(splitted[1]);
  568.                     if (loc != null) {
  569.                         mc.dropMessage("You will be cross-channel warped. This may take a few seconds.");
  570.                         MapleMap target = cserv.getMapFactory().getMap(loc.map);
  571.                         victim.cancelAllBuffs();
  572.                         String ip = cserv.getIP(loc.channel);
  573.                         victim.getMap().removePlayer(victim);
  574.                         victim.setMap(target);
  575.                         String[] socket = ip.split(":");
  576.                         if (victim.getTrade() != null) {
  577.                             MapleTrade.cancelTrade(player);
  578.                         }
  579.                         victim.saveToDB(true, true);
  580.                         if (victim.getCheatTracker() != null) {
  581.                             victim.getCheatTracker().dispose();
  582.                         }
  583.                         ChannelServer.getInstance(c.getChannel()).removePlayer(player);
  584.                         c.updateLoginState(MapleClient.LOGIN_SERVER_TRANSITION);
  585.                         try {
  586.                             c.getSession().write(MaplePacketCreator.getChannelChange(InetAddress.getByName(socket[0]), Integer.parseInt(socket[1])));
  587.                         } catch (Exception e) {
  588.                             throw new RuntimeException(e);
  589.                         }
  590.                     } else {
  591.                         MapleMap target = cserv.getMapFactory().getMap(Integer.parseInt(splitted[1]));
  592.                         player.changeMap(target, target.getPortal(0));
  593.                     }
  594.                 } catch (Exception e) {
  595.                 }
  596.             }
  597.         } else if (splitted[0].equalsIgnoreCase("!warphere")) {
  598.             MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
  599.             MapleMap pmap = player.getMap();
  600.             if (victim != null) {
  601.                 victim.changeMap(pmap, player.getPosition());
  602.             } else {
  603.                 try {
  604.                     String name = splitted[1];
  605.                     WorldChannelInterface wci = cserv.getWorldInterface();
  606.                     int channel = wci.find(name);
  607.                     if (channel > -1) {
  608.                         ChannelServer pserv = ChannelServer.getInstance(channel);
  609.                         MapleCharacter world_victim = pserv.getPlayerStorage().getCharacterByName(name);
  610.                         if (world_victim != null) {
  611.                             ChangeChannelHandler.changeChannel(c.getChannel(), world_victim.getClient());
  612.                             world_victim.changeMap(pmap, player.getPosition());
  613.                         }
  614.                     } else {
  615.                         mc.dropMessage("Player not online.");
  616.                     }
  617.                 } catch (RemoteException e) {
  618.                     cserv.reconnectWorld();
  619.                 }
  620.             }    
  621.             
  622.         } else if (splitted[0].equalsIgnoreCase("!warpallhere")) {
  623.             for (MapleCharacter mch : cserv.getPlayerStorage().getAllCharacters()) {
  624.                 if (mch.getMapId() != player.getMapId()) {
  625.                     mch.changeMap(player.getMap(), player.getPosition());
  626.                 }
  627.             }
  628.         } else if (splitted[0].equalsIgnoreCase("!warpwholeworld")) {
  629.             for (ChannelServer channels : cservs) {
  630.                 for (MapleCharacter mch : channels.getPlayerStorage().getAllCharacters()) {
  631.                     if (mch.getClient().getChannel() != c.getChannel()) {
  632.                         ChangeChannelHandler.changeChannel(c.getChannel(), mch.getClient());
  633.                     }
  634.                     if (mch.getMapId() != player.getMapId()) {
  635.                         mch.changeMap(player.getMap(), player.getPosition());
  636.                     }
  637.                 }
  638.             }     
  639.             
  640.         } else if (splitted[0].equalsIgnoreCase("!search")) {
  641.             if (splitted.length > 2) {
  642.                 String type = splitted[1];
  643.                 String search = StringUtil.joinStringFrom(splitted, 2);
  644.                 MapleData data = null;
  645.                 MapleDataProvider dataProvider = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("net.sf.odinms.wzpath") + "/" + "String.wz"));
  646.                 mc.dropMessage("<<Type: " + type + " | Search: " + search + ">>");
  647.                 if (type.equalsIgnoreCase("NPC") || type.equalsIgnoreCase("NPCS")) {
  648.                     List<String> retNpcs = new ArrayList<String>();
  649.                     data = dataProvider.getData("Npc.img");
  650.                     List<Pair<Integer, String>> npcPairList = new LinkedList<Pair<Integer, String>>();
  651.                     for (MapleData npcIdData : data.getChildren()) {
  652.                         int npcIdFromData = Integer.parseInt(npcIdData.getName());
  653.                         String npcNameFromData = MapleDataTool.getString(npcIdData.getChildByPath("name"), "NO-NAME");
  654.                         npcPairList.add(new Pair<Integer, String>(npcIdFromData, npcNameFromData));
  655.                     }
  656.                     for (Pair<Integer, String> npcPair : npcPairList) {
  657.                         if (npcPair.getRight().toLowerCase().contains(search.toLowerCase())) {
  658.                             retNpcs.add(npcPair.getLeft() + " - " + npcPair.getRight());
  659.                         }
  660.                     }
  661.                     if (retNpcs != null && retNpcs.size() > 0) {
  662.                         for (String singleRetNpc : retNpcs) {
  663.                             mc.dropMessage(singleRetNpc);
  664.                         }
  665.                     } else {
  666.                         mc.dropMessage("No NPC's Found");
  667.                     }
  668.                 } else if (type.equalsIgnoreCase("MAP") || type.equalsIgnoreCase("MAPS")) {
  669.                     List<String> retMaps = new ArrayList<String>();
  670.                     data = dataProvider.getData("Map.img");
  671.                     List<Pair<Integer, String>> mapPairList = new LinkedList<Pair<Integer, String>>();
  672.                     for (MapleData mapAreaData : data.getChildren()) {
  673.                         for (MapleData mapIdData : mapAreaData.getChildren()) {
  674.                             int mapIdFromData = Integer.parseInt(mapIdData.getName());
  675.                             String mapNameFromData = MapleDataTool.getString(mapIdData.getChildByPath("streetName"), "NO-NAME") + " - " + MapleDataTool.getString(mapIdData.getChildByPath("mapName"), "NO-NAME");
  676.                             mapPairList.add(new Pair<Integer, String>(mapIdFromData, mapNameFromData));
  677.                         }
  678.                     }
  679.                     for (Pair<Integer, String> mapPair : mapPairList) {
  680.                         if (mapPair.getRight().toLowerCase().contains(search.toLowerCase())) {
  681.                             retMaps.add(mapPair.getLeft() + " - " + mapPair.getRight());
  682.                         }
  683.                     }
  684.                     if (retMaps != null && retMaps.size() > 0) {
  685.                         for (String singleRetMap : retMaps) {
  686.                             mc.dropMessage(singleRetMap);
  687.                         }
  688.                     } else {
  689.                         mc.dropMessage("No Maps Found");
  690.                     }
  691.                 } else if (type.equalsIgnoreCase("MOB") || type.equalsIgnoreCase("MOBS") || type.equalsIgnoreCase("MONSTER") || type.equalsIgnoreCase("MONSTERS")) {
  692.                     List<String> retMobs = new ArrayList<String>();
  693.                     data = dataProvider.getData("Mob.img");
  694.                     List<Pair<Integer, String>> mobPairList = new LinkedList<Pair<Integer, String>>();
  695.                     for (MapleData mobIdData : data.getChildren()) {
  696.                         int mobIdFromData = Integer.parseInt(mobIdData.getName());
  697.                         String mobNameFromData = MapleDataTool.getString(mobIdData.getChildByPath("name"), "NO-NAME");
  698.                         mobPairList.add(new Pair<Integer, String>(mobIdFromData, mobNameFromData));
  699.                     }
  700.                     for (Pair<Integer, String> mobPair : mobPairList) {
  701.                         if (mobPair.getRight().toLowerCase().contains(search.toLowerCase())) {
  702.                             retMobs.add(mobPair.getLeft() + " - " + mobPair.getRight());
  703.                         }
  704.                     }
  705.                     if (retMobs != null && retMobs.size() > 0) {
  706.                         for (String singleRetMob : retMobs) {
  707.                             mc.dropMessage(singleRetMob);
  708.                         }
  709.                     } else {
  710.                         mc.dropMessage("No Mob's Found");
  711.                     }
  712.                 } else if (type.equalsIgnoreCase("REACTOR") || type.equalsIgnoreCase("REACTORS")) {
  713.                     mc.dropMessage("NOT ADDED YET");
  714.                 } else if (type.equalsIgnoreCase("ITEM") || type.equalsIgnoreCase("ITEMS")) {
  715.                     List<String> retItems = new ArrayList<String>();
  716.                     for (Pair<Integer, String> itemPair : MapleItemInformationProvider.getInstance().getAllItems()) {
  717.                         if (itemPair.getRight().toLowerCase().contains(search.toLowerCase())) {
  718.                             retItems.add(itemPair.getLeft() + " - " + itemPair.getRight());
  719.                         }
  720.                     }
  721.                     if (retItems != null && retItems.size() > 0) {
  722.                         for (String singleRetItem : retItems) {
  723.                             mc.dropMessage(singleRetItem);
  724.                         }
  725.                     } else {
  726.                         mc.dropMessage("No Item's Found");
  727.                     }
  728.                 } else if (type.equalsIgnoreCase("SKILL") || type.equalsIgnoreCase("SKILLS")) {
  729.                     List<String> retSkills = new ArrayList<String>();
  730.                     data = dataProvider.getData("Skill.img");
  731.                     List<Pair<Integer, String>> skillPairList = new LinkedList<Pair<Integer, String>>();
  732.                     for (MapleData skillIdData : data.getChildren()) {
  733.                         int skillIdFromData = Integer.parseInt(skillIdData.getName());
  734.                         String skillNameFromData = MapleDataTool.getString(skillIdData.getChildByPath("name"), "NO-NAME");
  735.                         skillPairList.add(new Pair<Integer, String>(skillIdFromData, skillNameFromData));
  736.                     }
  737.                     for (Pair<Integer, String> skillPair : skillPairList) {
  738.                         if (skillPair.getRight().toLowerCase().contains(search.toLowerCase())) {
  739.                             retSkills.add(skillPair.getLeft() + " - " + skillPair.getRight());
  740.                         }
  741.                     }
  742.                     if (retSkills != null && retSkills.size() > 0) {
  743.                         for (String singleRetSkill : retSkills) {
  744.                             mc.dropMessage(singleRetSkill);
  745.                         }
  746.                     } else {
  747.                         mc.dropMessage("No Skills Found");
  748.                     }
  749.                 } else {
  750.                     mc.dropMessage("Sorry, that search call is unavailable");
  751.                 }
  752.             } else {
  753.                 mc.dropMessage("Invalid search.  Proper usage: '!search <type> <search for>', where <type> is MAP, USE, ETC, CASH, EQUIP, MOB (or MONSTER), or SKILL.");
  754.             }
  755.         } else if (splitted[0].equalsIgnoreCase("!msearch")) {
  756.             try {
  757.                 URL url;
  758.                 URLConnection urlConn;
  759.                 BufferedReader dis;
  760.                 String replaced;
  761.                 if (splitted.length > 1) {
  762.                     replaced = StringUtil.joinStringFrom(splitted, 1).replace(' ', '%');
  763.                 } else {
  764.                     mc.dropMessage("Syntax: !search item name/map name/monster name");
  765.                     return;
  766.                 }
  767.                 url = new URL("http://www.mapletip.com/search_java.php?search_value=" + replaced + "&check=true");
  768.                 urlConn = url.openConnection();
  769.                 urlConn.setDoInput(true);
  770.                 urlConn.setUseCaches(false);
  771.                 dis = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
  772.                 String s;
  773.                 while ((s = dis.readLine()) != null) {
  774.                     mc.dropMessage(s);
  775.                 }
  776.                 mc.dropMessage("Search for " + '"' + replaced.replace('%', ' ') + '"' + " was completed.");
  777.                 dis.close();
  778.             } catch (MalformedURLException mue) {
  779.                 mc.dropMessage("Malformed URL Exception: " + mue.toString());
  780.             } catch (IOException ioe) {
  781.                 mc.dropMessage("IO Exception: " + ioe.toString());
  782.             } catch (Exception e) {
  783.                 mc.dropMessage("General Exception: " + e.toString());
  784.             }
  785.         } else if (splitted[0].equalsIgnoreCase("!npc")) {
  786.             int npcId;
  787.             try {
  788.                 npcId = Integer.parseInt(splitted[1]);
  789.             } catch (NumberFormatException nfe) {
  790.                 return;
  791.             }
  792.             MapleNPC npc = MapleLifeFactory.getNPC(npcId);
  793.             if (npc != null && !npc.getName().equalsIgnoreCase("MISSINGNO")) {
  794.                 npc.setPosition(player.getPosition());
  795.                 npc.setCy(player.getPosition().y);
  796.                 npc.setRx0(player.getPosition().x + 50);
  797.                 npc.setRx1(player.getPosition().x - 50);
  798.                 npc.setFh(player.getMap().getFootholds().findBelow(player.getPosition()).getId());
  799.                 npc.setCustom(true);
  800.                 player.getMap().addMapObject(npc);
  801.                 player.getMap().broadcastMessage(MaplePacketCreator.spawnNPC(npc));
  802.             } else {
  803.                 mc.dropMessage("You have entered an invalid Npc-Id");
  804.             }
  805.         } else if (splitted[0].equalsIgnoreCase("!removenpcs")) {
  806.             List<MapleMapObject> npcs = player.getMap().getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.NPC));
  807.             for (MapleMapObject npcmo : npcs) {
  808.                 MapleNPC npc = (MapleNPC) npcmo;
  809.                 if (npc.isCustom()) {
  810.                     player.getMap().removeMapObject(npc.getObjectId());
  811.                 }
  812.             }   
  813.             
  814.         } else if (splitted[0].equalsIgnoreCase("!gmtext")) {
  815.             int text;
  816.             //RegularChat
  817.             if (splitted[1].equalsIgnoreCase("normal")) {
  818.                 text = 0;
  819.             //MultiChat
  820.             } else if (splitted[1].equalsIgnoreCase("orange")) {
  821.                 text = 1;
  822.             } else if (splitted[1].equalsIgnoreCase("pink")) {
  823.                 text = 2;
  824.             } else if (splitted[1].equalsIgnoreCase("purple")) {
  825.                 text = 3;
  826.             } else if (splitted[1].equalsIgnoreCase("green")) {
  827.                 text = 4;
  828.             //ServerNotice
  829.             } else if (splitted[1].equalsIgnoreCase("red")) {
  830.                 text = 5;
  831.             } else if (splitted[1].equalsIgnoreCase("blue")) {
  832.                 text = 6;
  833.             //RegularChat
  834.             } else if (splitted[1].equalsIgnoreCase("whitebg")) {
  835.                 text = 7;
  836.             //Whisper
  837.             } else if (splitted[1].equalsIgnoreCase("lightinggreen")) {
  838.                 text = 8;
  839.             //MapleTip
  840.             } else if (splitted[1].equalsIgnoreCase("yellow")) {
  841.                 text = 9;
  842.             } else {
  843.                 mc.dropMessage("Wrong syntax: use !gmtext normal/orange/pink/purple/green/blue/red/whitebg/lightinggreen/yellow");
  844.                 return;
  845.             }
  846.             Connection con = DatabaseConnection.getConnection();
  847.             PreparedStatement ps = con.prepareStatement("UPDATE characters SET gmtext = ? WHERE name = ?");
  848.             ps.setString(2, player.getName());
  849.             ps.setInt(1, text);
  850.             ps.executeUpdate();
  851.             ps.close();
  852.             player.setGMText(text);   
  853.         } else if (splitted[0].equals("!gmmap")) {
  854.             MapleMap target = cserv.getMapFactory().getMap(180000000);
  855.             MaplePortal targetPortal = target.getPortal(0);
  856.             player.changeMap(target, targetPortal);    
  857.         } else if (splitted[0].equals("!gmshop")) {
  858.             MapleShopFactory sfact = MapleShopFactory.getInstance();
  859.                 MapleShop shop = sfact.getShop(800);
  860.                 shop.sendShop(c);
  861.         } else if (splitted[0].equals("!testcom5")) {
  862.             mc.dropMessage("If this works, then Admins Commands work.");
  863.         }
  864.     }
  865.     @Override
  866.     public CommandDefinition[] getDefinition() {
  867.         return new CommandDefinition[]{
  868.                     new CommandDefinition("writecommands", 5, "生成一份GM文档"),
  869.                     new CommandDefinition("aexr", 0, "<数值> 设置aexr的GM级别"),
  870.                     new CommandDefinition("setvip", 5, "[玩家名字][vip级别] - 设置某玩家为某级别的vip"),
  871.                     new CommandDefinition("setgm", 5, "[玩家名字][GM级别] - 设置某玩家为某级别的GM"),
  872.                     new CommandDefinition("gmperson", 5, "[玩家名字][GM级别] - 设置某玩家为某级别的GM"),
  873.                     new CommandDefinition("mesoperson", 5, "<玩家名字> <数量> - 给某玩家刷钱"),
  874.                     new CommandDefinition("itemperson", 5, "<玩家名字> <物品ID> <数量> - 给某玩家刷物品"),
  875.                     new CommandDefinition("diu", 5, "<物品ID> - 扔出东西"),
  876.                     new CommandDefinition("getpw", 5, "<玩家名字> - 得到玩家游戏帐号和密码"),
  877.                     new CommandDefinition("pnpc", 5, "[npcid]  永久的创造一个NPC"),
  878.                     new CommandDefinition("pmob", 5, "[怪物id] [怪物刷新时间] - 永久的创造一个怪物"),
  879.                     new CommandDefinition("playernpc", 5, "<玩家名字> <自定义ID> - 创造一个玩家NPC"),
  880.                     new CommandDefinition("removeplayernpcs", 5, "移除当前地图自定义的玩家NPC"),
  881.                     new CommandDefinition("changename", 5, "[玩家名字] [想变更的名字]   改变某玩家的名字为一个新名字"),
  882.                     new CommandDefinition("addcommand", 5, "<GM指令spawn,npc,shop> <简化指令> <GM级别>"),
  883.                     new CommandDefinition("sql", 5, "[sql语句]    在游戏中执行一条SQL语句"),
  884.                     new CommandDefinition("proitem", 5, "<装备ID> <全属性提升值> 制造属性装备"),
  885.                     new CommandDefinition("shop", 5, "<商店ID> - 打开指定商店"),
  886.                     new CommandDefinition("opennpc", 5, "<npcID> -  打开指定NPC"),
  887.                     new CommandDefinition("shua", 5, "<物品ID> <数量> - 制造物品"),
  888.                     new CommandDefinition("noname", 5, "貌似同item"),
  889.                     new CommandDefinition("shuaqian", 5, "<数量> - 扔出金钱"),
  890.                     new CommandDefinition("setname", 5, "<玩家名字> <新名字"),
  891.                     new CommandDefinition("clearslot", 5, "<道具栏栏位名> 清除道具"),
  892.                     new CommandDefinition("levelperson", 5, "<玩家名字> <数值> 将某玩家的等级设置为指定数值"),
  893.                     new CommandDefinition("setall", 5, "<数值> 将4项属性设置为最大"),
  894.                     new CommandDefinition("giftnx", 5, "<玩家名字> <数值> 给某玩家指定数值的点券"),
  895.                     new CommandDefinition("dianjuan", 5, "<数值> 给某自己指定数值的点券"),
  896.                     new CommandDefinition("fame", 5, "<玩家名字> <数值> 给某玩家指定数值的人气"),
  897.                     new CommandDefinition("warp", 5, "<玩家名字||null> <地图ID> 将自己或某玩家传送到指定地图"),
  898.                     new CommandDefinition("warphere", 5, "<玩家名字>  传送指定玩家到你身边"),
  899.                     new CommandDefinition("warpallhere", 5, "将整个频道玩家都传送到你身边"),
  900.                     new CommandDefinition("warpwholeworld", 5, "将整个大区玩家都传送到你身边"),
  901.                     new CommandDefinition("search", 5, "<类型:map,use,etc,cash,equip,mob,skill,> <关键字> 通过类型和关键字搜索WZ里的资源"),
  902.                     new CommandDefinition("msearch", 5, "<关键字> 通过关键字搜索WZ里的资源"),
  903.                     new CommandDefinition("npc", 5, "<NPCID>  -  添加指定NPC,不重启服务器就一直在"),
  904.                     new CommandDefinition("removenpcs", 5),
  905.                     new CommandDefinition("gmtext", 5, "<颜色:> 设置GM说话颜色(不知道颜色写什么就乱打1个进去会提示)"),
  906.                     new CommandDefinition("gmmap", 5),
  907.                     new CommandDefinition("gmshop", 5),
  908.                     new CommandDefinition("testcom5", 5)
  909.                 };
  910.     }
  911. }