Jump to content
  1. Administração

    1. Administração

      Você é um visitante e não consegue acessar o fórum? Ou é um membro já cadastrado e está com problemas? Aqui é o lugar certo para comunicar-se com a equipe L2JBrasil, para agradecer, sugerir, reportar problemas entre outros.

      11,022
      posts
  2. L2J

    1. 65,261
      posts
    2. Tutoriais

      Encontre aqui tutoriais para montar seu servidor de lineage, tutoriais desde os mais básicos até os mais avançados sobre edição, criação e etc.

      19,782
      posts
    3. Download

      Encontre aqui Armas, Armaduras, items e muito mais para dar aquele toque especial ao seu servidor.

      52,805
      posts
    4. Sites

      Encontre sites pré-configurados, scripts, programas para edição e etc.

      20,644
      posts
    5. Java MODs

      Encontre aqui os melhores mods para o seu servidor.

      15,414
      posts
    6. 322,370
      posts
    7. Desenvolvimento

      Discuta projetos, encontre usuarios com as mesmas ideias, desenvolva o que tem em mente e discuta nessa area.

      14,580
      posts
    8. Recrutamento

      Precisa de uma equipe ou de alguém para lhe ajudar? Procure um ou vários sócios aqui e forme a staff de seu servidor!

      5,558
      posts
    9. Conteúdo Offline

      Área onde se encontra todos os tópicos com links ou imagens offline aguardando a recuperação.
      Você pode contribuir! Basta comentar no tópico com um link online do conteúdo.

      35,955
      posts
  3. Players

    1. 4,561
      posts
    2. 312
      posts
    3. Lineage 2: Revolution

      Lineage 2: Revolution é um MMORPG Mobile (Celular/Tablet) desenvolvida pela Netmarble Neo.

      Ele utiliza tecnologia Unreal Engine 4, o que garante gráficos de tirar o fólego.

      124
      posts
  4. Outros Assuntos

    1. Off-Topic

      Tudo Sobre lineage ou não pode ser discutido aqui.
      Proibido: Dúvidas, Spam, Propaganda, Pedidos, entre outros.

      44,198
      posts
    2. Tecnologia & PC

      Local para discutir todo tipo de tecnologia relacionada a jogos, computadores, inovações, reviews, etc.

      577
      posts
    3. Artes

      Peça uma arte! Confira obras artísticas que membros produziram e compartilharam conosco. Você também irá encontrar conteúdos e ferramentas de design para download!

      29,442
      posts
    4. Divulgação Lineage II Facebook (Beta)   (12,907 visits to this link)

      Divulgue seu servidor ou encontre um servidor para jogar no grupo oficial para divulgação no facebook.

  5. Publicidade Privada

    1. L2JCenter Soluções de Internet

      Dedicados, Cloud, Hospedagem, Domínios e Suporte à L2J. Entre em contato através de nosso site.

      2,125
      posts
    2. Atualstudio Desenvolvimento Web   (11,833 visits to this link)

      Company specialized in creating websites, systems and design.
      E-mail: [email protected] · Whatsapp: (77) 99977-9727 · Telephone: (77) 3451-5790 · Contact Us!

    3. L2JScripts - Panels

      A solução definitiva para administração e automação de seu servidor de Lineage 2.

      1
      post
    4. Convert Host

      Dedicated, Cloud and Hosting for sites with great prices.

      139
      posts
    5. AlphaServers

      Especialista em servidores dedicado e semi. Whats (67) 9 9949 7100

      40
      posts
  6. Top L2jBrasil

    1. Top 200   (433,737 visits to this link)

      #
      Encontre aqui um bom servidor para jogar. Veja os servidores mais votados em nosso top server.
      Divulgue também o seu servidor de Lineage 2 faça um cadastro agora mesmo e coloque o HTML em seu site e espere que os seus players votem no servidor!
    2. Painel de Controle   (2,800 visits to this link)

      Gerencie sua conta

    3. Contratar Banner   (2,930 visits to this link)

      Se você já tem uma conta e quer dar um Up nela, contrate um banner!

    4. Duvidas & Ajuda top.l2jbrasil.com

      Alguma dúvida? Está precisando de ajuda com alguma coisa relacionado ao Top? Poste aqui.

      1
      post
    5. Criar conta   (2,479 visits to this link)

      Adicione seu servidor ao nosso rank!

    6. Votesystem   (3,070 visits to this link)

      Quer recompensar seus players por votarem no seu servidor? Acesse

    7. Anúncios Especiais   (2,960 visits to this link)

      Está precisando de algo mais especial? Entre em contato podemos te ajudar.

    8. Private Servers

      Tópicos sobre os servidores.

      611
      posts



     



  • Popular Now

  • Tópicos

  • Our picks

    • Catedral  de Notre Dame
      Catedral de Notre Dame em Paris está em chamas. Ela foi a inspiração para a igreja de Giran

       

       
        • Sad
        • Like
      • 4 replies
    • Tema para Bootstrap 4 - Lineage 2 Moderno
      Fala, galera, beleza?

      Seguinte, peguei o Sass do Bootstrap 4.3 e o modifiquei para ficar com visual igual ao cliente do L2 Moderno. O objetivo é deixar os componentes o mais parecido possível com L2, mas sem alterar nada o HTML da utilização original do Bootstrap.


      Demo: https://l2brasil.bitbucket.io/bootstrap-modern/

      Projeto open-source: https://bitbucket.org/l2brasil/bootstrap
        • I love it
        • Like
      • 14 replies
  • Posts

    • 1. Create a new java file on data/scripts/custom/PartyTeleporter/PartyTeleporter.java package custom.PartyTeleporter; import com.l2jserver.gameserver.cache.HtmCache; import com.l2jserver.gameserver.datatables.ItemTable; import com.l2jserver.gameserver.instancemanager.ZoneManager; import com.l2jserver.gameserver.model.L2Party; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.model.zone.L2ZoneType; import com.l2jserver.gameserver.network.serverpackets.InventoryUpdate; import com.l2jserver.gameserver.network.serverpackets.ItemList; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jserver.gameserver.network.serverpackets.StatusUpdate; /** * @author `Heroin * Made For Maxcheaters.com * PartyTeleporter */ public class PartyTeleporter extends Quest { private static final int npcid = 36650; // npc id //------------------------------------- //Teleport Location Coordinates X,Y,Z. //Use /loc command in game to find them. private static final int locationX = -56742; // npc id private static final int locationY = 140569; // npc id private static final int locationZ = -2625; // 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 = 155; //Here you have to set your zone Id //------------------------------------- private static final int MinPtMembers = 2; // Minimum Party Members Count For Enter on Zone. private static final int ItemConsumeId = 57; // Item Consume id. private static final int ItemConsumeNum = 100; // Item Consume Am.ount. private static final boolean ShowPlayersInside = true; //If you set it true, NPC will show how many players are inside area. private static final boolean ShowPartiesInside = true; //If you set it true, NPC will show how many parties are inside area. //------------------------------------- private static String htm = "data/scripts/custom/PartyTeleporter/1.htm"; //html location. private static String ItemName = ItemTable.getInstance().createDummyItem(ItemConsumeId).getItemName(); //Item name, Dont Change this public PartyTeleporter(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(npcid); addTalkId(npcid); addStartNpc(npcid); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { if (event.startsWith("partytp")) { TP(event, npc, player, event); } return ""; } @SuppressWarnings("deprecation") public int getPartiesInside(int zoneId)//Calculating parties inside party area.     {         int i = 0;         for (L2ZoneType zone : ZoneManager.getInstance().getAllZones())             if (zone.getId() == zoneId)             {                 for (L2Character character : zone.getCharactersInside().values())                     if (character instanceof L2PcInstance && (!((L2PcInstance) character).getClient().isDetached()) &&                     ((L2PcInstance) character).getParty() != null &&                     ((L2PcInstance) character).getParty().isLeader((L2PcInstance) character))                         i++;             }         return i;     } @SuppressWarnings("deprecation") public int getPlayerInside(int zoneId)//Calculating players inside party area.     {         int i = 0;         for (L2ZoneType zone : ZoneManager.getInstance().getAllZones())             if (zone.getId() == zoneId)             {                 for (L2Character character : zone.getCharactersInside().values())                     if (character instanceof L2PcInstance && (!((L2PcInstance) character).getClient().isDetached()))                         i++;             } return i; } private 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 void proccessTP(L2PcInstance player) // Teleporting party members to zone { for (L2PcInstance member : player.getParty().getPartyMembers()) { member.teleToLocation(locationX, locationY, locationZ);//Location X, Y ,Z } } private void TP(String event, L2Npc npc, L2PcInstance player, String command) // 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; } else { 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, true);//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 String onFirstTalk(L2Npc npc, L2PcInstance player) { final int npcId = npc.getNpcId(); if (player.getQuestState(getName()) == null) { newQuestState(player); } if (npcId == npcid) { String html = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htm); html = html.replaceAll("%player%", player.getName());//Replaces %player% with player name on html html = html.replaceAll("%itemname%", ItemName);//Item name replace on html html = html.replaceAll("%price%", player.getParty()!=null ? ""+ItemConsumeNum*player.getParty().getMemberCount()+"": "0");//Price calculate replace html = html.replaceAll("%minmembers%", ""+MinPtMembers);//Mimum entry party members replace html = html.replaceAll("%allowed%", isAllowedEnter(player) ? "<font color=00FF00>allowed</font>" : "<font color=FF0000>not allowed</font>");//Condition checker replace on html html = html.replaceAll("%parties%", ShowPartiesInside ? "<font color=FFA500>Parties Inside: "+getPartiesInside(ZoneId)+"</font><br>": "");//Parties inside html = html.replaceAll("%players%", ShowPlayersInside ? "<font color=FFA500>Players Inside: "+getPlayerInside(ZoneId)+"</font><br>": "");//Players Inside NpcHtmlMessage npcHtml = new NpcHtmlMessage(0); npcHtml.setHtml(html); player.sendPacket(npcHtml); } return ""; } private 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; } else { return false; } } else { return false; } } public static void main(final String[] args) { new PartyTeleporter(-1, PartyTeleporter.class.getSimpleName(), "custom"); System.out.println("Party Teleporter by `Heroin has been loaded successfully!"); } }   2.Create a new htm file on data/scripts/custom/PartyTeleporter/1.htm <html> <title>%player%</title> <body><center> <img src="L2UI_CH3.herotower_deco" width=256 height=32></center><br> You have to be a party leader in order to ask from me to teleport you and your party inside party area.<br> Minimum Number Of Party Members: <font color="LEVEL">%minmembers%</font>.<br> You are currently %allowed% to enter party area with your party.<br> Party Teleport will cost you total: <font color="LEVEL">%price% %itemname%</font><br> <center> %parties% %players% <table><tr> <td><button value="Teleport Me & My Party!" action="bypass -h Quest PartyTeleporter partytp" width=180 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> </tr></table> <br><br> <center> <img src="L2UI_CH3.herotower_deco" width=256 height=32></center> </body></html> 3. Add script on scripts.cfg file: custom/PartyTeleporter/PartyTeleporter.java 4. Run this query on your database or install the NPC by yourself. INSERT INTO `npc` VALUES ('36650', '13173', 'PartyTeleporter', '1', 'MaxCheaters.com', '1', 'LineageNPC.clear_npc', '8.00', '19.00', '85', 'male', 'L2Npc', null, null, null, null, null, '40', '43', '30', '21', '20', '20', '0', '0', null, null, null, null, '230', '1', '0', '333', '0', '0', '0', '60.00000', '120.00000', '1', '1', '0', '0'); How to Modify:   Check Variables on code: private static final int npcid = 36650; // npc id //------------------------------------- //Teleport Location Coordinates X,Y,Z. //Use /loc command in game to find them. private static final int locationX = -56742; // npc id private static final int locationY = 140569; // npc id private static final int locationZ = -2625; // 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 = 155; //Here you have to set your zone Id //------------------------------------- private static final int MinPtMembers = 2; // Minimum Party Members Count For Enter on Zone. private static final int ItemConsumeId = 57; // Item Consume id. private static final int ItemConsumeNum = 100; // Item Consume Am.ount. private static final boolean ShowPlayersInside = true; //If you set it true, NPC will show how many players are inside area. private static final boolean ShowPartiesInside = true; //If you set it true, NPC will show how many parties are inside area. //------------------------------------- private static String htm = "data/scripts/custom/PartyTeleporter/1.htm"; //html location. Alguem adapta pramin fazendo favo ?
    • tenho minha soucer mais nao estou conseguindo colocar no eclipse para mexer ......  
    • ne kk   tem como me ajudar? eu nao estou conseguindo colocar minha soucer no eclipse de jeito nenhum aff
    • Isso vc consegue alterar no core, caso tenha acesso...
    • Blz, obrigado mesmo assim kk
  • Forum Statistics

    • Total Topics
      109,751
    • Total Posts
      707,180
  • Recent Awards

    • Entusiasta

    • Bamba

    • Pré-histórico

    • Veterano

    • Pré-histórico

×
×
  • Create New...