Jump to content
  • 0

Question

Posted (edited)

Hello all , i have question how to make a reward for siege to cwh after end siege . i based on l2jfrozen thanks all for help

Edited by TreVor

6 answers to this question

Recommended Posts

  • 0
Posted

Find the line where the siege is end and add

clan.getWarehouse().addItem("SiegeReward", 57, 8000, clan.getLeader().getPlayerInstance(), null);

  • 0
Posted
public void endSiege()
{
if (getIsInProgress())
{
announceToPlayer("The siege of " + getCastle().getName() + " has finished!", false);


LOGGER.info("[SIEGE] The siege of " + getCastle().getName() + " has finished! " + fmt.format(new Date(System.currentTimeMillis())));


if (getCastle().getOwnerId() <= 0)
{
announceToPlayer("The siege of " + getCastle().getName() + " has ended in a draw.", false);


LOGGER.info("[SIEGE] The siege of " + getCastle().getName() + " has ended in a draw. " + fmt.format(new Date(System.currentTimeMillis())));
}

this ?

  • 0
Posted (edited)

i guess so...

 

try to edit it with 

announceToPlayer("The siege of " + getCastle().getName() + " has finished!", false);
LOGGER.info("[SIEGE] The siege of " + getCastle().getName() + " has finished! " + fmt.format(new Date(System.currentTimeMillis())));
if (getCastle().getOwnerId() <= 0)
{
	announceToPlayer("The siege of " + getCastle().getName() + " has ended in a draw.", false);
	LOGGER.info("[SIEGE] The siege of " + getCastle().getName() + " has ended in a draw. " + fmt.format(new Date(System.currentTimeMillis())));
}
+else
+{
+    L2Clan clan = ClanTable.getInstance().getClan(getCastle().getOwnerId());
+    clan.getWarehouse().addItem("SiegeReward", 57, 8000, clan.getLeader().getPlayerInstance(), null);
+}

Edited by melron
  • 0
Posted (edited)

its ok on compile hmm how to add 3-4 items to reward ? after this 57, 8000, 2220,5 clan.getLeader().getPlayerInstance(), null);

Edited by TreVor
  • 0
Posted (edited)

final int[][] rewardList = {{57,1000}, {6393, 10}, {6394, 100}};

 

for (int[] reward : rewardList)

   clan.getWarehouse().addItem("reward", reward[0], reward[1], clan.getLeader().getPlayerInstance(), null);

Edited by Θα Σπασω Κουπες
Guest
This topic is now closed to further replies.


×
×
  • Create New...