+(You must have targeted the player that you are interested in modifing/count his NCoins.)
+
+
+
+
Value:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/html/admin/reload.htm b/trunk/dist/game/data/html/admin/reload.htm
index 2fb11e87c7..30c6016ace 100644
--- a/trunk/dist/game/data/html/admin/reload.htm
+++ b/trunk/dist/game/data/html/admin/reload.htm
@@ -47,7 +47,7 @@
-
+
diff --git a/trunk/dist/game/data/scripts/handlers/MasterHandler.java b/trunk/dist/game/data/scripts/handlers/MasterHandler.java
index e2e3e03bb3..0e9fc45caf 100644
--- a/trunk/dist/game/data/scripts/handlers/MasterHandler.java
+++ b/trunk/dist/game/data/scripts/handlers/MasterHandler.java
@@ -59,6 +59,7 @@ import handlers.admincommandhandlers.AdminEvents;
import handlers.admincommandhandlers.AdminExpSp;
import handlers.admincommandhandlers.AdminFightCalculator;
import handlers.admincommandhandlers.AdminFortSiege;
+import handlers.admincommandhandlers.AdminGamePoints;
import handlers.admincommandhandlers.AdminGeodata;
import handlers.admincommandhandlers.AdminGm;
import handlers.admincommandhandlers.AdminGmChat;
@@ -353,6 +354,7 @@ public class MasterHandler
AdminExpSp.class,
AdminFightCalculator.class,
AdminFortSiege.class,
+ AdminGamePoints.class,
AdminGeodata.class,
AdminGm.class,
AdminGmChat.class,
diff --git a/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminGamePoints.java b/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminGamePoints.java
new file mode 100644
index 0000000000..37c537c9de
--- /dev/null
+++ b/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminGamePoints.java
@@ -0,0 +1,238 @@
+/*
+ * Copyright (C) 2004-2015 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 .
+ */
+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 Ncoin commands.
+ * @author Mobius
+ */
+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
+ {
+ if ((activeChar.getTarget() != null) && activeChar.getTarget().isPlayer())
+ {
+ String val = command.substring(22);
+ if (!addGamePoints(activeChar, val))
+ {
+ activeChar.sendMessage("Usage: //add_game_points count");
+ }
+ }
+ else
+ {
+ activeChar.sendMessage("You must select a player first.");
+ }
+ }
+ 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.getPrimePoints() + " NCoins.");
+ }
+ 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
+ {
+ if ((activeChar.getTarget() != null) && activeChar.getTarget().isPlayer())
+ {
+ String val = command.substring(22);
+ if (!setPrimePoints(activeChar, val))
+ {
+ activeChar.sendMessage("Usage: //set_game_points count");
+ }
+ }
+ else
+ {
+ activeChar.sendMessage("You must select a player first.");
+ }
+ }
+ catch (StringIndexOutOfBoundsException e)
+ { // Case of missing parameter
+ activeChar.sendMessage("Usage: //set_game_points count");
+ }
+ }
+ else if (command.startsWith("admin_subtract_game_points"))
+ {
+ try
+ {
+ if ((activeChar.getTarget() != null) && activeChar.getTarget().isPlayer())
+ {
+ String val = command.substring(27);
+ if (!subtractGamePoints(activeChar, val))
+ {
+ activeChar.sendMessage("Usage: //subtract_game_points count");
+ }
+ }
+ else
+ {
+ activeChar.sendMessage("You must select a player first.");
+ }
+ }
+ 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/NCoins.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.THAT_IS_AN_INCORRECT_TARGET);
+ return false;
+ }
+
+ final int points = Integer.valueOf(val);
+ if (points < 1)
+ {
+ admin.sendMessage("Invalid Ncoin count.");
+ return false;
+ }
+
+ final int currentPoints = player.getPrimePoints();
+ if (currentPoints < 1)
+ {
+ player.setPrimePoints(points);
+ }
+ else
+ {
+ player.setPrimePoints(currentPoints + points);
+ }
+
+ admin.sendMessage("Added " + points + " NCoins to " + player.getName() + ".");
+ admin.sendMessage(player.getName() + " has now a total of " + player.getPrimePoints() + " NCoins.");
+ return true;
+ }
+
+ private boolean setPrimePoints(L2PcInstance admin, String val)
+ {
+ L2Object target = admin.getTarget();
+ L2PcInstance player = null;
+ if (target.isPlayer())
+ {
+ player = (L2PcInstance) target;
+ }
+ else
+ {
+ admin.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
+ return false;
+ }
+
+ final int points = Integer.valueOf(val);
+ if (points < 0)
+ {
+ admin.sendMessage("Invalid Ncoin count.");
+ return false;
+ }
+
+ player.setPrimePoints(points);
+ admin.sendMessage(player.getName() + " has now a total of " + points + " NCoins.");
+ 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.THAT_IS_AN_INCORRECT_TARGET);
+ return false;
+ }
+
+ final int points = Integer.valueOf(val);
+ if (points < 1)
+ {
+ admin.sendMessage("Invalid Ncoin count.");
+ return false;
+ }
+
+ final int currentPoints = player.getPrimePoints();
+ if (currentPoints <= points)
+ {
+ player.setPrimePoints(0);
+ }
+ else
+ {
+ player.setPrimePoints(currentPoints - points);
+ }
+ admin.sendMessage(player.getName() + " has now a total of " + player.getPrimePoints() + " NCoins.");
+ return true;
+ }
+
+ @Override
+ public String[] getAdminCommandList()
+ {
+ return ADMIN_COMMANDS;
+ }
+}
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java b/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java
index 49cf5a2d3b..aafef8ff40 100644
--- a/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java
+++ b/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java
@@ -37,6 +37,7 @@ import com.l2jserver.gameserver.data.xml.impl.EnchantItemGroupsData;
import com.l2jserver.gameserver.data.xml.impl.ItemCrystalizationData;
import com.l2jserver.gameserver.data.xml.impl.MultisellData;
import com.l2jserver.gameserver.data.xml.impl.NpcData;
+import com.l2jserver.gameserver.data.xml.impl.PrimeShopData;
import com.l2jserver.gameserver.data.xml.impl.TeleportersData;
import com.l2jserver.gameserver.data.xml.impl.TransformData;
import com.l2jserver.gameserver.datatables.ItemTable;
@@ -258,6 +259,12 @@ public class AdminReload implements IAdminCommandHandler
AdminData.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded item crystalization data.");
break;
}
+ case "itemmall":
+ {
+ PrimeShopData.getInstance().load();
+ AdminData.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded L2 Store data.");
+ break;
+ }
case "ability":
{
AbilityPointsData.getInstance().load();
diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/ExPCCafeRequestOpenWindowWithoutNPC.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/ExPCCafeRequestOpenWindowWithoutNPC.java
index 2d28ec037c..0b0cb4b82f 100644
--- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/ExPCCafeRequestOpenWindowWithoutNPC.java
+++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/ExPCCafeRequestOpenWindowWithoutNPC.java
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2004-2015 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 .
+ */
package com.l2jserver.gameserver.network.clientpackets;
import com.l2jserver.Config;