Jump to content
  • 0

Nobless Skill ?


Question

Posted

i have a zone where give you nobless buff

the problem is

 

If i make nobless buff in town and after that join in this zone , zone give me again nobless buff and when i die i in this zone i lost buffs with nobless skill

 

if i join in this zone without nobless and zone make me nobless when i die everything is fine !

 

any ideas how to fix that ? it is problem on nobless skill or ?

7 answers to this question

Recommended Posts

  • 0
Posted

A check about if you already got that buff resolve the issue.

 

Ofc, replace "victim" and "L2Skill"...

if (victim.getFirstEffect(L2Skill) == null)
     victim.blablabumbumbuff;

 

But you should correct noblesse buff aswell, because if you got one noble who knows the trick, he can use it on an enemy to debuff him (as you said yourself, 2 noblesse are canceling the effect).

 

And no, it's not normal. Noblesse shouldn't stack and make it bugs.

  • 0
Posted

On onEnter() method in your zone type, find the line: SkillTable.getInstance().getInfo(NOBLE_ID, 1).getEffects(character, character); and make it look like(note that in place of character you should put the L2PcInstance object you may have created after the character instanceof L2PcInstance check you should have made):

 

(where i put character replace it with L2PcInstance object i mentioned above)

 

boolean doNoble = true;

for (L2Effect e : character.getAllEffects())

{

        if (e.getSkill().getId() == NOBLE_ID)

        {

                  doNoble = false;

        }

}

if (doNoble)

{

        SkillTable.getInstance().getInfo(NOBLE_ID, 1).getEffects(character, character);

}

 

This just checks if the character has already nobless and if he doesn't it gives him.

 

 

P.S. I saw Tryskell replied with a better way, maybe you should use this.

  • 0
Posted

A check about if you already got that buff resolve the issue.

 

Ofc, replace "victim" and "L2Skill"...

if (victim.getFirstEffect(L2Skill) == null)
     victim.blablabumbumbuff;

 

But you should correct noblesse buff aswell, because if you got one noble who knows the trick, he can use it on an enemy to debuff him (as you said yourself, 2 noblesse are canceling the effect).

 

And no, it's not normal. Noblesse shouldn't stack and make it bugs.

where to find that ? because im not good with java

if (victim.getFirstEffect(L2Skill) == null)
     victim.blablabumbumbuff;

  • 0
Posted

Find the line i told you in my reply and replace it with Tryskell's lines.

that is right place ?

and how its need look ?

 

}

	L2Skill effect = null;
	for (int[] skillIdLvl : _effectsOnEnter)
	{
		effect = SkillTable.getInstance().getInfo(skillIdLvl[0], skillIdLvl[1]);
		if (effect != null)
			effect.getEffects(character, character);
	}

  • 0
Posted

Replace these 2:

if (effect != null)
      effect.getEffects(character, character);

 

with these:

if (effect != null)
{
        if (character.getFirstEffect(effect) == null)
        {
                effect.getEffects(character, character);
        }
}

  • 0
Posted

Replace these 2:

if (effect != null)
      effect.getEffects(character, character);

 

with these:

if (effect != null)
{
        if (character.getFirstEffect(effect) == null)
        {
                effect.getEffects(character, character);
        }
}

 

 

o.0 perfect perfect working fine

 

big tnx to

An4rchy

Tryskell

Guest
This topic is now closed to further replies.


×
×
  • Create New...