|
Você não é registrado, por favor registre-se para ter acesso ao conteúdo completo. Caso seja registrado, efetue login. Esqueceu sua senha? Clique aqui Recomendamos o uso do Mozilla Firefox para uma melhor visualização. |
|
| Início | Postados Hoje | Marcar Fóruns Como Lidos | Álbums | Banidos | SE Team | Medalhas |
|
|||||||
| Registrar | Loteria VIP | Staff SE | Regras do fórum | Comunidade | Arcade | Postados Hoje | Pesquisar | Experience |
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
![]() |
|
|
LinkBack | Ferramentas do Tópico | Modos de Exibição |
|
|
#1 (permalink) | ||
|
Membro - Veterano
![]() Registrado em: Dec 2009
Posts: 1,335
Agradeceu: 490
Agradecido 803 Vezes em 427 Posts
Nome Real: Roberto
|
Queria Tirar Uma Duvida Onde Estao Todos Os
[B]Codigos Abaixo Se eu Alterar Pro ToPlayers Troca em Todos Qui Estao em Baixo Annunciara no Chat Superior ? [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar] Citação:
Citação:
Código:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
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
{
// check about wars
if (targetPlayer.getClan() != null && getClan() != null)
{
if (getClan().isAtWarWith(targetPlayer.getClanId()))
{
if (targetPlayer.getClan().isAtWarWith(getClanId()))
{
// 'Both way war' -> 'PvP Kill'
increasePvpKills();
if ( target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL ) // Announces a PvP kill
Announcements.getInstance().announceToPlayers("Player "+this.getName()+" hunted Player "+target.getName());
else if ( target instanceof L2PcInstance && Config.ANNOUNCE_ALL_KILL ) // Announces a kill
Announcements.getInstance().announceToPlayers("Player "+this.getName()+" killed Player "+target.getName());
return;
}
}
}
// 'No war' or 'One way war' -> 'Normal PK'
if (targetPlayer.getKarma() > 0) // Target player has karma
{
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());
}
|
||
|
|
|
| Links Patrocinados |
|
|
#2 (permalink) |
|
playstation
![]() Registrado em: Dec 2008
Localização: Belo Horizonte
Posts: 1,284
Agradeceu: 118
Agradecido 1,503 Vezes em 772 Posts
Nome Real: Marcelo
|
Teoricamente sim, porém é necessário ter suporte para o método announceToPlayers.
Isso já foi discutido em outros tópicos. Procure um pouco que encontrará a solução neles.
__________________
Há! Só posso rir de quem quer vender o que mal sabe fazer... Quer ser respondido direito!? Não faça perguntas idiotas. (Y) |
|
|
|
| O seguinte membro ao lado disse Obrigado(a) a : paytaly por gostar deste Post : |
Mazokista (06-07-2010)
|
|
|
#4 (permalink) |
|
Membro - Karma
![]() Registrado em: Sep 2009
Localização: Rio Verde GO
Posts: 383
Agradeceu: 265
Agradecido 274 Vezes em 113 Posts
Nome Real: Paulo Eduardo Ferreira
|
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
|
|
|
|
|
|
#6 (permalink) |
|
Membro - Karma
![]() Registrado em: Sep 2009
Localização: Rio Verde GO
Posts: 383
Agradeceu: 265
Agradecido 274 Vezes em 113 Posts
Nome Real: Paulo Eduardo Ferreira
|
acabei de colocar no L2JMACK rev 69! muito simples, ai a diff se quiser ver
Código:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
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 68)
+++ /trunk/L2J-Mack_IL/L2J-Mack_GameServer/java/com/l2dot/gameserver/model/actor/instance/L2PcInstance.java (revision 69)
@@ -4812,5 +4812,5 @@
increasePvpKills();
if ( target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL ) // Announces a PvP kill
- Announcements.getInstance().announceToAll("Player "+this.getName()+" hunted Player "+target.getName());
+ Announcements.getInstance().announceToPlayers("Player "+this.getName()+" hunted Player "+target.getName());
return;
}
@@ -4827,7 +4827,7 @@
increasePvpKills();
if ( target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL ) // Announces a PvP kill
- Announcements.getInstance().announceToAll("Player "+this.getName()+" hunted Player "+target.getName());
+ Announcements.getInstance().announceToPlayers("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());
+ Announcements.getInstance().announceToPlayers("Player "+this.getName()+" killed Player "+target.getName());
return;
}
@@ -4842,5 +4842,5 @@
increasePvpKills();
if ( target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL ) // Announces a PvP kill
- Announcements.getInstance().announceToAll("Player "+this.getName()+" hunted Player "+target.getName());
+ Announcements.getInstance().announceToPlayers("Player "+this.getName()+" hunted Player "+target.getName());
}
}
@@ -4849,9 +4849,9 @@
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());
+ Announcements.getInstance().announceToPlayers("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());
+ Announcements.getInstance().announceToPlayers("Player "+this.getName()+" killed Player "+target.getName());
}
/**
|
|
|
|
| O seguinte membro ao lado disse Obrigado(a) a : B1Z4R0 por gostar deste Post : |
Mazokista (06-07-2010)
|
|
|
#7 (permalink) | |
|
Membro - Veterano
![]() Registrado em: Dec 2009
Posts: 1,335
Agradeceu: 490
Agradecido 803 Vezes em 427 Posts
Nome Real: Roberto
|
Muito Obrigado Manow Qui Deus de Abençoe
ASuhuhsahusa Foi Falta de Atencao Esqueci dessa Linha Mais Brigadao Mesmo Citação:
|
|
|
|
|
![]() |
|
|