Skip to content

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

Featured Replies

i fixed that problem http://www.maxcheaters.com/forum/index.php?topic=137066.0 , now leader takes crown, but every clan member can wear it ???

		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 :(

where do i add this?

 

ohh sorry In UseItem.java

after :

if (itemId == 57)

  • Author

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

 

damn I forget the import :D

import net.sf.l2j.gameserver.model.L2Clan;

';' expected

 

Hey mate, are You blind?

  • Author

Hey mate, are You blind?

tried but nothing, i will try now with the import

actually when i add ;, i still got error not a statement, but 1 error

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.