Jump to content
  • 0

[help]leader when takes castle takes crown but everyone in clan can wear it.


Question

8 answers to this question

Recommended Posts

  • 0
Posted

		L2Clan cl = activeChar.getClan(); 

            if ((cl == null || cl.getHasCastle() == 0) && itemId == 7015 && Config.CASTLE_SHIELD)
            {
                    activeChar.sendMessage("You can't equip that");
                    return;
            }

            if ((cl == null || cl.getHasHideout() == 0) && itemId == 6902 && Config.CLANHALL_SHIELD)
            {
                    activeChar.sendMessage("You can't equip that");
                    return;
            }

            if ((itemId >= 7860 && itemId <= 7879) && Config.APELLA_ARMORS && (cl == null || activeChar.getPledgeClass() < 5))
            {
                 activeChar.sendMessage("You can't equip that");
                    return;
            }

            if ((itemId >= 7850 && itemId <= 7859) && Config.OATH_ARMORS && (cl == null))
            {
                    activeChar.sendMessage("You can't equip that");
                    return;
            }

            if (itemId == 6841 && Config.CASTLE_CROWN && (cl == null || (cl.getHasCastle() == 0 || !activeChar.isClanLeader())))
            {
                    activeChar.sendMessage("You can't equip that");
                    return;
            }

            if (Config.CASTLE_CIRCLETS && ((itemId >= 6834 && itemId <= 6840) || itemId == 8182 || itemId == 8183))
            {
                    if (cl == null)
                    {
                            activeChar.sendMessage("You can't equip that");
                            return;
                    }
                    else
                    {
                            int circletId = CastleManager.getInstance().getCircletByCastleId(cl.getHasCastle());
                            if (activeChar.getPledgeType() == -1 || circletId != itemId)
                            {
                                    activeChar.sendMessage("You can't equip that");
                                    return;
                            }
                    }
            }

 

You can remove the configs couse I dont have time now :(

  • 0
Posted

ohh sorry In UseItem.java

after :

if (itemId == 57)

ERROR ON COMPILE ???

 

    [javac] Compiling 1221 source files to C:\workspace\L2_GameServer_It\build\classes

    [javac] C:\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\clientpackets\UseItem.java:142: not a statement

    [javac] L2Clan cl = activeChar.getClan();

    [javac] ^

    [javac] C:\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\clientpackets\UseItem.java:142: ';' expected

    [javac] L2Clan cl = activeChar.getClan();

    [javac]       ^

    [javac] 2 errors

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...