Ir para conteúdo
  • Cadastre-se
  • 0

FLAGZONE


Meireles

Pergunta

Boa tarde amigos, Eu utilizo a pack l2jmega do l2carlinhos e nela já existe uma flag zone porem eu queria fazer a seguinte mudança. gostaria de deixar os players que entrar na flagzone com o namecolor diferente no caso gostaria de por nome azul escuro envez de ficar a cor padrão da flag zone e ao sair da fleg a cor sumir junto com o fleg.... e tambem quero criar uma nova flegzone porem a auteração dessa sera o nome dos players... todos os players que entrar nessa fleg zone ficaram todos com nick: Player e será uma area que nao poderar dar pt.

Nessa area também não dara pra  vet o clan nem nada todos que tiverem nessa area terão que se enfrentar pois nessa area não amostra quem e do clan nem nada todos terão nick: Player ...Alguém saberia me informar como eu faço por favor 🙏 dês de já muito obrigado

 

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

1 resposta a esta questão

Posts recomendados

  • 0

Olá amigos bom dia... eu estou tentando fazer uma area pvp que o player que teleportar para la fique com seu nome como Player. eu até que consegui aqui fazer isso porém quando sai da area pvp ainda continua com nome Player. e na barra de HP onde fica o nome do personagem também fica com nome Player. eu quero que mude somente aparencia do nome pra quando o player sair do local voltar seu nome normal.

Meu codigo está assim:

Citar

 

/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package com.l2jmega.gameserver.model.zone.type;

import com.l2jmega.Config;
import com.l2jmega.gameserver.model.L2Party;
import com.l2jmega.gameserver.model.actor.Creature;
import com.l2jmega.gameserver.model.actor.instance.Player;
import com.l2jmega.gameserver.model.zone.L2SpawnZone;
import com.l2jmega.gameserver.model.zone.ZoneId;

public class L2PvPZone extends L2SpawnZone
{
    public L2PvPZone(int id)
    {
        super(id);
    }

    @Override
    protected void onEnter(Creature character)
    {     
        character.setInsideZone(ZoneId.PVP_CUSTOM, true);
        
         if (character instanceof Player) {
           Player activeChar = (Player)character;
          activeChar.setName("Player" + Config.NAME_PVP_ZONE);
          
          if (Config.ANTZERG_CHECK_PARTY_INVITE) {
                checkPartyMembers(activeChar);
              }
         }
         
         character.sendMessage("You have entered a Pvp Zone!");
    }

    @Override
    protected void onExit(Creature character)
    {
        character.setInsideZone(ZoneId.PVP_CUSTOM, false);
        character.sendMessage("You have left a Pvp Zone!");
    }
    
    @Override
    public void onDieInside(Creature character)
    {
    }
    
    @Override
    public void onReviveInside(Creature character)
    {
    }
      
      public void checkPartyMembers(Player player) {
            L2Party party = player.getParty();
            
            if (party == null) {
              return;
            }
            for (Player member : party.getPartyMembers()) {
              
              if (member == null) {
                continue;
              }
              if (!member.isOnline()) {
                continue;
              }
              if (member.getClan() == null) {
                continue;
              }
              if (member.getClan() != player.getClan() && member.getClan().getAllyId() != player.getClan().getAllyId() && member.getClan() != null && player.getClan() != null && member.getAllyId() != 0 && player.getAllyId() != 0) {
                
                player.sendMessage("In pvp zone only clan/ally party allowed.");
                player.getParty().removePartyMember(player, L2Party.MessageType.Left);
                break;
              } 
            } 
          }
    
}

 

 

A linha que adicionei foi: activeChar.setName("Player" + Config.NAME_PVP_ZONE);

Link para o comentário
Compartilhar em outros sites


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.