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

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock