- 0
-
Registre-se
Faça parte da maior e mais antigas comunidades sobre Lineage2 da América Latina.
- Entre
- ou
- Cadastre-se
-
Quem Está Navegando
- Nenhum usuário registrado visualizando esta página.
-
Posts
-
Por Gabrieljdb · Postado
Falta arquivo "armorgrp.dat" alguém poderia postar. Grato! -
Também to querendo só a textura do drop no chão, se alguém tiver.
-
Opa Obrigado amigo e aguarde que vamos tentar por todas as quests 99,9% funcional principalemnte porque projeto acis nao vi ate agora com quest 90%
-
Por Saimon Cordeiro · Postado
Boa noite, estimado amigo! Sou entusiasta de servidores Low Raste e vou testar as missões do projeto, começando pelas classes de nível 20 de todas as raças. Desde já, expresso minha gratidão pelo suporte e pelo empreendimento. -
Por otaviodeyvison · Postado
Zonas em Vermelho - Mapas de upgrades de outras crônicas por isso nao esta disponivel nesse pack de download. Link Download: O conteúdo está oculto, favor efetuar login ou se cadastrar! Entre ou Cadastre-se -
Por otaviodeyvison · Postado
- Aqui esta listado todas as quests - conforme os infos disponíveis, no qual podemos testar as quests: -
Ola amigo no caso sua duvida sobre a lucera tem que ser feita na area oficial do projeto. Segue o link da area. Dúvidas - L2JBrasil - A Maior e mais antiga Comunidade de Lineage 2 da América Latina
-
Por zoidegato22 · Postado
boa Kelvin, eu tenho essa Rev lucera , voce poderia tira uma informação, so 1 duvida, pois eu coloco na Config de logar 2 char por HWID , nao funciona, só funciona o po IP, poderia me tira essa duvida.
-
Pergunta
AikoN~
Oiiiee, estou com um evento aqui onde existe DOIS times, um ataca uma bandeira enquanto o outro defende essa bandeira.
Se o time atacante destrói as 3 bandeiras ele ganha e se não destruir o defensor ganha...
Queria mudar esse código para que os dois times atacassem a bandeira do inimigo. Cada time tem suas próprias 3 bandeiras para defender e a proposta é destruir as 3 do adversário.
Código UM: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java
if (getNpcId() == 36006)
{
if(!CastleWars.isFinished)
{
CastleWars.flagskilled++;
CastleWars.attackersWin();
}
}
Eu tentei multiplicar ele pondo o mesmo código embaixo e mudando o ID para 36007 e o flags para flags2.. mais deu error ao compilar.
O código principal seria esse: head-src/com/l2jfrozen/gameserver/model/entity/event/CastleWars.java
+ */
+ /**
+ * @author Boorinio
+ */
+ package com.l2jfrozen.gameserver.model.entity.event;
+
+ import java.util.List;
+
+ import com.l2jfrozen.gameserver.model.entity.Announcements;
+ import com.l2jfrozen.gameserver.datatables.csv.DoorTable;
+ import com.l2jfrozen.gameserver.datatables.sql.NpcTable;
+ import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
+ import com.l2jfrozen.gameserver.model.L2World;
+ import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance;
+ import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+ import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
+
+ import javolution.util.FastList;
+ import javolution.util.FastSet;
+
+ public class CastleWars
+ {
+ private static List<L2PcInstance> _defenders = new FastList<L2PcInstance>();
+ private static List<L2PcInstance> _attackers = new FastList<L2PcInstance>();
+ private static FastSet<L2NpcInstance> _flags = new FastSet<L2NpcInstance>();
+ public static boolean isFinished;
+ public static boolean CastleRegi;
+ public static boolean isRunning;
+ private static boolean alaksokolies = false;
+ private static int i;
+ public static int flagskilled = 0;
+ public static int defendersx = 77566;
+ public static int defendersy = -152128;
+ public static int defendersz = -545;
+ public static int attackersx = 84303;
+ public static int attackersy = -140727;
+ public static int attackersz = -1568;
+ public static int[] flagslocx =
+ {
+ 77545, 76663, 78446,
+ };
+ private static int[] flagslocy =
+ {
+ -149937, -154522, -154524,
+ };
+ private static int[] flagslocz =
+ {
+ 345, 128, 235,
+ };
+
+ public static void openRegi()
+ {
+ Announcements.getInstance().announceToAll("Castle Wars Event has Started!");
+ Announcements.getInstance().announceToAll("Type .join to enter or .leave to leave!");
+ Announcements.getInstance().announceToAll("You have 5 minutes to register!");
+ isRunning = true;
+ isFinished = false;
+ CastleRegi = true;
+ waitSecs(300);
+ stopRegi();
+ preparecastle();
+ shufflePlayers();
+ teleportThem();
+ Announcements.getInstance().announceToAll("You have 10 minutes till the event is finished!");
+ waitSecs(600);
+ if (!isFinished)
+ {
+ defendersWin();
+
+ }
+
+ }
+
+ public static void preparecastle()
+ {
+ DoorTable.getInstance().getDoor(22130001).openMe();
+ DoorTable.getInstance().getDoor(22130002).openMe();
+ DoorTable.getInstance().getDoor(22130003).openMe();
+ DoorTable.getInstance().getDoor(22130004).openMe();
+ DoorTable.getInstance().getDoor(22130005).openMe();
+ DoorTable.getInstance().getDoor(22130010).openMe();
+ DoorTable.getInstance().getDoor(22130007).openMe();
+ DoorTable.getInstance().getDoor(22130011).openMe();
+ DoorTable.getInstance().getDoor(22130009).openMe();
+ DoorTable.getInstance().getDoor(22130008).openMe();
+ DoorTable.getInstance().getDoor(22130010).openMe();
+ DoorTable.getInstance().getDoor(22130006).openMe();
+ L2NpcInstance flags = null;
+ for (i = 0; i < 3; i++)
+ {
+ flags = addSpawn(36006, flagslocx, flagslocy, flagslocz);
+ _flags.add(flags);
+ }
+ }
+
+ public static void cleanevent()
+ {
+ for (L2PcInstance defender : _defenders)
+ {
+ defender.getAppearance().setNameColor(0xFFFFFF);
+ defender.setTitle("");
+ defender.broadcastUserInfo();
+ defender.teleToLocation(82724, 148307, -3469);
+ defender.isinCastleWars = false;
+ defender.isDefender=false;
+ }
+ for (L2PcInstance attacker : _attackers)
+ {
+ attacker.getAppearance().setNameColor(0xFFFFFF);
+ attacker.setTitle("");
+ attacker.broadcastUserInfo();
+ attacker.teleToLocation(82724, 148307, -3469);
+ attacker.isinCastleWars = false;
+ attacker.isAttacker=false;
+ }
+ for (L2NpcInstance flags : _flags)
+ {
+ flags.deleteMe();
+
+ }
+ flagskilled = 0;
+ _flags.clear();
+ _defenders.clear();
+ _attackers.clear();
+ DoorTable.getInstance().getDoor(22130001).closeMe();
+ DoorTable.getInstance().getDoor(22130002).closeMe();
+ DoorTable.getInstance().getDoor(22130003).closeMe();
+ DoorTable.getInstance().getDoor(22130004).closeMe();
+ DoorTable.getInstance().getDoor(22130005).closeMe();
+ DoorTable.getInstance().getDoor(22130010).closeMe();
+ DoorTable.getInstance().getDoor(22130007).closeMe();
+ DoorTable.getInstance().getDoor(22130011).closeMe();
+ DoorTable.getInstance().getDoor(22130009).closeMe();
+ DoorTable.getInstance().getDoor(22130008).closeMe();
+ DoorTable.getInstance().getDoor(22130010).closeMe();
+ DoorTable.getInstance().getDoor(22130006).closeMe();
+ }
+
+ public static void defendersWin()
+ {
+ Announcements.getInstance().announceToAll("Defenders Won the event they protected the flags!");
+ for (L2PcInstance defender : _defenders)
+ {
+ defender.sendMessage("Congratulations! Here is a reward for your effort!");
+ defender.addItem("Reward", 3470, 1, defender, true);
+ }
+ isFinished = true;
+ cleanevent();
+ }
+
+ public static void attackersWin()
+ {
+ if (flagskilled == 3)
+ {
+ Announcements.getInstance().announceToAll("Attackers Won the event they killed all the flags!");
+ for (L2PcInstance attacker : _attackers)
+ {
+ attacker.sendMessage("Congratulations! Here is a reward for your effort!");
+ attacker.addItem("Reward", 3470, 1, attacker, true);
+ }
+ isFinished = true;
+ cleanevent();
+ }
+ }
+
+ public static void teleportThem()
+ {
+ for (L2PcInstance defender : _defenders)
+ {
+ defender.teleToLocation(defendersx, defendersy, defendersz);
+ }
+ for (L2PcInstance attacker : _attackers)
+ {
+ attacker.teleToLocation(attackersx, attackersy, attackersz);
+ }
+ }
+
+ public static void stopRegi()
+ {
+ Announcements.getInstance().announceToAll("Registrations are now over!");
+ CastleRegi = false;
+ }
+
+ public static void shufflePlayers()
+ {
+ for (L2PcInstance player : L2World.getInstance().getAllPlayers())
+ {
+ if (player.isinCastleWars)
+ {
+ if (alaksokolies)
+ {
+ _defenders.add(player);
+ player.getAppearance().setNameColor(0xFF0000);
+ player.setTitle("Defender");
+ player.broadcastUserInfo();
+ player.isDefender=true;
+ alaksokolies = false;
+ }
+ else
+ {
+ _attackers.add(player);
+ player.getAppearance().setNameColor(0x0000FF);
+ player.setTitle("Attacker");
+ player.broadcastUserInfo();
+ player.isAttacker=true;
+ alaksokolies = true;
+ }
+ }
+ }
+ }
+
+ public static void waitSecs(int i)
+ {
+ try
+ {
+ Thread.sleep(i * 1000);
+ }
+ catch (InterruptedException ie)
+ {
+ ie.printStackTrace();
+ }
+ }
+
+ private static L2NpcInstance addSpawn(int npcId, int x, int y, int z)
+ {
+ L2NpcInstance result = null;
+ try
+ {
+ L2NpcTemplate template = NpcTable.getInstance().getTemplate(npcId);
+ if (template != null)
+ {
+ L2Spawn spawn = new L2Spawn(template);
+ spawn.setInstanceId(0);
+ spawn.setHeading(1);
+ spawn.setLocx(x);
+ spawn.setLocy(y);
+ spawn.setLocz(z);
+ spawn.stopRespawn();
+ result = spawn.spawnOne();
+ return result;
+ }
+ }
+ catch (Exception e1)
+ {
+ }
+ return null;
+ }
+ }
Esse aqui eu não estou conseguindo por a opção dos 2 times tanto atacarem como defenderem suas bandeiras... Me ajudaaaaaaaaaaaaaaaaaaaaa pufavo
alguém adapta isso pra mim?
//RESOLVIDO, CONSEGUI... :)
Editado por PsiuTopico Resolvido
Link para o comentário
Compartilhar em outros sites
0 respostass a esta questão
Posts recomendados
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.