|
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 |
|
|
#11 (permalink) | ||||||||||||||
![]() ![]() Registrado em: May 2009
Localização: Minas Gerais-Pouso Alegre
Posts: 2,249
Agradeceu: 754
Agradecido 2,075 Vezes em 922 Posts
Nome Real: Júlio César R.de Morães
|
@cleberhills :
Oo esta pronto ali é so adicionar nos lugares especificos. Caso queira mexer com JAVA amigo e quiser algo que jogue apenas um arquivo dentro de uma pasta e pronto pode esquecer amigo. No tópico tem escrito tudo o que é para fazer então não tem poblemas...
__________________
Olá voce é novo na SecretExperience ?
Hum então voce ja deve ter lido as regras ? Não ? Então leia nossas regras evite ser alertado : [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar] Ainda tem dúvida de algo ? Então leia nosso FAQ : [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar] |
||||||||||||||
|
|
|
||||||||||||||
| Links Patrocinados |
|
|
#12 (permalink) |
|
Membro - Capitão
![]() Registrado em: Mar 2009
Localização: Belo Horizonte - MG
Posts: 119
Agradeceu: 58
Agradecido 33 Vezes em 25 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
|
Isto serve pra INTERLUDE?
Se nao, tem algum CTF pra IL aqui? Tem como alguem postar, pq eu nao achei! Obrigado! |
|
|
|
|
|
#13 (permalink) | ||||||||||||||
|
Membro - Tenente
![]() Registrado em: Nov 2008
Localização: Rio de Janeiro
Posts: 100
Agradeceu: 143
Agradecido 52 Vezes em 22 Posts
Nome Real: Filipe Felisberto
|
Belo trabalho.
Cara eu coloquei no meu fonte certinho... consegui compilar o Core, depois alterei a data-pack e rodei legal. conseguir startar o CTF, porém qdo eu vou para me registrar (Join), não acontece nada. Alguem poderia me da uma ajuda? revisei o código e não estou identificando o metodo que chama o JOIN. Aonde que o Join para o registro do player eh chamado? Obrigado. |
||||||||||||||
|
|
|
||||||||||||||
|
|
#14 (permalink) |
|
Membro - Marechal
![]() Registrado em: May 2009
Localização: Aqui (:
Posts: 291
Agradeceu: 113
Agradecido 164 Vezes em 43 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
![]() Nome Real: Nando
|
Olá pessoal, eu precisa disso para l2jarchaid!
Queria saber onde eu modifico ou se precisa para incorporar nele? vlw!
|
|
|
|
|
|
#15 (permalink) | |
|
Amigo SE
![]() Registrado em: Dec 2008
Localização: Um lugar onde vc não sabe onde é.
Posts: 400
Agradeceu: 201
Agradecido 444 Vezes em 128 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
|
filipephp, se estiver usando L2JServer, scripts/handlers será sua resposta
Crie um txt e renomeie para CTFCmd.java (a extenção é java), e salve isto nele: Código:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.voicedcommandhandlers;
import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.entity.CTF;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
public class CTFCmd implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS = { "joinctf", "leavectf", "infoctf" };
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
if (command.startsWith("joinctf"))
{
JoinCTF(activeChar);
}
else if(command.startsWith("leavectf"))
{
LeaveCTF(activeChar);
}
else if(command.startsWith("infoctf"))
{
SendCTFinfo(activeChar);
}
return true;
}
public String[] getVoicedCommandList()
{
return VOICED_COMMANDS;
}
public boolean JoinCTF (L2PcInstance activeChar)
{
if ( activeChar == null)
{
return false;
}
NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage( 0 );
if (!CTF._joining) //check if ctf event is running or/and joining is avaliable
{
npcHtmlMessage.setHtml("<html><body>You can not register now: CTF event joining is not avaliable.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
return false;
}
else if (activeChar._inEventCTF) //check if player is already registered in ctf event
{
npcHtmlMessage.setHtml("<html><body>You are participating this event already.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
return false;
}
else if ( activeChar.isCursedWeaponEquipped()) //check if player is holding a cursed weapon
{
npcHtmlMessage.setHtml("<html><body>You are not allowed to participate to the Event holding a Cursed Weapon.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
return false;
}
else if ( activeChar.isInOlympiadMode()) //check if player is in olympiads - dunno why, but sometimes simple doesnt work this check =/
{
npcHtmlMessage.setHtml("<html><body>You are not allowed to participate to the Event while in Olympiad.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
return false;
}
else if (activeChar.isInJail()) //check if player is in jail
{
npcHtmlMessage.setHtml("<html><body>You are not allowed to participate to the Event while in Jail.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
return false;
}
else if (activeChar.getLevel() < CTF._minlvl)
{
npcHtmlMessage.setHtml("<html><body>Your level is too low to participate at this Event.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
return false;
}
else if (activeChar.getKarma() > 0) //check player karma - dunno why karma players cant participate - looks useless since player can register while not with karma and do pk after that ;)
{
npcHtmlMessage.setHtml("<html><body>You are not allowed to participate to the Event with Karma.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
return false;
}
else if (CTF._maxPlayers == CTF._playersShuffle.size()) //check player karma - dunno why karma players cant participate - looks useless since player can register while not with karma and do pk after that ;)
{
npcHtmlMessage.setHtml("<html><body>Sorry,CTF Event is full.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
return false;
}
else //send dialog confirmation to player that he is registered in ctf event and add him
{
npcHtmlMessage.setHtml("<html><body>Your participation in the CTF event has been aproved.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
CTF.addPlayer(activeChar,"");
return true;
}
}
public boolean LeaveCTF (L2PcInstance activeChar)
{
if ( activeChar == null)
{
return false;
}
NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage( 0 );
if (!CTF._joining) //check if CTF event is running or joining is avaliable
{
npcHtmlMessage.setHtml("<html><body>You can not unregister now cause there is no CTF event running.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
return false;
}
else if (CTF._teleport || CTF._started) //check if ctf event has already teleported and started
{
npcHtmlMessage.setHtml("<html><body>You can not leave after CTF event has started.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
return false;
}
else //send dialog confirmation to player that he is unregistered from ctf event and remove him
{
npcHtmlMessage.setHtml("<html><body>Your participation in the CTF event has been removed.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
CTF.removePlayer(activeChar);
return true;
}
}
public boolean SendCTFinfo (L2PcInstance activeChar)
{
if ( activeChar == null)
{
return false;
}
NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage( 0 );
if (CTF._joining)
{
npcHtmlMessage.setHtml("<html><body>There are " + CTF._playersShuffle.size() + " players participating in this event.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
return true;
}
else
{
npcHtmlMessage.setHtml("<html><body>There is no Event in progress.</body></html>");
activeChar.sendPacket( npcHtmlMessage );
return false;
}
}
}
No diretório acima, scripts/handers, há um arquivo chamado MasterHandler.java Role a barra até ver a frase: Citação:
Somente coloque isto abaixo ou acima de alguma (Cuidado para não danificar nada!) Código:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
if (Config.CTF_ALLOW_VOICE_COMMAND) VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new CTFCmd()); Então crie uma pasta chamada l2jlive na sua pasta config, e crie um arquivo chamado Events.properties (Extenção .properties!) Insira isso dentro do arquivo que você criou: Código:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
#-------------------------------------------------------- # Event's Settings- By L2jLive Team #-------------------------------------------------------- # ----------------------------- # Capture The Flag - CTF # ----------------------------- # CTFEvenTeams = NO|BALANCE|SHUFFLE # NO means: not even teams. # BALANCE means: Players can only join team with lowest player count. # SHUFFLE means: Players can only participate to the event and not direct to a team. Teams will be shuffled on teams teleport. # Default: SHUFFLE CTFEvenTeams = SHUFFLE # Allow voiced command on CTF Event? # Default: False CTFAllowVoiceCommand = False # Players that are not participating in CTF can target ctf participants? # Default: False CTFAllowInterference = False # CTF participants can use potions? # Default: False CTFAllowPotions = False # CTF participants can summon by item? # Default: False CTFAllowSummon = False # Remove all effects of CTF participants on event start? # Default: True CTFOnStartRemoveAllEffects = True # Unsummon pet of CTF participants on event start? # Default: True CTFOnStartUnsummonPet = True # On revive participants regain full HP/MP/CP? # Default: False CTFReviveRecovery = False # Announce all team statistics # Default: False CTFAnnounceTeamStats = False # Announce reward # Default: False CTFAnnounceReward = False # Players with cursed weapon are allowed to join? # Default: True CTFJoinWithCursedWeapon = True # Delay on revive when dead, NOTE: 20000 equals to 20 seconds, minimum 1000 (1 second) # Default: 20000 CTFReviveDelay = 20000 Até mais, espero que eu tenha ajudado.
__________________
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar] |
|
|
|
|
|
|
#16 (permalink) |
|
Membro - Aspirante
![]() Registrado em: Dec 2009
Posts: 72
Agradeceu: 318
Agradecido 63 Vezes em 51 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
![]()
|
Como configuro o ctf ?
|
|
|
|
| O seguinte membro ao lado disse Obrigado(a) a : Lorde por gostar deste Post : |
Kertron (18-07-2010)
|
|
|
#17 (permalink) | ||||||||||||||
|
Membro - Tenente
![]() Registrado em: Nov 2008
Localização: Rio de Janeiro
Posts: 100
Agradeceu: 143
Agradecido 52 Vezes em 22 Posts
Nome Real: Filipe Felisberto
|
Valter vlw, consegui colocar pra funcionar aqui. Perfeito....
Agora, tipo fui v um NPC Custom que tenho aqui, aqueles que vem basico nos fontes do L2jserver, e tipo quando eu compro o buff nele, vem duplicado a compra. Ou seja eu pago 2 x e me cobra 2x. Fiz a reversa do fonte, tirando o CTF, e isso para de acontecer. Não estou identificando o problema, pois já vi e os metodos do CTF não impactam na venda. Alguem já passou por isso? |
||||||||||||||
|
|
|
||||||||||||||
|
|
#18 (permalink) | ||||||||||||||
|
Membro - Sargento
![]() Registrado em: Jan 2011
Localização: Salvador
Posts: 35
Agradeceu: 22
Agradecido 15 Vezes em 5 Posts
Nome Real: Ígor Ferreira Torres
|
pow cara tá dando erro nessa parte
+import net.sf.l2j.gameserver.model.entity.events.CTF; |
||||||||||||||
|
|
|
||||||||||||||
![]() |
|
|