Siga-nos em...
Follow us on Twitter Follow us on Facebook Watch us on YouTube
Registro


Alpha Servers
Resultados 1 a 2 de 2
  1. #1

    Avatar de Mazokista
    Data de Ingresso
    Jun 2011
    Localização
    Na Frente do PC
    Idade
    22
    Posts
    2
    Agradecido
    0
    Agradeceu
    0
    Peso da Avaliação
    0

    Thumbs up [L2JServer] Close Portas do Coliseum

    Código:
    Index: java/com/it/roberto/Config.java
    ===================================================================
    --- java/com/it/roberto/Config.java	(revision 57)
    +++ java/com/it/roberto/Config.java	(working copy)
    @@ -73,11 +73,7 @@
     	public static boolean CTF_ALLOW_SUMMON;
     	public static boolean CTF_ON_START_REMOVE_ALL_EFFECTS;
     	public static boolean CTF_ON_START_UNSUMMON_PET;
    +	public static boolean CTF_REVIVE_RECOVERY;
    +    public static String CTF_DOORS_IDS_TO_OPEN_STRING;
    +	public static List<Integer> CTF_DOORS_IDS_TO_OPEN = new FastList<Integer>();
    +    public static String CTF_DOORS_IDS_TO_CLOSE_STRING;
    +	public static List<Integer> CTF_DOORS_IDS_TO_CLOSE = new FastList<Integer>();
         public static boolean ENABLE_MODIFY_SKILL_DURATION;
         public static Map<Integer, Integer> SKILL_DURATION_LIST;	
     	public static boolean MOVE_BASED_KNOWNLIST;
    @@ -2087,20 +2083,6 @@
     				CTF_ON_START_REMOVE_ALL_EFFECTS = Boolean.parseBoolean(additionsSettings.getProperty("CTFOnStartRemoveAllEffects", "true"));
     				CTF_ON_START_UNSUMMON_PET = Boolean.parseBoolean(additionsSettings.getProperty("CTFOnStartUnsummonPet", "true"));
     				CTF_REVIVE_RECOVERY = Boolean.parseBoolean(additionsSettings.getProperty("CTFReviveRecovery", "false"));			
    +		        CTF_DOORS_IDS_TO_OPEN_STRING = additionsSettings.getProperty("CTFDoorsToOpen", "");
    +				CTF_DOORS_IDS_TO_OPEN = new FastList<Integer>();
    +				for (String door : CTF_DOORS_IDS_TO_OPEN_STRING.split(";"))
    +				{
    +                     if (!door.equals(""))
    +						CTF_DOORS_IDS_TO_OPEN.add(Integer.parseInt(door));
    +				}
    +		        CTF_DOORS_IDS_TO_CLOSE_STRING = additionsSettings.getProperty("CTFDoorsToClose", "");
    +				CTF_DOORS_IDS_TO_CLOSE = new FastList<Integer>();
    +				for (String door : CTF_DOORS_IDS_TO_CLOSE_STRING.split(";"))
    +				{
    +                     if (!door.equals(""))
    +						CTF_DOORS_IDS_TO_CLOSE.add(Integer.parseInt(door));
    +				}
                 }
                 catch (Exception e)
                 {
    Index: java/com/it/roberto/gameserver/model/entity/events/CTF.java
    ===================================================================
    --- java/com/it/roberto/gameserver/model/entity/events/CTF.java	(revision 57)
    +++ java/com/it/roberto/gameserver/model/entity/events/CTF.java	(working copy)
    @@ -10,7 +10,6 @@
     import com.it.roberto.Config;
     import com.it.roberto.L2DatabaseFactory;
     import com.it.roberto.gameserver.ThreadPoolManager;
    +import com.it.roberto.gameserver.datatables.DoorTable;
     import com.it.roberto.gameserver.datatables.ItemTable;
     import com.it.roberto.gameserver.datatables.NpcTable;
     import com.it.roberto.gameserver.datatables.SpawnTable;
    @@ -22,7 +21,6 @@
     import com.it.roberto.gameserver.model.L2Summon;
     import com.it.roberto.gameserver.model.L2World;
     import com.it.roberto.gameserver.model.L2Radar;
    +import com.it.roberto.gameserver.model.actor.instance.L2DoorInstance;
     import com.it.roberto.gameserver.model.actor.instance.L2PcInstance;
     import com.it.roberto.gameserver.model.actor.instance.L2PetInstance;
     import com.it.roberto.gameserver.serverpackets.ActionFailed;
    @@ -722,7 +720,7 @@
             _joining = true;
             spawnEventNpc(activeChar);
             Announcements(_eventName + "(CTF): Joinable in " + _joiningLocationName + "!");
    -		closeDoors();
    +		// Closes all doors specified in configs for tvt
         }
     
         public static void startJoin()
    @@ -736,7 +734,7 @@
             _joining = true;
             spawnEventNpc();
             Announcements(_eventName + "(CTF): Joinable in " + _joiningLocationName + "!");
    +		// Closes all doors specified in configs for CTF
    +		closeDoors();
         }
         
         public static boolean startAutoJoin()
    @@ -1272,7 +1270,7 @@
             unspawnAllFlags();
             Announcements(_eventName + "(CTF): Match aborted!");
             teleportFinish();
    +		// Opens all doors specified in configs for CTF
    +		openDoors();
         }
         
         public static void sit()
    @@ -1955,7 +1953,7 @@
         
         public static void teleportFinish()
         {
    +		// Opens all doors specified in configs for CTF
    +		openDoors();
             Announcements(_eventName + "(CTF): Teleport back to participation NPC!");
     
             ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
    @@ -1972,6 +1970,10 @@
             }, 3000);
         }
     
    +
    +	/**
    +	 * Close doors specified in configs
    +	 */
    +	private static void closeDoors() 
    +	{
    +		for ( int doorId : Config.CTF_DOORS_IDS_TO_CLOSE ) 
    +		{
    +			L2DoorInstance doorInstance = DoorTable.getInstance().getDoor( doorId );
    +
    +			if ( doorInstance != null ) 
    +			{
    +				doorInstance.closeMe();
    +			}
    +		}
    +	}
    +
    @@ -1984,7 +1986,10 @@
     			}
     		}
     	}
    -
    +	
    +	/**
    +     * author : Mazokista
    +	 * Open doors specified in configs
    +	 */
    +	private static void openDoors() 
    +	{
    +		for (int doorId : Config.CTF_DOORS_IDS_TO_OPEN ) 
    +		{
    +			L2DoorInstance doorInstance = DoorTable.getInstance().getDoor( doorId );
    +
    +			if ( doorInstance != null ) 
    +			{
    +				doorInstance.openMe();
    +			}
    +		}
    +	}
    +
    Index: java/config/additions.ini
    ===================================================================
    --- java/config/additions.ini	(revision 57)
    +++ java/config/additions.ini	(working copy)
    @@ -377,9 +377,3 @@
     
     # on revive participants regain full hp/mp/cp ?
     CTFReviveRecovery = False
    +
    +# Installation of doors in the closed / open in early / late
    +# ex.: 1;2;3;4;5;6
    +# no ";" at the start or end
    +CTFDoorsToOpen =
    +CTFDoorsToClose =
    \ No newline at end of file
    Creditos : Mazokista

  2. #2

    Avatar de flaiter
    Data de Ingresso
    Jan 2012
    Localização
    Olinda
    Idade
    23
    Posts
    2
    Agradecido
    0
    Agradeceu
    0
    Peso da Avaliação
    0

    Padrão

    So funfa com CTF ou fuciona para TVT também ?

 

 

Informações de Tópico

Usuários Navegando neste Tópico

Há 1 usuários navegando neste tópico. (0 registrados e 1 visitantes)

Tópicos Similares

  1. |Release| L2jServer v4.4 Freya
    Por SrNooB no fórum Freya
    Respostas: 1
    Último Post: 14-06-2012, 11:17 PM
  2. |Release| [L2JServer][Freya+]Suporte enchant para Scroll Crystal
    Por Over12 no fórum L2J -Mods
    Respostas: 1
    Último Post: 20-05-2011, 12:21 AM
  3. Respostas: 0
    Último Post: 24-02-2011, 04:59 AM
  4. Respostas: 0
    Último Post: 24-02-2011, 04:39 AM

Tags para este Tópico

Marcadores

Permissões de Postagem

  • Você não pode iniciar novos tópicos
  • Você não pode enviar respostas
  • Você não pode enviar anexos
  • Você não pode editar suas mensagens
  •