Jump to content
  • 0

Siege Reward In Cwh


TreVor

Question

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
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Find the line where the siege is end and add

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

Link to comment
Share on other sites

  • 0
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 ?

Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0

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 Θα Σπασω Κουπες
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...