Jump to content
  • 0

How block or penalize the use of heavy in classes without heavy mastery?


Question

Posted

I wanna know how i can put a limit for example for "Tyrants" can use heavy why not have mastery for this, archers, dagers etc... something like block the use for that classes or put a penalty reduce the speed when some class without heavy mastery equip this. thx.

3 answers to this question

Recommended Posts

  • 0
Posted

http://www.maxcheaters.com/forum/index.php?topic=41734.0

 

with this i think u cant even wear it, but it works

and u didnt post what server pack you have and what cronicle

 

My Rev:

 

l2jdp = committed-rev="6174"

l2j = committed-rev="3102"

 

Gracia Final.

 

The code say:

 

if (item.isEquipable())

     {

        if (activeChar.isDisarmed())

           return;

 

        if (!((L2Equip) item.getItem()).allowEquip(activeChar))  (This line is not in my code).

        {

           activeChar.sendPacket(new SystemMessage(SystemMessageId.NO_CONDITION_TO_EQUIP));

           return;

        }

 

But in the mine:

 

if (activeChar.isDisarmed())

                       {

                           activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION));

                           return;

                       }

                       

                       // Don't allow weapon/shield equipment if a cursed weapon is equiped

                       if (activeChar.isCursedWeaponEquipped())

                       {

                           return;

                       }

                       

  • 0
Posted

I try with:

 

if (activeChar.isDisarmed())

                       {

                           activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION));

                           return;

                       }

                       

                     //Begining the script

                                if (activeChar.getClassId().getId() == 114)

                                {

                                   if (item.getItemType() == L2ArmorType.HEAVY)

                                   {

                                      activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION));

                                      return;

                                   }  

                                }

                       

                       // Don't allow weapon/shield equipment if a cursed weapon is equiped

 

Compile without problems but not work -.-

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...