{
try
{
String[] commandSplit = command.split(" ");
int npcId = Integer.valueOf(commandSplit[1]);
L2NpcTemplate npc = NpcTable.getInstance().getTemplate(npcId);
Show_Npc_Property(activeChar, npc);
}
catch (Exception e)
{
activeChar.sendMessage("Wrong usage: //edit_npc <npcId>");
}
}
else if(command.startsWith("admin_show_droplist "))
{
int npcId = 0;
try
{
npcId = Integer.parseInt(command.substring(20).trim());
}
catch(Exception e){}
if(npcId > 0)
showNpcDropList(activeChar, npcId);
else
activeChar.sendMessage("Usage: //show_droplist <npc_id>");
}
else if (!Config.ALT_PRIVILEGES_ADMIN && !(checkLevel(activeChar.getAccessLevel()) && activeChar.isGM()))
return false;
else if(command.startsWith("admin_addShopItem "))
{
String[] args = command.split(" ");
if (args.length > 1)
addShopItem(activeChar, args);
}
else if(command.startsWith("admin_delShopItem "))
{
String[] args = command.split(" ");
if (args.length > 2)
delShopItem(activeChar, args);
}
else if(command.startsWith("admin_editShopItem "))
{
String[] args = command.split(" ");
if (args.length > 2)
editShopItem(activeChar, args);
}
else if(command.startsWith("admin_save_npc "))
{
try
{
save_npc_property(activeChar, command);
}
catch (StringIndexOutOfBoundsException e)
{}
}
else if(command.startsWith("admin_edit_drop "))
{
int npcId = -1, itemId = 0, category = -1000;
try
{
StringTokenizer st = new StringTokenizer(command.substring(16).trim());
if (st.countTokens() == 3)
{
try
{
npcId = Integer.parseInt(st.nextToken());
itemId = Integer.parseInt(st.nextToken());
category = Integer.parseInt(st.nextToken());
showEditDropData(activeChar, npcId, itemId, category);
}
catch(Exception e)
{}
}
else if (st.countTokens() == 6)
{
try
{
npcId = Integer.parseInt(st.nextToken());
itemId = Integer.parseInt(st.nextToken());
category = Integer.parseInt(st.nextToken());
int min = Integer.parseInt(st.nextToken());
int max = Integer.parseInt(st.nextToken());
int chance = Integer.parseInt(st.nextToken());
updateDropData(activeChar, npcId, itemId, min, max, category, chance);
}
catch(Exception e)
{
_log.fine("admin_edit_drop parements error: " + command);
}
}
else
activeChar.sendMessage("Usage: //edit_drop <npc_id> <item_id> <category> [<min> <max> <chance>]");
}
catch (StringIndexOutOfBoundsException e)
{
activeChar.sendMessage("Usage: //edit_drop <npc_id> <item_id> <category> [<min> <max> <chance>]");
}
}
else if (command.startsWith("admin_add_drop "))
{
int npcId = -1;
try
{
StringTokenizer st = new StringTokenizer(command.substring(15).trim());
if(st.countTokens() == 1)
{
try
{
String[] input = command.substring(15).split(" ");
if (input.length < 1)
return true;
npcId = Integer.parseInt(input[0]);
}
catch(Exception e){}
if(npcId > 0)
{
L2NpcTemplate npcData = NpcTable.getInstance().getTemplate(npcId);
showAddDropData(activeChar, npcData);
}
}
else if(st.countTokens() == 6)
{