Jump to content

fissban

Members
  • Posts

    42
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by fissban

  1. because using json when we can write the same things in java and keep the basis of the l2j projects or use alternative language we all know and are accustomed to using as xml Although the idea is good but it is being used long ago by some programmers do not want to show their source code to sell codes. but yes, I like the idea.
  2. My project requires java eclipse 8 and in its latest version
  3. l2jlisvus activo? no estoy seguro de ello porque hace un commit cada 3 meses. actualize el primer post ya que google code cierra me vi obligado a mudarme y ahora uso SourceForge _______________________________________________________________________________________ l2jlisvus active? I'm not sure about it because you commit every 3 months. actualize the first post since google code closes I was forced to relocate and now use the SourceForge
  4. L2jAdmins C4 Crónica: Scions of Destiny (C4) Descripción: Emulador de la crónica C4 basado en el lenguaje Java. Licencia: GPL Créditos: Fissban Colaboradores: Reynald0, mauronob. Base: Proyecto de L2jLisvus Lenguaje: Java Requerimientos: • Java JDK/JRE 8 • MySQL Server • Eclipse LUNA Actualmente llevo mas de 4 meses trabajando en este proyecto personal junto a unos pocos colaboradores. La intención de este pequeño grupo no es la de realizar mods ni perder el tiempo en aspectos similares, nos concentramos en mejorar el código lo mas posible intentando que este sea eficiente y claro. Nuestra intención es llevar todos los AI y Quest a java en el cual ya vamos bastantes avanzados. No quiero entrar en detalle de todo el trabajo que llevamos realizados porque podría estar un buen tiempo escribiendo, dejare que ustedes mismos revisen mi trabajo y lo critiquen. new SVN https://svn.code.sf.net/p/l2jadmins/code/C4 Scions of Destiny/ new TIMELINE https://sourceforge.net/p/l2jadmins/code/commit_browser ----------------------------------------------------------------------- Chronicle: Scions of Destiny (C4) Description: Emulator chronic C4 based on the Java language. License: GPL Credits: Fissban Contributors: Reynald0, mauronob Base: Project L2jLisvus Language: Java Requirements: • Java JDK/JRE 8 • MySQL Server • MOON Eclipse I have now spent more than four months working on this personal project along with a few colleagues. The intent of this small group is not to make mods or wasting time in similar ways, we focus on improving the code as much as possible trying to make this efficient and clear. Our intention is to bring all AI and Quest for java in which we are already quite advanced. I will not go into detail of all the work we performed because it might be a good time writing, I'll let yourselves review and criticize my work. new SVN https://svn.code.sf.net/p/l2jadmins/code/C4 Scions of Destiny/ new TIMELINE https://sourceforge.net/p/l2jadmins/code/commit_browser
  5. this code is hardcode. the html is better to define them as such and not within the code. execution times is better to write this as follows String html = "<html>"+ "<title>L2Mondial Enchanter</title>"+ "<body>"+ "<center><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"+ "<font color=\"FF9900\">" + title + "</font></center><br>"+ content + "<br><br>"+ "<center><a action=\"bypass -h Quest Enchant " + enchantType + "\">Go Back</a></center>"+ "</body>"+ "</html>"; return html; TextBuilder _td = new TextBuilder(); _td.append("<html>"); _td.append("<title>L2Mondial Enchanter</title>"); _td.append("<body>"); _td.append("<center><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"); _td.append("<font color=\"FF9900\">" + title + "</font></center><br>" + content + "<br><br>"); _td.append("<center><a action=\"bypass -h Quest Enchant " + enchantType + "\">Go Back</a></center>"); _td.append("</body>"); _td.append("</html>"); return _td.toString();
  6. What protection provided by this code? read all the character skills?
  7. This new buffer does not replace the Adventurers' Guide only complements it. When passing within 500 of npc this will give the buff so autoamtica. In addition to implementing the code should also add to script.cfg and delete spawnlist table so the npc spawn. Written for H5 l2jserver unstable Credits are mine =) Sorry for my English use google translator. /* * Copyright (C) 2004-2013 L2J DataPack * * This file is part of L2J DataPack. * * L2J DataPack 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. * * L2J DataPack 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 custom.NpcBufferGod; /** * @autor: fissban */ import java.util.Collection; import ai.npc.AbstractNpcAI; import com.l2jserver.gameserver.ThreadPoolManager; import com.l2jserver.gameserver.datatables.SkillTable; import com.l2jserver.gameserver.model.Location; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.L2Summon; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.base.ClassId; import com.l2jserver.gameserver.model.holders.SkillHolder; import com.l2jserver.gameserver.model.skills.L2Skill; public class NpcBufferGOD extends AbstractNpcAI { // NPC private static final int Newbie_Helper = 32327; // Spawn state private static boolean SPAWNED = false; static final Location[] SPAWNS = { // Sacado de la DB new Location(17136, 144896, -3008, 26624), new Location(43556, -47608, -792, 36864), new Location(82385, 53283, -1488, 16384), new Location(82879, 149380, -3469, 34120), new Location(87152, -141328, -1336, 49296), new Location(111168, 221008, -3544, 0), new Location(116935, 77258, -2688, 40960), new Location(147099, 25939, -2008, 49151), new Location(148077, -55367, -2728, 32768), new Location(-84081, 243227, -3728, 9000), new Location(115632, -177996, -896, 32768), new Location(-45032, -113598, -192, 32768), new Location(12111, 16686, -4584, 63240), new Location(45475, 48359, -3056, 49152), new Location(-119692, 44504, 360, 33324), new Location(-13920, 121977, -2984, 33000), new Location(-83123, 150868, -3120, 0), }; protected NpcBufferGOD(String name, String descr) { super(name, descr); addStartNpc(Newbie_Helper); addSpawnId(Newbie_Helper); addTalkId(Newbie_Helper); if (!SPAWNED) { for (Location spawn : SPAWNS) { addSpawn(Newbie_Helper, spawn, false, 0); } SPAWNED = true; } } @Override public String onSpawn(L2Npc npc) { ThreadPoolManager.getInstance().scheduleGeneral(new BufferAI(npc), 5000); return super.onSpawn(npc); } @Override public String onTalk(L2Npc npc, L2PcInstance player) { return "32327.htm"; } protected class BufferAI implements Runnable { private final L2Npc _npc; // Skills private final SkillHolder HASTE_1 = new SkillHolder(4327, 1); private final SkillHolder HASTE_2 = new SkillHolder(5632, 1); private final SkillHolder CUBIC = new SkillHolder(4338, 1); private final SkillHolder[] FIGHTER_BUFFS = { new SkillHolder(4322, 1), // Wind Walk new SkillHolder(4323, 1), // Shield new SkillHolder(5637, 1), // Magic Barrier new SkillHolder(4324, 1), // Bless the Body new SkillHolder(4325, 1), // Vampiric Rage new SkillHolder(4326, 1), // Regeneration }; private final SkillHolder[] MAGE_BUFFS = { new SkillHolder(4322, 1), // Wind Walk new SkillHolder(4323, 1), // Shield new SkillHolder(5637, 1), // Magic Barrier new SkillHolder(4328, 1), // Bless the Soul new SkillHolder(4329, 1), // Acumen new SkillHolder(4330, 1), // Concentration new SkillHolder(4331, 1), // Empower }; private final SkillHolder[] SUMMON_BUFFS = { new SkillHolder(4322, 1), // Wind Walk new SkillHolder(4323, 1), // Shield new SkillHolder(5637, 1), // Magic Barrier new SkillHolder(4324, 1), // Bless the Body new SkillHolder(4325, 1), // Vampiric Rage new SkillHolder(4326, 1), // Regeneration new SkillHolder(4328, 1), // Bless the Soul new SkillHolder(4329, 1), // Acumen new SkillHolder(4330, 1), // Concentration new SkillHolder(4331, 1), // Empower }; protected BufferAI(L2Npc caster) { _npc = caster; } @Override public void run() { if ((_npc == null) || !_npc.isVisible()) { return; } Collection<L2PcInstance> plrs = _npc.getKnownList().getKnownPlayers().values(); for (L2PcInstance player : plrs) { if ((player == null) || player.isInvul() || player.isDead() || (player.getLevel() > 75) || (player.getLevel() < 6) || player.isCursedWeaponEquipped() || (player.getKarma() != 0) || !_npc.isInsideRadius(player, 500, false, false)) { continue; } // summons if ((player.getSummon() != null) && player.getSummon().isServitor()) { for (SkillHolder skills : SUMMON_BUFFS) { CastSummon(player.getSummon(), skills.getSkill()); } if (player.getLevel() > 40) { CastSummon(player.getSummon(), HASTE_2.getSkill()); } else { CastSummon(player.getSummon(), HASTE_1.getSkill()); } } // magos if (player.isMageClass() && (player.getClassId() != ClassId.overlord) && (player.getClassId() != ClassId.warcryer)) { for (SkillHolder skills : MAGE_BUFFS) { CastPlayer(player, skills.getSkill()); } } // warrios else { for (SkillHolder skills : FIGHTER_BUFFS) { CastPlayer(player, skills.getSkill()); } if (player.getLevel() > 40) { CastPlayer(player, HASTE_2.getSkill()); } else { CastPlayer(player, HASTE_1.getSkill()); } } if ((player.getLevel() >= 16) && (player.getLevel() <= 34)) { player.doSimultaneousCast(CUBIC.getSkill()); } } ThreadPoolManager.getInstance().scheduleGeneral(this, 3000); } // metodo para los players private boolean CastPlayer(L2PcInstance player, L2Skill skill) { if (player.getFirstEffect(skill) == null) { skill.getEffects(_npc, player); SkillTable.getInstance().getInfo(skill.getId(), skill.getLevel()).getEffects(player, player); return true; } return false; } // metodo para los summons private boolean CastSummon(L2Summon summon, L2Skill skill) { if (summon.getFirstEffect(skill) == null) { skill.getEffects(_npc, summon); SkillTable.getInstance().getInfo(skill.getId(), skill.getLevel()).getEffects(summon, summon); return true; } return false; } } public static void main(String[] args) { new NpcBufferGOD(NpcBufferGOD.class.getSimpleName(), "ai/npc"); } }
  8. error is an import, you just have to open the line and look _init_.py 4 and fix it, but without seeing the code is hard to help more sorry but my English is very bad, use translate
×
×
  • Create New...