Jump to content

lyrien

Members
  • Posts

    8
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by lyrien

  1. Hi to all as simple tittle said: I need and looking foor a interface to h5 whit auto cache refresh/reload i saw in some servers it have and never get low fps if have so much time playing if someone have and could share i'll be so happy and my hamster too regards forum!
  2. @NevesOma Hi dear, thanks so much for reply and link <3 good night to both of us I tried whit a [mxencdec] and it seems are decrypted but when i try open it whit xdat editor, still take a messagge error for a encrypted file [Log from mxencdec]
  3. Hi dear @Celestine thanks to reply ... 2 last question - any link for l2endec? im searching and don't found it - and if it's encrypted whit smartcrypt -> Smart Crypt Decrypt will work to decrypt it ?
  4. Hi im trying to make some changes to an interface.xdat file ... basic like font size and eliminates some panels but when i open the file whit a xdat editor it say's what file are encrypted... so exist any way to decrypt it ? program or guide ? My xdat editor info (if need) i search on google and other forums but didnt find any guide or program ... i will be so gratefull to who could help me ... from now thanks and regards
  5. Well i did it if u check my second reply whit new code using the implements of IXmlReader and don't get any problem so i can say i did right... Thanks to all, can close the topic !
  6. Hey thanks for your reply ... I try to copy the way what i found at class (MultisellData.java) and did this: public class EnchantData implements IXmlReader { private static Logger _log = Logger.getLogger(EnchantData.class.getName()); private static final Map<Integer, L2EnchantScroll> _map = new HashMap<>(); public EnchantData() { load(); } @Override public void load() { parseFile("data/xml/enchants.xml"); } @Override public void parseDocument(Document doc, Path path) { try { for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) { if ("list".equalsIgnoreCase(n.getNodeName())) { for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) { if ("enchant".equalsIgnoreCase(d.getNodeName())) { NamedNodeMap attrs = d.getAttributes(); int id = Integer.valueOf(attrs.getNamedItem("id").getNodeValue()); byte grade = Byte.valueOf(attrs.getNamedItem("grade").getNodeValue()); boolean weapon = Boolean.valueOf(attrs.getNamedItem("weapon").getNodeValue()); boolean breaks = Boolean.valueOf(attrs.getNamedItem("break").getNodeValue()); boolean maintain = Boolean.valueOf(attrs.getNamedItem("maintain").getNodeValue()); String[] list = attrs.getNamedItem("chance").getNodeValue().split(";"); byte[] chance = new byte[list.length]; for (int i = 0; i < list.length; i++) chance[i] = Byte.valueOf(list[i]); well it's work fine to me because don't get erros and on live works good each enchant config... Obviously if someone know Java more than me could say: "dude u are so wrong.." So if someone could say if this it's ok or i must do anything more will be so grateful btw thanks again @Zake
  7. Hi to everyone. i'm making this thread to find any help Im new on the world of l2 servers, im using free source of acis (rev 382) and cannot ad this code to my project /* * This program 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. * * This program 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 net.sf.l2j.gameserver.data.xml; import java.io.File; import java.util.HashMap; import java.util.Map; import java.util.logging.Logger; import net.sf.l2j.gameserver.enums.items.CrystalType; import net.sf.l2j.gameserver.model.L2EnchantScroll; import net.sf.l2j.gameserver.model.item.instance.ItemInstance; import net.sf.l2j.gameserver.xmlfactory.XMLDocumentFactory; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; /** * @author Thug * */ public class EnchantData { private static Logger _log = Logger.getLogger(EnchantData.class.getName()); private static final Map<Integer, L2EnchantScroll> _map = new HashMap<>(); public static EnchantData getInstance() { return SingletonHolder._instance; } protected EnchantData() { try { File f = new File("./data/xml/enchants.xml"); Document doc = XMLDocumentFactory.getInstance().loadDocument(f); for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) { if ("list".equalsIgnoreCase(n.getNodeName())) { for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) { if ("enchant".equalsIgnoreCase(d.getNodeName())) { NamedNodeMap attrs = d.getAttributes(); int id = Integer.valueOf(attrs.getNamedItem("id").getNodeValue()); byte grade = Byte.valueOf(attrs.getNamedItem("grade").getNodeValue()); boolean weapon = Boolean.valueOf(attrs.getNamedItem("weapon").getNodeValue()); boolean breaks = Boolean.valueOf(attrs.getNamedItem("break").getNodeValue()); boolean maintain = Boolean.valueOf(attrs.getNamedItem("maintain").getNodeValue()); String[] list = attrs.getNamedItem("chance").getNodeValue().split(";"); byte[] chance = new byte[list.length]; for (int i = 0; i < list.length; i++) chance[i] = Byte.valueOf(list[i]); CrystalType grade_test = CrystalType.NONE; switch (grade) { case 1: grade_test = CrystalType.D; break; case 2: grade_test = CrystalType.C; break; case 3: grade_test = CrystalType.B; break; case 4: grade_test = CrystalType.A; break; case 5: grade_test = CrystalType.S; break; } _map.put(id, new L2EnchantScroll(grade_test, weapon, breaks, maintain, chance)); } } } } _log.info("EnchantTable: Loaded " + _map.size() + " enchants."); } catch (Exception e) { _log.warning("EnchantTable: Error while loading enchant table: " + e); } } public L2EnchantScroll getEnchantScroll(ItemInstance item) { return _map.get(item.getItemId()); } private static class SingletonHolder { protected static final EnchantData _instance = new EnchantData(); } } i have errors in the lines: // -> import net.sf.l2j.gameserver.xmlfactory.XMLDocumentFactory; // -> Document doc = XMLDocumentFactory.getInstance().loadDocument(f); i will be so grateful if someone could help me
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock