Jump to content
Christian-SDM

L2J Mega Corrigido

Recommended Posts

UNICO ARQUIVO Q TO EM DUVIDA É NA Class, Mysql.java da uma busca ai amigo! mas acho que n tem nada a ve essa class

Edited by Christian-SDM

Share this post


Link to post
Share on other sites

Proteja seu servidor de ataques DDoS massivos!

VPS EPIC
10 minutos atrás, Christian-SDM disse:

UNICO ARQUIVO Q TO EM DUVIDA É NA Class, Mysql.java da uma busca ai amigo! mas acho que n tem nada a ve essa class

Esse não, na realidade tu pode até deletar ele e aplicar try-with-resources no Repair.java, pois é só ele que está usando o mysql.java

Edited by PeNaChO
  • Thanks 1

NHEpml4.png

Share this post


Link to post
Share on other sites

Alguem coloca os novos links no tópico Obrigado!.

Revisao compilada limpa com os mods

Source v2

Aproveitei e adicionei um novo sistema de vip, que quando vc ganha vip, vc ganha item e skill, tudo por config, e coloquei Vip especial login, o personagem vip loga, e da faisca de fogos de artificio,  no video abaixo mostra tudo.

 

 

  • Like 2

Share this post


Link to post
Share on other sites

Bom tópico e boa contribuição, mas,  onde o dono tinha como derrubar o servidor porque tinha uma falh

A falha ainda existe. 


Em breve novo servidor Classic PvP

www.l2prime.co

Private Classic 150x

Share this post


Link to post
Share on other sites
7 horas atrás, Elesis disse:

Bom tópico e boa contribuição, mas,  onde o dono tinha como derrubar o servidor porque tinha uma falh

A falha ainda existe. 

Existe onde? Ja foi removido na v2, se vc encontrar algo suspeito,  me avise, pq eu olhei no core de cima abaixo, e nao encontrei mais nada relacionado a falha. Qualquer coisa se vc achar por acaso,  publica  ai obrigado!

Share this post


Link to post
Share on other sites
58 minutos atrás, liraman disse:

 

Christian-SDM

axei um bug na rev V2, quando voce tenta desativar os fogos de artificios de quando um player vip loga ele buga geral nenhum npc e nenhum mob aparece, tem mais um no gs log tem um erro de class referente a Vip com id de item 57 da uma olhadinha 😉

consegue fazer um video mostrando ?

Share this post


Link to post
Share on other sites

pior que nao dá, mais ta facil de entender..

tipo voce vai na config/customs/command e desativa :

# =================================================================
#                         COMMAND LIST
# =================================================================

# Fogos de Artificio, Ação Victory e Anunciar quando Vip Logar ?
EspecialVipLogin = True (desativando aki por False)

ele buga todos os npcs e mobs

e o outro bug é esse na gs log

<a href="//imgur.com/a/iqStr6y"></a>

 

Edited by liraman
Mal explicado o caminho da config

Share this post


Link to post
Share on other sites
25 minutos atrás, liraman disse:

pior que nao dá, mais ta facil de entender..

tipo voce vai na config/customs/command e desativa :

# =================================================================
#                         COMMAND LIST
# =================================================================

# Fogos de Artificio, Ação Victory e Anunciar quando Vip Logar ?
EspecialVipLogin = True (desativando aki por False)

ele buga todos os npcs e mobs

e o outro bug é esse na gs log

<a href="//imgur.com/a/iqStr6y"></a>

 

ja corrigir o bug dos mobs e npcs sumindo, agora vo ve da config!

Share this post


Link to post
Share on other sites
3 minutos atrás, liraman disse:

fico feliz, bom pack sem palavras..

caso encontre algo mais reporto você.

Pronto, jaja faço update da source v3

Share this post


Link to post
Share on other sites
8 minutos atrás, liraman disse:

Christian-SDM

nao estou conseguindo abrir o painel do fake player

ou estou usando o comando errado?

usei //controlfake

//fakes

To adicionado vip item 7/15/30 dias com 2 click, porque eu removi o donate do vip que tinha no painel, porque não tava completo.. daqui pouco ja faço update, to nos ultimos detalhes!

Edited by Christian-SDM

Share this post


Link to post
Share on other sites

Correção dos npcs sumindo quando desativa a opção de vip login, aproveitando ja adicionei vip 2 click, 7/15/30 dias, com item+skills.

Source V3

Quer algum mod que não tenha aqui? mande MP OU PUBLICA AQUI NO TÓPICO!

Pack V3

Video atualizado com novos mods

 

 

Em 16/12/2019 at 14:46, Dwbryel disse:

Editado @Christian-SDM

coloquei v3 pq tinha um bug e complementei com vip itens 2 click 7/15/30 dias, atualiza tópico pf, e remova os links antigos! Obrigado!

Edited by Christian-SDM
  • Like 1
  • I love it 2

Share this post


Link to post
Share on other sites
12 minutos atrás, Gr1ze disse:

Can you upload link full source with datapack?

 

for datapack to have a compiled revision, use only the kernel to add mods

Share this post


Link to post
Share on other sites

cara onde eu desativo para o player não ganha divine Inspiration ?
quero colocar para cair de raid boss os livros.
não estou achando a opção [ quero deixar tipo frozen. AutoLearnDivineInspiration = false

Edited by SCRASH0

Share this post


Link to post
Share on other sites
2 horas atrás, SCRASH0 disse:

cara onde eu desativo para o player não ganha divine Inspiration ?
quero colocar para cair de raid boss os livros.
não estou achando a opção [ quero deixar tipo frozen. AutoLearnDivineInspiration = false

acho q n tem, tem que adicionar, pelo q me lembro ja fiz codigo pra isso, procura em java mods amigo!

  • Like 1

Share this post


Link to post
Share on other sites
12 horas atrás, SCRASH0 disse:

cara onde eu desativo para o player não ganha divine Inspiration ?
quero colocar para cair de raid boss os livros.
não estou achando a opção [ quero deixar tipo frozen. AutoLearnDivineInspiration = false

players.properties

# Spell book needed to learn Divine Inspiration.
# Default: True
DivineInspirationSpBookNeeded = True


j58fx5.gif

Share this post


Link to post
Share on other sites
1 hora atrás, ~Danilo Nascimento~ disse:

players.properties

# Spell book needed to learn Divine Inspiration.
# Default: True
DivineInspirationSpBookNeeded = True

Não  é isso que ele procura amigo.. essa função ai, só Serve pra pega skill com book, mas como ta auto learn skill, o divine pega auto tambem...

Mas como disse, ja fiz o mod pra isso, só procurar em Java mods 😉😉

Share this post


Link to post
Share on other sites
3 minutos atrás, Christian-SDM disse:

Não  é isso que ele procura amigo.. essa função ai, só Serve pra pega skill com book, mas como ta auto learn skill, o divine pega auto tambem...

Mas como disse, ja fiz o mod pra isso, só procurar em Java mods 😉😉

Entendi, mas não é preciso criar MOD pra uma coisa simples assim. Basta você adicionar na lista de skills das classes, em: data/xml/classes

            <!-- Divine Inspiration -->
            <skill id="1405" lvl="1" sp="0" minLvl="52" />
            <skill id="1405" lvl="2" sp="0" minLvl="61" />


            <skill id="1405" lvl="3" sp="0" minLvl="76" />
            <skill id="1405" lvl="4" sp="0" minLvl="76" />

 

upei a class de dark_fighter pra voce entender melhor, segue o anexo:

dark_fighter.rar


j58fx5.gif

Share this post


Link to post
Share on other sites
1 hora atrás, ~Danilo Nascimento~ disse:

Entendi, mas não é preciso criar MOD pra uma coisa simples assim. Basta você adicionar na lista de skills das classes, em: data/xml/classes

            <!-- Divine Inspiration -->
            <skill id="1405" lvl="1" sp="0" minLvl="52" />
            <skill id="1405" lvl="2" sp="0" minLvl="61" />


            <skill id="1405" lvl="3" sp="0" minLvl="76" />
            <skill id="1405" lvl="4" sp="0" minLvl="76" />

 

upei a class de dark_fighter pra voce entender melhor, segue o anexo:

dark_fighter.rar 11 kB · 0 downloads

isso q vc fez, bugo o char, boneco nao caminha! e ainda recebe a divine inspiration

15 horas atrás, SCRASH0 disse:

cara onde eu desativo para o player não ganha divine Inspiration ?
quero colocar para cair de raid boss os livros.
não estou achando a opção [ quero deixar tipo frozen. AutoLearnDivineInspiration = false

aqui mod ativar ou desativar auto learn divine

 

  • Like 1

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

Proteção Oficial L2JBrasil







  • Recently Browsing

    No registered users viewing this page.

  • Similar Content

    • By Luther
      Galera to tentando tirar a animação que o npc buffer faz quando o player pega um buff, igual a animação do aiox.
      acredito que isso seja feito no core, então ta aqui o arquivo do npc. 
      package net.sf.l2j.gameserver.model.actor.instance; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.StringTokenizer; import net.sf.l2j.commons.lang.StringUtil; import net.sf.l2j.commons.random.Rnd; import net.sf.l2j.Config; import net.sf.l2j.gameserver.data.BufferTable; import net.sf.l2j.gameserver.data.SkillTable; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.actor.Creature; import net.sf.l2j.gameserver.model.actor.Npc; import net.sf.l2j.gameserver.model.actor.Summon; import net.sf.l2j.gameserver.model.actor.ai.CtrlIntention; import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.gameserver.network.serverpackets.ItemList; import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse; import net.sf.l2j.gameserver.network.serverpackets.MoveToPawn; import net.sf.l2j.gameserver.network.serverpackets.MyTargetSelected; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; import net.sf.l2j.gameserver.network.serverpackets.ValidateLocation; public final class SchemeBuffer extends Npc { public SchemeBuffer(int objectId, NpcTemplate template) { super(objectId, template); } @Override public void onAction(Player player) { if (this != player.getTarget()) { player.setTarget(this); player.sendPacket(new MyTargetSelected(getObjectId(), 0)); player.sendPacket(new ValidateLocation(this)); } else { if (!canInteract(player)) player.getAI().setIntention(CtrlIntention.INTERACT, this); else { // Rotate the player to face the instance player.sendPacket(new MoveToPawn(player, this, Npc.INTERACTION_DISTANCE)); if (hasRandomAnimation()) onRandomAnimation(Rnd.get(8)); showMainWindow(player); // Send ActionFailed to the player in order to avoid he stucks player.sendPacket(ActionFailed.STATIC_PACKET); } } } private void showMainWindow(Player activeChar) { /* * if(Config.community_board_in_npcs) { CommunityBoard.getInstance().handleCommands(activeChar.getClient(), "_bbsnpcs;openfile;buffer;index"); return; } */ NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/mods/buffer/index.htm"); html.replace("%objectId%", String.valueOf(getObjectId())); html.replace("%name%", activeChar.getName()); html.replace("%buffcount%", "You have " + activeChar.getBuffCount() + "/" + activeChar.getMaxBuffCount() + " buffs."); // html.replace("%intro%", ServerSideImage.getInstance().getRankNameImageHtmlTag(activeChar, 2, 256, 64)); activeChar.sendPacket(html); } @Override public void onBypassFeedback(Player player, String command) { if (player.getPvpFlag() > 0 && Config.RESTRICT_USE_BUFFER_ON_PVPFLAG) { player.sendMessage("You can't use buffer when you are pvp flagged."); return; } if (player.isInCombat() && Config.RESTRICT_USE_BUFFER_IN_COMBAT) { player.sendMessage("You can't use buffer when you are in combat."); return; } if (player.isDead()) return; StringTokenizer st = new StringTokenizer(command, " "); String actualCommand = st.nextToken(); if (actualCommand.equalsIgnoreCase("bufflist")) { autoBuffFunction(player, st.nextToken()); } else if (actualCommand.equalsIgnoreCase("restore")) { String noble = st.nextToken(); player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp()); player.setCurrentCp(player.getMaxCp()); if (noble.equals("true")) { SkillTable.getInstance().getInfo(1323, 1).getEffects(player, player); } final Summon summon = player.getPet(); if (summon != null) summon.setCurrentHpMp(summon.getMaxHp(), summon.getMaxMp()); showMainWindow(player); } else if (actualCommand.equalsIgnoreCase("cancellation")) { L2Skill buff; buff = SkillTable.getInstance().getInfo(1056, 1); buff.getEffects(this, player); player.stopAllEffectsExceptThoseThatLastThroughDeath(); player.broadcastPacket(new MagicSkillUse(this, player, 1056, 1, 850, 0)); player.stopAllEffects(); final Summon summon = player.getPet(); if (summon != null) summon.stopAllEffects(); showMainWindow(player); } else if (actualCommand.equalsIgnoreCase("openlist")) { String category = st.nextToken(); String htmfile = st.nextToken(); NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); if (category.equalsIgnoreCase("null")) { html.setFile("data/html/mods/buffer/" + htmfile + ".htm"); // First Page if (htmfile.equals("index")) { html.replace("%name%", player.getName()); html.replace("%buffcount%", "You have " + player.getBuffCount() + "/" + player.getMaxBuffCount() + " buffs."); } } else html.setFile("data/html/mods/buffer/" + category + "/" + htmfile + ".htm"); html.replace("%objectId%", String.valueOf(getObjectId())); player.sendPacket(html); } else if (actualCommand.equalsIgnoreCase("dobuff")) { int buffid = Integer.valueOf(st.nextToken()); int bufflevel = Integer.valueOf(st.nextToken()); String category = st.nextToken(); String windowhtml = st.nextToken(); String votebuff = null; if (st.hasMoreTokens()) votebuff = st.nextToken(); if (windowhtml.equals("malaria")) { if (player.getInventory().getInventoryItemCount(Config.VOTE_BUFF_ITEM_ID, 0) >= 1) { player.getInventory().destroyItemByItemId("VoteCoins", Config.VOTE_BUFF_ITEM_ID, 1, player, null); player.getInventory().updateDatabase(); player.sendPacket(new ItemList(player, true)); player.sendMessage(1 + " Champion Coin disappeared."); } else { player.sendMessage("You need the " + Config.VOTE_BUFF_ITEM_COUNT + " Champion Coin to get buff."); return; } } if (votebuff != null) { if (player.getInventory().getInventoryItemCount(Config.VOTE_BUFF_ITEM_ID, 0) >= Config.VOTE_BUFF_ITEM_COUNT) { player.getInventory().destroyItemByItemId("VoteCoins", Config.VOTE_BUFF_ITEM_ID, Config.VOTE_BUFF_ITEM_COUNT, player, null); player.getInventory().updateDatabase(); player.sendPacket(new ItemList(player, true)); player.sendMessage(Config.VOTE_BUFF_ITEM_COUNT + " Champion Coin disappeared."); } else { player.sendMessage("You need the " + Config.VOTE_BUFF_ITEM_COUNT + " Champion Coin to get buff."); return; } } Creature target = player; if (category.equalsIgnoreCase("pet")) { if (player.getPet() == null) { player.sendMessage("Incorrect Pet"); showMainWindow(player); return; } target = player.getPet(); } MagicSkillUse mgc = new MagicSkillUse(this, target, buffid, bufflevel, 1150, 0); player.sendPacket(mgc); player.broadcastPacket(mgc); SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, target); NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/mods/buffer/" + category + "/" + windowhtml + ".htm"); html.replace("%objectId%", String.valueOf(getObjectId())); html.replace("%name%", player.getName()); player.sendPacket(html); } else if (actualCommand.equalsIgnoreCase("getbuff")) { int buffid = Integer.valueOf(st.nextToken()); int bufflevel = Integer.valueOf(st.nextToken()); if (buffid != 0) { SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player); broadcastPacket(new MagicSkillUse(this, player, buffid, bufflevel, 450, 0)); showMainWindow(player); } } else if (actualCommand.startsWith("support")) { showGiveBuffsWindow(player, st.nextToken()); } else if (actualCommand.startsWith("givebuffs")) { final String targetType = st.nextToken(); final String schemeName = st.nextToken(); final int cost = Integer.parseInt(st.nextToken()); final Creature target = (targetType.equalsIgnoreCase("pet")) ? player.getPet() : player; if (target == null) player.sendMessage("You don't have a pet."); else if (cost == 0 || player.reduceAdena("NPC Buffer", cost, this, true)) { for (int skillId : BufferTable.getInstance().getScheme(player.getObjectId(), schemeName)) SkillTable.getInstance().getInfo(skillId, SkillTable.getInstance().getMaxLevel(skillId)).getEffects(this, target); } showGiveBuffsWindow(player, targetType); } else if (actualCommand.startsWith("editschemes")) { if (st.countTokens() == 2) showEditSchemeWindow(player, st.nextToken(), st.nextToken()); else player.sendMessage("Something wrong with your scheme. Please contact with Admin"); } else if (actualCommand.startsWith("skill")) { final String groupType = st.nextToken(); final String schemeName = st.nextToken(); final int skillId = Integer.parseInt(st.nextToken()); final List<Integer> skills = BufferTable.getInstance().getScheme(player.getObjectId(), schemeName); if (actualCommand.startsWith("skillselect") && !schemeName.equalsIgnoreCase("none")) { if (skills.size() < Config.BUFFER_MAX_SKILLS) skills.add(skillId); else player.sendMessage("This scheme has reached the maximum amount of buffs."); } else if (actualCommand.startsWith("skillunselect")) skills.remove(Integer.valueOf(skillId)); showEditSchemeWindow(player, groupType, schemeName); } else if (actualCommand.startsWith("manageschemes")) { showManageSchemeWindow(player); } else if (actualCommand.startsWith("createscheme")) { try { final String schemeName = st.nextToken(); if (schemeName.length() > 14) { player.sendMessage("Scheme's name must contain up to 14 chars. Spaces are trimmed."); showManageSchemeWindow(player); return; } final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId()); if (schemes != null) { if (schemes.size() == Config.BUFFER_MAX_SCHEMES) { player.sendMessage("Maximum schemes amount is already reached."); showManageSchemeWindow(player); return; } if (schemes.containsKey(schemeName)) { player.sendMessage("The scheme name already exists."); showManageSchemeWindow(player); return; } } BufferTable.getInstance().setScheme(player.getObjectId(), schemeName.trim(), new ArrayList<Integer>()); showManageSchemeWindow(player); } catch (Exception e) { player.sendMessage("Scheme's name must contain up to 14 chars. Spaces are trimmed."); showManageSchemeWindow(player); } } else if (actualCommand.startsWith("deletescheme")) { try { final String schemeName = st.nextToken(); final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId()); if (schemes != null && schemes.containsKey(schemeName)) schemes.remove(schemeName); } catch (Exception e) { player.sendMessage("This scheme name is invalid."); } showManageSchemeWindow(player); } else if (actualCommand.startsWith("clearscheme")) { try { final String schemeName = st.nextToken(); final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId()); if (schemes != null && schemes.containsKey(schemeName)) schemes.get(schemeName).clear(); } catch (Exception e) { player.sendMessage("This scheme name is invalid."); } showManageSchemeWindow(player); } else super.onBypassFeedback(player, command); } /** * Sends an html packet to player with Give Buffs menu info for player and pet, depending on targetType parameter {player, pet} * @param player : The player to make checks on. * @param targetType : a String used to define if the player or his pet must be used as target. */ private void showGiveBuffsWindow(Player player, String targetType) { final StringBuilder sb = new StringBuilder(200); final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId()); if (schemes == null || schemes.isEmpty()) sb.append("<font color=\"LEVEL\">You haven't defined any scheme, please go to 'Manage my schemes' and create at least one valid scheme.</font>"); else { for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet()) { final int cost = getFee(scheme.getValue()); StringUtil.append(sb, "<font color=\"LEVEL\"><a action=\"bypass -h npc_%objectId%_givebuffs ", targetType, " ", scheme.getKey(), " ", cost, "\">", scheme.getKey(), " (", scheme.getValue().size(), " skill(s))</a>", ((cost > 0) ? " - Adena cost: " + cost : ""), "</font><br1>"); } } final NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile("data/html/mods/buffer/schememanager/index-1.htm"); html.replace("%schemes%", sb.toString()); html.replace("%targettype%", (targetType.equalsIgnoreCase("pet") ? "&nbsp;<a action=\"bypass -h npc_%objectId%_support player\">yourself</a>&nbsp;|&nbsp;your pet" : "yourself&nbsp;|&nbsp;<a action=\"bypass -h npc_%objectId%_support pet\">your pet</a>")); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } /** * Sends an html packet to player with Manage scheme menu info. This allows player to create/delete/clear schemes * @param player : The player to make checks on. */ private void showManageSchemeWindow(Player player) { final StringBuilder sb = new StringBuilder(200); final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId()); if (schemes == null || schemes.isEmpty()) sb.append("<font color=\"LEVEL\">You haven't created any scheme.</font>"); else { sb.append("<table>"); for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet()) StringUtil.append(sb, "<tr><td width=140>", scheme.getKey(), " (", scheme.getValue().size(), " skill(s))</td><td width=60><button value=\"Clear\" action=\"bypass -h npc_%objectId%_clearscheme ", scheme.getKey(), "\" width=55 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td width=60><button value=\"Drop\" action=\"bypass -h npc_%objectId%_deletescheme ", scheme.getKey(), "\" width=55 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>"); sb.append("</table>"); } final NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile("data/html/mods/buffer/schememanager/index-2.htm"); html.replace("%schemes%", sb.toString()); html.replace("%max_schemes%", Config.BUFFER_MAX_SCHEMES); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } /** * This sends an html packet to player with Edit Scheme Menu info. This allows player to edit each created scheme (add/delete skills) * @param player : The player to make checks on. * @param groupType : The group of skills to select. * @param schemeName : The scheme to make check. */ private void showEditSchemeWindow(Player player, String groupType, String schemeName) { final NpcHtmlMessage html = new NpcHtmlMessage(0); if (schemeName.equalsIgnoreCase("none")) html.setFile("data/html/mods/buffer/schememanager/index-3.htm"); else { if (groupType.equalsIgnoreCase("none")) html.setFile("data/html/mods/buffer/schememanager/index-4.htm"); else { html.setFile("data/html/mods/buffer/schememanager/index-5.htm"); html.replace("%skilllistframe%", getGroupSkillList(player, groupType, schemeName)); } html.replace("%schemename%", schemeName); html.replace("%myschemeframe%", getPlayerSchemeSkillList(player, groupType, schemeName)); html.replace("%typesframe%", getTypesFrame(groupType, schemeName)); } html.replace("%schemes%", getPlayerSchemes(player, schemeName)); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } /** * @param player : The player to make checks on. * @param schemeName : The name to don't link (previously clicked). * @return a String listing player's schemes. The scheme currently on selection isn't linkable. */ private static String getPlayerSchemes(Player player, String schemeName) { final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId()); if (schemes == null || schemes.isEmpty()) return "Please create at least one scheme."; final StringBuilder sb = new StringBuilder(200); sb.append("<table>"); for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet()) { if (schemeName.equalsIgnoreCase(scheme.getKey())) StringUtil.append(sb, "<tr><td width=200>", scheme.getKey(), " (<font color=\"LEVEL\">", scheme.getValue().size(), "</font> / ", Config.BUFFER_MAX_SKILLS, " skill(s))</td></tr>"); else StringUtil.append(sb, "<tr><td width=200><a action=\"bypass -h npc_%objectId%_editschemes none ", scheme.getKey(), "\">", scheme.getKey(), " (", scheme.getValue().size(), " / ", Config.BUFFER_MAX_SKILLS, " skill(s))</a></td></tr>"); } sb.append("</table>"); return sb.toString(); } /** * @param player : The player to make checks on. * @param groupType : The group of skills to select. * @param schemeName : The scheme to make check. * @return a String representing skills available to selection for a given groupType. */ private static String getGroupSkillList(Player player, String groupType, String schemeName) { final List<Integer> skills = new ArrayList<>(); for (int skillId : BufferTable.getSkillsIdsByType(groupType)) { if (BufferTable.getInstance().getSchemeContainsSkill(player.getObjectId(), schemeName, skillId)) continue; skills.add(skillId); } if (skills.isEmpty()) return "That group doesn't contain any skills."; final StringBuilder sb = new StringBuilder(500); sb.append("<table>"); int count = 0; for (int skillId : skills) { if (BufferTable.getInstance().getSchemeContainsSkill(player.getObjectId(), schemeName, skillId)) continue; if (count == 0) sb.append("<tr>"); if (skillId < 100) sb.append("<td width=180><font color=\"949490\"><a action=\"bypass -h npc_%objectId%_skillselect " + groupType + " " + schemeName + " " + skillId + "\">" + SkillTable.getInstance().getInfo(skillId, 1).getName() + "</a></font></td>"); else if (skillId < 1000) sb.append("<td width=180><font color=\"949490\"><a action=\"bypass -h npc_%objectId%_skillselect " + groupType + " " + schemeName + " " + skillId + "\">" + SkillTable.getInstance().getInfo(skillId, 1).getName() + "</a></font></td>"); else sb.append("<td width=180><font color=\"949490\"><a action=\"bypass -h npc_%objectId%_skillselect " + groupType + " " + schemeName + " " + skillId + "\">" + SkillTable.getInstance().getInfo(skillId, 1).getName() + "</a></font></td>"); count++; if (count == 2) { sb.append("</tr><tr><td></td></tr>"); count = 0; } } if (!sb.toString().endsWith("</tr>")) sb.append("</tr>"); sb.append("</table>"); return sb.toString(); } /** * @param player : The player to make checks on. * @param groupType : The group of skills to select. * @param schemeName : The scheme to make check. * @return a String representing a given scheme's content. */ private static String getPlayerSchemeSkillList(Player player, String groupType, String schemeName) { final List<Integer> skills = BufferTable.getInstance().getScheme(player.getObjectId(), schemeName); if (skills.isEmpty()) return "That scheme is empty."; final StringBuilder sb = new StringBuilder(500); sb.append("<table>"); int count = 0; for (int sk : skills) { if (count == 0) sb.append("<tr>"); if (sk < 100) sb.append("<td width=180><font color=\"6e6e6a\"><a action=\"bypass -h npc_%objectId%_skillunselect " + groupType + " " + schemeName + " " + sk + "\">" + SkillTable.getInstance().getInfo(sk, 1).getName() + "</a></font></td>"); else if (sk < 1000) sb.append("<td width=180><font color=\"6e6e6a\"><a action=\"bypass -h npc_%objectId%_skillunselect " + groupType + " " + schemeName + " " + sk + "\">" + SkillTable.getInstance().getInfo(sk, 1).getName() + "</a></font></td>"); else sb.append("<td width=180><font color=\"6e6e6a\"><a action=\"bypass -h npc_%objectId%_skillunselect " + groupType + " " + schemeName + " " + sk + "\">" + SkillTable.getInstance().getInfo(sk, 1).getName() + "</a></font></td>"); count++; if (count == 2) { sb.append("</tr><tr><td></td></tr>"); count = 0; } } if (!sb.toString().endsWith("<tr>")) sb.append("<tr>"); sb.append("</table>"); return sb.toString(); } /** * @param groupType : The group of skills to select. * @param schemeName : The scheme to make check. * @return a string representing all groupTypes availables. The group currently on selection isn't linkable. */ private static String getTypesFrame(String groupType, String schemeName) { final StringBuilder sb = new StringBuilder(500); sb.append("<table>"); int count = 0; for (String s : BufferTable.getSkillTypes()) { if (count == 0) sb.append("<tr>"); if (groupType.equalsIgnoreCase(s)) StringUtil.append(sb, "<td width=65>", s, "</td>"); else StringUtil.append(sb, "<td width=65><a action=\"bypass -h npc_%objectId%_editschemes ", s, " ", schemeName, "\">", s, "</a></td>"); count++; if (count == 4) { sb.append("</tr>"); count = 0; } } if (!sb.toString().endsWith("</tr>")) sb.append("</tr>"); sb.append("</table>"); return sb.toString(); } /** * @param list : A list of skill ids. * @return a global fee for all skills contained in list. */ private static int getFee(ArrayList<Integer> list) { if (Config.BUFFER_STATIC_BUFF_COST >= 0) return (list.size() * Config.BUFFER_STATIC_BUFF_COST); int fee = 0; for (int sk : list) { if (Config.BUFFER_BUFFLIST.get(sk) == null) continue; fee += Config.BUFFER_BUFFLIST.get(sk).getValue(); } return fee; } private void autoBuffFunction(Player player, String bufflist) { ArrayList<L2Skill> skills_to_buff = new ArrayList<>(); List<Integer> list = null; if (bufflist.equalsIgnoreCase("fighter")) list = Config.FIGHTER_SKILL_LIST; else if (bufflist.equalsIgnoreCase("mage")) list = Config.MAGE_SKILL_LIST; if (list != null) { for (int skillId : list) { L2Skill skill = SkillTable.getInstance().getInfo(skillId, SkillTable.getInstance().getMaxLevel(skillId)); if (skill != null) skills_to_buff.add(skill); } for (L2Skill sk : skills_to_buff) sk.getEffects(player, player); player.updateEffectIcons(); list = null; } skills_to_buff.clear(); showMainWindow(player); } }  
    • By odir
      Sou novo no forum e jogava l2, estes dias fiquei com vontade de montar um servidor.
      queria dicas por onde começar ja vi alguns videos do forum.
      eu segui o video e consegui por o servidor para rodar porem não consigo por ele online.
      abri as portas do modem criei conta no No IP fiz tudo como estava no video mais não deu ele so da para jogar em rede.
    • By L2 Grifinória
      Olá pessoal!
      Vou explicar um pouco do nosso server.

      GAME E COMANDOS
      RATES
      BUFFER
      ENCHANTS  
      POTIONS
      SIEGE
      OLYMPIADS 
      DYNASTY ITEMS 
      GRIFINORIA COIN 
      PREMIUM ACOUNT
      QUESTS RATES 
      RAID BOSS
    • By Albeci Nogueira
      Boa tarde..
      Procurei na source mas não encontrei onde posso alterar alguma coisa no Scroll of Scape, pois queria deixar infinito, até vi no forum ensinando, mas para frozen, e na acis não achei o arquivo ScrollofScape.java, pois deve ser diferente, se alguem souber fico agradecido.
  • Posts

×
×
  • Create New...