Ir para conteúdo
  • Cadastre-se
  • 0

Como aplico essa correção pvp/pk Annouce


Alison Olivo

Pergunta

Index: F:/Workspace/L2jFrozen_GameServer/config/functions/pvp.properties

===================================================================

--- F:/Workspace/L2jFrozen_GameServer/config/functions/pvp.properties (revision 899)

+++ F:/Workspace/L2jFrozen_GameServer/config/functions/pvp.properties (working copy)

@@ -181,15 +143,12 @@

# Default : True

AllowSoEInPvP = True

 

-# Announce all Kills (PVP and PK Kills) (THIS MOD IS STILL BETA!)

-AnnounceAllKill = False

+# Announces when a Player Pvp another Player. Default - false

+AnnouncePvPKill = False

 

# Announces when a Player PK another Player. Default - false

AnnouncePkKill = False

 

-# Announces when a Player Pvp another Player. Default - false

-AnnouncePvPKill = False

-

# When the duel is more than 4 players are transported to the coordinates,

# Listed below

DuelSpawnX = -102495

Index: F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java

===================================================================

--- F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 899)

+++ F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy)

@@ -6478,6 +6455,10 @@

if(checkIfPvP(target) && targetPlayer.getPvpFlag() != 0 || isInsideZone(ZONE_PVP) && targetPlayer.isInsideZone(ZONE_PVP))

{

increasePvpKills();

+ if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL && !isGM())

+ {

+ Announcements.getInstance().announceToPlayers("PvP: " + getName() + " hunted " + target.getName());

+ }

}

else

{

@@ -6490,14 +6471,10 @@

{

// 'Both way war' -> 'PvP Kill'

increasePvpKills();

- if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL)

+ if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL && !isGM())

{

- Announcements.getInstance().announceToAll("Player " + getName() + " hunted Player " + target.getName());

+ Announcements.getInstance().announceToPlayers("PvP: " + getName() + " hunted " + target.getName());

}

- else if(target instanceof L2PcInstance && Config.ANNOUNCE_ALL_KILL)

- {

- Announcements.getInstance().announceToAll("Player " + getName() + " killed Player " + target.getName());

- }

addItemReword(targetPlayer);

return;

}

@@ -6511,27 +6488,22 @@

if(Config.KARMA_AWARD_PK_KILL)

{

increasePvpKills();

+ if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL && !isGM())

+ {

+ Announcements.getInstance().announceToPlayers("PvP: " + getName() + " hunted " + target.getName());

+ }

}

-

- if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL)

- {

- Announcements.getInstance().announceToAll("Player " + 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)

+ if(target instanceof L2PcInstance && Config.ANNOUNCE_PK_KILL && !isGM())

{

- Announcements.getInstance().announceToAll("Player " + getName() + " has assassinated Player " + target.getName());

+ Announcements.getInstance().announceToPlayers("PK: " + getName() + " has assassinated " + target.getName());

}

}

}

}

- if(target instanceof L2PcInstance && Config.ANNOUNCE_ALL_KILL)

- {

- Announcements.getInstance().announceToAll("Player " + getName() + " killed Player " + target.getName());

- }

 

if(targetPlayer.getObjectId() == _lastKill && (count < Config.REWORD_PROTECT - 1 || Config.REWORD_PROTECT == 0) || !(_inEventDM && DM.is_started()))

{

Index: F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java

===================================================================

--- F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java (revision 899)

+++ F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java (working copy)

@@ -257,26 +257,29 @@

cs = null;

}

+

+ public void announceToPlayers(String message)

+ {

+ for (L2PcInstance player : L2World.getInstance().getAllPlayers())

+ {

+ player.sendMessage(message);

+ }

+ }

+

// Method fo handling announcements from admin

public void handleAnnounce(String command, int lengthToTrim)

{

Index: F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/Config.java

===================================================================

--- F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/Config.java (revision 899)

+++ F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/Config.java (working copy)

@@ -2531,7 +2547,6 @@

/** Announce PvP, PK, Kill*/

public static boolean ANNOUNCE_PVP_KILL;

public static boolean ANNOUNCE_PK_KILL;

- public static boolean ANNOUNCE_ALL_KILL;

 

public static int DUEL_SPAWN_X;

public static int DUEL_SPAWN_Y;

@@ -2649,8 +2686,7 @@

ALLOW_POTS_IN_PVP = Boolean.parseBoolean(pvpSettings.getProperty("AllowPotsInPvP", "True"));

/** Enable Pk Info mod. Displays number of times player has killed other */

ENABLE_PK_INFO = Boolean.valueOf(pvpSettings.getProperty("EnablePkInfo", "false"));

- // Get the AnnounceAllKill, AnnouncePvpKill and AnnouncePkKill values

- ANNOUNCE_ALL_KILL = Boolean.parseBoolean(pvpSettings.getProperty("AnnounceAllKill", "False"));

+ // Get the AnnouncePvpKill and AnnouncePkKill values

ANNOUNCE_PVP_KILL = Boolean.parseBoolean(pvpSettings.getProperty("AnnouncePvPKill", "False"));

ANNOUNCE_PK_KILL = Boolean.parseBoolean(pvpSettings.getProperty("AnnouncePkKill", "False"));

 

@@ -5297,18 +5333,14 @@

{

STARTING_AA = Integer.parseInt(pValue);

}

- else if(pName.equalsIgnoreCase("AnnouncePvPKill") && !ANNOUNCE_ALL_KILL)

+ else if(pName.equalsIgnoreCase("AnnouncePvPKill"))

{

ANNOUNCE_PVP_KILL = Boolean.valueOf(pValue);

}

- else if(pName.equalsIgnoreCase("AnnouncePkKill") && !ANNOUNCE_ALL_KILL)

+ else if(pName.equalsIgnoreCase("AnnouncePkKill"))

{

ANNOUNCE_PK_KILL = Boolean.valueOf(pValue);

}

- else if(pName.equalsIgnoreCase("AnnounceAllKill") && !ANNOUNCE_PVP_KILL && !ANNOUNCE_PK_KILL)

- {

- ANNOUNCE_ALL_KILL = Boolean.valueOf(pValue);

- }

else if(pName.equalsIgnoreCase("DisableWeightPenalty"))

{

DISABLE_WEIGHT_PENALTY = Boolean.valueOf(pValue);

 

 

bom alguem pode me informar como aplico essa Correção?? Obrigado :D

Link para o comentário
Compartilhar em outros sites

12 respostass a esta questão

Posts recomendados

  • 1

voce tem que entrar no eclipse pra poder arrumar isso @Czekay 

eu so adicionei essas correção que estão com +++

--- F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 899)

+++ F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy)

todos que tiver    .announceToAll    você substitui por     .announceToPlayers 

+ Announcements.getInstance().announceToPlayers("Player " + getName() + " hunted " + target.getName());

 

- Announcements.getInstance().announceToAll("Player " + getName() + " hunted Player " + target.getName());

+ Announcements.getInstance().announceToPlayers("Player " + getName() + " hunted " + target.getName());

 

===================================================================

--- F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java (revision 899)

+++ F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/gameserver/model/entity/Announcements.java (working copy)

@@ -257,26 +257,29 @@

cs = null;

}

    public void announceToAll(final SystemMessage sm)
    {
        for (final L2PcInstance player : L2World.getInstance().getAllPlayers())
        {
            player.sendPacket(sm);
        }
    }

+

+ public void announceToPlayers(String message)

+ {

+ for (L2PcInstance player : L2World.getInstance().getAllPlayers())

+ {

+ player.sendMessage(message);

+ }

+ }

+

// Method fo handling announcements from admin

public void handleAnnounce(String command, int lengthToTrim)

{

Index: F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/Config.java

===================================================================

--- F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/Config.java (revision 899)

+++ F:/Workspace/L2jFrozen_GameServer/head-src/com/l2jfrozen/Config.java (working copy)

@@ -2531,7 +2547,6 @@

/** Announce PvP, PK, Kill*/

public static boolean ANNOUNCE_PVP_KILL;

public static boolean ANNOUNCE_PK_KILL;

- public static boolean ANNOUNCE_ALL_KILL;

 

public static int DUEL_SPAWN_X;

public static int DUEL_SPAWN_Y;

@@ -2649,8 +2686,7 @@

ALLOW_POTS_IN_PVP = Boolean.parseBoolean(pvpSettings.getProperty("AllowPotsInPvP", "True"));

/** Enable Pk Info mod. Displays number of times player has killed other */

ENABLE_PK_INFO = Boolean.valueOf(pvpSettings.getProperty("EnablePkInfo", "false"));

- // Get the AnnounceAllKill, AnnouncePvpKill and AnnouncePkKill values

- ANNOUNCE_ALL_KILL = Boolean.parseBoolean(pvpSettings.getProperty("AnnounceAllKill", "False"));

+ // Get the AnnouncePvpKill and AnnouncePkKill values

ANNOUNCE_PVP_KILL = Boolean.parseBoolean(pvpSettings.getProperty("AnnouncePvPKill", "False"));

ANNOUNCE_PK_KILL = Boolean.parseBoolean(pvpSettings.getProperty("AnnouncePkKill", "False"));

 

@@ -5297,18 +5333,14 @@

{

STARTING_AA = Integer.parseInt(pValue);

}

- else if(pName.equalsIgnoreCase("AnnouncePvPKill") && !ANNOUNCE_ALL_KILL)   <<<< essa parte aqui  eu apaguei o && !ANNOUNCE_ALL_KILL)

+ else if(pName.equalsIgnoreCase("AnnouncePvPKill"))    <<<<<<<     e ficou assim

{

ANNOUNCE_PVP_KILL = Boolean.valueOf(pValue);

}

- else if(pName.equalsIgnoreCase("AnnouncePkKill") && !ANNOUNCE_ALL_KILL)   <<<< essa parte aqui  eu apaguei o && !ANNOUNCE_ALL_KILL)

+ else if(pName.equalsIgnoreCase("AnnouncePkKill"))    <<<<<<<     e ficou assim 

{

ANNOUNCE_PK_KILL = Boolean.valueOf(pValue);

}

- else if(pName.equalsIgnoreCase("AnnounceAllKill") && !ANNOUNCE_PVP_KILL && !ANNOUNCE_PK_KILL) 

- {

- ANNOUNCE_ALL_KILL = Boolean.valueOf(pValue);

- }

else if(pName.equalsIgnoreCase("DisableWeightPenalty"))

{

DISABLE_WEIGHT_PENALTY = Boolean.valueOf(pValue);

Link para o comentário
Compartilhar em outros sites


  • 0
Em 28/09/2014 at 20:29, Wesley Oliveira disse:

galera no meu server aparece assim

 

GM: 20Matar killed 70 correr

 

Gostaria que aparecesse assim

 

Player 20matar kileedd 70correr

 

 

Alguem pode me ajudar ?

o meu estava assim mudei uma pasta na System resolveu sysstring-e.dat pega isso de uma system que nao esta bugada 

So que agora aparece la 

Annunciaments: player 70 killed Player 90

Link para o comentário
Compartilhar em outros sites

  • 0
 

galera no meu server aparece assim

 

GM: 20Matar killed 70 correr

 

Gostaria que aparecesse assim

 

Player 20matar kileedd 70correr

 

 

Alguem pode me ajudar ?

A depender da REV na propria config ja tem a linha pra editar se não tiver tenta na systemmsg.bat procura a linha pra ver se nao e la também

Link para o comentário
Compartilhar em outros sites

# Announces when a Player PK another Player. Default - false

AnnouncePkKill = False <~~ Coloque True

 

-# Announces when a Player Pvp another Player. Default - false

-AnnouncePvPKill = False <~~ Coloque True

galera no meu server aparece assim

 

GM: 20Matar killed 70 correr

 

Gostaria que aparecesse assim

 

Player 20matar kileedd 70correr

 

 

Alguem pode me ajudar ?

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...
  • Registre-se

    Faça parte da maior e  mais antigas comunidades sobre Lineage2 da América Latina.





×
×
  • 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.