Jump to content

Recommended Posts

Posted

If you want to prevent to some class use some kind of equipment (for example Titan with bow) you can use this script.

You need to insert to network/clientpackets/UseItem.java the following lines:

 

 

if (item.isEquipable())

{

if (activeChar.isDisarmed())

return;

 

if (!((L2Equip) item.getItem()).allowEquip(activeChar))

{

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

return;

}

 

//Begining the script

+ if (activeChar.getClassId().getId() == 88)

+ {

+ if (item.getItemType() == L2ArmorType.MAGIC)

+ {

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

+ return;

+ }

+ }

 

 

In this example the class is Duelist and the item type is robe armor.

If you want the same with some kind of weapon you need to change the line

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

to

if (item.getItemType() == L2WeaponType.DAGGER)

the available class-ids and item types are listed below.

 

To prevent sub-class bugging i use this script to unequip all the armors/weapon/jewels on class changing:

 

model/actor/instance/L2PcInstance.java

/**

* Changes the character's class based on the given class index.

* <BR><BR>

* An index of zero specifies the character's original (base) class,

* while indexes 1-3 specifies the character's sub-classes respectively.

*

* @param classIndex

*/

public boolean setActiveClass(int classIndex)

{

+ L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);

+ if (chest != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

+

+ L2ItemInstance head = getInventory().getPaperdollItem(Inventory.PAPERDOLL_HEAD);

+ if (head != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(head.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

+

+ L2ItemInstance gloves = getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES);

+ if (gloves != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(gloves.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

+

+ L2ItemInstance feet = getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET);

+ if (feet != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(feet.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

+

+ L2ItemInstance legs = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS);

+ if (legs != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(legs.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

+

+ L2ItemInstance rhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);

+ if (rhand != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(rhand.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

+

+ L2ItemInstance lhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);

+ if (lhand != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(lhand.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

+ L2ItemInstance lear = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEAR);

+ if (lhand != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(lear.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

+ L2ItemInstance rear = getInventory().getPaperdollItem(Inventory.PAPERDOLL_REAR);

+ if (lhand != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(rear.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

+ L2ItemInstance neck = getInventory().getPaperdollItem(Inventory.PAPERDOLL_NECK);

+ if (lhand != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(neck.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

+ L2ItemInstance lfinger = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LFINGER);

+ if (lhand != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(lfinger.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

+ L2ItemInstance rfinger = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RFINGER);

+ if (lhand != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(rfinger.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

+ L2ItemInstance under = getInventory().getPaperdollItem(Inventory.PAPERDOLL_UNDER);

+ if (lhand != null)

+ {

+

+ L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(under.getItem().getBodyPart());

+ InventoryUpdate iu = new InventoryUpdate();

+ for (L2ItemInstance element : unequipped)

+ iu.addModifiedItem(element);

+ sendPacket(iu);

+

+ }

 

[table][tr][td]Class ID-s:[/td][td]Item types[/td][/tr][tr][td]HUMANS

-- 0=Human Fighter | 1=Warrior | 2=Gladiator | 3=Warlord | 4=Human Knight

-- 5=Paladin | 6=Dark Avenger | 7=Rogue | 8=Treasure Hunter | 9=Hawkeye

-- 10=Human Mystic | 11=Wizard | 12=Sorcerer/ss | 13=Necromancer | 14=Warlock

-- 15=Cleric | 16=Bishop | 17=Prophet

 

-- ELVES

-- 18=Elven Fighter | 19=Elven Knight | 20=Temple Knight | 21=Swordsinger | 22=Elven Scout

-- 23=Plainswalker | 24=Silver Ranger | 25=Elven Mystic | 26=Elven Wizard | 27=Spellsinger

-- 28=Elemental Summoner | 29=Elven Oracle | 30=Elven Elder

 

-- DARK ELVES

-- 31=Dark Fighter | 32=Palus Knight | 33=Shillien Knight | 34=Bladedancer | 35=Assassin

-- 36=Abyss Walker | 37=Phantom Ranger | 38=Dark Mystic | 39=Dark Wizard | 40=Spellhowler

-- 41=Phantom Summoner | 42=Shillien Oracle | 43=Shillien Elder

 

-- ORCS

-- 44=Orc Fighter | 45=Orc Raider | 46=Destroyer | 47=Monk | 48=Tyrant

-- 49=Orc Mystic | 50=Orc Shaman | 51=Overlord | 52=Warcryer

 

-- DWARVES

-- 53=Dwarven Fighter | 54=Scavenger | 55=Bounty Hunter | 56=Artisan | 57=Warsmith

 

-- HUMANS 3rd Professions

-- 88=Duelist | 89=Dreadnought | 90=Phoenix Knight | 91=Hell Knight | 92=Sagittarius

-- 93=Adventurer | 94=Archmage | 95=Soultaker | 96=Arcana Lord | 97=Cardinal

-- 98=Hierophant

 

-- ELVES 3rd Professions

-- 99=Evas Templar | 100=Sword Muse | 101=Wind Rider | 102=Moonlight Sentinel

-- 103=Mystic Muse | 104=Elemental Master | 105=Evas Saint

 

-- DARK ELVES 3rd Professions

-- 106=Shillien Templar | 107=Spectral Dancer | 108=Ghost Hunter | 109=Ghost Sentinel

-- 110=Storm Screamer | 111=Spectral Master | 112=Shillien Saint

 

-- ORCS 3rd Professions

-- 113=Titan | 114=Grand Khavatari

-- 115=Dominator | 116=Doomcryer

 

-- DWARVES 3rd Professions

-- 117=Fortune Seeker | 118=Maestro

 

-- KAMAELS

-- 123=Male Soldier | 124=Female Soldier | 125=Trooper | 126=Warder

-- 127=Berserker | 128=Male Soul Breaker | 129=Female Soul Breaker | 130=Arbalester

-- 131=Doombringer | 132=Male Soul Hound | 133=Female Soul Hound | 134=Trickster

-- 135=Inspector | 136=Judicator [/td][td]-Weapons-

NONE (Shield)

SWORD

BLUNT

DAGGER

BOW

POLE

ETC

FIST

DUAL

DUALFIST

BIGSWORD (Two Handed Swords)

PET

ROD

BIGBLUNT (Two handed blunt)

ANCIENT_SWORD

CROSSBOW

RAPIER

 

-Armors-

HEAVY

LIGHT

MAGIC

[/td][/tr][/table]

 

Tested on L2JFree. I hope this share was usefull. and sorry for my bad english:P

Posted

+1 karma for your both shares.Really nice.That's the part that maxcheaters is missing,the development on java.Keep it up dude.

  • 1 month later...
Posted

do i have to replace this with urs?

 

            if (item.isEquipable())
            {
            	// No unequipping/equipping while the player is in special conditions
			if (activeChar.isStunned() || activeChar.isSleeping() || activeChar.isParalyzed()
					|| activeChar.isAlikeDead())
			{
				activeChar.sendMessage("Your status does not allow you to do that.");
				return;
			}

			int bodyPart = item.getItem().getBodyPart();

			// Prevent player to remove the weapon on special conditions
                if ((activeChar.isAttackingNow() || activeChar.isCastingNow() || activeChar.isMounted() || (activeChar._inEventCTF && activeChar._haveFlagCTF))
                        && (bodyPart == L2Item.SLOT_LR_HAND 
                            || bodyPart == L2Item.SLOT_L_HAND 
                            || bodyPart == L2Item.SLOT_R_HAND))
                {
                    if (activeChar._inEventCTF && activeChar._haveFlagCTF)
                    	activeChar.sendMessage("This item can not be equipped when you have the flag.");
                	return;
                }
                
                // Don't allow weapon/shield equipment if a cursed weapon is equiped
                if (activeChar.isCursedWeaponEquiped()
                       && ((bodyPart == L2Item.SLOT_LR_HAND 
                               || bodyPart == L2Item.SLOT_L_HAND 
                               || bodyPart == L2Item.SLOT_R_HAND)
                       || itemId == 6408)) // Don't allow to put formal wear
                {
                   return;
                }

 

 

also if i add it can i add multiple numbers like that?

 

 

+			if (activeChar.getClassId().getId() == 88,117,118

 

 

Posted
Buildfile: C:\Documents and Settings\workspace\L2_GameServer_It\build.xml
clean:
init:
    [mkdir] Created dir: C:\Documents and Settings\workspace\L2_GameServer_It\build
    [mkdir] Created dir: C:\Documents and Settings\workspace\L2_GameServer_It\build\classes
    [mkdir] Created dir: C:\Documents and Settings\workspace\L2_GameServer_It\build\dist
    [mkdir] Created dir: C:\Documents and Settings\workspace\L2_GameServer_It\build\dist\login
    [mkdir] Created dir: C:\Documents and Settings\workspace\L2_GameServer_It\build\dist\gameserver
version:
     [exec] Execute failed: java.io.IOException: Cannot run program "svnversion": CreateProcess error=2, ??? ????? ?????? ? ?????? ??? ???????????? ??????? ??? ?? ???????
compile:
    [javac] Compiling 1214 source files to C:\Documents and Settings\workspace\L2_GameServer_It\build\classes
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\clientpackets\UseItem.java:402: class, interface, or enum expected
    [javac] if (item.isEquipable())
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\clientpackets\UseItem.java:407: class, interface, or enum expected
    [javac] 			if (!((L2Equip) item.getItem()).allowEquip(activeChar))
    [javac] 			^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\clientpackets\UseItem.java:410: class, interface, or enum expected
    [javac] 				return;
    [javac] 				^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\clientpackets\UseItem.java:411: class, interface, or enum expected
    [javac] 			}
    [javac] 			^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\clientpackets\UseItem.java:419: class, interface, or enum expected
    [javac] +					return;
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\clientpackets\UseItem.java:420: class, interface, or enum expected
    [javac] +				}	
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8539: not a statement
    [javac] +		L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8539: ';' expected
    [javac] +		L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
    [javac]  		              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8540: illegal start of expression
    [javac] +		if (chest != null)
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8540: not a statement
    [javac] +		if (chest != null)
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8541: illegal start of expression
    [javac] +		{
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8541: not a statement
    [javac] +		{
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8543: '.class' expected
    [javac] +				L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart());
    [javac]  				                 ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8542: not a statement
    [javac] +			
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8543: illegal start of expression
    [javac] +				L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart());
    [javac]  				                            ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8543: not a statement
    [javac] +				L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart());
    [javac]  				                              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8544: not a statement
    [javac] +				InventoryUpdate iu = new InventoryUpdate();
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8544: ';' expected
    [javac] +				InventoryUpdate iu = new InventoryUpdate();
    [javac]  				               ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8545: illegal start of expression
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8545: not a statement
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8545: ')' expected
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                   ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8545: not a statement
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				    ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8545: ';' expected
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                           ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8545: not a statement
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8545: ';' expected
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                                        ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8547: not a statement
    [javac] +				sendPacket(iu);
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8549: illegal start of expression
    [javac] +		}
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8548: not a statement
    [javac] +			
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8550: not a statement
    [javac] +		
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8551: ';' expected
    [javac] +		L2ItemInstance head = getInventory().getPaperdollItem(Inventory.PAPERDOLL_HEAD);
    [javac]  		              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8552: illegal start of expression
    [javac] +		if (head != null)
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8552: not a statement
    [javac] +		if (head != null)
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8553: illegal start of expression
    [javac] +		{
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8553: not a statement
    [javac] +		{
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8555: '.class' expected
    [javac] +				L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(head.getItem().getBodyPart());
    [javac]  				                 ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8554: not a statement
    [javac] +			
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8555: illegal start of expression
    [javac] +				L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(head.getItem().getBodyPart());
    [javac]  				                            ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8555: not a statement
    [javac] +				L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(head.getItem().getBodyPart());
    [javac]  				                              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8556: not a statement
    [javac] +				InventoryUpdate iu = new InventoryUpdate();
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8556: ';' expected
    [javac] +				InventoryUpdate iu = new InventoryUpdate();
    [javac]  				               ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8557: illegal start of expression
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8557: not a statement
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8557: ')' expected
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                   ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8557: not a statement
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				    ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8557: ';' expected
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                           ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8557: not a statement
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8557: ';' expected
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                                        ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8559: not a statement
    [javac] +				sendPacket(iu);
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8561: illegal start of expression
    [javac] +		}
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8560: not a statement
    [javac] +			
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8562: not a statement
    [javac] +		
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8563: ';' expected
    [javac] +		L2ItemInstance gloves = getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES);
    [javac]  		              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8564: illegal start of expression
    [javac] +		if (gloves != null)
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8564: not a statement
    [javac] +		if (gloves != null)
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8565: illegal start of expression
    [javac] +		{
    [javac]  		^

Posted

    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8565: not a statement
    [javac] +		{
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8567: '.class' expected
    [javac] +				L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(gloves.getItem().getBodyPart());
    [javac]  				                 ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8566: not a statement
    [javac] +			
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8567: illegal start of expression
    [javac] +				L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(gloves.getItem().getBodyPart());
    [javac]  				                            ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8567: not a statement
    [javac] +				L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(gloves.getItem().getBodyPart());
    [javac]  				                              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8568: not a statement
    [javac] +				InventoryUpdate iu = new InventoryUpdate();
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8568: ';' expected
    [javac] +				InventoryUpdate iu = new InventoryUpdate();
    [javac]  				               ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8569: illegal start of expression
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8569: not a statement
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8569: ')' expected
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                   ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8569: not a statement
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				    ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8569: ';' expected
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                           ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8569: not a statement
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8569: ';' expected
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                                        ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8571: not a statement
    [javac] +				sendPacket(iu);
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8573: illegal start of expression
    [javac] +		}
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8572: not a statement
    [javac] +			
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8574: not a statement
    [javac] +		
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8575: ';' expected
    [javac] +		L2ItemInstance feet = getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET);
    [javac]  		              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8576: illegal start of expression
    [javac] +		if (feet != null)
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8576: not a statement
    [javac] +		if (feet != null)
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8577: illegal start of expression
    [javac] +		{
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8577: not a statement
    [javac] +		{
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8579: '.class' expected
    [javac] +				L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(feet.getItem().getBodyPart());
    [javac]  				                 ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8578: not a statement
    [javac] +			
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8579: illegal start of expression
    [javac] +				L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(feet.getItem().getBodyPart());
    [javac]  				                            ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8579: not a statement
    [javac] +				L2ItemInstance[] unequipped = +getInventory().unEquipItemInBodySlotAndRecord(feet.getItem().getBodyPart());
    [javac]  				                              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8580: not a statement
    [javac] +				InventoryUpdate iu = new InventoryUpdate();
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8580: ';' expected
    [javac] +				InventoryUpdate iu = new InventoryUpdate();
    [javac]  				               ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8581: illegal start of expression
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8581: not a statement
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8581: ')' expected
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                   ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8581: not a statement
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				    ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8581: ';' expected
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                           ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8581: not a statement
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8581: ';' expected
    [javac] +				for (L2ItemInstance element : unequipped)
    [javac]  				                                        ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8583: not a statement
    [javac] +				sendPacket(iu);
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8585: illegal start of expression
    [javac] +		}
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8584: not a statement
    [javac] +			
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8586: not a statement
    [javac] +		
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8587: ';' expected
    [javac] +		L2ItemInstance legs = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS);
    [javac]  		              ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8588: illegal start of expression
    [javac] +		if (legs != null)
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8588: not a statement
    [javac] +		if (legs != null)
    [javac] ^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8589: illegal start of expression
    [javac] +		{
    [javac]  		^
    [javac] C:\Documents and Settings\workspace\L2_GameServer_It\java\net\sf\l2j\gameserver\model\actor\instance\L2PcInstance.java:8589: not a statement
    [javac] +		{
    [javac] ^
    [javac] 100 errors

BUILD FAILED
C:\Documents and Settings\workspace\L2_GameServer_It\build.xml:67: Compile failed; see the compiler error output for details.

Total time: 6 seconds

 

 

First sorry for double post i could write over 20000 characters...

 

 

Second What have i to make now?

Posted

First sorry for double post i could write over 20000 characters...

 

 

Second What have i to make now?

 

what a nab!

 

you must remove the + !!!

 

Also, I applied Succsessfully this to L2J (in eclipse), lets Hope it will Work in Game too . I will post a feedback later.

Posted

ok, here my FeedBack :

 

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

        {

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

            {

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

              return;

            } 

        }

 

Armor Types for Me Didnt Worked at all (tried only MAGIC) maybe is different in L2J.

 

################################################################

 

 

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

        {

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

            {

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

              return;

            } 

        }

 

This Worked.

 

#################################################################

 

 

The sub-class bugging Prevention Worked Well.

 

#################################################################

 

 

Now My Question is : How can be In L2J the Armor Type ? I mean...Why the Hell didnt worked ?

Posted

Ok i done it....

 

Whats ur problem ?

 

i dont care what u say i am new to java....

what a nab!

 

you must remove the + !!!

 

Also, I applied Succsessfully this to L2J (in eclipse), lets Hope it will Work in Game too . I will post a feedback later.

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



  • Posts

    • Trust and Honesty   We don’t need to brag - what matters is that you actually feel the service works the way it should. No surprises, no stress. With Vibe SMS, you can focus on your tasks knowing everything runs smoothly. Like having a friend by your side calm, reliable, and without unnecessary words.   Website link — https://vibe-sms.net/ Our Telegram channel — https://t.me/vibe_sms
    • The old Trances packs were built using Java 7, which is outdated. Our server is running on the latest Java version, fully up-to-date for 2025
    • Experience L2Gold like never before – available ONLY on Saturdays & Sundays! Custom Armors: Dynasty, Apella Custom Weapons: L2Gold Weapons Custom Jewelry: L2Gold Jewelry Custom Teleport System & AIO Buffer Custom Zones, NPCs & Raidbosses This is not just another private server – it’s a limited-time battleground for the ultimate L2 experience! Play only on weekends Website: https://l2kandra.online/ Info & Contact: https://www.facebook.com/profile.php?id=61578869175323  
    • 突发新闻! Twitter Premium(推特高级版) 现以优惠价发售!立即尝试 — 限时优惠! ➡ Twitter Premium X 订阅(适用于您的推特账户),可选 1 个月 / 1 年(任选)。需要登录授权您的推特账户。价格:每月 $7–13(每年 $75) ➡ Twitter X Premium Plus 订阅 + GROK AI 助手(适用于您的推特账户),可选 1 个月 / 1 年(任选)。需要登录授权您的推特账户。价格:每月 $48–55(每年 $480) ➡ 2010–2023 年老推特账号,带蓝色认证标志(Tier 1/2/3 国家)| 提供完整访问权限(含登录名、密码和令牌)| 价格:起价 $9 ➡ 2010–2023 年老推特 NFT 账号,带蓝色认证标志(Tier 1/2/3 国家)| 提供完整访问权限(含登录名、密码和令牌)| 价格:起价 $9 ➡ 2010–2023 年老推特账号,带蓝色认证标志 + 真实粉丝(100–20000,可自选)| Tier 1/2/3 国家 | 提供完整访问权限(含登录名、密码和令牌)| 支持补充:30+ 天 | 价格:起价 $9.5 ➡ 2010–2023 年老推特账号,带广告管理器(ADS Manager)和蓝色认证标志,并绑定信用卡 | 区域:Tier 1 国家 | 提供完整访问权限(含登录名、密码和令牌)| 价格:起价 $35 您可以在我们的网站商店或通过 Telegram 机器人购买! ➡ 数字商品商店(网站):前往 ➡ 商店 Telegram 机器人:前往 ➡ Telegram Stars 购买机器人:前往 ➡ SMM 面板:前往 – 推广您的社交媒体账户。 我们为您呈现最新的优惠与特别活动,用于购买我们平台的商品和服务: 1. 使用优惠码 OCTOBER2025(8% 折扣)在十月于我们的网站或机器人中购物!首次购买还可使用优惠码 SOCNET(15% 折扣) 2. 注册后在我们网站的论坛主题中按以下格式留言,即可获得 $1 商店余额或 10–20% 折扣:"SEND ME BONUS, MY USERNAME IS..." 3. 首次试用 SMM 面板即可获得 $1:只需在网站支持中心提交标题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道与 Telegram Stars 购买机器人每周举行 Telegram Stars 抽奖活动! 新闻资讯: ➡ Telegram 频道:https://t.me/accsforyou_shop✅ ➡ WhatsApp 频道:https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t✅ ➡ Discord 服务器:https://discord.gg/y9AStFFsrh✅ 联系方式与支持: ➡ Telegram:https://t.me/socnet_support✅ ➡ WhatsApp:https://wa.me/79051904467✅ ➡ Discord:socnet_support ✅ ➡ ✉ 邮箱:solomonbog@socnet.store ✅
    • Breaking News! Twitter Premium now available at a discounted price! Try it right now — limited-time offer! ➡ Twitter Premium X subscription for your Twitter account for 1 month / 1 year (your choice). Requires login authorization to your Twitter account. Price from: $7–13 per 1 month ($75 per 12 months) ➡ Twitter X Premium Plus subscription and GROK AI assistant for your Twitter account for 1 month / 1 year (your choice). Requires login authorization to your Twitter account. Price from: $48–55 per 1 month ($480 per 12 months) ➡ Old Twitter Accounts 2010–2023 with BLUE Regular Tick (Tier 1/2/3 countries) | Full access with Login, Password, and Token included! | Price from: $9 ➡ Old Twitter NFT Accounts 2010–2023 with BLUE Tick (Tier 1/2/3 countries) | Full access with Login, Password, and Token included! | Price from: $9 ➡ Old Twitter Accounts 2010–2023 with BLUE Regular Tick and real followers: 100–20000 (followers of your choice) | Tier 1/2/3 countries | Full access with Login, Password, and Token included | Refill: 30+ days | Price from: $9.5 ➡ Old Twitter Accounts 2010–2023 with ADS Manager and BLUE Regular Tick linked with Credit Card | GEO: Tier 1 countries | Full access with Login, Password, and Token included | Price from: $35 Shop in our online store or through our Telegram bot! ➡ Digital goods store (Website): Go ➡ Store Telegram bot: Go ➡ Telegram bot for purchasing Telegram Stars: Go ➡ SMM Panel: Go – promote your social media accounts. We would like to present you with the latest list of promotions and special offers for purchasing products and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website or Bot) in October! You can also use the first-time promo code SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — just post your username after registration on our website in the following format: "SEND ME BONUS, MY USERNAME IS..." – post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a support ticket with the title “Get Trial Bonus” on our website (Support). 4. Weekly giveaways of Telegram Stars in our Telegram channel and our Telegram bot for Star purchases! News: ➡ Telegram channel: https://t.me/accsforyou_shop✅ ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t✅ ➡ Discord server: https://discord.gg/y9AStFFsrh✅ Contacts and Support: ➡ Telegram: https://t.me/socnet_support✅ ➡ WhatsApp: https://wa.me/79051904467✅ ➡ Discord: socnet_support ✅ ➡ ✉ Email: solomonbog@socnet.store ✅
  • Topics

×
×
  • 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