Jump to content
  • 0

[Qestion]StuckSubs


Question

7 answers to this question

Recommended Posts

  • 0
Posted

Thats the base code:

 

Index: /Trunk/L2_GameServer/java/config/intrepid.properties
===================================================================
--- /Trunk/L2_GameServer/java/config/intrepid.properties (revision 30)
+++ /Trunk/L2_GameServer/java/config/intrepid.properties (revision 49)
@@ -30,2 +30,5 @@
#---------------------------------------------
AllowedNPCTypes = L2Boss,L2Chest,L2FestivalMonster,L2Minion,L2Monster,L2Pet,L2RaidBoss,L2SiegeGuard,L2SiegeNpc,L2ControlTower,L2GrandBoss,L2Artefact,L2FortManager,L2FortSiegeNpc,L2FortSiegeGuard,L2FortCommander,L2FortBallista
+
+# Sub stuck
+SubStucking = False
Index: /Trunk/L2_GameServer/java/net/sf/l2j/Config.java
===================================================================
--- /Trunk/L2_GameServer/java/net/sf/l2j/Config.java (revision 30)
+++ /Trunk/L2_GameServer/java/net/sf/l2j/Config.java (revision 49)
@@ -652,4 +652,6 @@
     /** List of NPC types that won't allow casting */
     public static FastList<String> LIST_ALLOWED_NPC_TYPES = new FastList<String>();
+    /** stuck sub **/
+    public static boolean ACUMULATIVE_SUBCLASS_SKILLS;
     
     /** ************************************************** **/
@@ -1552,4 +1554,5 @@
	                	LIST_ALLOWED_NPC_TYPES.add(npc_type);
	                }
+	                ACUMULATIVE_SUBCLASS_SKILLS = Boolean.parseBoolean(intrepidSettings.getProperty("SubStucking", "False"));
	            }
	            catch (Exception e)
Index: /Trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java
===================================================================
--- /Trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 8)
+++ /Trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 49)
@@ -816,6 +816,6 @@
         

-        final Race npcRace = getVillageMasterRace();
-        final ClassType npcTeachType = getVillageMasterTeachType();
+        getVillageMasterRace();
+        getVillageMasterTeachType();

         PlayerClass currClass = PlayerClass.values()[charClassId];
@@ -862,22 +862,4 @@
                         availSubs.remove(availSub);                        
                 }
-
-                if (npcRace == Race.Human || npcRace == Race.Elf)
-                {
-                    // If the master is human or light elf, ensure that fighter-type
-                    // masters only teach fighter classes, and priest-type masters
-                    // only teach priest classes etc.
-                    if (!availSub.isOfType(npcTeachType)) availSubs.remove(availSub);
-
-                    // Remove any non-human or light elf classes.
-                    else if (!availSub.isOfRace(Race.Human)
-                        && !availSub.isOfRace(Race.Elf)) availSubs.remove(availSub);
-                }
-                else
-                {
-                    // If the master is not human and not light elf,
-                    // then remove any classes not of the same race as the master.
-                    if (!availSub.isOfRace(npcRace)) availSubs.remove(availSub);
-                }
             }
         }
Index: /Trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- /Trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 48)
+++ /Trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 49)
@@ -231,4 +231,5 @@
     // Character Skill SQL String Definitions:
	private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE charId=? AND class_index=?";
+	private static final String ACUMULATE_SKILLS_FOR_CHAR_SUB = "SELECT skill_id,skill_level FROM character_skills WHERE charId=? ORDER BY skill_id , skill_level ASC";
	private static final String ADD_NEW_SKILL = "INSERT INTO character_skills (charId,skill_id,skill_level,skill_name,class_index) VALUES (?,?,?,?,?)";
	private static final String UPDATE_CHARACTER_SKILL_LEVEL = "UPDATE character_skills SET skill_level=? WHERE skill_id=? AND charId=? AND class_index=?";
@@ -7557,10 +7558,14 @@
		try
		{
+			// L2 Emu Addon
+			boolean isAcumulative = Config.ACUMULATIVE_SUBCLASS_SKILLS;
+			
			// Retrieve all skills of this L2PcInstance from the database
			con = L2DatabaseFactory.getInstance().getConnection();
-			PreparedStatement statement = con.prepareStatement(RESTORE_SKILLS_FOR_CHAR);
-			
+			PreparedStatement statement = con.prepareStatement(isAcumulative ? ACUMULATE_SKILLS_FOR_CHAR_SUB : RESTORE_SKILLS_FOR_CHAR);
			statement.setInt(1, getObjectId());
-			statement.setInt(2, getClassIndex());
+			if (!isAcumulative)
+				// L2 Emu Addon
+				statement.setInt(2, getClassIndex());
			ResultSet rset = statement.executeQuery();

Index: /Trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/base/PlayerClass.java
===================================================================
--- /Trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/base/PlayerClass.java (revision 6)
+++ /Trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/base/PlayerClass.java (revision 49)
@@ -209,5 +209,4 @@

	private static final Set<PlayerClass> mainSubclassSet;
-	private static final Set<PlayerClass> neverSubclassed = EnumSet.of(Overlord, Warsmith);

	private static final Set<PlayerClass> subclasseSet1 = EnumSet.of(DarkAvenger, Paladin, TempleKnight, ShillienKnight);
@@ -222,5 +221,4 @@
	{
		Set<PlayerClass> subclasses = getSet(null, Third);
-		subclasses.removeAll(neverSubclassed);

		mainSubclassSet = subclasses;
@@ -269,9 +267,38 @@
				switch (_race)
				{
+					case Human:
+						subclasses.removeAll(getSet(DarkElf, Third));
+						subclasses.removeAll(getSet(Elf, Third));
+						subclasses.removeAll(getSet(Orc, Third));
+						subclasses.removeAll(getSet(Dwarf, Third));
+						subclasses.removeAll(getSet(Kamael, Third));
+						break;
+					case DarkElf:
+						subclasses.removeAll(getSet(Human, Third));
+						subclasses.removeAll(getSet(Elf, Third));
+						subclasses.removeAll(getSet(Orc, Third));
+						subclasses.removeAll(getSet(Dwarf, Third));
+						subclasses.removeAll(getSet(Kamael, Third));
+						break;
					case Elf:
+						subclasses.removeAll(getSet(Human, Third));
						subclasses.removeAll(getSet(DarkElf, Third));
-						break;
-					case DarkElf:
+						subclasses.removeAll(getSet(Orc, Third));
+						subclasses.removeAll(getSet(Dwarf, Third));
+						subclasses.removeAll(getSet(Kamael, Third));
+						break;
+					case Orc:
+						subclasses.removeAll(getSet(Human, Third));
+						subclasses.removeAll(getSet(DarkElf, Third));
						subclasses.removeAll(getSet(Elf, Third));
+						subclasses.removeAll(getSet(Dwarf, Third));
+						subclasses.removeAll(getSet(Kamael, Third));
+						break;
+					case Dwarf:
+						subclasses.removeAll(getSet(Human, Third));
+						subclasses.removeAll(getSet(DarkElf, Third));
+						subclasses.removeAll(getSet(Orc, Third));
+						subclasses.removeAll(getSet(Elf, Third));
+						subclasses.removeAll(getSet(Kamael, Third));
						break;
				}
@@ -294,6 +321,4 @@
				else
					subclasses.removeAll(EnumSet.of(femaleSoulbreaker));
-				if (player.getTotalSubClasses() < 2)
-					subclasses.removeAll(EnumSet.of(inspector));
			}
		}

 

And add that too to avoid the mastery duplicates:

 

Index: /Trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- /Trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 49)
+++ /Trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 50)
@@ -7575,12 +7575,20 @@
				int id = rset.getInt("skill_id");
				int level = rset.getInt("skill_level");
+				int chclass = rset.getInt("class_index");

				if (id > 9000 && id < 9007)
					continue; // fake skills for base stats
-
+				if(chclass != getClassIndex())
+
+				{
+					// Remove armor mastery from other classes
+					if(id == 118 || id == 163 || id == 236 || id == 249 || id == 252 || id == 253 || id == 258 || id == 259) continue;
+				}
+					
				// Create a L2Skill object for each record
				L2Skill skill = SkillTable.getInstance().getInfo(id, level);
-
-				// Add the L2Skill object to the L2Character _skills and its Func objects to the calculator set of the L2Character
+					
+				// Add the L2Skill object to the L2Character _skills and its
+				// Func objects to the calculator set of the L2Character
				super.addSkill(skill);
				if (Config.CHECK_SKILLS && Config.CHECK_SKILLS_ACCESS_LEVEL_LIST.contains(getAccessLevel().getLevel()))
@@ -7594,5 +7602,5 @@
						removeSkill(skill);
					}
-			}
+				}

			rset.close();

 

  • 0
Posted

intrepid.properties doesnt exist at l2j final pack, can u make it work please? tnx ^^

 

Pff, think a bit, it was just an example..

 

You can put it for example in l2jmods.properties

 

Check out this Thread - there is explanation about Config.

 

And next time do not bump old threads, locked.

Guest
This topic is now closed to further replies.


  • Posts

    • Very nice and passionate effort. Good luck.
    • SX.ORG is a global proxy platform offering residential, mobile and datacenter IPs for SEO, web scraping, ad verification and multi-account management. It provides flexible IP rotation, precise geo-targeting, HTTP(S)/SOCKS5 support, API access and pay-as-you-go pricing based only on the traffic you use.
    • L2-IMBA — SEASON 2  Custom PvP / PvE Interlude · Every Class Playable BETA — LIVE NOW GRAND START — 11 September 2026, 20:00 GMT+2 https://l2-imba.com · https://discord.com/invite/jmhVpj8ySv ═══════════════════════════════════════ RATES & CORE SETTINGS ═══════════════════════════════════════ Chronicle — Interlude XP / SP — x45, level-adjusted curve Adena — x1 Max level — 90 Subclass — 1, to level 80 Starting hub — Giran Skills — Auto-learn, post-80 via custom trainers Loot — Auto-loot with low-value filtering Buffs — Extended duration, expanded slots, saved schemes Client limit — NO DUAL-BOXING, one client per player Automation — Built-in auto-farm with daily time limit Offline — Trading and crafting enabled Current beta configuration. Final values confirmed at launch sign-off. ═══════════════════════════════════════ All 31 third classes are developed to level 90 through five specialized trainers — there are no dead classes here. Tanks, daggers, archers, warriors, summoners, healers, buffers and crafters all have real post-80 progression and a role worth playing. Full PvE progression through ten farm zones, thirty-five themed encounters and eighteen tracked raids, feeding into gear-equalized Team vs Team and open-world PvP. This isn't a stat patch with a new name. L2-IMBA keeps the combat, classes and world of Interlude and builds a new endgame on top of it — new equipment branches, custom class development past level 80, purpose-built farm ecosystems, boss progression, crafting, and augmentation, all connected into one progression loop. Level and develop your class → choose an armor identity → clear themed farm content → collect materials and boss resources → craft and upgrade without abandoning your build → compete in equalized and open-world PvP → reach God's equipment. ═══════════════════════════════════════ ROLE MASTERY ARMOR ═══════════════════════════════════════ Starting at Dynasty, armor becomes a real build choice instead of a mandatory set everyone wears. Each armor type offers three role masteries plus a flexible Universal path — twelve paths per tier, sixty full-set configurations across the progression. The chest piece selects your mastery; a matching five-piece set activates it. HEAVY   Juggernaut — frontline wall, shield synergy, reflection   Spellbreaker — anti-magic fortress, spell disruption   Slayer — heavy armor turned offensive, vampiric sustain LIGHT   Bowmaster — ranged pressure, kiting, accuracy   Assassin — positional burst, blow reliability, dagger lethals   Berserker — high-risk carry, power rises as HP falls ROBE   Arcanist — rapid-fire critical casting   Invoker — high-impact nuking and debuffs   Oracle — dedicated healing and support Upgrade recipes preserve your chosen path through every tier: Dynasty → Zariche → Valakas → Cursed → God's The system is gear-driven, not class-locked. Build creatively. ═══════════════════════════════════════ LEVEL 90 CLASS DEVELOPMENT ═══════════════════════════════════════ Max level extended to 90. Five specialized trainers — Archer, Tank, Rogue, Warrior, Mystic — cover all 31 third classes in post-80 progression, with 470+ learning entries. Every race gets a custom passive from level one. Tanks get distinct Human/Elf/Dark Elf identities. Duelist gains a two-handed greatsword path. Fortune Seeker becomes a real fighter without losing its spoil identity. Maestro gets a durable frontline route. Summoners, cubics and servitors get deeper combat logic rather than stat scaling. This is backed by server-side combat work — dedicated handling for debuff proficiency, PvE skill damage, blows, lethals, bow reuse, vampirism and reflection. ═══════════════════════════════════════ THE FARMING WORLD ═══════════════════════════════════════ Ten dedicated farm destinations via Global Gatekeeper: Farm Coins 1 & 2, Holy, Fire/Water, Wind, Earth, Unholy, Golden, Chaotic and Night zones. Seven themed enemy families — Undead, Demon, Angel, Beast, Bug, Water, Fire — each with four stages and a mini-boss. Thirty-five distinct encounters, each with its own resource identity feeding crafting. Eighteen tracked raids — twelve Farm Raid Bosses and six Custom Epic Raid Bosses. Plus a scheduled group-based Party Zone with dynamically managed normal and rare spawns. ═══════════════════════════════════════ CRAFTING & ENDGAME ═══════════════════════════════════════ SOUL FORGE — recycle old weapons into tier resources, convert boss and farm materials, craft Legendary components. Old gear becomes input, not warehouse clutter. CURATED AUGMENTATION — data-driven Top-Grade and Legendary profiles with meaningful stat, active and passive pools. Active effects are categorized so the same effect can't be stacked through equipment swapping. EXTENDED ENCHANT — Custom Crystal and Legendary stages. On the Legendary route, a failed enchant does not destroy the item or reduce its enchant level. Long-term progression, not an all-or-nothing gamble. TREASURE CHESTS — Rare, Immortal, Epic and Legendary tiers feeding gear growth, crafting and augmentation. ═══════════════════════════════════════ PvP ═══════════════════════════════════════ Gear-equalized Team vs Team on a recurring schedule — your equipment is snapshotted and restored, so the fight is about play, not who farmed longest. Open-world PvP with rewards and ranks alongside it. ═══════════════════════════════════════ QUALITY OF LIFE ═══════════════════════════════════════ - No dual-boxing — one client per player, enforced - Built-in auto-farm with a daily time limit — no third-party software needed, and third-party automation is bannable - Auto-learn skills, auto-loot with low-value drop filtering - Extended-duration buffs, expanded slots, saved schemes - Offline trading and crafting - Global Gatekeeper, global class change - Offline combat automation disabled ═══════════════════════════════════════ BY THE NUMBERS ═══════════════════════════════════════ 380+ custom item definitions · 110+ weapons and shields · 210+ armor and wearables · 250+ custom skill definitions · 2,700+ custom monster placements · 90+ shop and exchange catalogs · 1,100+ offers ═══════════════════════════════════════ BETA ═══════════════════════════════════════ Core systems, progression identities and content routes are in place. Exact item bonuses, mastery values, skill strength, reuse times, augment pools, enchant chances, drop rates and crafting costs remain subject to testing. Beta changes will refine balance without removing the defining role of each mastery or the overall progression structure. All beta characters are wiped at full launch. Beta testers keep their rewards. ═══════════════════════════════════════ OPEN BETA — 4 SEPTEMBER 2026 · 18:00 GMT+2 Website: https://l2-imba.com Wiki: https://l2-imba.com/wiki Register: https://l2-imba.com/account Download: https://l2-imba.com/start-playing Discord:  https://discord.com/invite/jmhVpj8ySv
    • 🛡️ 100% Safe on your personal Gmail. Zero VPN required and works globally. Grab yours directly on klouditem.com! 🚀 Daily Restock Complete! All 12–18 Month Gemini Pro activations are active with instant setup.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..