Resultados 1 a 3 de 3
  1. #1

    • Lineage2 KF!

    • Offline
    Pontos: 22.019, Level: 20
    Pontos: 22.019, Level: 20
    Level completado: 77%,
    Pontos requeridos para o próximo Level: 381
    Level completado: 77%, Pontos requeridos para o próximo Level: 381
    Atividade geral: 27,0%
    Atividade geral: 27,0%
    • Array

    Data de Ingresso
    Jan 2011
    Localização
    Dentro do HD
    Idade
    19
    Posts
    345
    Agradecer
    81
    Agradecido 118 em 86 Posts
    Peso da Avaliação
    0
    Humor
    Meu Humor
    Twisted

    Padrão Annuncio PvP and PK

    Esto Postando Arquivo Para [MOD] Annunciar Os PvP e PK No Chat Superior
    Porque A Maioria Das Pessoas Tentao Muda e Nao Consegui
    Esto Postando Aqui Para Voce Porque Tive a Mesma Duvida e Nao Consegui Editar Graças
    a B1Z4R0 Consegui Entao Ta ae


    Créditos : L2JFree




    Código:
    Index: /Trunk/L2J-Mack_IL/Config/PvP.propierties ================================================== ================= --- /Trunk/L2J-Mack_IL/Config/PvP.propierties (revision 1156) +++ /Trunk/L2J-Mack_IL/Config/PvP.propierties (working copy) @@ -29,3 +29,11 @@ PvPVsNormalTime = 40000 # Length one stays in PvP mode after hitting a purple player (in ms) PvPVsPvPTime = 20000 + +# Announces when a Player PK another Player. Default - false +AnnouncePkKill = False +# Announces when a Player Pvp another Player. Default - false +AnnouncePvPKill = False +# Announces when a Player kill another Player. Default - false +# NOTE: If AnnounceKill is enabled, AnnouncePk and AnnouncePvP will be disabled. +AnnounceAllKill = False Index: /Trunk/L2J-Mack_IL/L2J-Mack_GameServer/java/com/l2dot/Config.java ================================================== ================= --- /Trunk/L2J-Mack_IL/L2J-Mack_GameServer/java/com/l2dot/Config.java (revision 1156) +++ /Trunk/L2J-Mack_IL/L2J-Mack_GameServer/java/com/l2dot/Config.java (working copy) @@ -777,7 +777,13 @@ public static int PVP_NORMAL_TIME; - public static int PVP_PVP_TIME; + public static int PVP_PVP_TIME; + public static boolean ANNOUNCE_PVP_KILL; + public static boolean ANNOUNCE_PK_KILL; + public static boolean ANNOUNCE_ALL_KILL; // Karma Punishment /** Allow player with karma to be killed in peace zone ? */ @@ -1926,6 +1932,18 @@ PVP_NORMAL_TIME = Integer.parseInt(pvpSettings.getProperty("PvPVsNor malTime", "15000")); PVP_PVP_TIME = Integer.parseInt(pvpSettings.getProperty("PvPVsPvP Time", "30000")); + ANNOUNCE_ALL_KILL = Boolean.parseBoolean(pvpSettings.getProperty("Anno unceAllKill", "False")); // Get the AnnounceAllKill, AnnouncePvpKill and AnnouncePkKill values + if ( !ANNOUNCE_ALL_KILL ) + { + ANNOUNCE_PVP_KILL = Boolean.parseBoolean(pvpSettings.getProperty("Anno uncePvPKill", "False")); + ANNOUNCE_PK_KILL = Boolean.parseBoolean(pvpSettings.getProperty("Anno uncePkKill", "False")); + } + else + { + ANNOUNCE_PVP_KILL = false; + ANNOUNCE_PK_KILL = false; + } + } catch (Exception e) { @@ -2323,6 +2341,9 @@ else if (pName.equalsIgnoreCase("PvPVsNormalTime")) PVP_NORMAL_TIME = Integer.parseInt(pValue); else if (pName.equalsIgnoreCase("PvPVsPvPTime")) PVP_PVP_TIME = Integer.parseInt(pValue); + else if (pName.equalsIgnoreCase("AnnouncePvPKill") && !ANNOUNCE_ALL_KILL ) ANNOUNCE_PVP_KILL = Boolean.valueOf(pValue); // Set announce Pvp value + else if (pName.equalsIgnoreCase("AnnouncePkKill") && !ANNOUNCE_ALL_KILL ) ANNOUNCE_PK_KILL = Boolean.valueOf(pValue); // Set announce Pk value + else if (pName.equalsIgnoreCase("AnnounceAllKill") && !ANNOUNCE_PVP_KILL && !ANNOUNCE_PK_KILL ) ANNOUNCE_ALL_KILL = Boolean.valueOf(pValue); // Set announce kill value else if (pName.equalsIgnoreCase("GlobalChat")) DEFAULT_GLOBAL_CHAT = pValue; else if (pName.equalsIgnoreCase("TradeChat")) DEFAULT_TRADE_CHAT = pValue; else if (pName.equalsIgnoreCase("MenuStyle")) GM_ADMIN_MENU_STYLE = pValue; Index: /Trunk/L2J-Mack_IL/L2J-Mack_GameServer/java/com/l2dot/gameserver/Announcements.java ================================================== ================= --- /trunk/L2J-Mack_IL/L2J-Mack_GameServer/java/com/l2dot/gameserver/Announcements.java (revision 5) +++ /trunk/L2J-Mack_IL/L2J-Mack_GameServer/java/com/l2dot/gameserver/Announcements.java (revision 69) @@ -240,3 +240,11 @@ } } + + public void announceToPlayers(String message) + { + // Get all players + for (L2PcInstance player : L2World.getInstance().getAllPlayers()) { + player.sendMessage(message); + } + } } Index: /Trunk/L2J-Mack_IL/L2J-Mack_GameServer/java/com/l2dot/gameserver/model/actor/instance/L2PcInstance.java ================================================== ================= --- /Trunk/L2J-Mack_IL/L2J-Mack_GameServer/java/com/l2dot/gameserver/model/actor/instance/L2PcInstance.java (revision 1156) +++ /Trunk/L2J-Mack_IL/L2J-Mack_GameServer/java/com/l2dot/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -35,6 +35,7 @@ import javolution.util.FastMap; import net.sf.l2j.Config; import net.sf.l2j.L2DatabaseFactory; +import net.sf.l2j.gameserver.Announcements; import net.sf.l2j.gameserver.GameTimeController; import net.sf.l2j.gameserver.GeoData; import net.sf.l2j.gameserver.GmListTable; @@ -4446,6 +4447,9 @@ ) { increasePvpKills(); + if ( target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL ) // Announces a PvP kill + Announcements.getInstance().announceToPlayers("Pla yer "+this.getName()+" hunted Player "+target.getName()); + return; } else // Target player doesn't have pvp flag set { @@ -4458,6 +4462,10 @@ { // 'Both way war' -> 'PvP Kill' increasePvpKills(); + if ( target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL ) // Announces a PvP kill + Announcements.getInstance().announceToPlayers("Pla yer "+this.getName()+" hunted Player "+target.getName()); + else if ( target instanceof L2PcInstance && Config.ANNOUNCE_ALL_KILL ) // Announces a kill + Announcements.getInstance().announceToPlayers("Pla yer "+this.getName()+" killed Player "+target.getName()); return; } } @@ -4469,13 +4477,19 @@ if ( Config.KARMA_AWARD_PK_KILL ) { increasePvpKills(); + if ( target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL ) // Announces a PvP kill + Announcements.getInstance().announceToPlayers("Pla yer "+this.getName()+" hunted Player "+target.getName()); } } else if (targetPlayer.getPvpFlag() == 0) // Target player doesn't have karma { increasePkKillsAndKarma(targetPlayer.getLevel()); + if ( target instanceof L2PcInstance && Config.ANNOUNCE_PK_KILL ) // Announces a Pk kill + Announcements.getInstance().announceToPlayers("Pla yer "+this.getName()+" has assassinated Player "+target.getName()); } } + if ( target instanceof L2PcInstance && Config.ANNOUNCE_ALL_KILL ) // Announces a kill + Announcements.getInstance().announceToPlayers("Pla yer "+this.getName()+" killed Player "+target.getName()); } /**
    Última edição por ↘ Wanhelsing; 4 Semanas Atrás às 07:09 PM.


    Se olhe no espelho parceiro.E Não perca a esperança, pois foi Deus que lhe sua image, alma e semelhança.


  2. #2

    • L2J Developer

    • Offline
    Pontos: 7.980, Level: 10
    Pontos: 7.980, Level: 10
    Level completado: 35%,
    Pontos requeridos para o próximo Level: 720
    Level completado: 35%, Pontos requeridos para o próximo Level: 720
    Atividade geral: 14,0%
    Atividade geral: 14,0%
    • Array

    Data de Ingresso
    Sep 2011
    Localização
    Salvador
    Posts
    97
    Agradecer
    38
    Agradecido 17 em 11 Posts
    Peso da Avaliação
    0
    Humor
    Meu Humor
    Inspired

    Padrão

    Post Editado '



    Recuso Imitações !

  3. #3

    • L2J Developer

    • Offline
    Pontos: 7.980, Level: 10
    Pontos: 7.980, Level: 10
    Level completado: 35%,
    Pontos requeridos para o próximo Level: 720
    Level completado: 35%, Pontos requeridos para o próximo Level: 720
    Atividade geral: 14,0%
    Atividade geral: 14,0%
    • Array

    Data de Ingresso
    Sep 2011
    Localização
    Salvador
    Posts
    97
    Agradecer
    38
    Agradecido 17 em 11 Posts
    Peso da Avaliação
    0
    Humor
    Meu Humor
    Inspired

    Padrão

    Citação Postado originalmente por Maxmilian Ver Post
    Esto Postando Arquivo Para [MOD] Annunciar Os PvP e PK No Chat Superior
    Porque A Maioria Das Pessoas Tentao Muda e Nao Consegui
    Esto Postando Aqui Para Voce Porque Tive a Mesma Duvida e Nao Consegui Editar Graças
    a B1Z4R0 Consegui Entao Ta ae


    Créditos : L2JFree




    Código:
    Manim se puder edite seu post pq os codigos estão tudo juntos e nao da para entender nada.

    Use outro BBCode que fique legal para ele.

    Att. Equipe ZoneGames



    Recuso Imitações !

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
  •