try
{
result = " (" + playerOneHp + "hp vs " + playerTwoHp + "hp - "
+ _damageP1 + "dmg vs " + _damageP2 + "dmg) "
+ _playerOneName + " win " + pointDiff + " points";
L2ItemInstance item = _playerOne.getInventory().addItem("Olympiad", Config.ALT_OLY_BATTLE_REWARD_ITEM, _gpreward, _playerOne, null);
InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(item);
_playerOne.sendPacket(iu);
SystemMessage sm = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
sm.addItemName(item.getItemId());
sm.addNumber(_gpreward);
_playerOne.sendPacket(sm);
}
catch (Exception e)
{
}
}
else if (_playerOne == null
|| _playerOne.isOnline() == 0
|| (playerOneHp == 0 && playerTwoHp != 0)
|| (_damageP2 > _damageP1 && playerOneHp != 0 && playerTwoHp != 0))
{
playerTwoStat.set(POINTS, playerTwoPoints + pointDiff);
playerOneStat.set(POINTS, playerOnePoints - pointDiff);
playerTwoStat.set(COMP_WON, playerTwoWon + 1);
playerOneStat.set(COMP_LOST, playerOneLost + 1);
_sm.addString(_playerTwoName);
broadcastMessage(_sm, true);
_sm2.addString(_playerTwoName);
_sm2.addNumber(pointDiff);
broadcastMessage(_sm2, false);
_sm3.addString(_playerOneName);
_sm3.addNumber(pointDiff);
broadcastMessage(_sm3, false);
winner = _playerTwoName + " won";
try
{
result = " (" + playerOneHp + "hp vs " + playerTwoHp + "hp - "
+ _damageP1 + "dmg vs " + _damageP2 + "dmg) "
+ _playerTwoName + " win " + pointDiff + " points";
L2ItemInstance item = _playerTwo.getInventory().addItem("Olympiad", Config.ALT_OLY_BATTLE_REWARD_ITEM, _gpreward, _playerTwo, null);
InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(item);
_playerTwo.sendPacket(iu);
SystemMessage sm = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
sm.addItemName(item.getItemId());
sm.addNumber(_gpreward);
_playerTwo.sendPacket(sm);
}
catch (Exception e)
{