=.= some code about GM command
From L2J server, i did not change anything
----------------------------------------
if(text.startsWith("."))
{
String command = text.substring(1);
if(command.equals("help"))
{
NpcHtmlMessage adminCommands = new NpcHtmlMessage(5);
StringBuffer html1 = new StringBuffer("<html><title>AdminCommands</title>");
html1.append("<body>");
html1.append("<br><a action=\"bypass -h spawn_monster\">spawn monster</a>");
html1.append("<br><a action=\"bypass -h come_here\">force target to move here</a>");
html1.append("<br><a action=\"bypass -h attack_me\">force target to attack</a>");
html1.append("<br><a action=\"bypass -h stats\">show statistics</a>");
html1.append("</body></html>");
adminCommands.setHtml(html1.toString());
con.sendPacket(adminCommands);
** else
if(command.startsWith("teleport"))
{
StringTokenizer st = new StringTokenizer(command);
st.nextToken();
String x1 = st.nextToken();
int x = Integer.parseInt(x1);
String y1 = st.nextToken();
int y = Integer.parseInt(y1);
String z1 = st.nextToken();
int z = Integer.parseInt(z1);
CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), "teleporting to " + x + " " + y + " " + z);
con.sendPacket(cs);
TeleportToLocation tele = new TeleportToLocation(activeChar, x, y, z);
con.sendPacket(tele);
activeChar.setX(x);
activeChar.setY

;
activeChar.setZ(z);
** else
if(command.startsWith("buy"))
{
int listId = 0;
try
{
listId = Integer.parseInt(command.substring(3));
**
catch(NumberFormatException e) { **
net.sf.l2j.gameserver.model.L2BuyList list = TradeController.getInstance().getBuyList(listId);
if(list != null)
{
BuyList bl = new BuyList(list, activeChar.getAdena());
con.sendPacket(bl);
** else
{
System.out.println("no buylist with id:" + listId);
**
** else
if(command.equals("money"))
{
activeChar.addAdena(0x186a0);
ItemList il = new ItemList(activeChar, true);
con.sendPacket(il);
** else
if(command.equals("mob"))
{
net.sf.l2j.gameserver.templates.L2Npc goblin = NpcTable.getInstance().getTemplate(3);
L2NpcInstance mob = new L2NpcInstance(goblin);
mob.setObjectId(IdFactory.getInstance().getNextId());
mob.setX(activeChar.getX());
mob.setY(activeChar.getY());
mob.setZ(activeChar.getZ());
mob.setCurrentHp(80D);
mob.setMaxHp(198);
mob.setHeading(activeChar.getHeading());
mob.setUnknown1(1.0800000000000001D);
mob.setUnknown2(0.99836639999999999D);
NpcInfo ni = new NpcInfo(mob);
con.sendPacket(ni);
L2World.getInstance().storeObject(mob);
** else
if(command.startsWith("movehere"))
{
net.sf.l2j.gameserver.model.L2Object target1 = activeChar.getTarget();
if(target1 instanceof L2NpcInstance)
{
L2NpcInstance temp = (L2NpcInstance)target1;
temp.moveTo(activeChar.getX(), activeChar.getY(), activeChar.getZ(), 0);
**
** else
if(command.startsWith("sethere"))
{
net.sf.l2j.gameserver.model.L2Object target1 = activeChar.getTarget();
if(target1 instanceof L2NpcInstance)
{
L2NpcInstance temp = (L2NpcInstance)target1;
temp.setTo(activeChar.getX(), activeChar.getY(), activeChar.getZ(), activeChar.getHeading());
**
** else
if(command.startsWith("stopmove"))
{
net.sf.l2j.gameserver.model.L2Object target1 = activeChar.getTarget();
if(target1 instanceof L2NpcInstance)
{
L2NpcInstance temp = (L2NpcInstance)target1;
temp.stopMove();
**
** else
if(command.startsWith("stat"))
{
int val = Integer.parseInt(command.substring(4));
System.out.println("changing stat: " + val);
StatusUpdate su = new StatusUpdate(activeChar.getObjectId());
su.addAttribute(val, 234);
con.sendPacket(su);
** else
if(command.startsWith("exp"))
{
int val = Integer.parseInt(command.substring(4));
System.out.println("setting exp to: " + val);
activeChar.setExp(val);
UserInfo ui = new UserInfo(activeChar);
con.sendPacket(ui);
** else
if(command.startsWith("level"))
{
int val = Integer.parseInt(command.substring(6));
System.out.println("setting level to: " + val);
activeChar.setLevel(val);
UserInfo ui = new UserInfo(activeChar);
con.sendPacket(ui);
** else
if(command.startsWith("doorinfo"))
{
System.out.println("creating door ");
L2DoorInstance door = new L2DoorInstance();
door.setObjectId(0x48302222);
door.setX(activeChar.getX());
door.setY(activeChar.getY());
door.setZ(activeChar.getZ());
DoorInfo di = new DoorInfo(door);
con.sendPacket(di);
DoorStatusUpdate ds = new DoorStatusUpdate(door);
con.sendPacket(ds);
**
** else
{
CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
con.sendPacket(cs);
**