- 0
This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
GameBlonD
Hi, anyone can help me add a check on seal of rule (pray) so players can casted only from the Platform?
Tried something like this:
but it doesn't work
Full code:
public boolean checkIfOkToCastSealOfRule(Castle castle, boolean isCheckOnly, L2Skill skill) { SystemMessage sm; if (castle == null || castle.getCastleId() <= 0) { sm = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED); sm.addSkillName(skill); } else if (!castle.getArtifacts().contains(getTarget())) { sm = new SystemMessage(SystemMessageId.INCORRECT_TARGET); } else if (!castle.getSiege().getIsInProgress()) { sm = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED); sm.addSkillName(skill); } else if (!Util.checkIfInRange(200, this, getTarget(), true)) { sm = new SystemMessage(SystemMessageId.DIST_TOO_FAR_CASTING_STOPPED); } else if (castle.getSiege().getAttackerClan(getClan()) == null) { sm = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED); sm.addSkillName(skill); } else { if (!isCheckOnly) { sm = new SystemMessage(SystemMessageId.OPPONENT_STARTED_ENGRAVING); castle.getSiege().announceToPlayer(sm, false); } return true; } sendPacket(sm); return false; }3 answers to this question
Recommended Posts