Ir para conteúdo
  • Cadastre-se
  • 0

newbies proteccion


Kef95

Pergunta

Hola, recientemente agregué un código para proteger a los novatos del ataque de otros jugadores, depende de la diferencia de nivel de los jugadores.  "el jugador está anchor" cuando golpea al jugador con una diferencia de nivel de más de 10. pero esto se basa en "TARGET" y el jugador también se paraliza cuando usa un buff para otro jugador con una diferencia de 10 niveles. Quiero permitirles buffs a otros jugadores sin importar la diferencia de nivel.

code:

Spoiler

 public void newbieProtectionSystem (L2Character target)
 {
 if (L2Config.ENABLE_NEWBIE_PROTECTION_SYSTEM)
 {
 int targetLevel = target.getLevel ();
 int playerLevel = L2PcInstance.this.getLevel ();

 if (playerLevel - targetLevel> Config.PROTECTION_DIFFERENCE_LEVEL)
 {
 int skillId = Config.PROTECTION_SKILL_ID;
 int skillLevel = Config.PROTECTION_SKILL_LVL;

 L2Skill skill;
 skill = SkillTable.getInstance (). getInfo (skillId, skillLevel);
 if (skill != null)
 skill.getEffects (L2PcInstance.this, L2PcInstance.this);

 sendMessage (Config.PROTECTION_MESSAGE);

 return;
}

ayuda!!

Editado por Kef95
Link para o comentário
Compartilhar em outros sites

4 respostass a esta questão

Posts recomendados


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Processando...




×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.