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

    • Hi everyone, A while ago, I needed to extract some L2 textures and found that acmi's L2Tool was a good way to do it. There might be other methods out there but I'm not aware of them, so I decided to fork this project and improve it to suit my needs. I built this using BellSoft Liberica JDK 17. Since modern Java versions no longer include JavaFX by default, I've made the app handle it automatically. You don't need any manual setup—just use the  run.bat  and it will automatically extract the required JavaFX modules on the first run. Key features of this fork: UI Overhaul: I've tweaked the interface to give it a cleaner look with Dark Mode and more detailed metadata for each texture. Export Formats: You can now extract textures in WEBP, PNG, and DDS. Individual or Batch Export: Flexible options to export a single selected texture or the entire package at once.     I'm leaving the link here in case it's useful to anyone!   Installation and Execution:     Clone the repository:   https://github.com/Ak4n1/l2tool cd l2tool          2.Build the project:   ./gradlew build              3. Run the application:         ./run.bat      Or simply double-click on run.bat.    
    • Wtb full account or items on l2 warland 
    • https://discord.gg/k53SZ4DM5z   Interlude Client L2Old Pride is a L2 Pride Interlude Based All functional skills (Not archer/mage server)   L2Old Pride Helper (Works like Woundrous Cubic) https://imgur.com/iYqmHQY Farm Zones: Cave of Trials and Elven Ruins (Chaotic) Olympiads: Every 15 days Various Cosmetic Items https://imgur.com/uoeU6Jw https://imgur.com/oCS2Zed PvP Zone: Gludin Village (No-Parties, Disguised) More than 100 new Skills https://imgur.com/6RaPsQV Max Level: 90 https://imgur.com/z4QVJKZ Gaining Xp by PVP https://imgur.com/LRqI31T Purchasable S-grade items +10 or +20 with random chance to enchant +5 Purchasable Custom Items Depends on Tier Mysterious Merchants https://imgur.com/2ZwWyPH Auto Enchant Via PvPing (with low chance) Custom Raid Bosses Siege Every Weekend (Aden, Rune, Giran) Autofarm / Drop Tracker https://imgur.com/Vz3rha6   RATES: • Start Level 80 • Max level 90  • EXP: 5000x • SP: 5000x • ADENA 6000x   ENCHANT: • Maximum enchant S Grade Items: +35. • Maximum enchant Unique/Epic Items: +25. • Maximum enchant Legendary Items: +18. • Maximum enchant Relic Items: +14. •Descriptions for rate at scrolls!   EVENTS: • TEAMS vs TEAMS • CAPTURE THE FLAG • DOMINATION • DEATH MATCH • DICE OF DEATH • CHAOTIC ZONE   OTHERS: Assistance system in pvps. Where support classes are enabled to receive pvp with a low chance, for supporting a party member during pvp. •  /sit to regen HP/MP/CP • Custom Shots Glows https://imgur.com/FLK0DmR • Achievements System • Daily Tasks System • Monthly Tasks System   CUSTOM ARMORS SETS Dread Armor/Titanium Armor Pride Armor Rykros Armor https://imgur.com/SPxoQp1   CUSTOM WEAPONS SETS Unique Weapons Pride Weapons Legendary Weapons Relic Weapons https://imgur.com/kOHNXhS   CUSTOM ACCESSORIES Standard Superior Legendary https://imgur.com/zPqNiiX   CUSTOM JEWELS/TATTOO Legendary Nightmarish https://imgur.com/gcqS28P There are many more features that you will only understand by playing and following. Beta testing server is currently open. Follow us on our discord and join our server to test it.
    • You shouldn't use rev 382, not sure why everyone keep using that.   I don't make changesets for fun, I don't make new revisions for nothing.   Follow the revisions.
  • 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