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.


×
×
  • 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