-
Total de itens
297 -
Registro em
-
Última visita
-
Prêmios recebidos
1
Tudo que [ADM]Mystogan postou
-
sim mais como citei acima nao posso substituir o sleep de um servidor por esse efeito logo essa linha ira aplicar a "bola de sleep" no mod gostaria de saber apenas o ID dentro da systextures ou um meio de editar o arquivo LineageEffect.u para criar uma linha especifica para apenas esse efeito
-
-
sabe o import desse efeito para poder usar ele em um mod java ?
-
e possivel separar ele dos demais sem precisar subistituir o sleep ?
-
um mod muito bom uma pena nao ter tido continuidade
-
Ola galera estou tentando adaptar esse mod para o jFrozen ele e originalmente feito para Acis mais estou tendo pequenas dificuldades em alguns imports se alguem souber para qual import devo trocar fico muito grato. Codigo Original +package net.sf.l2j.gameserver.model.actor.instance; + +import java.util.StringTokenizer; + +import net.sf.l2j.Config; +import net.sf.l2j.gameserver.datatables.ItemTable; +import net.sf.l2j.gameserver.instancemanager.ZoneManager; +import net.sf.l2j.gameserver.model.L2Party; +import net.sf.l2j.gameserver.model.actor.L2Character; +import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; +import net.sf.l2j.gameserver.model.zone.L2ZoneType; +import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; +import net.sf.l2j.gameserver.network.serverpackets.InventoryUpdate; +import net.sf.l2j.gameserver.network.serverpackets.ItemList; +import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; +import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate; + + +/** + * @author `Heroin Adapter Gandalf PartyTeleporter, Lucas Fernandes + */ +public class L2PartyTeleporterInstance extends L2NpcInstance +{ + private static final int npcid = Config.NPC_ID_PT_TELEPORTER; // npc id + // ------------------------------------- + // Teleport Location Coordinates X,Y,Z. + // Use /loc command in game to find them. + private static final int locationX = Config.NPC_PT_TELEPORTER_X; // npc id + private static final int locationY = Config.NPC_PT_TELEPORTER_Y; // npc id + private static final int locationZ = Config.NPC_PT_TELEPORTER_Z; // npc id + // ------------------------------------- + // ------------------------------------- + // Select the id of your zone. + // If you dont know how to find your zone id is simple. + // Go to data/zones/(your zone file).xml and find your zone + // E.g: <zone name="dion_monster_pvp" id="6" type="ArenaZone" shape="NPoly" minZ="-3596" maxZ="0"> + /** The id of your zone is id="6" */ + /** --------------------------------------------------------------------------- */ + /** WARNING: If your zone does not have any id or your location is not on any zone in data/zones/ folder, you have to add one by your self */ // required to calculate parties & players + /** --------------------------------------------------------------------------- */ + private static final int ZoneId = Config.NPC_PT_ZONEID; // Here you have to set your zone Id + // ------------------------------------- + private static final int MinPtMembers = Config.NPC_PT_MINPT_MEMBERS; // Minimum Party Members Count For Enter on Zone. + private static final int ItemConsumeId = Config.NPC_PT_ITEMCONSUME_ID; // Item Consume id. + private static final int ItemConsumeNum = Config.NPC_PT_ITEMCOMSUME_QT; // Item Consume Am.ount. + private static final boolean ShowPlayersInside = Config.NPC_PT_SHOWINSIDE_PLAYERS; // If you set it true, NPC will show how many players are inside area. + private static final boolean ShowPartiesInside = Config.NPC_PT_SHOWINSIDE_PARTIES; // If you set it true, NPC will show how many parties are inside area. + private static String ItemName = ItemTable.getInstance().getTemplate(ItemConsumeId).getName(); // Item name, Dont Change this + private String htmContent; + + public L2PartyTeleporterInstance(int objectId, NpcTemplate template) + { + super(objectId, template); + } + + @Override + public void onBypassFeedback(L2PcInstance player, String command) + { + player.sendPacket(ActionFailed.STATIC_PACKET); + + StringTokenizer st = new StringTokenizer(command, " "); + String actualCommand = st.nextToken(); // Get actual command + + if (actualCommand.equalsIgnoreCase("partytp")) + { + TP(player); + } + super.onBypassFeedback(player, command); + } + + public int getPartiesInside(int zoneId)// Calculating parties inside party area. + { + int i = 0; + for (L2ZoneType zone : ZoneManager.getInstance().getZones(locationX, locationY, locationZ)) + { + if (zone.getId() == zoneId) + { + for (L2Character character : zone.getCharactersInside()) + { + if ((character instanceof L2PcInstance) && (!((L2PcInstance) character).getClient().isDetached()) && (((L2PcInstance) character).getParty() != null) && ((L2PcInstance) character).getParty().isLeader((L2PcInstance) character)) + { + i++; + } + } + } + } + return i; + } + + public int getPlayerInside(int zoneId)// Calculating players inside party area. + { + int i = 0; + for (L2ZoneType zone : ZoneManager.getInstance().getZones(locationX, locationY, locationZ)) + { + if (zone.getId() == zoneId) + { + for (L2Character character : zone.getCharactersInside()) + { + if ((character instanceof L2PcInstance) && (!((L2PcInstance) character).getClient().isDetached())) + { + i++; + } + } + } + } + return i; + } + + private static boolean PartyItemsOk(L2PcInstance player) + // Checks if all party members have the item in their inventory. + // If pt member has not enough items, party not allowed to enter. + { + try + { + for (L2PcInstance member : player.getParty().getPartyMembers()) + { + if (member.getInventory().getItemByItemId(ItemConsumeId) == null) + + { + player.sendMessage("Your party member " + member.getName() + " does not have enough items."); + return false; + } + if (member.getInventory().getItemByItemId(ItemConsumeId).getCount() < ItemConsumeNum) + { + player.sendMessage("Your party member " + member.getName() + " does not have enough items."); + return false; + } + } + return true; + + } + catch (Exception e) + { + player.sendMessage("Something went wrong try again."); + return true; + } + } + + private static void proccessTP(L2PcInstance player) // Teleporting party members to zone + { + for (L2PcInstance member : player.getParty().getPartyMembers()) + { + member.teleToLocation(locationX, locationY, locationZ, 1);// Location X, Y ,Z + } + } + + private static void TP(L2PcInstance player) // Teleport player & his party + { + try + { + L2Party pt = player.getParty(); + if (pt == null) + { + player.sendMessage("You are not currently on party."); + return; + } + if (!pt.isLeader(player)) + { + player.sendMessage("You are not party leader."); + return; + } + if (pt.getMemberCount() < MinPtMembers) + { + player.sendMessage("You are going to need a bigger party " + "in order to enter party area."); + return; + } + if (!PartyItemsOk(player)) + { + return; + } + proccessTP(player); + for (L2PcInstance ppl : pt.getPartyMembers()) + { + if (ppl.getObjectId() != player.getObjectId()) // Dont send this message to pt leader. + { + ppl.sendMessage("Your party leader asked to teleport on party area!");// Message only to party members + } + ppl.sendMessage(ItemConsumeNum + " " + ItemName + " have been dissapeared.");// Item delete from inventory message + ppl.getInventory().destroyItemByItemId("Party_Teleporter", ItemConsumeId, ItemConsumeNum, ppl, ppl);// remove item from inventory + ppl.sendPacket(new InventoryUpdate());// Update + ppl.sendPacket(new ItemList(ppl, false));// Update + ppl.sendPacket(new StatusUpdate(ppl));// Update + + } + // Sends message to party leader. + player.sendMessage((ItemConsumeNum * player.getParty().getMemberCount()) + " " + ItemName + " dissapeard from your party."); + + } + catch (Exception e) + { + player.sendMessage("Something went wrong try again."); + } + } + + @Override + public void showChatWindow(L2PcInstance player) + { + final int npcId = Config.NPC_ID_PT_TELEPORTER; + if (npcId == npcid) + { + htmContent = "data/html/mods/PartyTeleporter/PartyTeleporter.htm"; + if (htmContent != null) + { + final NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId()); + npcHtmlMessage.setHtml(htmContent); + npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId())); + npcHtmlMessage.replace("%player%", player.getName());// Replaces %player% with player name on html + npcHtmlMessage.replace("%itemname%", ItemName);// Item name replace on html + npcHtmlMessage.replace("%price%", player.getParty() != null ? "" + (ItemConsumeNum * player.getParty().getMemberCount()) + "" : "0");// Price calculate replace + npcHtmlMessage.replace("%minmembers%", "" + MinPtMembers);// Mimum entry party members replace + npcHtmlMessage.replace("%allowed%", isAllowedEnter(player) ? "<font color=00FF00>allowed</font>" : "<font color=FF0000>not allowed</font>");// Condition checker replace on html + npcHtmlMessage.replace("%parties%", ShowPartiesInside ? "<font color=FFA500>Parties Inside: " + getPartiesInside(ZoneId) + "</font><br>" : "");// Parties inside + npcHtmlMessage.replace("%players%", ShowPlayersInside ? "<font color=FFA500>Players Inside: " + getPlayerInside(ZoneId) + "</font><br>" : "");// Players Inside + player.sendPacket(npcHtmlMessage); + } + + player.sendPacket(ActionFailed.STATIC_PACKET); + } + } + + private static boolean isAllowedEnter(L2PcInstance player) // Checks if player & his party is allowed to teleport. + { + if (player.getParty() != null) + { + if ((player.getParty().getMemberCount() >= MinPtMembers) && PartyItemsOk(player)) // Party Length & Item Checker + { + return true; + } + return false; + } + return false; + } + +} Esse eo codigo que estou adaptando. package com.guardian.gameserver.model.actor.instance; import java.util.StringTokenizer; import com.guardian.Config; import com.guardian.gameserver.model.Item; import com.guardian.gameserver.instancemanager.ZoneManager; import com.guardian.gameserver.model.L2Party; import com.guardian.gameserver.model.L2Character; import com.guardian.gameserver.templates.L2NpcTemplate; import com.guardian.gameserver.model.zone.L2ZoneType; import com.guardian.gameserver.network.serverpackets.ActionFailed; import com.guardian.gameserver.network.serverpackets.InventoryUpdate; import com.guardian.gameserver.network.serverpackets.ItemList; import com.guardian.gameserver.network.serverpackets.NpcHtmlMessage; import com.guardian.gameserver.network.serverpackets.StatusUpdate; /** * @author `Heroin Adapter Gandalf PartyTeleporter, Lucas Fernandes */ public class L2PartyTeleporterInstance extends L2NpcInstance { private static final int npcid = Config.NPC_ID_PT_TELEPORTER; // npc id // ------------------------------------- // Teleport Location Coordinates X,Y,Z. // Use /loc command in game to find them. private static final int locationX = Config.NPC_PT_TELEPORTER_X; // npc id private static final int locationY = Config.NPC_PT_TELEPORTER_Y; // npc id private static final int locationZ = Config.NPC_PT_TELEPORTER_Z; // npc id // ------------------------------------- // ------------------------------------- // Select the id of your zone. // If you dont know how to find your zone id is simple. // Go to data/zones/(your zone file).xml and find your zone // E.g: <zone name="dion_monster_pvp" id="6" type="ArenaZone" shape="NPoly" minZ="-3596" maxZ="0"> /** The id of your zone is id="6" */ /** --------------------------------------------------------------------------- */ /** WARNING: If your zone does not have any id or your location is not on any zone in data/zones/ folder, you have to add one by your self */ // required to calculate parties & players /** --------------------------------------------------------------------------- */ private static final int ZoneId = Config.NPC_PT_ZONEID; // Here you have to set your zone Id // ------------------------------------- private static final int MinPtMembers = Config.NPC_PT_MINPT_MEMBERS; // Minimum Party Members Count For Enter on Zone. private static final int ItemConsumeId = Config.NPC_PT_ITEMCONSUME_ID; // Item Consume id. private static final int ItemConsumeNum = Config.NPC_PT_ITEMCOMSUME_QT; // Item Consume Am.ount. private static final boolean ShowPlayersInside = Config.NPC_PT_SHOWINSIDE_PLAYERS; // If you set it true, NPC will show how many players are inside area. private static final boolean ShowPartiesInside = Config.NPC_PT_SHOWINSIDE_PARTIES; // If you set it true, NPC will show how many parties are inside area. private static String ItemName = ItemTable.getInstance().getTemplate(ItemConsumeId).getName(); // Item name, Dont Change this private String htmContent; public L2PartyTeleporterInstance(int objectId, L2NpcTemplate template) { super(objectId, template); } @Override public void onBypassFeedback(L2PcInstance player, String command) { player.sendPacket(ActionFailed.STATIC_PACKET); StringTokenizer st = new StringTokenizer(command, " "); String actualCommand = st.nextToken(); // Get actual command if (actualCommand.equalsIgnoreCase("partytp")) { TP(player); } super.onBypassFeedback(player, command); } public int getPartiesInside(int zoneId)// Calculating parties inside party area. { int i = 0; for (L2ZoneType zone : ZoneManager.getInstance().getZones(locationX, locationY, locationZ)) { if (zone.getId() == zoneId) { for (L2Character character : zone.getCharactersInside()) { if ((character instanceof L2PcInstance) && (!((L2PcInstance) character).getClient().isDetached()) && (((L2PcInstance) character).getParty() != null) && ((L2PcInstance) character).getParty().isLeader((L2PcInstance) character)) { i++; } } } } return i; } public int getPlayerInside(int zoneId)// Calculating players inside party area. { int i = 0; for (L2ZoneType zone : ZoneManager.getInstance().getZones(locationX, locationY, locationZ)) { if (zone.getId() == zoneId) { for (L2Character character : zone.getCharactersInside()) { if ((character instanceof L2PcInstance) && (!((L2PcInstance) character).getClient().isDetached())) { i++; } } } } return i; } private static boolean PartyItemsOk(L2PcInstance player) // Checks if all party members have the item in their inventory. // If pt member has not enough items, party not allowed to enter. { try { for (L2PcInstance member : player.getParty().getPartyMembers()) { if (member.getInventory().getItemByItemId(ItemConsumeId) == null) { player.sendMessage("Your party member " + member.getName() + " does not have enough items."); return false; } if (member.getInventory().getItemByItemId(ItemConsumeId).getCount() < ItemConsumeNum) { player.sendMessage("Your party member " + member.getName() + " does not have enough items."); return false; } } return true; } catch (Exception e) { player.sendMessage("Something went wrong try again."); return true; } } private static void proccessTP(L2PcInstance player) // Teleporting party members to zone { for (L2PcInstance member : player.getParty().getPartyMembers()) { member.teleToLocation(locationX, locationY, locationZ, 1);// Location X, Y ,Z } } private static void TP(L2PcInstance player) // Teleport player & his party { try { L2Party pt = player.getParty(); if (pt == null) { player.sendMessage("You are not currently on party."); return; } if (!pt.isLeader(player)) { player.sendMessage("You are not party leader."); return; } if (pt.getMemberCount() < MinPtMembers) { player.sendMessage("You are going to need a bigger party " + "in order to enter party area."); return; } if (!PartyItemsOk(player)) { return; } proccessTP(player); for (L2PcInstance ppl : pt.getPartyMembers()) { if (ppl.getObjectId() != player.getObjectId()) // Dont send this message to pt leader. { ppl.sendMessage("Your party leader asked to teleport on party area!");// Message only to party members } ppl.sendMessage(ItemConsumeNum + " " + ItemName + " have been dissapeared.");// Item delete from inventory message ppl.getInventory().destroyItemByItemId("Party_Teleporter", ItemConsumeId, ItemConsumeNum, ppl, ppl);// remove item from inventory ppl.sendPacket(new InventoryUpdate());// Update ppl.sendPacket(new ItemList(ppl, false));// Update ppl.sendPacket(new StatusUpdate(ppl));// Update } // Sends message to party leader. player.sendMessage((ItemConsumeNum * player.getParty().getMemberCount()) + " " + ItemName + " dissapeard from your party."); } catch (Exception e) { player.sendMessage("Something went wrong try again."); } } @Override public void showChatWindow(L2PcInstance player) { final int npcId = Config.NPC_ID_PT_TELEPORTER; if (npcId == npcid) { htmContent = "data/html/mods/PartyTeleporter/PartyTeleporter.htm"; if (htmContent != null) { final NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId()); npcHtmlMessage.setHtml(htmContent); npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId())); npcHtmlMessage.replace("%player%", player.getName());// Replaces %player% with player name on html npcHtmlMessage.replace("%itemname%", ItemName);// Item name replace on html npcHtmlMessage.replace("%price%", player.getParty() != null ? "" + (ItemConsumeNum * player.getParty().getMemberCount()) + "" : "0");// Price calculate replace npcHtmlMessage.replace("%minmembers%", "" + MinPtMembers);// Mimum entry party members replace npcHtmlMessage.replace("%allowed%", isAllowedEnter(player) ? "<font color=00FF00>allowed</font>" : "<font color=FF0000>not allowed</font>");// Condition checker replace on html npcHtmlMessage.replace("%parties%", ShowPartiesInside ? "<font color=FFA500>Parties Inside: " + getPartiesInside(ZoneId) + "</font><br>" : "");// Parties inside npcHtmlMessage.replace("%players%", ShowPlayersInside ? "<font color=FFA500>Players Inside: " + getPlayerInside(ZoneId) + "</font><br>" : "");// Players Inside player.sendPacket(npcHtmlMessage); } player.sendPacket(ActionFailed.STATIC_PACKET); } } private static boolean isAllowedEnter(L2PcInstance player) // Checks if player & his party is allowed to teleport. { if (player.getParty() != null) { if ((player.getParty().getMemberCount() >= MinPtMembers) && PartyItemsOk(player)) // Party Length & Item Checker { return true; } return false; } return false; } } Meus principais erros sao os import import com.guardian.gameserver.model.Item; import com.guardian.gameserver.instancemanager.ZoneManager;
-
muito bacana otima iniciativa estou no aguardo mais ja uso no meu pre
-
L2j Lisvus (C4) Scions of Destiny.
Tópico respondeu ao Saimon Cordeiro de [ADM]Mystogan em The Chaotic Chronicle (Prelude-C5)
por onde eles tao vendendo o acesso para modificar o core ? -
Compilando e clonando revisão L2JBRasil 3.0 pelo git
Tópico respondeu ao Tayran.JavaDev de [ADM]Mystogan em Tutoriais
quando for uma github com login e senha onde posso ir para digitar ambas ? -
alguem ai poderia me enviar um TvT que funcione na Acis 375 ? ou quem sabe concertar um que exista
-
vou estar te enviando o git no privado ?
-
Usando Git e Publicando seus projetos no GitHub
Tópico respondeu ao Grundor de [ADM]Mystogan em Tutoriais
colei no github -
Usando Git e Publicando seus projetos no GitHub
Tópico respondeu ao Grundor de [ADM]Mystogan em Tutoriais
entendo so que quando tento enviar os arquivos para o github da essa msg que não faço ideia de onde configurar o arquivo Config esta assim dentro da pasta .git -
Usando Git e Publicando seus projetos no GitHub
Tópico respondeu ao Grundor de [ADM]Mystogan em Tutoriais
estou com esse pequeno probleminha quando chego ate essa linha nao consigo digitar nada apenas apertar enter nao consigo definir uma senha ... e tb nao sei se e realmente esse email que devo por para conectar com o Github.com sim ele eo mesmo que usei para criar a conta -
o maximo que eu poderia e zipar ele e te enviar pode ser ?
-
Exatamente isso que esta ocorrendo
-
acho que me espressei errado Tayran, eque os chares fora do TvT nao estao ficando nem Flag e Nem com Karma [Hidden Content]
-
Galerinha adicionei esse MOD TvT em minha Acis 375 porem dentro do servidor estou com o seguinte problema dos players nao ficarem flag ou darem Pk e ficar sem karma mais os pontos como PvP / PK sao somados alguém saberia me dizer como arrumar ou onde pode estar o erro ? [Hidden Content] ou caso alguém tenha um TvT funcional para a Acis375 poderia postar ? ficaria muito grato
-
muito obrigado estou fazendo um otimo uso agr no servidor
-
[Hidden Content] Thx brow ?
-
Obrigado podem fechar o topico resolvido
-
alguem sabe onde posso mudar o numero de protocolo da rev L2jAcis ?
-
sim eo fixed do Feather so que queria deixar ele fixo para todos os players e quando clicar nele nao reviver no local mas em giran sabe onde modificar para acontecer isso ?
-
Galerinha gostaria de por o Fixed Aquele que so tem para ADM/GM quando morre para todos os players e quando clicar nele enviar para giran alguem sabe onde posso encontralo no JAVA ou se ja tem algum mod para isso no forum ?
-
Atualizações Recentes de Status
-
Hello, someone can help me, is there a problem or something wrong with what I did because it doesn't want to run log in and gameserver, I hope you can help me, thank you very much for helping· 0 respostas