Noticias:

No tienes permiso para ver los enlaces. Para poder verlos Registrate o Conectate.

Menú Principal

Prime Shop System

Iniciado por Pandragon, Jul 27, 2025, 12:25 AM

Tema anterior - Siguiente tema

Pandragon









Credits -> https://gist.github.com/Pandragon/8e3c855447f394d8c4b1

### Eclipse Workspace Patch 1.0
#P L2J_Server_BETA
Index: java/com/l2jserver/gameserver/network/clientpackets/RequestBrBuyProduct.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/RequestBrBuyProduct.java    (revision 0)
+++ java/com/l2jserver/gameserver/network/clientpackets/RequestBrBuyProduct.java    (working copy)
@@ -0,0 +1,142 @@
+/*
+ * Copyright (C) 2004-2014 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.network.clientpackets;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.util.logging.Level;
+
+import com.l2jserver.Config;
+import com.l2jserver.L2DatabaseFactory;
+import com.l2jserver.gameserver.datatables.ItemMallData;
+import com.l2jserver.gameserver.datatables.ItemTable;
+import com.l2jserver.gameserver.model.ItemMallProduct;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.items.L2Item;
+import com.l2jserver.gameserver.network.serverpackets.ExBrBuyProduct;
+import com.l2jserver.gameserver.network.serverpackets.ExBrGamePoint;
+import com.l2jserver.gameserver.network.serverpackets.StatusUpdate;
+
+public class RequestBrBuyProduct extends L2GameClientPacket
+{
+    private static final String _C__D0_8B_REQUESTBRBUYPRODUCT = "[C] D0 8C RequestBrBuyProduct";
+    
+    private int _productId;
+    private int _count;
+    
+    @Override
+    protected void readImpl()
+    {
+        _productId = readD();
+        _count = readD();
+    }
+    
+    @Override
+    protected void runImpl()
+    {
+        final L2PcInstance player = getClient().getActiveChar();
+        if (player == null)
+        {
+            return;
+        }
+        
+        if ((_count > 99) || (_count < 0))
+        {
+            return;
+        }
+        
+        final ItemMallProduct product = ItemMallData.getInstance().getProduct(_productId);
+        if (product == null)
+        {
+            player.sendPacket(new ExBrBuyProduct(ExBrBuyProduct.RESULT_WRONG_PRODUCT));
+            return;
+        }
+        
+        final long totalPoints = product.getPrice() * _count;
+        if (totalPoints < 0)
+        {
+            player.sendPacket(new ExBrBuyProduct(ExBrBuyProduct.RESULT_WRONG_PRODUCT));
+            return;
+        }
+        
+        final long gamePointSize = Config.GAME_POINT_ITEM_ID == -1 ? player.getGamePoints() : player.getInventory().getInventoryItemCount(Config.GAME_POINT_ITEM_ID, -1);
+        if (totalPoints > gamePointSize)
+        {
+            player.sendPacket(new ExBrBuyProduct(ExBrBuyProduct.RESULT_NOT_ENOUGH_POINTS));
+            return;
+        }
+        
+        final L2Item item = ItemTable.getInstance().getTemplate(product.getItemId());
+        if (item == null)
+        {
+            player.sendPacket(new ExBrBuyProduct(ExBrBuyProduct.RESULT_WRONG_PRODUCT));
+            return;
+        }
+        
+        final int totalWeight = product.getItemWeight() * product.getItemCount() * _count;
+        int totalCount = 0;
+        totalCount += item.isStackable() ? 1 : product.getItemCount() * _count;
+        if (!player.getInventory().validateCapacity(totalCount) || !player.getInventory().validateWeight(totalWeight))
+        {
+            player.sendPacket(new ExBrBuyProduct(ExBrBuyProduct.RESULT_INVENTORY_FULL));
+            return;
+        }
+        
+        // Pay for Item
+        if (Config.GAME_POINT_ITEM_ID == -1)
+        {
+            player.setGamePoints(player.getGamePoints() - totalPoints);
+        }
+        else
+        {
+            player.getInventory().destroyItemByItemId("Buy Product" + _productId, Config.GAME_POINT_ITEM_ID, totalPoints, player, null);
+        }
+        
+        // Buy Item
+        player.getInventory().addItem("Buy Product" + _productId, product.getItemId(), product.getItemCount() * _count, player, null);
+        
+        final StatusUpdate su = new StatusUpdate(player.getObjectId());
+        su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
+        player.sendPacket(su);
+        
+        player.sendPacket(new ExBrGamePoint(player));
+        player.sendPacket(new ExBrBuyProduct(ExBrBuyProduct.RESULT_OK));
+        player.broadcastUserInfo();
+        
+        // Save transaction info at SQL table item_mall_transactions
+        try (Connection con = L2DatabaseFactory.getInstance().getConnection();
+            PreparedStatement statement = con.prepareStatement("INSERT INTO item_mall_transactions (charId, productId, quantity) values (?,?,?)"))
+        {
+            statement.setLong(1, player.getObjectId());
+            statement.setInt(2, product.getProductId());
+            statement.setLong(3, _count);
+            statement.executeUpdate();
+        }
+        catch (Exception e)
+        {
+            _log.log(Level.SEVERE, "Could not save Item Mall transaction: " + e.getMessage(), e);
+        }
+    }
+    
+    @Override
+    public String getType()
+    {
+        return _C__D0_8B_REQUESTBRBUYPRODUCT;
+    }
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/network/serverpackets/ExBrGamePoint.java
===================================================================
--- java/com/l2jserver/gameserver/network/serverpackets/ExBrGamePoint.java    (revision 0)
+++ java/com/l2jserver/gameserver/network/serverpackets/ExBrGamePoint.java    (working copy)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2004-2014 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.network.serverpackets;
+
+import com.l2jserver.Config;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+
+public class ExBrGamePoint extends L2GameServerPacket
+{
+    private final int _playerObj;
+    private long _points;
+    
+    public ExBrGamePoint(L2PcInstance player)
+    {
+        _playerObj = player.getObjectId();
+        
+        if (Config.GAME_POINT_ITEM_ID == -1)
+        {
+            _points = player.getGamePoints();
+        }
+        else
+        {
+            _points = player.getInventory().getInventoryItemCount(Config.GAME_POINT_ITEM_ID, -1);
+        }
+    }
+    
+    @Override
+    public void writeImpl()
+    {
+        writeC(0xFE);
+        writeH(0xD5);
+        writeD(_playerObj);
+        writeQ(_points);
+        writeD(0x00);
+    }
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/network/L2GamePacketHandler.java
===================================================================
--- java/com/l2jserver/gameserver/network/L2GamePacketHandler.java    (revision 6599)
+++ java/com/l2jserver/gameserver/network/L2GamePacketHandler.java    (working copy)
@@ -1116,19 +1116,19 @@
                                 msg = new RequestExOlympiadMatchListRefresh();
                                 break;
                             case 0x89:
-                                // RequestBRGamePoint
+                                msg = new RequestBrGamePoint();
                                 break;
                             case 0x8A:
-                                // RequestBRProductList
+                                msg = new RequestBrProductList();
                                 break;
                             case 0x8B:
-                                // RequestBRProductInfo
+                                msg = new RequestBrProductInfo();
                                 break;
                             case 0x8C:
-                                // RequestBRBuyProduct
+                                msg = new RequestBrBuyProduct();
                                 break;
                             case 0x8D:
-                                // RequestBRRecentProductList
+                                msg = new RequestBrRecentProductList();
                                 break;
                             case 0x8E:
                                 // BrMinigameLoadScores
Index: java/com/l2jserver/gameserver/network/clientpackets/RequestBrRecentProductList.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/RequestBrRecentProductList.java    (revision 0)
+++ java/com/l2jserver/gameserver/network/clientpackets/RequestBrRecentProductList.java    (working copy)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2004-2014 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.network.clientpackets;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.network.serverpackets.ExBrRecentProductList;
+
+/**
+ * @author Pandragon
+ */
+public class RequestBrRecentProductList extends L2GameClientPacket
+{
+    private static final String _C__D0_8D_BRRECENTPRODUCTLIST = "[C] D0:8D BrRecentProductList";
+    
+    @Override
+    protected void readImpl()
+    {
+    }
+    
+    @Override
+    protected void runImpl()
+    {
+        final L2PcInstance player = getClient().getActiveChar();
+        if (player == null)
+        {
+            return;
+        }
+        
+        player.sendPacket(new ExBrRecentProductList(player));
+    }
+    
+    @Override
+    public String getType()
+    {
+        return _C__D0_8D_BRRECENTPRODUCTLIST;
+    }
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/model/ItemMallProduct.java
===================================================================
--- java/com/l2jserver/gameserver/model/ItemMallProduct.java    (revision 0)
+++ java/com/l2jserver/gameserver/model/ItemMallProduct.java    (working copy)
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2004-2014 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model;
+
+import com.l2jserver.gameserver.datatables.ItemTable;
+import com.l2jserver.gameserver.model.items.L2Item;
+
+/**
+ * @author Pandragon
+ */
+public class ItemMallProduct
+{
+    private final int _productId;
+    private final int _category;
+    private final int _points;
+    private final int _item;
+    private final int _count;
+    
+    private final int _weight;
+    private final boolean _tradable;
+    
+    public ItemMallProduct(int productId, int category, int points, int item, int count)
+    {
+        _productId = productId;
+        _category = category;
+        _points = points;
+        _item = item;
+        _count = count;
+        
+        final L2Item itemTemplate = ItemTable.getInstance().getTemplate(item);
+        if (itemTemplate != null)
+        {
+            _weight = itemTemplate.getWeight();
+            _tradable = itemTemplate.isTradeable();
+        }
+        else
+        {
+            _weight = 0;
+            _tradable = true;
+        }
+    }
+    
+    public int getProductId()
+    {
+        return _productId;
+    }
+    
+    public int getCategory()
+    {
+        return _category;
+    }
+    
+    public int getPrice()
+    {
+        return _points;
+    }
+    
+    public int getItemId()
+    {
+        return _item;
+    }
+    
+    public int getItemCount()
+    {
+        return _count;
+    }
+    
+    public int getItemWeight()
+    {
+        return _weight;
+    }
+    
+    public boolean isTradable()
+    {
+        return _tradable;
+    }
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/network/serverpackets/ExBrRecentProductList.java
===================================================================
--- java/com/l2jserver/gameserver/network/serverpackets/ExBrRecentProductList.java    (revision 0)
+++ java/com/l2jserver/gameserver/network/serverpackets/ExBrRecentProductList.java    (working copy)
@@ -0,0 +1,92 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.network.serverpackets;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+
+import com.l2jserver.L2DatabaseFactory;
+import com.l2jserver.gameserver.datatables.ItemMallData;
+import com.l2jserver.gameserver.model.ItemMallProduct;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+ * @author Pandragon
+ */
+public class ExBrRecentProductList extends L2GameServerPacket
+{
+    private final List<ItemMallProduct> _itemList = new ArrayList<>();
+    
+    public ExBrRecentProductList(L2PcInstance player)
+    {
+        final int playerObj = player.getObjectId();
+        
+        try (Connection con = L2DatabaseFactory.getInstance().getConnection();
+            PreparedStatement statement = con.prepareStatement("SELECT productId FROM item_mall_transactions WHERE charId=? ORDER BY transactionTime DESC"))
+        {
+            statement.setInt(1, playerObj);
+            try (ResultSet rset = statement.executeQuery())
+            {
+                while (rset.next())
+                {
+                    final ItemMallProduct product = ItemMallData.getInstance().getProduct(rset.getInt("productId"));
+                    if ((product != null) && !_itemList.contains(product))
+                    {
+                        _itemList.add(product);
+                    }
+                }
+            }
+        }
+        catch (Exception e)
+        {
+            _log.log(Level.SEVERE, "Could not restore Item Mall transaction: " + e.getMessage(), e);
+        }
+    }
+    
+    @Override
+    protected void writeImpl()
+    {
+        if ((_itemList == null) || _itemList.isEmpty())
+        {
+            return;
+        }
+        
+        writeC(0xFE);
+        writeH(0xDC);
+        writeD(_itemList.size());
+        
+        for (ItemMallProduct product : _itemList)
+        {
+            writeD(product.getProductId());
+            writeH(product.getCategory());
+            writeD(product.getPrice());
+            writeD(0x00); // category
+            
+            writeD(0x00); // start sale
+            writeD(0x00); // end sale
+            writeC(0x00); // day week
+            writeC(0x00); // start hour
+            writeC(0x00); // start min
+            writeC(0x00); // end hour
+            writeC(0x00); // end min
+            writeD(0x00); // current stock
+            writeD(0x00); // max stock
+        }
+    }
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/GameServer.java
===================================================================
--- java/com/l2jserver/gameserver/GameServer.java    (revision 6599)
+++ java/com/l2jserver/gameserver/GameServer.java    (working copy)
@@ -65,6 +65,7 @@
 import com.l2jserver.gameserver.datatables.HitConditionBonus;
 import com.l2jserver.gameserver.datatables.InitialEquipmentData;
 import com.l2jserver.gameserver.datatables.InitialShortcutData;
+import com.l2jserver.gameserver.datatables.ItemMallData;
 import com.l2jserver.gameserver.datatables.ItemTable;
 import com.l2jserver.gameserver.datatables.KarmaData;
 import com.l2jserver.gameserver.datatables.ManorData;
@@ -240,6 +241,7 @@
         MerchantPriceConfigTable.getInstance().loadInstances();
         BuyListData.getInstance();
         MultisellData.getInstance();
+        ItemMallData.getInstance();
         RecipeData.getInstance();
         ArmorSetsData.getInstance();
         FishData.getInstance();
Index: dist/game/config/General.properties
===================================================================
--- dist/game/config/General.properties    (revision 6599)
+++ dist/game/config/General.properties    (working copy)
@@ -930,6 +930,17 @@
 AllowReportsFromSameClanMembers = False
 
 # ---------------------------------------------------------------------------
+# Item-Mall Settings
+# ---------------------------------------------------------------------------
+# Enable Item-Mall.
+# Default: False
+EnableItemMall = False
+
+# Item Id used by item mall.
+# Default: -1
+GamePointItemId = -1
+
+# ---------------------------------------------------------------------------
 # Developer Settings
 # ---------------------------------------------------------------------------
 # Do not touch these if you do not know what you are doing.
Index: java/com/l2jserver/gameserver/network/clientpackets/RequestBrProductInfo.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/RequestBrProductInfo.java    (revision 0)
+++ java/com/l2jserver/gameserver/network/clientpackets/RequestBrProductInfo.java    (working copy)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2004-2014 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.network.clientpackets;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.network.serverpackets.ExBrProductInfo;
+
+public class RequestBrProductInfo extends L2GameClientPacket
+{
+    private static final String _C__D0_8B_REQUESTBRPRODUCTINFO = "[C] D0:8B RequestBrProductInfo";
+    
+    private int _productId;
+    
+    @Override
+    protected void readImpl()
+    {
+        _productId = readD();
+    }
+    
+    @Override
+    protected void runImpl()
+    {
+        final L2PcInstance player = getClient().getActiveChar();
+        if (player == null)
+        {
+            return;
+        }
+        
+        player.sendPacket(new ExBrProductInfo(_productId));
+    }
+    
+    @Override
+    public String getType()
+    {
+        return _C__D0_8B_REQUESTBRPRODUCTINFO;
+    }
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/network/serverpackets/ExBrProductInfo.java
===================================================================
--- java/com/l2jserver/gameserver/network/serverpackets/ExBrProductInfo.java    (revision 0)
+++ java/com/l2jserver/gameserver/network/serverpackets/ExBrProductInfo.java    (working copy)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2004-2014 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.network.serverpackets;
+
+import com.l2jserver.gameserver.datatables.ItemMallData;
+import com.l2jserver.gameserver.model.ItemMallProduct;
+
+public class ExBrProductInfo extends L2GameServerPacket
+{
+    private final ItemMallProduct _product;
+    
+    public ExBrProductInfo(int id)
+    {
+        _product = ItemMallData.getInstance().getProduct(id);
+    }
+    
+    @Override
+    protected void writeImpl()
+    {
+        if (_product == null)
+        {
+            return;
+        }
+        
+        writeC(0xFE);
+        writeH(0xD7);
+        
+        writeD(_product.getProductId()); // product id
+        writeD(_product.getPrice()); // points
+        writeD(1); // components size
+        writeD(_product.getItemId()); // item id
+        writeD(_product.getItemCount()); // quality
+        writeD(_product.getItemWeight()); // weight
+        writeD(_product.isTradable() ? 1 : 0); // 0 - dont drop/trade
+    }
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java    (revision 6599)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
@@ -363,8 +363,8 @@
     
     // Character Character SQL String Definitions:
     private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,createDate) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
-    private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=? WHERE charId=?";
-    private static final String RESTORE_CHARACTER = "SELECT * FROM characters WHERE charId=?";
+    private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=?,game_points=? WHERE charId=?";
+    private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, title_color, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, newbie, nobless, power_grade, subpledge, lvl_joined_academy, apprentice, sponsor, clan_join_expiry_time, clan_create_expiry_time, death_penalty_level, bookmarkslot, vitality_points, createDate, language, game_points FROM characters WHERE charId=?";
     
     // Character Teleport Bookmark:
     private static final String INSERT_TP_BOOKMARK = "INSERT INTO character_tpbookmark (charId,Id,x,y,z,icon,tag,name) values (?,?,?,?,?,?,?,?)";
@@ -817,6 +817,9 @@
     private double _mpUpdateDecCheck = .0;
     private double _mpUpdateInterval = .0;
     
+    // Item Mall
+    private long _gamePoints;
+    
     /** Char Coords from Client */
     private int _clientX;
     private int _clientY;
@@ -7126,6 +7129,9 @@
                     // Language
                     player.setLang(rset.getString("language"));
                     
+                    // Item Mall
+                    player.setGamePoints(rset.getLong("game_points"));
+                    
                     // Retrieve the name and ID of the other characters assigned to this account.
                     try (PreparedStatement stmt = con.prepareStatement("SELECT charId, char_name FROM characters WHERE account_name=? AND charId<>?"))
                     {
@@ -7566,7 +7572,8 @@
             statement.setInt(47, getBookMarkSlot());
             statement.setInt(48, getVitalityPoints());
             statement.setString(49, getLang());
-            statement.setInt(50, getObjectId());
+            statement.setLong(50, getGamePoints());
+            statement.setInt(51, getObjectId());
             
             statement.execute();
         }
@@ -14203,6 +14210,16 @@
         return _notMoveUntil;
     }
     
+    public long getGamePoints()
+    {
+        return _gamePoints;
+    }
+    
+    public void setGamePoints(long gamePoints)
+    {
+        _gamePoints = gamePoints;
+    }
+    
     public void updateNotMoveUntil()
     {
         _notMoveUntil = System.currentTimeMillis() + Config.PLAYER_MOVEMENT_BLOCK_TIME;
Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java    (revision 6599)
+++ java/com/l2jserver/Config.java    (working copy)
@@ -659,6 +659,8 @@
     public static String[] BOTREPORT_RESETPOINT_HOUR;
     public static long BOTREPORT_REPORT_DELAY;
     public static boolean BOTREPORT_ALLOW_REPORTS_FROM_SAME_CLAN_MEMBERS;
+    public static boolean ENABLE_ITEM_MALL;
+    public static int GAME_POINT_ITEM_ID;
     
     // --------------------------------------------------
     // FloodProtector Settings
@@ -2012,6 +2014,9 @@
             BOTREPORT_REPORT_DELAY = General.getInt("BotReportDelay", 30) * 60000;
             BOTREPORT_ALLOW_REPORTS_FROM_SAME_CLAN_MEMBERS = General.getBoolean("AllowReportsFromSameClanMembers", false);
             
+            ENABLE_ITEM_MALL = General.getBoolean("EnableItemMall", false);
+            GAME_POINT_ITEM_ID = General.getInt("GamePointItemId", -1);
+            
             // Load FloodProtector L2Properties file
             final PropertiesParser FloodProtectors = new PropertiesParser(FLOOD_PROTECTOR_FILE);
             
Index: java/com/l2jserver/gameserver/network/clientpackets/RequestBrProductList.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/RequestBrProductList.java    (revision 0)
+++ java/com/l2jserver/gameserver/network/clientpackets/RequestBrProductList.java    (working copy)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2004-2014 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.network.clientpackets;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.network.serverpackets.ExBrProductList;
+
+public class RequestBrProductList extends L2GameClientPacket
+{
+    private static final String _C__D0_8A_REQUESTBRPRODUCTLIST = "[C] D0:8A RequestBrProductList";
+    
+    @Override
+    protected void readImpl()
+    {
+    }
+    
+    @Override
+    protected void runImpl()
+    {
+        final L2PcInstance player = getClient().getActiveChar();
+        if (player == null)
+        {
+            return;
+        }
+        
+        player.sendPacket(new ExBrProductList());
+    }
+    
+    @Override
+    public String getType()
+    {
+        return _C__D0_8A_REQUESTBRPRODUCTLIST;
+    }
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/network/serverpackets/ExBrProductList.java
===================================================================
--- java/com/l2jserver/gameserver/network/serverpackets/ExBrProductList.java    (revision 0)
+++ java/com/l2jserver/gameserver/network/serverpackets/ExBrProductList.java    (working copy)
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2004-2014 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.network.serverpackets;
+
+import java.util.Collection;
+
+import com.l2jserver.gameserver.datatables.ItemMallData;
+import com.l2jserver.gameserver.model.ItemMallProduct;
+
+/**
+ * @author Pandragon
+ */
+public class ExBrProductList extends L2GameServerPacket
+{
+    private final Collection<ItemMallProduct> _itemList = ItemMallData.getInstance().getAllItems();
+    
+    @Override
+    protected void writeImpl()
+    {
+        writeC(0xFE);
+        writeH(0xD6);
+        writeD(_itemList.size());
+        
+        for (ItemMallProduct product : _itemList)
+        {
+            final int category = product.getCategory();
+            
+            writeD(product.getProductId()); // product id
+            writeH(category); // category id
+            writeD(product.getPrice()); // points
+            
+            switch (category)
+            {
+                case 6:
+                {
+                    writeD(0x01); // event
+                    break;
+                }
+                case 7:
+                {
+                    writeD(0x02); // best
+                    break;
+                }
+                case 8:
+                {
+                    writeD(0x03); // event & best
+                    break;
+                }
+                default:
+                {
+                    writeD(0x00); // normal
+                    break;
+                }
+            }
+            
+            writeD(0x00); // start sale
+            writeD(0x00); // end sale
+            writeC(0x00); // day week
+            writeC(0x00); // start hour
+            writeC(0x00); // start min
+            writeC(0x00); // end hour
+            writeC(0x00); // end min
+            writeD(0x00); // current stock
+            writeD(0x00); // max stock
+        }
+    }
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/datatables/ItemMallData.java
===================================================================
--- java/com/l2jserver/gameserver/datatables/ItemMallData.java    (revision 0)
+++ java/com/l2jserver/gameserver/datatables/ItemMallData.java    (working copy)
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2004-2014 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.datatables;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.logging.Logger;
+
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+import com.l2jserver.Config;
+import com.l2jserver.gameserver.engines.DocumentParser;
+import com.l2jserver.gameserver.model.ItemMallProduct;
+import com.l2jserver.gameserver.model.StatsSet;
+
+/**
+ * @author Pandragon
+ */
+public class ItemMallData extends DocumentParser
+{
+    private static final Logger _log = Logger.getLogger(ItemMallData.class.getName());
+    private final Map<Integer, ItemMallProduct> _mallList = new HashMap<>();
+    
+    protected ItemMallData()
+    {
+        if (!Config.ENABLE_ITEM_MALL)
+        {
+            return;
+        }
+        
+        load();
+    }
+    
+    @Override
+    public void load()
+    {
+        _mallList.clear();
+        parseDatapackFile("data/ItemMall.xml");
+    }
+    
+    @Override
+    protected void parseDocument()
+    {
+        NamedNodeMap attrs;
+        Node att;
+        StatsSet set = null;
+        for (Node a = getCurrentDocument().getFirstChild(); a != null; a = a.getNextSibling())
+        {
+            if ("list".equalsIgnoreCase(a.getNodeName()))
+            {
+                for (Node b = a.getFirstChild(); b != null; b = b.getNextSibling())
+                {
+                    if ("product".equalsIgnoreCase(b.getNodeName()))
+                    {
+                        attrs = b.getAttributes();
+                        set = new StatsSet();
+                        for (int i = 0; i < attrs.getLength(); i++)
+                        {
+                            att = attrs.item(i);
+                            set.set(att.getNodeName(), att.getNodeValue());
+                        }
+                        final ItemMallProduct product = new ItemMallProduct(set.getInt("id"), set.getInt("category"), set.getInt("points"), set.getInt("item"), set.getInt("count"));
+                        _mallList.put(set.getInt("id"), product);
+                    }
+                }
+            }
+        }
+        
+        _log.info(getClass().getSimpleName() + ": Loaded " + _mallList.size() + " products.");
+    }
+    
+    public Collection<ItemMallProduct> getAllItems()
+    {
+        return _mallList.values();
+    }
+    
+    public ItemMallProduct getProduct(int id)
+    {
+        return _mallList.get(id);
+    }
+    
+    public static ItemMallData getInstance()
+    {
+        return SingletonHolder._instance;
+    }
+    
+    private static class SingletonHolder
+    {
+        protected static final ItemMallData _instance = new ItemMallData();
+    }
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/network/clientpackets/RequestBrGamePoint.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/RequestBrGamePoint.java    (revision 0)
+++ java/com/l2jserver/gameserver/network/clientpackets/RequestBrGamePoint.java    (working copy)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2004-2014 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.network.clientpackets;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.network.serverpackets.ExBrGamePoint;
+
+public class RequestBrGamePoint extends L2GameClientPacket
+{
+    private static final String _C__D0_89_REQUESTBRGAMEPOINT = "[C] D0:89 RequestBrGamePoint";
+    
+    @Override
+    protected void readImpl()
+    {
+    }
+    
+    @Override
+    protected void runImpl()
+    {
+        final L2PcInstance player = getClient().getActiveChar();
+        if (player == null)
+        {
+            return;
+        }
+        player.sendPacket(new ExBrGamePoint(player));
+    }
+    
+    @Override
+    public String getType()
+    {
+        return _C__D0_89_REQUESTBRGAMEPOINT;
+    }
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/network/serverpackets/ExBrBuyProduct.java
===================================================================
--- java/com/l2jserver/gameserver/network/serverpackets/ExBrBuyProduct.java    (revision 0)
+++ java/com/l2jserver/gameserver/network/serverpackets/ExBrBuyProduct.java    (working copy)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2004-2014 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.network.serverpackets;
+
+public class ExBrBuyProduct extends L2GameServerPacket
+{
+    public static final int RESULT_OK = 1; // ok
+    public static final int RESULT_NOT_ENOUGH_POINTS = -1;
+    public static final int RESULT_WRONG_PRODUCT = -2; // also -5
+    public static final int RESULT_INVENTORY_FULL = -4;
+    public static final int RESULT_SALE_PERIOD_ENDED = -7; // also -8
+    public static final int RESULT_WRONG_USER_STATE = -9; // also -11
+    public static final int RESULT_WRONG_PRODUCT_ITEM = -10;
+    
+    private final int _result;
+    
+    public ExBrBuyProduct(int result)
+    {
+        _result = result;
+    }
+    
+    @Override
+    protected void writeImpl()
+    {
+        writeC(0xFE);
+        writeH(0xD8);
+        writeD(_result);
+    }
+}
\ No newline at end of file
#P L2J_DataPack_BETA
Index: dist/game/data/ItemMall.xml
===================================================================
--- dist/game/data/ItemMall.xml    (revision 0)
+++ dist/game/data/ItemMall.xml    (working copy)
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/ItemMall.xsd">
+    <!--
+    category = Enchant       1
+    category = Supplies      2
+    category = Decorating    3
+    category = Package       4
+    category = Others        5
+    category = Event         6
+    category = Best          7
+    category = Event & Best  8
+    -->
+    <product id="1050021" category="2" points="3" item="22025" count="1" /> <!-- Powerful Healing Potion -->
+    <product id="1050022" category="2" points="1" item="22026" count="1" /> <!-- High-grade Healing Potion -->
+    <product id="1080001" category="2" points="200" item="22000" count="1" /> <!-- Small fortuna box -->
+    <product id="1080002" category="2" points="270" item="22001" count="1" /> <!-- Middle fortuna box -->
+    <product id="1080003" category="2" points="405" item="22002" count="1" /> <!-- Large fortuna box -->
+    <product id="1080004" category="2" points="81" item="22003" count="1" /> <!-- Small fortuna cube -->
+    <product id="1080005" category="2" points="216" item="22004" count="1" /> <!-- Middle fortuna cube -->
+    <product id="1080006" category="2" points="324" item="22005" count="1" /> <!-- Large fortuna cube -->
+    <product id="1080009" category="2" points="4" item="22027" count="1" /> <!-- Secret medicine of Will - D grade -->
+    <product id="1080010" category="2" points="13" item="22028" count="1" /> <!-- Secret medicine of Will - C grade -->
+    <product id="1080011" category="2" points="22" item="22029" count="1" /> <!-- Secret medicine of Will - B grade -->
+    <product id="1080012" category="2" points="34" item="22030" count="1" /> <!-- Secret medicine of Will - A grade -->
+    <product id="1080013" category="2" points="49" item="22031" count="1" /> <!-- Secret medicine of Will - S grade -->
+    <product id="1080014" category="2" points="10" item="22032" count="1" /> <!-- Secret medicine of Life - D grade -->
+    <product id="1080015" category="2" points="30" item="22033" count="1" /> <!-- Secret medicine of Life - C grade -->
+    <product id="1080016" category="2" points="54" item="22034" count="1" /> <!-- Secret medicine of Life - B grade -->
+    <product id="1080017" category="2" points="85" item="22035" count="1" /> <!-- Secret medicine of Life - A grade -->
+    <product id="1080018" category="2" points="122" item="22036" count="1" /> <!-- Secret medicine of Life - S grade -->
+    <product id="1080019" category="2" points="4" item="22037" count="1" /> <!-- Potion of Will -->
+    <product id="1080021" category="5" points="4" item="22039" count="1" /> <!-- Wind Walk Scroll -->
+    <product id="1080022" category="2" points="8" item="22040" count="1" /> <!-- Haste Scroll -->
+    <product id="1080023" category="2" points="4" item="22041" count="1" /> <!-- Might Scroll -->
+    <product id="1080024" category="2" points="4" item="22042" count="1" /> <!-- Shield Scroll -->
+    <product id="1080025" category="2" points="8" item="22043" count="1" /> <!-- Death Whisper Scroll -->
+    <product id="1080026" category="2" points="8" item="22044" count="1" /> <!-- Guidance Scroll -->
+    <product id="1080027" category="2" points="8" item="22045" count="1" /> <!-- Empower Scroll -->
+    <product id="1080028" category="2" points="8" item="22046" count="1" /> <!-- Grater Acumen Scroll -->
+    <product id="1080029" category="2" points="8" item="22047" count="1" /> <!-- Vampiric Rage Scroll -->
+    <product id="1080030" category="2" points="8" item="22048" count="1" /> <!-- Bless the Body Scroll -->
+    <product id="1080031" category="2" points="8" item="22049" count="1" /> <!-- Berserker Spirit Scroll -->
+    <product id="1080032" category="2" points="4" item="22050" count="1" /> <!-- Magic Barrier Scroll -->
+    <product id="1080033" category="2" points="8" item="22060" count="1" /> <!-- Rune of SP - 336 Hour Expiration Period -->
+    <product id="1080034" category="2" points="8" item="22061" count="1" /> <!-- Rune of SP - 720 Hour Expiration Period -->
+    <product id="1080035" category="2" points="8" item="22062" count="1" /> <!-- Crystal form Rune - 24 Hour Expiration Period -->
+    <product id="1080048" category="1" points="68" item="22066" count="1" /> <!-- Rune of Feather - 24 Hour Expiration Period -->
+    <product id="1080049" category="4" points="52" item="22087" count="1" /> <!-- A Scroll Bundle of Fighter -->
+    <product id="1080050" category="4" points="59" item="22088" count="1" /> <!-- A Scroll Bundle of Mage -->
+    <product id="1080051" category="4" points="21" item="22089" count="1" /> <!-- Bone Quiver -->
+    <product id="1080052" category="4" points="34" item="22090" count="1" /> <!-- Steel Quiver -->
+    <product id="1080053" category="4" points="48" item="22091" count="1" /> <!-- Silver Quiver -->
+    <product id="1080054" category="4" points="54" item="22092" count="1" /> <!-- Mithril Quiver -->
+    <product id="1080055" category="4" points="68" item="22093" count="1" /> <!-- Quiver of Light -->
+    <product id="1080056" category="4" points="21" item="22149" count="1" /> <!-- Bone Bolt Container -->
+    <product id="1080057" category="4" points="34" item="22150" count="1" /> <!-- Steel Bolt Container -->
+    <product id="1080058" category="4" points="48" item="22151" count="1" /> <!-- Silver Bolt Container -->
+    <product id="1080059" category="4" points="54" item="22152" count="1" /> <!-- Mithril Bolt Container -->
+    <product id="1080060" category="4" points="68" item="22153" count="1" /> <!-- Bolt Container of Light -->
+    <product id="1080061" category="4" points="31" item="22094" count="1" /> <!-- Blessed Spiritshot Pack - D grade -->
+    <product id="1080062" category="4" points="61" item="22095" count="1" /> <!-- Blessed Spiritshot Pack - C grade -->
+    <product id="1080063" category="4" points="166" item="22096" count="1" /> <!-- Blessed Spiritshot Pack - B grade -->
+    <product id="1080064" category="4" points="196" item="22097" count="1" /> <!-- Blessed Spiritshot Pack - A grade -->
+    <product id="1080065" category="4" points="237" item="22098" count="1" /> <!-- Blessed Spiritshot Pack - S grade -->
+    <product id="1080066" category="4" points="12" item="22099" count="1" /> <!-- Spiritshot Pack - D grade -->
+    <product id="1080067" category="4" points="24" item="22100" count="1" /> <!-- Spiritshot Pack - C grade -->
+    <product id="1080068" category="4" points="68" item="22101" count="1" /> <!-- Spiritshot Pack - B grade -->
+    <product id="1080069" category="4" points="81" item="22102" count="1" /> <!-- Spiritshot Pack - A grade -->
+    <product id="1080070" category="4" points="102" item="22103" count="1" /> <!-- Spiritshot Pack - S grade -->
+    <product id="1080071" category="4" points="8" item="22104" count="1" /> <!-- Soulshot Pack - D grade -->
+    <product id="1080072" category="4" points="10" item="22105" count="1" /> <!-- Soulshot Pack - C grade -->
+    <product id="1080073" category="4" points="34" item="22106" count="1" /> <!-- Soulshot Pack - B grade -->
+    <product id="1080074" category="4" points="54" item="22107" count="1" /> <!-- Soulshot Pack - A grade -->
+    <product id="1080075" category="4" points="68" item="22108" count="1" /> <!-- Soulshot Pack - S grade -->
+    <product id="1080076" category="4" points="61" item="22109" count="1" /> <!-- Blessed Spiritshot Large Pack - D grade -->
+    <product id="1080077" category="4" points="122" item="22110" count="1" /> <!-- Blessed Spiritshot Large Pack - C grade -->
+    <product id="1080078" category="4" points="331" item="22111" count="1" /> <!-- Blessed Spiritshot Large Pack - B grade -->
+    <product id="1080079" category="4" points="392" item="22112" count="1" /> <!-- Blessed Spiritshot Large Pack - A grade -->
+    <product id="1080080" category="4" points="473" item="22113" count="1" /> <!-- Blessed Spiritshot Large Pack - S grade -->
+    <product id="1080081" category="4" points="24" item="22114" count="1" /> <!-- Spiritshot Large Pack - D grade -->
+    <product id="1080082" category="4" points="48" item="22115" count="1" /> <!-- Spiritshot Large Pack - C grade -->
+    <product id="1080083" category="4" points="135" item="22116" count="1" /> <!-- Spiritshot Large Pack - B grade -->
+    <product id="1080084" category="4" points="162" item="22117" count="1" /> <!-- Spiritshot Large Pack - A grade -->
+    <product id="1080085" category="4" points="203" item="22118" count="1" /> <!-- Spiritshot Large Pack - S grade -->
+    <product id="1080086" category="4" points="14" item="22119" count="1" /> <!-- Soulshot Large Pack - D grade -->
+    <product id="1080087" category="4" points="21" item="22120" count="1" /> <!-- Soulshot Large Pack - C grade -->
+    <product id="1080088" category="4" points="68" item="22121" count="1" /> <!-- Soulshot Large Pack - B grade -->
+    <product id="1080089" category="4" points="108" item="22122" count="1" /> <!-- Soulshot Large Pack - A grade -->
+    <product id="1080090" category="4" points="135" item="22123" count="1" /> <!-- Soulshot Large Pack - S grade -->
+    <product id="1080091" category="3" points="338" item="22124" count="1" /> <!-- Wrapped daisy hairpin -->
+    <product id="1080092" category="3" points="338" item="22125" count="1" /> <!-- Wrapped forget-me-not hairpin -->
+    <product id="1080093" category="3" points="338" item="22126" count="1" /> <!-- Wrapped outlaws eyepatch -->
+    <product id="1080094" category="3" points="338" item="22127" count="1" /> <!-- Wrapped pirates eyepatch -->
+    <product id="1080095" category="3" points="338" item="22128" count="1" /> <!-- Wrapped Monocle -->
+    <product id="1080096" category="3" points="338" item="22129" count="1" /> <!-- Wrapped Red Mask of Victory -->
+    <product id="1080097" category="3" points="338" item="22130" count="1" /> <!-- Wrapped Red Horn of Victory -->
+    <product id="1080098" category="3" points="338" item="22131" count="1" /> <!-- Wrapped Party Mask -->
+    <product id="1080099" category="3" points="338" item="22132" count="1" /> <!-- Wrapped Red Party Mask -->
+    <product id="1080100" category="3" points="338" item="22133" count="1" /> <!-- Wrapped Cat Ear -->
+    <product id="1080101" category="3" points="338" item="22134" count="1" /> <!-- Wrapped Noblewomans Hairpin -->
+    <product id="1080102" category="3" points="338" item="22135" count="1" /> <!-- Wrapped Raccoon Ear -->
+    <product id="1080103" category="3" points="338" item="22136" count="1" /> <!-- Wrapped Rabbit Ear -->
+    <product id="1080104" category="3" points="338" item="22137" count="1" /> <!-- Wrapped Little Angels Wings -->
+    <product id="1080105" category="3" points="338" item="22138" count="1" /> <!-- Wrapped Fairys Tentacle -->
+    <product id="1080106" category="3" points="338" item="22139" count="1" /> <!-- Wrapped Dandys Chapeau -->
+    <product id="1080107" category="3" points="338" item="22140" count="1" /> <!-- Wrapped Artisans Goggles -->
+    <product id="1080112" category="1" points="33" item="20335" count="1" /> <!-- Rune of Experience: 30% - 5 hour limited time -->
+    <product id="1080113" category="1" points="54" item="20336" count="1" /> <!-- Rune of Exp. Points 50% - 5 Hour Expiration Period -->
+    <product id="1080114" category="1" points="52" item="20337" count="1" /> <!-- Rune of Exp. Points 30% - 10 Hour Expiration Period -->
+    <product id="1080115" category="1" points="87" item="20338" count="1" /> <!-- Rune of Exp. Points 50% - 10 Hour Expiration Period -->
+    <product id="1080116" category="1" points="697" item="20339" count="1" /> <!-- Rune of Exp. Points 30% - 7 Day Expiration Period -->
+    <product id="1080117" category="1" points="1161" item="20340" count="1" /> <!-- Rune of Exp. Points 50% - 7 Day Expiration Period -->
+    <product id="1080118" category="1" points="17" item="20341" count="1" /> <!-- Rune of SP 30% - 5 Hour Expiration Period -->
+    <product id="1080119" category="1" points="27" item="20342" count="1" /> <!-- Rune of SP 50% - 5 Hour Expiration Period -->
+    <product id="1080120" category="1" points="26" item="20343" count="1" /> <!-- Rune of SP 30% - 10 Hour Expiration Period -->
+    <product id="1080121" category="1" points="44" item="20344" count="1" /> <!-- Rune of SP 50% - 10 Hour Expiration Period -->
+    <product id="1080122" category="1" points="349" item="20345" count="1" /> <!-- Rune of SP 30% - 7 Day Expiration Period -->
+    <product id="1080123" category="1" points="581" item="20346" count="1" /> <!-- Rune of SP 50% - 7 Day Expiration Period -->
+    <product id="1080124" category="1" points="33" item="20347" count="1" /> <!-- Rune of Crystal level 3 - 5 Hour Expiration Period -->
+    <product id="1080125" category="1" points="54" item="20348" count="1" /> <!-- Rune of Crystal level 5 - 5 Hour Expiration Period -->
+    <product id="1080126" category="1" points="52" item="20349" count="1" /> <!-- Rune of Crystal level 3 - 10 Hour Expiration Period -->
+    <product id="1080127" category="1" points="87" item="20350" count="1" /> <!-- Rune of Crystal level 5 - 10 Hour Expiration Period -->
+    <product id="1080128" category="1" points="697" item="20351" count="1" /> <!-- Rune of Crystal level 3 - 7 Day Expiration Period -->
+    <product id="1080129" category="1" points="1161" item="20352" count="1" /> <!-- Rune of Crystal level 5 - 7 Day Expiration Period -->
+    <product id="1080130" category="1" points="21" item="12362" count="1" /> <!-- Weapon-Type Enhance Backup Stone (D-Grade) -->
+    <product id="1080131" category="1" points="45" item="12363" count="1" /> <!-- Weapon-Type Enhance Backup Stone (C-Grade) -->
+    <product id="1080132" category="1" points="203" item="12364" count="1" /> <!-- Weapon-Type Enhance Backup Stone (B-Grade) -->
+    <product id="1080133" category="1" points="729" item="12365" count="1" /> <!-- Weapon-Type Enhance Backup Stone (A-Grade) -->
+    <product id="1080134" category="1" points="2025" item="12366" count="1" /> <!-- Weapon-Type Enhance Backup Stone (S-Grade) -->
+    <product id="1080135" category="1" points="4" item="12367" count="1" /> <!-- Armor-Type Enhance Backup Stone (D-Grade) -->
+    <product id="1080136" category="1" points="7" item="12368" count="1" /> <!-- Armor-Type Enhance Backup Stone (C-Grade) -->
+    <product id="1080137" category="1" points="29" item="12369" count="1" /> <!-- Armor-Type Enhance Backup Stone (B-Grade) -->
+    <product id="1080138" category="1" points="104" item="12370" count="1" /> <!-- Armor-Type Enhance Backup Stone (A-Grade) -->
+    <product id="1080139" category="1" points="290" item="12371" count="1" /> <!-- Armor-Type Enhance Backup Stone (S-Grade) -->
+    <product id="1080140" category="4" points="14" item="20326" count="1" /> <!-- Beast Soulshot Pack -->
+    <product id="1080141" category="4" points="11" item="20327" count="1" /> <!-- Beast Spiritshot Pack -->
+    <product id="1080142" category="4" points="68" item="20328" count="1" /> <!-- Blessed Beast Spiritshot Pack -->
+    <product id="1080143" category="4" points="27" item="20329" count="1" /> <!-- Beast Soulshot Large Pack -->
+    <product id="1080144" category="4" points="22" item="20330" count="1" /> <!-- Beast Spiritshot Large Pack -->
+    <product id="1080145" category="4" points="135" item="20331" count="1" /> <!-- Blessed Beast Spiritshot Large Pack -->
+    <product id="1080146" category="5" points="30" item="20364" count="1" /> <!-- Omen Beast Transformation Scroll -->
+    <product id="1080147" category="5" points="30" item="20365" count="1" /> <!-- Death Blader Transformation Scroll -->
+    <product id="1080148" category="5" points="30" item="20366" count="1" /> <!-- Grail Apostle Transformation Scroll -->
+    <product id="1080149" category="5" points="30" item="20367" count="1" /> <!-- Unicorn Transformation Scroll -->
+    <product id="1080150" category="5" points="30" item="20368" count="1" /> <!-- Lilim Knight Transformation Scroll -->
+    <product id="1080151" category="5" points="30" item="20369" count="1" /> <!-- Golem Guardian Transformation Scroll -->
+    <product id="1080152" category="5" points="30" item="20370" count="1" /> <!-- Inferno Drake Transformation Scroll -->
+    <product id="1080153" category="5" points="30" item="20371" count="1" /> <!-- Dragon Bomber Transformation Scroll -->
+    <product id="1080154" category="5" points="27" item="20372" count="1" /> <!-- Escape - Talking Island Village -->
+    <product id="1080155" category="5" points="27" item="20373" count="1" /> <!-- Escape - Elven Village -->
+    <product id="1080156" category="5" points="27" item="20374" count="1" /> <!-- Escape - Dark Elven Village -->
+    <product id="1080157" category="5" points="27" item="20375" count="1" /> <!-- Escape - Orc Village -->
+    <product id="1080158" category="5" points="27" item="20376" count="1" /> <!-- Escape - Dwarven Village -->
+    <product id="1080159" category="5" points="27" item="20377" count="1" /> <!-- Escape - Gludin Village -->
+    <product id="1080160" category="5" points="27" item="20378" count="1" /> <!-- Escape - Town of Gludio -->
+    <product id="1080161" category="5" points="27" item="20379" count="1" /> <!-- Escape - Town of Dion -->
+    <product id="1080162" category="5" points="27" item="20380" count="1" /> <!-- Escape - Floran Village -->
+    <product id="1080163" category="5" points="27" item="20381" count="1" /> <!-- Escape - Giran Castle Town -->
+    <product id="1080164" category="5" points="27" item="20382" count="1" /> <!-- Escape - Hardins Academy -->
+    <product id="1080165" category="5" points="27" item="20383" count="1" /> <!-- Escape - Heine -->
+    <product id="1080166" category="5" points="27" item="20384" count="1" /> <!-- Escape - Town of Oren -->
+    <product id="1080167" category="5" points="27" item="20385" count="1" /> <!-- Escape - Ivory Tower -->
+    <product id="1080168" category="5" points="27" item="20386" count="1" /> <!-- Escape - Hunters Village -->
+    <product id="1080169" category="5" points="27" item="20387" count="1" /> <!-- Escape - Town of Aden -->
+    <product id="1080170" category="5" points="27" item="20388" count="1" /> <!-- Escape - Town of Goddard -->
+    <product id="1080171" category="5" points="27" item="20389" count="1" /> <!-- Escape - Rune Township -->
+    <product id="1080172" category="5" points="27" item="20390" count="1" /> <!-- Escape - Town of Schuttgart -->
+    <product id="1080173" category="5" points="675" item="13015" count="1" /> <!-- My Teleport Spellbook -->
+    <product id="1080174" category="5" points="135" item="13016" count="5" /> <!-- My Teleport Scroll -->
+    <product id="1080175" category="5" points="270" item="13016" count="10" /> <!-- My Teleport Scroll -->
+    <product id="1080176" category="5" points="338" item="20033" count="5" /> <!-- My Teleport Flag -->
+    <product id="1080177" category="5" points="675" item="20033" count="10" /> <!-- My Teleport Flag -->
+    <product id="1080178" category="5" points="338" item="13010" count="5" /> <!-- Extra Entrance Pass - Kamaloka (Hall of the Abyss) -->
+    <product id="1080179" category="5" points="675" item="13010" count="10" /> <!-- Extra Entrance Pass - Kamaloka (Hall of the Abyss) -->
+    <product id="1080180" category="5" points="338" item="13011" count="5" /> <!-- Extra Entrance Pass - Near Kamaloka -->
+    <product id="1080181" category="5" points="675" item="13011" count="10" /> <!-- Extra Entrance Pass - Near Kamaloka -->
+    <product id="1080182" category="5" points="338" item="13012" count="5" /> <!-- Extra Entrance Pass - Kamaloka (Labyrinth of the Abyss) -->
+    <product id="1080183" category="5" points="675" item="13012" count="10" /> <!-- Extra Entrance Pass - Kamaloka (Labyrinth of the Abyss) -->
+    <product id="1080185" category="5" points="268" item="13021" count="1" /> <!-- Color Name -->
+    <product id="1080186" category="3" points="14" item="5592" count="1" /> <!-- Greater CP Potion -->
+    <product id="1080197" category="3" points="142" item="20391" count="1" /> <!-- Potion of Energy Maintenance -->
+    <product id="1080198" category="3" points="68" item="20392" count="1" /> <!-- Potion of Vitality Replenishin -->
+    <product id="1080199" category="5" points="79" item="20393" count="1" /> <!-- Sweet Fruit Cocktail -->
+    <product id="1080200" category="5" points="91" item="20394" count="1" /> <!-- Fresh Fruit Cocktail -->
+    <product id="1080201" category="3" points="338" item="139" count="1" /> <!-- Sudden Agathion 7 Day Pack -->
+    <product id="1080202" category="3" points="338" item="140" count="1" /> <!-- Shiny Agathion 7 Day Pack -->
+    <product id="1080203" category="3" points="338" item="141" count="1" /> <!-- Sobbing Agathion 7 Day Pack -->
+    <product id="1080205" category="3" points="254" item="13370" count="1" /> <!-- Pumpkin Transformation Stick 7-Day Pack (Event) -->
+    <product id="1080206" category="3" points="169" item="13371" count="1" /> <!-- Kat the Cat Hat 7-Day Pack (Event) -->
+    <product id="1080207" category="3" points="169" item="13372" count="1" /> <!-- Feline Queen Hat 7-Day Pack (Event) -->
+    <product id="1080208" category="3" points="169" item="13373" count="1" /> <!-- Monster Eye Hat 7-Day Pack (Event) -->
+    <product id="1080209" category="3" points="169" item="13374" count="1" /> <!-- Brown Bear Hat 7-Day Pack (Event) -->
+    <product id="1080210" category="3" points="169" item="13375" count="1" /> <!-- Fungus Hat 7-Day Pack (Event) -->
+    <product id="1080211" category="3" points="169" item="13376" count="1" /> <!-- Skull Hat 7-Day Pack (Event) -->
+    <product id="1080212" category="3" points="169" item="13377" count="1" /> <!-- Ornithomimus Hat 7-Day Pack (Event) -->
+    <product id="1080213" category="3" points="169" item="13378" count="1" /> <!-- Feline King Hat 7-Day Pack (Event) -->
+    <product id="1080214" category="3" points="169" item="13379" count="1" /> <!-- Kai the Cat Hat 7-Day Pack (Event) -->
+    <product id="1080229" category="3" points="169" item="13380" count="1" /> <!-- OX Stick 7-Day Pack (Event) -->
+    <product id="1080230" category="3" points="506" item="13381" count="1" /> <!-- Rock-Paper-Scissors Stick 7-Day Pack (Event) -->
+    <product id="1080236" category="5" points="199" item="17019" count="1" /> <!-- Mounting Item 3 Pack -->
+    <product id="1080238" category="5" points="89" item="14054" count="1" /> <!-- Steam Beatle Mounting Bracelet - 7-day Limited Period -->
+    <product id="1080239" category="5" points="89" item="13022" count="1" /> <!-- Light Purple-Maned Horse Mounting Bracelet - 7 day limited period -->
+    <product id="1080240" category="5" points="18" item="15438" count="1" /> <!-- 10 minute Energy Maintaining Potion -->
+    <product id="1080241" category="5" points="54" item="15440" count="1" /> <!-- Vitality Maintenance Potion - 30 minutes -->
+    <product id="1080242" category="5" points="24" item="20572" count="1" /> <!-- Rune of Exp. Points 30% - 3 hours limited time -->
+    <product id="1080243" category="5" points="9" item="21084" count="1" /> <!-- Rune of Exp. Points 30% -->
+    <product id="1080244" category="5" points="5" item="21086" count="1" /> <!-- Rune of SP 30% -->
+    <product id="1080245" category="5" points="15" item="21030" count="1" /> <!-- Hardins Divine Protection -->
+    <product id="1080246" category="5" points="15" item="21031" count="1" /> <!-- Hardins Blessing -->
+    <product id="1080247" category="5" points="5" item="21032" count="1" /> <!-- Silpeeds Wing -->
+    <product id="1080248" category="5" points="92" item="21033" count="1" /> <!-- Silpeeds Blessing -->
+    <product id="1080249" category="5" points="1" item="21038" count="1" /> <!-- Potion of a Hero -->
+    <!-- Event -->
+    <product id="1080205" category="6" points="254" item="13370" count="1" /> <!-- Pumpkin Transformation Stick 7-Day Pack (Event) -->
+    <product id="1080206" category="6" points="169" item="13371" count="1" /> <!-- Kat the Cat Hat 7-Day Pack (Event) -->
+    <product id="1080207" category="6" points="169" item="13372" count="1" /> <!-- Feline Queen Hat 7-Day Pack (Event) -->
+    <product id="1080208" category="6" points="169" item="13373" count="1" /> <!-- Monster Eye Hat 7-Day Pack (Event) -->
+    <product id="1080209" category="6" points="169" item="13374" count="1" /> <!-- Brown Bear Hat 7-Day Pack (Event) -->
+    <product id="1080210" category="6" points="169" item="13375" count="1" /> <!-- Fungus Hat 7-Day Pack (Event) -->
+    <product id="1080211" category="6" points="169" item="13376" count="1" /> <!-- Skull Hat 7-Day Pack (Event) -->
+    <product id="1080212" category="6" points="169" item="13377" count="1" /> <!-- Ornithomimus Hat 7-Day Pack (Event) -->
+    <product id="1080213" category="6" points="169" item="13378" count="1" /> <!-- Feline King Hat 7-Day Pack (Event) -->
+    <product id="1080214" category="6" points="169" item="13379" count="1" /> <!-- Kai the Cat Hat 7-Day Pack (Event) -->
+    <product id="1080229" category="6" points="169" item="13380" count="1" /> <!-- OX Stick 7-Day Pack (Event) -->
+    <product id="1080230" category="6" points="506" item="13381" count="1" /> <!-- Rock-Paper-Scissors Stick 7-Day Pack (Event) -->
+    <!-- Best -->
+    <product id="1080076" category="7" points="61" item="22109" count="1" /> <!-- Blessed Spiritshot Large Pack - D grade -->
+    <product id="1080077" category="7" points="122" item="22110" count="1" /> <!-- Blessed Spiritshot Large Pack - C grade -->
+    <product id="1080078" category="7" points="331" item="22111" count="1" /> <!-- Blessed Spiritshot Large Pack - B grade -->
+    <product id="1080079" category="7" points="392" item="22112" count="1" /> <!-- Blessed Spiritshot Large Pack - A grade -->
+    <product id="1080080" category="7" points="473" item="22113" count="1" /> <!-- Blessed Spiritshot Large Pack - S grade -->
+    <product id="1080081" category="7" points="24" item="22114" count="1" /> <!-- Spiritshot Large Pack - D grade -->
+    <product id="1080082" category="7" points="48" item="22115" count="1" /> <!-- Spiritshot Large Pack - C grade -->
+    <product id="1080083" category="7" points="135" item="22116" count="1" /> <!-- Spiritshot Large Pack - B grade -->
+    <product id="1080084" category="7" points="162" item="22117" count="1" /> <!-- Spiritshot Large Pack - A grade -->
+    <product id="1080085" category="7" points="203" item="22118" count="1" /> <!-- Spiritshot Large Pack - S grade -->
+    <product id="1080086" category="7" points="14" item="22119" count="1" /> <!-- Soulshot Large Pack - D grade -->
+    <product id="1080087" category="7" points="21" item="22120" count="1" /> <!-- Soulshot Large Pack - C grade -->
+    <product id="1080088" category="7" points="68" item="22121" count="1" /> <!-- Soulshot Large Pack - B grade -->
+    <product id="1080089" category="7" points="108" item="22122" count="1" /> <!-- Soulshot Large Pack - A grade -->
+    <product id="1080090" category="7" points="135" item="22123" count="1" /> <!-- Soulshot Large Pack - S grade -->
+</list>
\ No newline at end of file
Index: dist/sql/game/characters.sql
===================================================================
--- dist/sql/game/characters.sql    (revision 10394)
+++ dist/sql/game/characters.sql    (working copy)
@@ -55,6 +55,7 @@
   `vitality_points` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
   `createDate` date NOT NULL DEFAULT '0000-00-00',
   `language` VARCHAR(2) DEFAULT NULL,
+  `game_points` bigint(13) NOT NULL DEFAULT '0',
   PRIMARY KEY (`charId`),
   KEY `account_name` (`account_name`),
   KEY `char_name` (`char_name`),
Index: dist/game/data/html/admin/char_menu.htm
===================================================================
--- dist/game/data/html/admin/char_menu.htm    (revision 10394)
+++ dist/game/data/html/admin/char_menu.htm    (working copy)
@@ -45,8 +45,8 @@
 </tr>
 <tr>
 <td><button value="Party" action="bypass -h admin_partyinfo" width=82 height=20 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
+<td><button value="Game Points" action="bypass -h admin_gamepoints" width=82 height=20 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
 <td></td>
-<td></td>
 </tr>
 </table>
 <br>
Index: dist/game/data/html/admin/game_points.htm
===================================================================
--- dist/game/data/html/admin/game_points.htm    (revision 0)
+++ dist/game/data/html/admin/game_points.htm    (working copy)
@@ -0,0 +1,41 @@
+<html>
+    <title>Game Points</title>
+    <body>
+        <table width=270>
+            <tr>
+                <td width=45><button value="Main" action="bypass -h admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
+                <td width=180>
+                    <center>Game Points Menu</center>
+                </td>
+                <td width=45>
+                    <center><button value="Back" action="bypass -h admin_admin6" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></center>
+                </td>
+            </tr>
+        </table>
+        <table height=60 width=270>
+            <tr>
+                <td>
+                    Game Points is a type of currency used by the ingame Item Mall (also known as Prime Shop).
+                </td>
+            </tr>
+        </table>
+        <table width=270>
+            <tr>
+                <td width=70 align=right><font color="LEVEL">Value:</font></td>
+                <td>
+                    <edit var="qbox" width=120 height=15>
+                </td>
+            </tr>
+        </table>
+        <br>
+        <table width=270>
+            <tr>
+                <td><button value="Add" action="bypass -h admin_add_game_points $qbox" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
+                <td><button value="Subtract" action="bypass -h admin_subtract_game_points $qbox" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
+                <td><button value="Set" action="bypass -h admin_set_game_points $qbox" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
+                <td><button value="Count" action="bypass -h admin_count_game_points" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
+            </tr>
+        </table>
+        </center>
+    </body>
+</html>
\ No newline at end of file
Index: dist/game/data/scripts/handlers/admincommandhandlers/AdminGamePoints.java
===================================================================
--- dist/game/data/scripts/handlers/admincommandhandlers/AdminGamePoints.java    (revision 0)
+++ dist/game/data/scripts/handlers/admincommandhandlers/AdminGamePoints.java    (working copy)
@@ -0,0 +1,217 @@
+/*
+ * Copyright (C) 2004-2014 L2J DataPack
+ * 
+ * This file is part of L2J DataPack.
+ * 
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package handlers.admincommandhandlers;
+
+import com.l2jserver.gameserver.handler.IAdminCommandHandler;
+import com.l2jserver.gameserver.model.L2Object;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.network.SystemMessageId;
+import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ * Admin game point commands.
+ * @author Pandragon
+ */
+public class AdminGamePoints implements IAdminCommandHandler
+{
+    private static final String[] ADMIN_COMMANDS =
+    {
+        "admin_add_game_points",
+        "admin_count_game_points",
+        "admin_gamepoints",
+        "admin_set_game_points",
+        "admin_subtract_game_points"
+    };
+    
+    @Override
+    public boolean useAdminCommand(String command, L2PcInstance activeChar)
+    {
+        if (command.startsWith("admin_add_game_points"))
+        {
+            try
+            {
+                String val = command.substring(22);
+                if (!addGamePoints(activeChar, val))
+                {
+                    activeChar.sendMessage("Usage: //add_game_points count");
+                }
+            }
+            catch (StringIndexOutOfBoundsException e)
+            { // Case of missing parameter
+                activeChar.sendMessage("Usage: //add_game_points count");
+            }
+        }
+        else if (command.equals("admin_count_game_points"))
+        {
+            if ((activeChar.getTarget() != null) && activeChar.getTarget().isPlayer())
+            {
+                L2PcInstance target = (L2PcInstance) activeChar.getTarget();
+                activeChar.sendMessage(target.getName() + " has a total of " + target.getGamePoints() + " game points.");
+            }
+            else
+            {
+                activeChar.sendMessage("You must select a player first.");
+            }
+        }
+        else if (command.equals("admin_gamepoints"))
+        {
+            openGamePointsMenu(activeChar);
+        }
+        else if (command.startsWith("admin_set_game_points"))
+        {
+            try
+            {
+                String val = command.substring(22);
+                if (!setGamePoints(activeChar, val))
+                {
+                    activeChar.sendMessage("Usage: //set_game_points count");
+                }
+            }
+            catch (StringIndexOutOfBoundsException e)
+            { // Case of missing parameter
+                activeChar.sendMessage("Usage: //set_game_points count");
+            }
+        }
+        else if (command.startsWith("admin_subtract_game_points"))
+        {
+            try
+            {
+                String val = command.substring(27);
+                if (!subtractGamePoints(activeChar, val))
+                {
+                    activeChar.sendMessage("Usage: //subtract_game_points count");
+                }
+            }
+            catch (StringIndexOutOfBoundsException e)
+            { // Case of missing parameter
+                activeChar.sendMessage("Usage: //subtract_game_points count");
+            }
+        }
+        return true;
+    }
+    
+    private void openGamePointsMenu(L2PcInstance activeChar)
+    {
+        final NpcHtmlMessage html = new NpcHtmlMessage();
+        html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/game_points.htm");
+        activeChar.sendPacket(html);
+    }
+    
+    private boolean addGamePoints(L2PcInstance admin, String val)
+    {
+        L2Object target = admin.getTarget();
+        L2PcInstance player = null;
+        if (target.isPlayer())
+        {
+            player = (L2PcInstance) target;
+        }
+        else
+        {
+            admin.sendPacket(SystemMessageId.INCORRECT_TARGET);
+            return false;
+        }
+        
+        final Long points = Long.valueOf(val);
+        if (points < 1)
+        {
+            admin.sendMessage("Invalid game point count.");
+            return false;
+        }
+        
+        final long currentPoints = player.getGamePoints();
+        if (currentPoints < 1)
+        {
+            player.setGamePoints(points);
+        }
+        else
+        {
+            player.setGamePoints(currentPoints + points);
+        }
+        
+        admin.sendMessage("Added " + points + " game points to " + player.getName() + ".");
+        admin.sendMessage(player.getName() + " has now a total of " + player.getGamePoints() + " game points.");
+        return true;
+    }
+    
+    private boolean setGamePoints(L2PcInstance admin, String val)
+    {
+        L2Object target = admin.getTarget();
+        L2PcInstance player = null;
+        if (target.isPlayer())
+        {
+            player = (L2PcInstance) target;
+        }
+        else
+        {
+            admin.sendPacket(SystemMessageId.INCORRECT_TARGET);
+            return false;
+        }
+        
+        final Long points = Long.valueOf(val);
+        if (points < 0)
+        {
+            admin.sendMessage("Invalid game point count.");
+            return false;
+        }
+        
+        player.setGamePoints(points);
+        admin.sendMessage(player.getName() + " has now a total of " + points + " game points.");
+        return true;
+    }
+    
+    private boolean subtractGamePoints(L2PcInstance admin, String val)
+    {
+        L2Object target = admin.getTarget();
+        L2PcInstance player = null;
+        if (target.isPlayer())
+        {
+            player = (L2PcInstance) target;
+        }
+        else
+        {
+            admin.sendPacket(SystemMessageId.INCORRECT_TARGET);
+            return false;
+        }
+        
+        final Long points = Long.valueOf(val);
+        if (points < 1)
+        {
+            admin.sendMessage("Invalid game point count.");
+            return false;
+        }
+        
+        final long currentPoints = player.getGamePoints();
+        if (currentPoints <= points)
+        {
+            player.setGamePoints(0);
+        }
+        else
+        {
+            player.setGamePoints(currentPoints - points);
+        }
+        admin.sendMessage(player.getName() + " has now a total of " + player.getGamePoints() + " game points.");
+        return true;
+    }
+    
+    @Override
+    public String[] getAdminCommandList()
+    {
+        return ADMIN_COMMANDS;
+    }
+}
Index: dist/game/config/adminCommands.xml
===================================================================
--- dist/game/config/adminCommands.xml    (revision 10394)
+++ dist/game/config/adminCommands.xml    (working copy)
@@ -278,6 +278,14 @@
     <admin command="admin_setfort" accessLevel="7" />
     <admin command="admin_removefort" accessLevel="7" />
 
+    <!-- ADMIN ITEM MALL AND GAME POINTS -->
+    <admin command="admin_add_game_points" accessLevel="7" />
+    <admin command="admin_count_game_points" accessLevel="7" />
+    <admin command="admin_gamepoints" accessLevel="7" />
+    <admin command="admin_set_game_points" accessLevel="7" />
+    <admin command="admin_subtract_game_points" accessLevel="7" />
+    <admin command="admin_reload_itemmall" accessLevel="7" />
+
     <!-- ADMIN GEODATA -->
     <admin command="admin_geo_pos" accessLevel="7" />
     <admin command="admin_geo_spawn_pos" accessLevel="7" />
Index: dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java
===================================================================
--- dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java    (revision 10394)
+++ dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java    (working copy)
@@ -31,6 +31,7 @@
 import com.l2jserver.gameserver.datatables.DoorTable;
 import com.l2jserver.gameserver.datatables.EnchantItemData;
 import com.l2jserver.gameserver.datatables.EnchantItemGroupsData;
+import com.l2jserver.gameserver.datatables.ItemMallData;
 import com.l2jserver.gameserver.datatables.ItemTable;
 import com.l2jserver.gameserver.datatables.MultisellData;
 import com.l2jserver.gameserver.datatables.NpcData;
@@ -247,6 +248,12 @@
                     AdminTable.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded transform data.");
                     break;
                 }
+                case "itemmall":
+                {
+                    ItemMallData.getInstance().load();
+                    AdminTable.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded item mall data.");
+                    break;
+                }
                 default:
                 {
                     activeChar.sendMessage(RELOAD_USAGE);
Index: dist/game/data/html/admin/reload.htm
===================================================================
--- dist/game/data/html/admin/reload.htm    (revision 10394)
+++ dist/game/data/html/admin/reload.htm    (working copy)
@@ -47,9 +47,9 @@
     </tr>
     <tr>
         <td><button value="Crest" action="bypass admin_reload crest" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
+        <td><button value="Item Mall" action="bypass admin_reload itemmall" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
         <td></td>
         <td></td>
-        <td></td>
     </tr>
 </table>
 <br>
Index: dist/game/data/scripts/handlers/MasterHandler.java
===================================================================
--- dist/game/data/scripts/handlers/MasterHandler.java    (revision 10394)
+++ dist/game/data/scripts/handlers/MasterHandler.java    (working copy)
@@ -74,6 +74,7 @@
 import handlers.admincommandhandlers.AdminExpSp;
 import handlers.admincommandhandlers.AdminFightCalculator;
 import handlers.admincommandhandlers.AdminFortSiege;
+import handlers.admincommandhandlers.AdminGamePoints;
 import handlers.admincommandhandlers.AdminGeoEditor;
 import handlers.admincommandhandlers.AdminGeodata;
 import handlers.admincommandhandlers.AdminGm;
@@ -339,6 +340,7 @@
             AdminExpSp.class,
             AdminFightCalculator.class,
             AdminFortSiege.class,
+            AdminGamePoints.class,
             AdminGeodata.class,
             AdminGeoEditor.class,
             AdminGm.class,
Index: dist/game/data/xsd/ItemMall.xsd
===================================================================
--- dist/game/data/xsd/ItemMall.xsd    (revision 0)
+++ dist/game/data/xsd/ItemMall.xsd    (working copy)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    <xs:element name="list">
+        <xs:complexType>
+            <xs:sequence maxOccurs="1" minOccurs="1">
+                <xs:element name="product" minOccurs="1" maxOccurs="unbounded">
+                    <xs:complexType>
+                        <xs:attribute name="id" type="xs:positiveInteger" use="required" />
+                        <xs:attribute name="category" use="required">
+                            <xs:simpleType>
+                                <xs:restriction base="xs:positiveInteger">
+                                    <xs:minInclusive value="1" />
+                                    <xs:maxInclusive value="8" />
+                                </xs:restriction>
+                            </xs:simpleType>
+                        </xs:attribute>
+                        <xs:attribute name="points" type="xs:positiveInteger" use="required" />
+                        <xs:attribute name="item" type="xs:positiveInteger" use="required" />
+                        <xs:attribute name="count" type="xs:positiveInteger" use="required" />
+                    </xs:complexType>
+                </xs:element>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+</xs:schema>
\ No newline at end of file
Index: dist/sql/game/item_mall_transactions.sql
===================================================================
--- dist/sql/game/item_mall_transactions.sql    (revision 0)
+++ dist/sql/game/item_mall_transactions.sql    (working copy)
@@ -0,0 +1,6 @@
+CREATE TABLE IF NOT EXISTS `item_mall_transactions` (
+  `charId` INT UNSIGNED NOT NULL DEFAULT 0,
+  `productId` INT NOT NULL DEFAULT 0,
+  `quantity` INT NOT NULL DEFAULT 1,
+  `transactionTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
\ No newline at end of file