Jump to content

Recommended Posts

Posted

There are 2 ways I think :

Equip an 2handed wep and put a shield :)

Equip an one handed weapons ,equp shield and put a 2handed weapon in hand :)

 

File :

/**

*

* useitem.java

*

*/

 

 

FIX :

           if (activeChar.isFishing() && (itemId < 6535 || itemId > 6540))

           {

               // You cannot do anything else while fishing

               SystemMessage sm = new SystemMessage(SystemMessageId.CANNOT_DO_WHILE_FISHING_3);

               getClient().getActiveChar().sendPacket(sm);

               sm = null;

               return;

           }

 

+ L2Weapon curwep = activeChar.getActiveWeaponItem();

+            if (curwep != null)

+               {

+            if ((curwep.getItemType() == L2WeaponType.DUAL) && (item.getItemType() == L2WeaponType.NONE))

+                    {

+             activeChar.sendMessage("You are not allowed to do this.");

+             return;

+                    }

+             else if ((curwep.getItemType() == L2WeaponType.BOW) && (item.getItemType() == L2WeaponType.NONE))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+             else if ((curwep.getItemType() == L2WeaponType.BIGBLUNT) && (item.getItemType() == L2WeaponType.NONE))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+             else if ((curwep.getItemType() == L2WeaponType.BIGSWORD) && (item.getItemType() == L2WeaponType.NONE))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+             else if ((curwep.getItemType() == L2WeaponType.POLE) && (item.getItemType() == L2WeaponType.NONE))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.DUALFIST) && (item.getItemType() == L2WeaponType.NONE))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.DAGGER) && (item.getItemType() == L2WeaponType.DUALFIST))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                   }

+ else if ((curwep.getItemType() == L2WeaponType.DAGGER) && (item.getItemType() == L2WeaponType.POLE))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.DAGGER) && (item.getItemType() == L2WeaponType.BIGBLUNT))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.DAGGER) && (item.getItemType() == L2WeaponType.BIGSWORD))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.DAGGER) && (item.getItemType() == L2WeaponType.BOW))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.DAGGER) && (item.getItemType() == L2WeaponType.DUAL))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.SWORD) && (item.getItemType() == L2WeaponType.DUALFIST))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.SWORD) && (item.getItemType() == L2WeaponType.POLE))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.SWORD) && (item.getItemType() == L2WeaponType.BIGBLUNT))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.SWORD) && (item.getItemType() == L2WeaponType.BIGSWORD))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.SWORD) && (item.getItemType() == L2WeaponType.BOW))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.SWORD) && (item.getItemType() == L2WeaponType.DUAL))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.BLUNT) && (item.getItemType() == L2WeaponType.DUALFIST))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.BLUNT) && (item.getItemType() == L2WeaponType.POLE))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.BLUNT) && (item.getItemType() == L2WeaponType.BIGBLUNT))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.BLUNT) && (item.getItemType() == L2WeaponType.BIGSWORD))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.BLUNT) && (item.getItemType() == L2WeaponType.BOW))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+ else if ((curwep.getItemType() == L2WeaponType.BLUNT) && (item.getItemType() == L2WeaponType.DUAL))

+                    {

+         activeChar.sendMessage("You are not allowed to do this.");

+         return;

+                    }

+                }

 

// Char cannot use item when dead

if (activeChar.isDead())

{

SystemMessage sm = new SystemMessage(SystemMessageId.S1_CANNOT_BE_USED);

sm.addItemName(itemId);

getClient().getActiveChar().sendPacket(sm);

sm = null;

return;

}

 

 

CREDITS : V3ndetta[ME}
  • 2 weeks later...
  • 3 weeks later...
  • 4 weeks later...
Posted

then sey as that weys, some ppl will fix that i think

 

and here you have same code but some shorter :)

 

            L2Weapon curwep = activeChar.getActiveWeaponItem();
            if(curwep != null)
            {
            	if((curwep.getItemType() == L2WeaponType.DUAL && item.getItemType() == L2WeaponType.NONE)
            		|| (curwep.getItemType() == L2WeaponType.BOW && item.getItemType() == L2WeaponType.NONE)
            		|| (curwep.getItemType() == L2WeaponType.BIGBLUNT && item.getItemType() == L2WeaponType.NONE)
            		|| (curwep.getItemType() == L2WeaponType.BIGBLUNT && item.getItemType() == L2WeaponType.NONE)
            		|| (curwep.getItemType() == L2WeaponType.POLE && item.getItemType() == L2WeaponType.NONE)
            		|| (curwep.getItemType() == L2WeaponType.DUALFIST && item.getItemType() == L2WeaponType.NONE)
            		|| (curwep.getItemType() == L2WeaponType.DAGGER && item.getItemType() == L2WeaponType.DUALFIST)
            		|| (curwep.getItemType() == L2WeaponType.DAGGER && item.getItemType() == L2WeaponType.POLE)
            		|| (curwep.getItemType() == L2WeaponType.DAGGER && item.getItemType() == L2WeaponType.BIGBLUNT)
            		|| (curwep.getItemType() == L2WeaponType.DAGGER && item.getItemType() == L2WeaponType.BIGSWORD)
            		|| (curwep.getItemType() == L2WeaponType.DAGGER && item.getItemType() == L2WeaponType.BOW)
            		|| (curwep.getItemType() == L2WeaponType.DAGGER && item.getItemType() == L2WeaponType.DUAL)
            		|| (curwep.getItemType() == L2WeaponType.SWORD && item.getItemType() == L2WeaponType.DUALFIST)
            		|| (curwep.getItemType() == L2WeaponType.SWORD && item.getItemType() == L2WeaponType.POLE)
            		|| (curwep.getItemType() == L2WeaponType.SWORD && item.getItemType() == L2WeaponType.BIGBLUNT)
            		|| (curwep.getItemType() == L2WeaponType.SWORD && item.getItemType() == L2WeaponType.BIGSWORD)
            		|| (curwep.getItemType() == L2WeaponType.SWORD && item.getItemType() == L2WeaponType.BOW)
            		|| (curwep.getItemType() == L2WeaponType.SWORD && item.getItemType() == L2WeaponType.DUAL)
            		|| (curwep.getItemType() == L2WeaponType.BLUNT && item.getItemType() == L2WeaponType.DUALFIST)
            		|| (curwep.getItemType() == L2WeaponType.BLUNT && item.getItemType() == L2WeaponType.POLE)
            		|| (curwep.getItemType() == L2WeaponType.BLUNT && item.getItemType() == L2WeaponType.BIGBLUNT)
            		|| curwep.getItemType() == L2WeaponType.BLUNT && item.getItemType() == L2WeaponType.BIGSWORD)
            		|| (curwep.getItemType() == L2WeaponType.BLUNT && item.getItemType() == L2WeaponType.BOW)
            		|| (curwep.getItemType() == L2WeaponType.BLUNT && item.getItemType() == L2WeaponType.DUAL))
            	{
            		activeChar.sendMessage("You are not allowed to do this.");
            		return;
            	}	
            }

  • 3 months later...
Posted

credits to setekh from L2J-Archid.

Credits to vago... Anyway i said it once and again.. the packet protection of auguments is stupid.. CUS IT OVERLAP! use item listeners.

Locked

Guest
This topic is now closed to further replies.


×
×
  • Create New...