TreVor Posted August 20, 2017 Posted August 20, 2017 (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 August 20, 2017 by TreVor
0 melron Posted August 20, 2017 Posted August 20, 2017 Find the line where the siege is end and add clan.getWarehouse().addItem("SiegeReward", 57, 8000, clan.getLeader().getPlayerInstance(), null);
0 TreVor Posted August 20, 2017 Author Posted August 20, 2017 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 melron Posted August 20, 2017 Posted August 20, 2017 (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 August 20, 2017 by melron
0 TreVor Posted August 20, 2017 Author Posted August 20, 2017 (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 August 20, 2017 by TreVor
0 Θα Σπασω Κουπες Posted August 20, 2017 Posted August 20, 2017 (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 August 20, 2017 by Θα Σπασω Κουπες
Question
TreVor
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 TreVor6 answers to this question
Recommended Posts