Secret Experience

Secret Experience (https://secretexperience.net/index.php)
-   [L2J] Dúvidas (https://secretexperience.net/forumdisplay.php?f=37)
-   -   [Interlude] Announces PVP/PK MOD (https://secretexperience.net/showthread.php?t=22127)

B1Z4R0 08-06-2010 01:01 PM

Announces PVP/PK MOD
 
estou colocando esse mod Announces pvp/pk na teon podem esta anuncionando em chat GM , oq mudo pra anunciar onde mostra, damages, etc?


Código:

--- C:/Documents and Settings/YO/workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java  (revision 1156)
+++ C:/Documents and Settings/YO/workspace/L2_GameServer_It/java/net/sf/l2j/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().announceToAll("Player "+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().announceToAll("Player "+this.getName()+" hunted Player "+target.getName());
+                        else if ( target instanceof L2PcInstance && Config.ANNOUNCE_ALL_KILL ) // Announces a kill
+                          Announcements.getInstance().announceToAll("Player "+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().announceToAll("Player "+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().announceToAll("Player "+this.getName()+" has assassinated Player "+target.getName());
          }
      }
+      if ( target instanceof L2PcInstance && Config.ANNOUNCE_ALL_KILL ) // Announces a kill
+        Announcements.getInstance().announceToAll("Player "+this.getName()+" killed Player "+target.getName());
    }
 
    /**


Daniel2 08-06-2010 01:04 PM

Citação:

// 'Both way war' -> 'PvP Kill'
increasePvpKills();
+ if ( target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL ) // Announces a PvP kill
+ Announcements.getInstance().announceToAll("Player "+this.getName()+" hunted Player "+target.getName());
+ else if ( target instanceof L2PcInstance && Config.ANNOUNCE_ALL_KILL ) // Announces a kill
+ Announcements.getInstance().announceToAll("Player "+this.getName()+" killed Player "+target.getName());
return;
}
annucio

Citação:

if ( Config.KARMA_AWARD_PK_KILL )
{
increasePvpKills();
+ if ( target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL ) // Announces a PvP kill
+ Announcements.getInstance().announceToAll("Player "+this.getName()+" hunted Player "+target.getName());
}
}
else if (targetPlayer.getPvpFlag() == 0) // Target player doesn't have karma
{
dameges ;D :GEEK:

B1Z4R0 08-06-2010 05:36 PM

nao intendi, se ta dizendo que ja ta pra anunciar onde fica damages? pq nao mudo nada, pro que eu postei!

renan68 08-06-2010 05:41 PM

tem isso pra l2dot nao gente? :cute:

paytaly 08-06-2010 06:14 PM

[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Aqui o método para anunciar no System Message.
Código:

        /**
        * Announce to players.<BR><BR>
        * @param message The String of the message to send to player
        */
        public void announceToPlayers(String message)
        {
                // Get all players
                for (L2PcInstance player : L2World.getInstance().getAllPlayers())
                        player.sendMessage(message);
        }

Créditos: L2JFree.

renan68 17-06-2010 03:50 AM

mais aonde q fika essa coisa ae pra configura?

Daniel2 17-06-2010 01:13 PM

Citação:

C:/Documents and Settings/YO/workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
nesse carrinho aii mano ;D

RazerNaga 24-06-2010 02:52 AM

add aqui pra aparecer como anuncio gm e depois como mensagem como nosso amigo disse, uma pergunta no caso pra mim editar agora a cor que esta mostrando ali na parte de mensagens onde eu posso estar indo seria so pelo java ou podesse editar pela system se algm puder pelo menos dizer o caminho ja ajuda obrigado =)

bartomsilva 17-07-2010 11:05 AM

no teon como pegar o nome do player target

wesley oliveira 28-09-2014 07:27 PM

Como Alterar pvp announce!!
 
1 Anexo(s)
Gostaria de saber como eu altero, a opção de pvp announce.
No Meu Server Ta
Ex: GM:20Matar Killed 70Correr
Gostaria que Aparecesse como nesse anexo Obrigado!


Horários baseados na GMT -3. Agora são 10:49 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.