Jump to content
  • 0

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


Question

Posted

Hello Guys! so as i say on the title i need a code to when a player is in combat, he will cannot change or add any subclass!

can anyone help me please? is Important!

Thank's!

9 answers to this question

Recommended Posts

  • 0
Posted

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..)

  • 0
Posted

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;

}

  • 0
Posted

not correct at all.

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

  • 0
Posted

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;

  • 0
Posted

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() :)

  • 0
Posted

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!

Guest
This topic is now closed to further replies.


×
×
  • Create New...