Jump to content
  • 0

Seal Of Ruler Issue - (Pray)


Question

Posted

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:       

 else if (!Util.checkIfInRange(200, this, getTarget(), true) &&  (!(Math.abs(getZ() - getZ()) > 1000)))

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

  • 0
Posted (edited)

nice fix , thank you!

 

 

PS: It was a little difficult for me to adapt it in the old system  (L2J GF-) without timeline/changelog on acis timeline :P

Edited by GameBlonD
Guest
This topic is now closed to further replies.


×
×
  • Create New...