x = getX();
y = getY();
z = getZ();
//get local town
L2TownZone Town = TownManager.getInstance().getTown(x,y,z);
setPkKills(getPkKills() + 1);
/*if(!Config.TW_ALLOW_KARMA && Town != null && isinTownWar())
{
//nothing
}
else */
if(Town == null || (isinTownWar() && Config.TW_ALLOW_KARMA))
{
setKarma(getKarma() + newKarma);
}
/*else if()
{
setKarma(getKarma() + newKarma);
}*/
if(Town != null && isinTownWar())
{
if(Town.getTownId() == Config.TW_TOWN_ID && !Config.TW_ALL_TOWNS)
{
getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);
sendMessage("You received your prize for a town war kill!");
}
else if(Config.TW_ALL_TOWNS && Town.getTownId() != 0)
{
getInventory().addItem("TownWar", Config.TW_ITEM_ID, Config.TW_ITEM_AMOUNT, this, this);
sendMessage("You received your prize for a town war kill!");
}
}