Ir para conteúdo
  • Cadastre-se
  • 0

NewbieZone help


Kef95

Pergunta

Hello .. I have a code from @ Gabrieljdb for newbie zone .. based on level ..and i want:

1: based in item enchant (no more than +6 and if more teleport to giran)

2: cannot enchant into this zone

3: Auto flag on enter to zone and no flag on exit

4: THANK in advance

 

code is for l2jfrozen rev 1132 (java 1.7)

code here:

Spoiler


	/ **
 * @author Gabriel Fleck
 * /
public class L2NewbieZone extends L2ZoneType
{
    public L2NewbieZone (final int id)
    {
        super (id);
    }
    
    @Override
    protected void onEnter (final L2Character character)
    {
        if (character instanceof L2PcInstance)
        {
            if ((((L2PcInstance) character) .isNewbie ())
            {
                ((L2PcInstance) character) .sendMessage ("You entered the Newbie Zone.");
                ((L2PcInstance) character) .sendMessage ("This area is protected up to level" + Config.MAX_LEVEL_NEWBIE_STATUS + ", from level" + (Config.MAX_LEVEL_NEWBIE_STATUS + 1) + "the player who attempts to enter will be removed from the area . ");
            }
            else
            {
                ((L2PcInstance) character) .teleToLocation (82698,148638, -3473);
                    ((L2PcInstance) character) .sendMessage ("This is an area restricted only to Newbies. You will be teleported to the Giran Castle Town.");    
            }
        }
    }
    
    @Override
    protected void onExit (final L2Character character)
    {
        ((L2PcInstance) character) .sendMessage ("You left the Newbie Zone.");
    }
    
    @Override
    protected void onDieInside (final L2Character character)
    {
    }

    @Override
    protected void onReviveInside (final L2Character character)
    {
    }

}
	
	

 

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

0 respostass a esta questão

Posts recomendados

Até agora não há respostas para essa pergunta

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.