{
L2Object target = activeChar.getTarget();
if (target instanceof L2PetInstance)
{
L2PetInstance targetPet = (L2PetInstance) target;
targetPet.setCurrentFed(targetPet.getMaxFed());
targetPet.getOwner().sendPacket(new SetSummonRemainTime(targetPet.getMaxFed(), targetPet.getCurrentFed()));
targetPet = null;
}
else
{
activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
return false;
}
target = null;
return true;
}
case admin_remclanwait:
{
L2Object target = activeChar.getTarget();
L2PcInstance player = null;
if (target instanceof L2PcInstance)
{
player = (L2PcInstance) target;
}
else
{
activeChar.sendMessage("You have to select a player!");
return false;
}
target = null;
if (player.getClan() == null)
{
player.setClanJoinExpiryTime(0);
player.sendMessage("A GM Has reset your clan wait time, You may now join another clan.");
activeChar.sendMessage("You have reset " + player.getName() + "'s wait time to join another clan.");
}
else
{
activeChar.sendMessage("Sorry, but " + player.getName() + " must not be in a clan. Player must leave clan before the wait limit can be reset.");
return false;
}
player = null;
return true;
}
case admin_setcp:
{
String val = "";
int value = 0;
if (st.hasMoreTokens())
{
val = st.nextToken();
try
{
value = Integer.parseInt(val);
}
catch (NumberFormatException e)
{
activeChar.sendMessage("Value must be an integer");
activeChar.sendMessage("Usage: //setcp <new_value>");
return false;
}
}
else
{
activeChar.sendMessage("Usage: //setcp <new_value>");
return false;
}
activeChar.getStatus().setCurrentCp(value);
return true;
}
case admin_sethp:
{
String val = "";
int value = 0;
if (st.hasMoreTokens())
{
val = st.nextToken();
try
{
value = Integer.parseInt(val);
}
catch (NumberFormatException e)
{
activeChar.sendMessage("Value must be an integer");
activeChar.sendMessage("Usage: //sethp <new_value>");
return false;
}
}
else
{
activeChar.sendMessage("Usage: //sethp <new_value>");
return false;
}
activeChar.getStatus().setCurrentHp(value);
return true;
}
case admin_setmp:
{
String val = "";
int value = 0;
if (st.hasMoreTokens())
{
val = st.nextToken();
try
{
value = Integer.parseInt(val);
}
catch (NumberFormatException e)
{
activeChar.sendMessage("Value must be an integer");
activeChar.sendMessage("Usage: //setmp <new_value>");
return false;
}
}
else
{
activeChar.sendMessage("Usage: //setmp <new_value>");
return false;
}
activeChar.getStatus().setCurrentMp(value);
return true;
}
case admin_setchar_cp:
{
String val = "";
int value = 0;
if (st.hasMoreTokens())
{
val = st.nextToken();
try
{
value = Integer.parseInt(val);
}
catch (NumberFormatException e)
{
activeChar.sendMessage("Value must be an integer");
activeChar.sendMessage("Usage: //setchar_cp <new_value>");
return false;
}
}
else
{
activeChar.sendMessage("Usage: //setchar_cp <new_value>");
return false;
}
if (activeChar.getTarget() instanceof L2PcInstance)
{
L2PcInstance pc = (L2PcInstance) activeChar.getTarget();
pc.getStatus().setCurrentCp(value);
pc = null;
}
else if (activeChar.getTarget() instanceof L2PetInstance)
{
L2PetInstance pet = (L2PetInstance) activeChar.getTarget();
pet.getStatus().setCurrentCp(value);
pet = null;
}
else
{
activeChar.getStatus().setCurrentCp(value);
}
return true;
}
case admin_setchar_hp:
{
String val = "";
int value = 0;
if (st.hasMoreTokens())
{
val = st.nextToken();
try
{
value = Integer.parseInt(val);
}
catch (NumberFormatException e)
{
activeChar.sendMessage("Value must be an integer");
activeChar.sendMessage("Usage: //setchar_hp <new_value>");
return false;
}
}
else
{
activeChar.sendMessage("Usage: //setchar_hp <new_value>");
return false;
}
if (activeChar.getTarget() instanceof L2PcInstance)
{
L2PcInstance pc = (L2PcInstance) activeChar.getTarget();
pc.getStatus().setCurrentHp(value);
pc = null;
}
else if (activeChar.getTarget() instanceof L2PetInstance)
{
L2PetInstance pet = (L2PetInstance) activeChar.getTarget();
pet.getStatus().setCurrentHp(value);
pet = null;
}
else
{
activeChar.getStatus().setCurrentHp(value);
}
return true;
}
case admin_setchar_mp:
{
String val = "";
int value = 0;
if (st.hasMoreTokens())
{
val = st.nextToken();
try
{
value = Integer.parseInt(val);
}
catch (NumberFormatException e)
{
activeChar.sendMessage("Value must be an integer");
activeChar.sendMessage("Usage: //setchar_mp <new_value>");
return false;
}
}
else
{
activeChar.sendMessage("Usage: //setchar_mp <new_value>");
return false;
}
if (activeChar.getTarget() instanceof L2PcInstance)
{
L2PcInstance pc = (L2PcInstance) activeChar.getTarget();
pc.getStatus().setCurrentMp(value);
pc = null;
}
else if (activeChar.getTarget() instanceof L2PetInstance)
{
L2PetInstance pet = (L2PetInstance) activeChar.getTarget();
pet.getStatus().setCurrentMp(value);
pet = null;
}
else
{
activeChar.getStatus().setCurrentMp(value);