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

    • This post originally appeared on MmoGah. Odin: Valhalla Rising is an ambitious open-world MMORPG developed with Unreal Engine 4, offering breathtaking visuals and immersive gameplay. I will share everything you need to know before starting it.     Re-rolling In Odin, re-rolling isn't a practical strategy. Unlike most gacha games, where it's common to reset for better initial pulls, Odin focuses heavily on long-term growth. The earlier you begin playing and developing your character, the more advantages you'll gain over time. Instead of spending your efforts on re-rolling for ideal equipment, it's better to dive in and start progressing right away.   Server Selection Before starting your character, selecting a server is a crucial step. Since Odin doesn't support cross-server gameplay, coordinating with your friends, family, or guildmates is essential to ensure everyone creates their characters on the same server. Take the time to plan with your group beforehand. After deciding on a server, your next major choice will be picking a class.   Class Breakdown Odin features four primary starting classes: Warrior, Sorceress, Rogue, and Priest. Each class comes with its own distinct playstyle and unique strengths, so choose wisely, as your selection is permanent. However, even free-to-play players can create up to three characters on one server, giving you the flexibility to try different options and find the one that matches your preferences.   Quest and Leveling Once your character is created, your initial objective is to work through the main questline. This acts as both a tutorial and a method for early leveling. Odin simplifies the process with a convenient quest button that handles navigation, starts dialogues, and even enables auto-combat. This user-friendly feature allows beginners to grasp the basics of the game without feeling overloaded.   Auto Combat and No Kill-steal Mode Auto combat is an essential feature in Odin, enabling your character to battle monsters autonomously. This system allows you to effortlessly gain experience and loot, even while you're busy studying, cooking, or unwinding. To optimize its use, activate the no-kill-steal mode. This setting prevents your character from targeting monsters already engaged by other players, helping you avoid conflicts or potential PvP situations. However, if a quest becomes difficult to complete due to overcrowded areas, you can temporarily disable this mode to overcome the obstacle and move forward.   Item Management and Potions Don't overlook the importance of consumable items, especially health potions. These can be purchased, along with buffs, from general merchants in villages, and they play a crucial role in improving your combat efficiency and ensuring your survival. Always aim to keep a full stock of HP potions and carry buffs that boost attack, defense, or regeneration in batches of 5-10 for convenience.   Once you've acquired your consumables, assign them to your quick slots located at the bottom center of the screen. Swiping down activates these slots, and items like potions will automatically be used when necessary, so you don't need to worry about them mid-battle. Keep a close eye on your potion reserves, as running out during a tough fight could leave you vulnerable before reaching a safe area. In the early stages of the game, it's better to return to town for a restock if supplies are low rather than risking unnecessary defeats. You can also enable notifications to alert you when your health or potion count drops too low—a handy feature for staying prepared if your attention is elsewhere.   Leveling and AFK Farming Once you've mastered the fundamentals, the next step is to focus on leveling up and enhancing your character. Gaining levels is your primary source of progression early on, as it not only improves your stats but also unlocks crucial game features and new abilities. At this stage, simply sticking to the main questline provides a reliable and efficient way to gain experience.   Additionally, Odin includes a highly convenient idle feature called AFK mode. This allows your character to keep farming for resources and experience even when the game is closed, with a maximum duration of 8 hours per day. It's an excellent option for making progress while you're asleep, commuting, or otherwise occupied.   Gear Upgrades When the time comes to improve your gear, the initial focus should be on upgrading from normal-grade equipment to high-grade items. These provide significantly better stats and can be enhanced further to increase their effectiveness. Enhancing requires enhancement stones and gold, but it's important to stay within the safe enhancement limit. Attempting upgrades beyond this limit carries the risk of destroying your gear if the enhancement fails. Stick to safe enhancements until you've gained more experience and accumulated spare equipment to mitigate potential losses.   Skill Purchases When you've accumulated enough gold, it's time to invest in skills. These are crucial for enhancing your combat abilities and provide key benefits tailored to your class, whether it's increasing damage output, improving healing capabilities, or adding valuable utility. Before purchasing, ensure your character meets the level prerequisites for each skill. Your ultimate goal will be progressing through and completing the main questline in Midgard as you continue to develop your character.   Unlocking Jotenheim Finishing this milestone grants you access to the next region, Jetunheim, unlocking a variety of new content and challenges. This marks your first significant achievement in the game and is an essential early objective to strive for as you progress.   Joining a Guild Joining a guild is a highly beneficial step in Odin. Guilds not only provide opportunities for social interaction and group activities but also offer passive bonuses that can significantly enhance your gameplay. Even if you're not particularly active socially, being part of any guild is advantageous. The guild feature becomes accessible after completing Chapter 4, Quest 19 of the main story.   Guilds provide various perks, including buffs that scale with the guild's level. Additionally, you can earn guild coins by contributing through donations, quest completions, or regular logins. These coins can be exchanged for valuable rewards, such as epic-grade armor. The more you actively contribute to your guild, the greater the overall benefits for both you and the guild itself. Joining early and staying involved will undoubtedly strengthen your progression in the game.   Conclusion Here is the end of this beginners' guide. I hope these tips will help you level fast in Odin.
    • You can actually make a pseudomount code in your server, that way it can be displayed.. a friend made it for the l2off and i extended it a bit.. if u have l2off i might be able to help u on that
    • Discord : utchiha_market Telegram : https://t.me/utchiha_market Auto Buy Store : https://utchihamkt.mysellauth.com/ Join our server for more products : https://discord.gg/uthciha-services https://campsite.bio/utchihaamkt
    • Chill guys, Guytis ain't competent enough to make malware even if he wanted to
  • Topics

×
×
  • Create New...