DominiQue Posted December 30, 2009 Share Posted December 30, 2009 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} Link to comment Share on other sites More sharing options...
kosker Posted January 10, 2010 Share Posted January 10, 2010 man noone cant understand Link to comment Share on other sites More sharing options...
Levi4than Posted January 10, 2010 Share Posted January 10, 2010 Nice share bro!!Keep sharing your good work! Link to comment Share on other sites More sharing options...
Belzebul Posted January 10, 2010 Share Posted January 10, 2010 To where i have to put these lines? I mean what java file? To where? thank you Link to comment Share on other sites More sharing options...
rodox Posted January 10, 2010 Share Posted January 10, 2010 To where i have to put these lines?Use search in eclipse. Link to comment Share on other sites More sharing options...
Stefoulis15 Posted January 11, 2010 Share Posted January 11, 2010 credits to setekh from L2J-Archid. Link to comment Share on other sites More sharing options...
+cs.tribal Posted January 27, 2010 Share Posted January 27, 2010 Thank you mate! I am searching for fixes for my server! Link to comment Share on other sites More sharing options...
Xd3sT1nYX Posted January 27, 2010 Share Posted January 27, 2010 nice Fix! i love you !!i will use iton my server! Link to comment Share on other sites More sharing options...
DarkHacker Posted January 27, 2010 Share Posted January 27, 2010 ok good but i have a question only there you write "You are not allowed to do this" can we change it? Link to comment Share on other sites More sharing options...
MeVsYou Posted February 25, 2010 Share Posted February 25, 2010 I think need some imports to put or i am wrong,otherwelse it gives me many many errors. Link to comment Share on other sites More sharing options...
OverMe Posted February 25, 2010 Share Posted February 25, 2010 tnx man but have some errors Link to comment Share on other sites More sharing options...
Raule Posted February 27, 2010 Share Posted February 27, 2010 There's more ways to stcuk auguments..xd /moved Link to comment Share on other sites More sharing options...
varens Posted February 28, 2010 Share Posted February 28, 2010 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; } } Link to comment Share on other sites More sharing options...
leoadrian Posted June 8, 2010 Share Posted June 8, 2010 please can someone explain which part of the useitem have to insert this code? tnx Link to comment Share on other sites More sharing options...
Setekh Posted June 8, 2010 Share Posted June 8, 2010 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 Link to comment Share on other sites More sharing options...
Recommended Posts