Jump to content
  • 0

[HELP] When Players is in combat, cannot add/change subclass [FIXED][LOCK IT]


xXObanXx

Question

9 answers to this question

Recommended Posts

  • 0

You know the basics of java?

if yes,go and find in your source where the subclass system is done,and add the method for dissallow players which are in combact to make a subclass or even change..

now,if you do not know such things,reply here and we'll help you with the full code(even if its quite easy..)

Link to comment
Share on other sites

  • 0

You know the basics of java?

if yes,go and find in your source where the subclass system is done,and add the method for dissallow players which are in combact to make a subclass or even change..

now,if you do not know such things,reply here and we'll help you with the full code(even if its quite easy..)

I know some thing's but not exactly this!

e.g. i know:

if (activeChar.isInCombat) && player.(any code for subclass)

{

player.sendMessage("bla bla bla")

return;

}

Link to comment
Share on other sites

  • 0

not correct at all.

just search on l2villagemasterinstance where the sub is taking place,and add a check for combact,like trys told you.

 

i edit that... is it true?

 

-					if (allowAddition && !Config.ALT_GAME_SUBCLASS_WITHOUT_QUESTS)
+					if (allowAddition && !Config.ALT_GAME_SUBCLASS_WITHOUT_QUESTS && !player.isInCombat())
					allowAddition = checkQuests(player);

				if (allowAddition && isValidNewSubClass(player, paramOne))
				{
					if (!player.addSubClass(paramOne, player.getTotalSubClasses() + 1))
						return;

Link to comment
Share on other sites

  • 0

Search for

 

else if (command.startsWith("Subclass"))
{
	// Subclasses may not be changed while a skill is in use.
	if (player.isCastingNow() || player.isAllSkillsDisabled())
	{
		player.sendPacket(SystemMessageId.SUBCLASS_NO_CHANGE_OR_CREATE_WHILE_SKILL_IN_USE);
		return;
	}

 

or something like that and add there player.isInCombat() :)

Link to comment
Share on other sites

  • 0

Search for

 

else if (command.startsWith("Subclass"))
{
	// Subclasses may not be changed while a skill is in use.
	if (player.isCastingNow() || player.isAllSkillsDisabled())
	{
		player.sendPacket(SystemMessageId.SUBCLASS_NO_CHANGE_OR_CREATE_WHILE_SKILL_IN_USE);
		return;
	}

 

or something like that and add there player.isInCombat() :)

 

o thank you very much! i edit a line from this code and it work perfectly! thank you very much all!!!

 

Someone can close the topic now!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Thank you for your reply. I have removed it from the L2Server.exe file, but the L2Server still crashes. It doesn't crash if I don't start l2npc, otherwise it will crash within a few days at the latest.
    • Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore1 Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11
    • L2 ArenaWar: Low Rate PvP Server with Free Buffs & Autofarm [PVP]⚔️ [Free]🆓 Classic Interlude with  3x XP rates! Free starter pack(no grade) to kickstart your adventure! Autofarm for convenient grinding! Free buffs to keep you fighting fit! (2 job buffs) No experience loss on death! (Except with Karma) Clear Karma system to keep things fair! ⚖️ Active community of 800-1k players! Join our Discord to learn more! >> Discord <<     Server website: https://l2arenawar.com/en/    
    • This is dedication! 2 years working on a problem. Congratulations!
    • You indeed have to save player position over Enterworld to properly clean it up later (if you don't, even trying to delete packet content would eventually keep it up), that's what we do with debug packet (which is a reusable Map of ExServerPrimitive packets) on aCis.   It doesn't solve the FPS stuttering - more you draw/delete lines, more your client becomes laggy. It's like if client wasn't deleting drawn points/lines properly, but instead simply hide them and redrawn content above.   If you got a solution, I would happy to integrate it.   You should check aCis#Player _debug packet integration, it allows very big amount of lines/points to be drawn, it is also reusable.   https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java?ref_type=heads https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java?ref_type=heads  
  • Topics

×
×
  • Create New...