Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How To Make A Maplestory v111 (Lithium Based) Private Server

Subscriber and Mod!
Loyal Member
Joined
Jan 1, 2009
Messages
1,925
Reaction score
378
Starting ?
It looks werid...check that you have no missing files
View attachment 112203
@ piggy can u help me on this thnks a bunch if your could i mean what to fill in at the slots given
Use a portforward guide
Guys help us how to fix this i port forwarded what now people can start the server but when they enter the pic i get that error help please
Show .bat errors, make sure all JCE and JDK files are placed in the correct directories
Yeah make sure all files are placed correctly + portforward+ look for any .bat errors
 
Initiate Mage
Joined
Aug 11, 2012
Messages
2
Reaction score
0
now i make a client change ip but my friend cant connect server me how to ?
 
Newbie Spellweaver
Joined
Aug 10, 2012
Messages
17
Reaction score
0
It looks werid...check that you have no missing files

Use a portforward guide

Show .bat errors, make sure all JCE and JDK files are placed in the correct directories

Yeah make sure all files are placed correctly + portforward+ look for any .bat errors

Example like where missing .. ?
 
Newbie Spellweaver
Joined
Oct 15, 2008
Messages
9
Reaction score
0
Sup guys, got quite a similar question as the guy above me, olyspicyz.

Basically i ran the server on my current laptop, it works fine and stuff, but i ran on on my other laptops, it told me '-2147221000 (DLL for class not found)'. And uhh, i edited the client's IP to my hamachi's IP, hamachi's working also, but it doesn't seem to be able to run on other lap/desktops? Hope you guys will guide me through this. Thanks!
 
Newbie Spellweaver
Joined
Aug 21, 2012
Messages
44
Reaction score
2
I had java jdk v1.7 but it still says can't start Diamond Operator. Does I need netbeans 7.2 to start the diamond operator?

---Edit---

Installed Netbeans 7.2 and updated JDK_7_5 to JDK_7_6 and worked
 
Last edited:
Newbie Spellweaver
Joined
Mar 1, 2009
Messages
10
Reaction score
0
Hi i need help on this though it long but hope someones able to help me if your want teamviewer with me to slove it by all means pm me thanks
error.PNG - How To Make A Maplestory v111 (Lithium Based) Private Server - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Oct 15, 2008
Messages
9
Reaction score
0
Ur db.prop settings are prolly wrong or smth, those files stated in this tut that relates to db, and it's schema name and user : root thingy, u probably made some mistakes for those.
 
Newbie Spellweaver
Joined
Aug 21, 2012
Messages
44
Reaction score
2
I got an errors. That errors is there is no a 'setPotential' method and 'getPotential' method.
Here is the screenshot
LithiumREV96 Errors.PNG - How To Make A Maplestory v111 (Lithium Based) Private Server - RaGEZONE Forums

---Edit---

It's ok I don't need those method agn
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Aug 24, 2012
Messages
12
Reaction score
1
where do i put the UnlimitedJCEPolicy folder it doesnt say in the instructions

because i keep getting the error in the picture error - How To Make A Maplestory v111 (Lithium Based) Private Server - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Jun 2, 2012
Messages
16
Reaction score
0
where do i put the UnlimitedJCEPolicy folder it doesnt say in the instructions

because i keep getting the error in the pictureView attachment 112318


Code:
JCE Strength Files

1.Download them
2.Extract them anywhere
3.Copy them and paste in these directories


64bit

C:\Program Files\Java\jre7\lib\security
C:\Program Files\Java\jre7\lib/ext
C:\Program Files\Java\jre7\lib
C:\Program Files\Java\jdk1.7\jre\lib
C:\Program Files\Java\jdk1.7\jre\lib\ext
C:\Program Files\Java\jdk1.7\jre\lib\security

32bit

C:\Program Files(x86)\Java\jre7\lib\security
C:\Program Files(x86)\Java\jre7\lib/ext
C:\Program Files(x86)\Java\jre7\lib
C:\Program Files(x86)\Java\jdk1.7\jre\lib
C:\Program Files(x86)\Java\jdk1.7\jre\lib\ext
C:\Program Files(x86)\Java\jdk1.7\jre\lib\security
 
Newbie Spellweaver
Joined
Aug 21, 2012
Messages
44
Reaction score
2
Here is the screenshot.
I had done everything correctly to the java files and properties files
View attachment 112309
My ServerConstants.java
PHP:
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 ~ 2010 Patrick Huy <patrick.huy@frz.cc> 
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.

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 Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package constants;

import java.util.List;
import java.util.LinkedList;

public class ServerConstants {

    public static boolean TESPIA = false; // true = uses GMS test server, for MSEA it does nothing though
    public static final byte[] Gateway_IP = new byte[]{(byte) 127, (byte) 0, (byte) 0, (byte) 1};
    //public static final byte[] Gateway_IP = new byte[]{(byte) 5, (byte) 180, (byte) 9, (byte) 16};
    //Inject a DLL that hooks SetupDiGetClassDevsExA and returns 0.

    /*
     * Specifics which job gives an additional EXP to party
     * returns the percentage of EXP to increase
     */
    public static final byte Class_Bonus_EXP(final int job) {
        switch (job) {
            case 501:
            case 530:
            case 531:
            case 532:
            case 2300:
            case 2310:
            case 2311:
            case 2312:
            case 3100:
            case 3110:
            case 3111:
            case 3112:
            case 800:
            case 900:
            case 910:
                return 10;
        }
        return 0;
    }
    // Start of Poll
    public static final boolean PollEnabled = false;
    public static final String Poll_Question = "Are you mudkiz?";
    public static final String[] Poll_Answers = {"test1", "test2", "test3"};
    // End of Poll
    public static final short MAPLE_VERSION = (short) 116.1;
    public static final String MAPLE_PATCH = "1";
    public static boolean Use_Fixed_IV = true; // true = disable sniffing, false = server can connect to itself
    public static boolean Use_Localhost = false; // true = packets are logged, false = others can connect to server
    public static final int MIN_MTS = 100; //lowest amount an item can be, GMS = 110
    public static final int MTS_BASE = 0; //+amount to everything, GMS = 500, MSEA = 1000
    public static final int MTS_TAX = 5; //+% to everything, GMS = 10
    public static final int MTS_MESO = 10000; //mesos needed, GMS = 5000
    public static final String SQL_USER = "root", SQL_PASSWORD = "";
    //master login is only used in GMS: fake account for localhost only
    //master and master2 is to bypass all accounts passwords only if you are under the IPs below

    public static enum PlayerGMRank {

        NORMAL('@', 0),
        DONATOR('#', 1),
        SUPERDONATOR('$', 2),
        INTERN('%', 3),
        GM('!', 4),
        SUPERGM('!', 5),
        ADMIN('!', 6);
        private char commandPrefix;
        private int level;

        PlayerGMRank(char ch, int level) {
            commandPrefix = ch;
            this.level = level;
        }

        public char getCommandPrefix() {
            return commandPrefix;
        }

        public int getLevel() {
            return level;
        }
    }

    public static enum CommandType {

        NORMAL(0),
        TRADE(1),
        POKEMON(2);
        private int level;

        CommandType(int level) {
            this.level = level;
        }

        public int getType() {
            return level;
        }
    }
}

My DatabaseConnection.java
PHP:
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 ~ 2010 Patrick Huy <patrick.huy@frz.cc> 
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.

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 Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package database;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Collection;
import java.util.LinkedList;
import constants.ServerConstants;
import constants.GameConstants;
import server.ServerProperties;

/**
 * All OdinMS servers maintain a Database Connection. This class therefore "singletonices" the connection per process.
 * 
 * 
 * @author Frz
 */
public class DatabaseConnection {

    private static final ThreadLocal<Connection> con = new ThreadLocalConnection();
    public static final int CLOSE_CURRENT_RESULT = 1;
    /**
     * The constant indicating that the current <code>ResultSet</code> object
     * should not be closed when calling <code>getMoreResults</code>.
     *
     * @since 1.4
     */
    public static final int KEEP_CURRENT_RESULT = 2;
    /**
     * The constant indicating that all <code>ResultSet</code> objects that
     * have previously been kept open should be closed when calling
     * <code>getMoreResults</code>.
     *
     * @since 1.4
     */
    public static final int CLOSE_ALL_RESULTS = 3;
    /**
     * The constant indicating that a batch statement executed successfully
     * but that no count of the number of rows it affected is available.
     *
     * @since 1.4
     */
    public static final int SUCCESS_NO_INFO = -2;
    /**
     * The constant indicating that an error occured while executing a
     * batch statement.
     *
     * @since 1.4
     */
    public static final int EXECUTE_FAILED = -3;
    /**
     * The constant indicating that generated keys should be made
     * available for retrieval.
     *
     * @since 1.4
     */
    public static final int RETURN_GENERATED_KEYS = 1;
    /**
     * The constant indicating that generated keys should not be made
     * available for retrieval.
     *
     * @since 1.4
     */
    public static final int NO_GENERATED_KEYS = 2;

    public static final Connection getConnection() {
        return con.get();
    }

    public static final void closeAll() throws SQLException {
        for (final Connection con : ThreadLocalConnection.allConnections) {
	    if (con != null) {
            	con.close();
	    }
        }
    }

    private static final class ThreadLocalConnection extends ThreadLocal<Connection> {

        public static final Collection<Connection> allConnections = new LinkedList<Connection>();

        @Override
        protected final Connection initialValue() {
            try {
                Class.forName("com.mysql.jdbc.Driver"); // touch the mysql driver
            } catch (final ClassNotFoundException e) {
                System.err.println("ERROR" + e);
            }
            try {
                final Connection con = DriverManager.getConnection(
					"jdbc:mysql://localhost:3306/Lithium?autoReconnect=true", 
					ServerConstants.SQL_USER, ServerConstants.SQL_PASSWORD);
                allConnections.add(con);
                return con;
            } catch (SQLException e) {
                System.err.println("ERROR" + e);
                return null;
            }
        }
    }
}

My DumpItems.java
PHP:
/*
	This file is part of the ZeroFusion MapleStory Server
    Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc> 
                       Matthias Butz <matze@odinms.de>
                       Jan Christian Meyer <vimes@odinms.de>
    ZeroFusion organized by "RMZero213" <RMZero213@hotmail.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License version 3
    as published by the Free Software Foundation. You may not use, modify
    or distribute this program under any other version of the
    GNU Affero General Public License.

    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 Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package tools.wztosql;

import client.inventory.EquipAdditions;
import client.inventory.MapleInventoryType;
import constants.GameConstants;
import java.io.File;
import java.sql.Connection;
import java.sql.PreparedStatement;
import database.DatabaseConnection;
import java.sql.ResultSet;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.LinkedHashSet;
import java.util.Map.Entry;
import provider.MapleData;
import provider.MapleDataDirectoryEntry;
import provider.MapleDataFileEntry;
import provider.MapleDataProvider;
import provider.MapleDataProviderFactory;
import provider.MapleDataTool;
import server.life.Element;
import tools.Pair;

public class DumpItems {
	private MapleDataProvider item, string = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("net.sf.odinms.wzpath") + "/String.wz")), character;
    	protected final MapleData cashStringData = string.getData("Cash.img");
    	protected final MapleData consumeStringData = string.getData("Consume.img");
    	protected final MapleData eqpStringData = string.getData("Eqp.img");
   	protected final MapleData etcStringData = string.getData("Etc.img");
    	protected final MapleData insStringData = string.getData("Ins.img");
    	protected final MapleData petStringData = string.getData("Pet.img");
	protected final Set<Integer> doneIds = new LinkedHashSet<Integer>();
	protected boolean hadError = false;
	protected boolean update = false;
	protected int id = 0;
	private Connection con = DatabaseConnection.getConnection();

	public DumpItems(boolean update) throws Exception {
		this.update = update;
		this.item = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("net.sf.odinms.wzpath") + "/Item.wz"));
		this.character = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("net.sf.odinms.wzpath") + "/Character.wz"));
		if (item == null || string == null || character == null) {
			hadError = true;
		}
	}

        public boolean isHadError() {
                return hadError;
        }

	public void dumpItems() throws Exception {
		if (!hadError) {
			PreparedStatement psa = con.prepareStatement("INSERT INTO wz_itemadddata(itemid, `key`, value1, value2) VALUES (?, ?, ?, ?)");
			PreparedStatement psr = con.prepareStatement("INSERT INTO wz_itemrewarddata(itemid, item, prob, quantity, period, worldMsg, effect) VALUES (?, ?, ?, ?, ?, ?, ?)");
			PreparedStatement ps = con.prepareStatement("INSERT INTO wz_itemdata(itemid, name, msg, `desc`, slotMax, price, wholePrice, stateChange, flags, karma, meso, monsterBook, itemMakeLevel, questId, scrollReqs, consumeItem, totalprob, incSkill, replaceId, replaceMsg, `create`, afterImage) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
			PreparedStatement pse = con.prepareStatement("INSERT INTO wz_itemequipdata(itemid, itemLevel, `key`, `value`) VALUES (?, ?, ?, ?)");
			try {
				dumpItems(psa, psr, ps, pse);
			} catch (Exception e) {
				System.out.println(id + " quest.");
				e.printStackTrace();
				hadError = true;
			} finally {
				psr.executeBatch();
				psr.close();
				psa.executeBatch();
				psa.close();
				pse.executeBatch();
				pse.close();
				ps.executeBatch();
				ps.close();	
			}
		}
	}


	public void delete(String sql) throws Exception {
		PreparedStatement ps = con.prepareStatement(sql);
		ps.executeUpdate();
		ps.close();
	}

	public boolean doesExist(String sql) throws Exception {
		PreparedStatement ps = con.prepareStatement(sql);
		ResultSet rs = ps.executeQuery();
		boolean ret = rs.next();
		rs.close();
		ps.close();
		return ret;
	}

	public void dumpItems(MapleDataProvider d, PreparedStatement psa, PreparedStatement psr, PreparedStatement ps, PreparedStatement pse, boolean charz) throws Exception {
		for (MapleDataDirectoryEntry topDir : d.getRoot().getSubdirectories()) { //requirements first
			if (!topDir.getName().equalsIgnoreCase("Special") && !topDir.getName().equalsIgnoreCase("Hair") && !topDir.getName().equalsIgnoreCase("Face") && !topDir.getName().equalsIgnoreCase("Afterimage")) {
				for (MapleDataFileEntry ifile : topDir.getFiles()) {
					final MapleData iz = d.getData(topDir.getName() + "/" + ifile.getName());
					if (charz || topDir.getName().equalsIgnoreCase("Pet")) {
						dumpItem(psa,psr,ps,pse,iz);
					} else {
						for (MapleData itemData : iz) {
							dumpItem(psa,psr,ps,pse,itemData);
						}
					}
				}
			}
		}
	}

	public void dumpItem(PreparedStatement psa, PreparedStatement psr, PreparedStatement ps, PreparedStatement pse, MapleData iz) throws Exception {
		try {
			if (iz.getName().endsWith(".img")) {
				this.id = Integer.parseInt(iz.getName().substring(0, iz.getName().length() - 4));
			} else {
				this.id = Integer.parseInt(iz.getName());
			}
		} catch (NumberFormatException nfe) { //not we need
			return;
		}
		if (doneIds.contains(id) || GameConstants.getInventoryType(id) == MapleInventoryType.UNDEFINED) {
			return;
		}
		doneIds.add(id);
		if (update && doesExist("SELECT * FROM wz_itemdata WHERE itemid = " + id)) {
			return;
		}
		ps.setInt(1, id);
		final MapleData stringData = getStringData(id);
		if (stringData == null) {
			ps.setString(2, "");
			ps.setString(3, "");
			ps.setString(4, "");
		} else {
			ps.setString(2, MapleDataTool.getString("name", stringData, ""));
			ps.setString(3, MapleDataTool.getString("msg", stringData, ""));
			ps.setString(4, MapleDataTool.getString("desc", stringData, ""));
		}
        	short ret = 0;
        	final MapleData smEntry = iz.getChildByPath("info/slotMax");
        	if (smEntry == null) {
            		if (GameConstants.getInventoryType(id) == MapleInventoryType.EQUIP) {
                		ret = 1;
            		} else {
                		ret = 100;
            		}
        	} else {
            		ret = (short) MapleDataTool.getIntConvert(smEntry,-1);
        	}
		ps.setInt(5, ret);
        	double pEntry = 0.0;
        	MapleData pData = iz.getChildByPath("info/unitPrice");
        	if (pData != null) {
            		try {
                		pEntry = MapleDataTool.getDouble(pData);
            		} catch (Exception e) {
                		pEntry = (double) MapleDataTool.getIntConvert(pData,-1);
            		}
        	} else {
            		pData = iz.getChildByPath("info/price");
           	 	if (pData == null) {
                		pEntry = -1.0;
            		} else {
				pEntry = (double) MapleDataTool.getIntConvert(pData,-1);
			}
        	}
        	if (id == 2070019 || id == 2330007) {
        	    	pEntry = 1.0;
        	}
		ps.setString(6, String.valueOf(pEntry));
        	ps.setInt(7, MapleDataTool.getIntConvert("info/price", iz, -1));
        	ps.setInt(8, MapleDataTool.getIntConvert("info/stateChangeItem", iz, 0));
		int flags = MapleDataTool.getIntConvert("info/bagType", iz, 0);
		if (MapleDataTool.getIntConvert("info/notSale", iz, 0) > 0) {
			flags |= 0x10;
		}
		if (MapleDataTool.getIntConvert("info/expireOnLogout", iz, 0) > 0) {
			flags |= 0x20;
		}
		if (MapleDataTool.getIntConvert("info/pickUpBlock", iz, 0) > 0) {
			flags |= 0x40;
		}
		if (MapleDataTool.getIntConvert("info/only", iz, 0) > 0) {
			flags |= 0x80;
		}
		if (MapleDataTool.getIntConvert("info/accountSharable", iz, 0) > 0) {
			flags |= 0x100;
		}
		if (MapleDataTool.getIntConvert("info/quest", iz, 0) > 0) {
			flags |= 0x200;
		}
		if (MapleDataTool.getIntConvert("info/tradeBlock", iz, 0) > 0) {
			flags |= 0x400;
		}
		if (MapleDataTool.getIntConvert("info/accountShareTag", iz, 0) > 0) {
			flags |= 0x800;
		}
		if (MapleDataTool.getIntConvert("info/mobHP", iz, 0) > 0 && MapleDataTool.getIntConvert("info/mobHP", iz, 0) < 100) {
			flags |= 0x1000;
		}
		ps.setInt(9, flags);
        	ps.setInt(10, MapleDataTool.getIntConvert("info/tradeAvailable", iz, 0));
        	ps.setInt(11, MapleDataTool.getIntConvert("info/meso", iz, 0));
        	ps.setInt(12, MapleDataTool.getIntConvert("info/mob", iz, 0));
        	ps.setInt(13, MapleDataTool.getIntConvert("info/lv", iz, 0));
        	ps.setInt(14, MapleDataTool.getIntConvert("info/questId", iz, 0));
		int totalprob = 0;
		StringBuilder scrollReqs = new StringBuilder(), consumeItem = new StringBuilder(), incSkill = new StringBuilder();
		MapleData dat = iz.getChildByPath("req");
		if (dat != null) {
			for (MapleData req : dat) {
				if (scrollReqs.length() > 0) {
					scrollReqs.append(",");
				}
				scrollReqs.append(MapleDataTool.getIntConvert(req,0));
			}
		}
		dat = iz.getChildByPath("consumeItem");
		if (dat != null) {
			for (MapleData req : dat) {
				if (consumeItem.length() > 0) {
					consumeItem.append(",");
				}
				consumeItem.append(MapleDataTool.getIntConvert(req,0));
			}
		}
		ps.setString(15, scrollReqs.toString());
		ps.setString(16, consumeItem.toString());
		Map<Integer, Map<String, Integer>> equipStats = new HashMap<Integer, Map<String, Integer>>();
		equipStats.put(-1, new HashMap<String, Integer>());
		dat = iz.getChildByPath("mob");
		if (dat != null) {
			for (MapleData child : dat) {
				equipStats.get(-1).put("mob" + MapleDataTool.getIntConvert("id", child, 0), MapleDataTool.getIntConvert("prob", child, 0));
			}
		}
		dat = iz.getChildByPath("info/level/case");
		if (dat != null) {
			for (MapleData info : dat) {
				for (MapleData data : info) {
					if (data.getName().length() == 1 && data.getChildByPath("Skill") != null) {
						for (MapleData skil : data.getChildByPath("Skill")) {
							int incSkillz = MapleDataTool.getIntConvert("id", skil, 0);
							if (incSkillz != 0) {
								if (incSkill.length() > 0) {
									incSkill.append(",");
								}
								incSkill.append(incSkillz);
							}
						}
					}
				}
			}
		}
		dat = iz.getChildByPath("info/level/info");
		if (dat != null) {
			for (MapleData info : dat) {
	    			if (MapleDataTool.getIntConvert("exp", info, 0) == 0) {
					continue;
	    			}
				final int lv = Integer.parseInt(info.getName());
				if(equipStats.get(lv) == null) {
					equipStats.put(lv, new HashMap<String, Integer>());
				}
				for (MapleData data : info) {
                			if (data.getName().length() > 3) {
                    				equipStats.get(lv).put(data.getName().substring(3), MapleDataTool.getIntConvert(data, 0));
                			}
				}
			}
		}
		dat = iz.getChildByPath("info");
		if (dat != null) {
			ps.setString(22, MapleDataTool.getString("afterImage", dat, ""));
			final Map<String, Integer> rett = equipStats.get(-1);
        		for (final MapleData data : dat.getChildren()) {
            			if (data.getName().startsWith("inc")) {
					final int gg = MapleDataTool.getIntConvert(data, 0);
					if (gg != 0) {
                				rett.put(data.getName().substring(3), gg);
					}
            			}
        		}
			//save sql, only do the ones that exist
			for (String stat : GameConstants.stats) {
				final MapleData d = dat.getChildByPath(stat);
					if (stat.equals("canLevel")) {
						if (dat.getChildByPath("level") != null) {
							rett.put(stat, 1);
						}
				} else if (d != null) {

					if (stat.equals("skill")) {
            					for (int i = 0; i < d.getChildren().size(); i++) { // List of allowed skillIds
                					rett.put("skillid" + i, MapleDataTool.getIntConvert(Integer.toString(i), d, 0));
            					}
					} else {
						final int dd = MapleDataTool.getIntConvert(d, 0);
						if (dd != 0) {
							rett.put(stat, dd);
						}
					}
				}
			}
		} else {
			ps.setString(22, "");
		}
		pse.setInt(1, id);
		for (Entry<Integer, Map<String, Integer>> stats : equipStats.entrySet()) {
			pse.setInt(2, stats.getKey());
			for (Entry<String, Integer> stat : stats.getValue().entrySet()) {
				pse.setString(3, stat.getKey());
				pse.setInt(4, stat.getValue());
				pse.addBatch();
			}
		}
		dat = iz.getChildByPath("info/addition");
		if (dat != null) {
			psa.setInt(1, id);
        		for (MapleData d : dat.getChildren()) {
	    			EquipAdditions z = EquipAdditions.fromString(d.getName());
	    			if (z != null) {
					Pair<Integer, Integer> incs = null;
					if (z.isElement()) {
		    				String ele = MapleDataTool.getString(z.getValue1(), d, "F30"); //value1=value2
		    				incs = new Pair<Integer, Integer>(Element.getFromChar(ele.charAt(0)).getValue(), Integer.parseInt(ele.substring(1, ele.length()))); //E.G. F30
					} else {
		    				incs = new Pair<Integer, Integer>(MapleDataTool.getIntConvert(z.getValue1(), d, 0), MapleDataTool.getIntConvert(z.getValue2(), d, 0));
					}
            				psa.setString(2, d.getName());
					psa.setInt(3, incs.left);
					psa.setInt(4, incs.right);
					psa.addBatch();
	    			} else {
					System.out.println("UNKNOWN EQ ADDITION : " + d.getName() + " from " + id);
	    			}
        		}
		}
		dat = iz.getChildByPath("reward");
		if (dat != null) {
			psr.setInt(1, id);
			for (MapleData reward : dat) {
				psr.setInt(2, MapleDataTool.getIntConvert("item", reward, 0));
				psr.setInt(3, MapleDataTool.getIntConvert("prob", reward, 0));
				psr.setInt(4, MapleDataTool.getIntConvert("count", reward, 0));
				psr.setInt(5, MapleDataTool.getIntConvert("period", reward, 0));
				psr.setString(6, MapleDataTool.getString("worldMsg", reward, ""));
				psr.setString(7, MapleDataTool.getString("Effect", reward, ""));
				psr.addBatch();
				totalprob += MapleDataTool.getIntConvert("prob", reward, 0);
			}
		}
		ps.setInt(17, totalprob);
		ps.setString(18, incSkill.toString());
		dat = iz.getChildByPath("replace");
		if (dat != null) {
			ps.setInt(19, MapleDataTool.getInt("itemid", dat, 0));
			ps.setString(20, MapleDataTool.getString("msg", dat, ""));
		} else {
			ps.setInt(19, 0);
			ps.setString(20, "");
		}
		ps.setInt(21, MapleDataTool.getInt("info/create", iz, 0));
		ps.addBatch();
	}
	//kinda inefficient
	public void dumpItems(PreparedStatement psa, PreparedStatement psr, PreparedStatement ps, PreparedStatement pse) throws Exception {
		if (!update) {
			delete("DELETE FROM wz_itemdata");
			delete("DELETE FROM wz_itemequipdata");
			delete("DELETE FROM wz_itemadddata");
			delete("DELETE FROM wz_itemrewarddata");
			System.out.println("Deleted wz_itemdata successfully.");
		}
		System.out.println("Adding into wz_itemdata.....");
		dumpItems(item, psa, psr, ps, pse, false);
		dumpItems(character, psa, psr, ps, pse, true);
		System.out.println("Done wz_itemdata...");
	}

	public int currentId() {
		return id;
	}

	public static void main(String[] args) {	
		boolean hadError = false;
		boolean update = false;
		long startTime = System.currentTimeMillis();
		for (String file : args) {
			if (file.equalsIgnoreCase("-update")) {
				update = true;
			}
		}
		int currentQuest = 0;
		try {
                        final DumpItems dq = new DumpItems(update);
			System.out.println("Dumping Items");
			dq.dumpItems();
			hadError |= dq.isHadError();
			currentQuest = dq.currentId();
		} catch (Exception e) {
			hadError = true;
			e.printStackTrace();
			System.out.println(currentQuest + " quest.");
		}
		long endTime = System.currentTimeMillis();
		double elapsedSeconds = (endTime - startTime) / 1000.0;
		int elapsedSecs = (((int) elapsedSeconds) % 60);
		int elapsedMinutes = (int) (elapsedSeconds / 60.0);
		
		String withErrors = "";
		if (hadError) {
			withErrors = " with errors";
		}
		System.out.println("Finished" + withErrors + " in " + elapsedMinutes + " minutes " + elapsedSecs + " seconds");
	}


    protected final MapleData getStringData(final int itemId) {
        String cat = null;
        MapleData data;

        if (itemId >= 5010000) {
            data = cashStringData;
        } else if (itemId >= 2000000 && itemId < 3000000) {
            data = consumeStringData;
        } else if ((itemId >= 1132000 && itemId < 1183000) || (itemId >= 1010000 && itemId < 1040000) || (itemId >= 1122000 && itemId < 1123000)) {
            data = eqpStringData;
            cat = "Eqp/Accessory";
        } else if (itemId >= 1172000 && itemId < 1173000) {
            data = eqpStringData;
            cat = "Eqp/MonsterBook";
        } else if (itemId >= 1662000 && itemId < 1680000) {
            data = eqpStringData;
            cat = "Eqp/Android";
        } else if (itemId >= 1000000 && itemId < 1010000) {
            data = eqpStringData;
            cat = "Eqp/Cap";
        } else if (itemId >= 1102000 && itemId < 1103000) {
            data = eqpStringData;
            cat = "Eqp/Cape";
        } else if (itemId >= 1040000 && itemId < 1050000) {
            data = eqpStringData;
            cat = "Eqp/Coat";
        } else if (itemId >= 20000 && itemId < 22000) {
            data = eqpStringData;
            cat = "Eqp/Face";
        } else if (itemId >= 1080000 && itemId < 1090000) {
            data = eqpStringData;
            cat = "Eqp/Glove";
        } else if (itemId >= 30000 && itemId < 35000) {
            data = eqpStringData;
            cat = "Eqp/Hair";
        } else if (itemId >= 1050000 && itemId < 1060000) {
            data = eqpStringData;
            cat = "Eqp/Longcoat";
        } else if (itemId >= 1060000 && itemId < 1070000) {
            data = eqpStringData;
            cat = "Eqp/Pants";
        } else if (itemId >= 1610000 && itemId < 1660000) {
            data = eqpStringData;
            cat = "Eqp/Mechanic";
        } else if (itemId >= 1802000 && itemId < 1820000) {
            data = eqpStringData;
            cat = "Eqp/PetEquip";
        } else if (itemId >= 1920000 && itemId < 2000000) {
            data = eqpStringData;
            cat = "Eqp/Dragon";
        } else if (itemId >= 1112000 && itemId < 1120000) {
            data = eqpStringData;
            cat = "Eqp/Ring";
        } else if (itemId >= 1092000 && itemId < 1100000) {
            data = eqpStringData;
            cat = "Eqp/Shield";
        } else if (itemId >= 1070000 && itemId < 1080000) {
            data = eqpStringData;
            cat = "Eqp/Shoes";
        } else if (itemId >= 1900000 && itemId < 1920000) {
            data = eqpStringData;
            cat = "Eqp/Taming";
        } else if (itemId >= 1300000 && itemId < 1800000) {
            data = eqpStringData;
            cat = "Eqp/Weapon";
        } else if (itemId >= 4000000 && itemId < 5000000) {
            data = etcStringData;
            cat = "Etc";
        } else if (itemId >= 3000000 && itemId < 4000000) {
            data = insStringData;
        } else if (itemId >= 5000000 && itemId < 5010000) {
            data = petStringData;
        } else {
            return null;
        }
        if (cat == null) {
            return data.getChildByPath(String.valueOf(itemId));
        } else {
            return data.getChildByPath(cat + "/" + itemId);
        }
    }
}

My DumpMobSkills.java
PHP:
/*
	This file is part of the ZeroFusion MapleStory Server
    Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc> 
                       Matthias Butz <matze@odinms.de>
                       Jan Christian Meyer <vimes@odinms.de>
    ZeroFusion organized by "RMZero213" <RMZero213@hotmail.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License version 3
    as published by the Free Software Foundation. You may not use, modify
    or distribute this program under any other version of the
    GNU Affero General Public License.

    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 Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package tools.wztosql;

import java.io.File;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.util.List;
import database.DatabaseConnection;
import java.awt.Point;
import java.sql.ResultSet;
import java.util.ArrayList;
import provider.MapleData;
import provider.MapleDataProvider;
import provider.MapleDataProviderFactory;
import provider.MapleDataTool;

public class DumpMobSkills {
	private MapleDataProvider skill;
	protected boolean hadError = false;
	protected boolean update = false;
	protected int id = 0;
	private Connection con = DatabaseConnection.getConnection();

	public DumpMobSkills(boolean update) throws Exception {
		this.update = update;
		this.skill = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("net.sf.odinms.wzpath") + "/Skill.wz"));
		if (skill == null) {
			hadError = true;
		}
	}

        public boolean isHadError() {
                return hadError;
        }

	public void dumpMobSkills() throws Exception {
		if (!hadError) {
			PreparedStatement ps = con.prepareStatement("INSERT INTO wz_mobskilldata(skillid, `level`, hp, mpcon, x, y, time, prop, `limit`, spawneffect,`interval`, summons, ltx, lty, rbx, rby, once) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
			try {
				dumpMobSkills(ps);
			} catch (Exception e) {
				System.out.println(id + " skill.");
				e.printStackTrace();
				hadError = true;
			} finally {
				ps.executeBatch();
				ps.close();	
			}
		}
	}


	public void delete(String sql) throws Exception {
		PreparedStatement ps = con.prepareStatement(sql);
		ps.executeUpdate();
		ps.close();
	}

	public boolean doesExist(String sql) throws Exception {
		PreparedStatement ps = con.prepareStatement(sql);
		ResultSet rs = ps.executeQuery();
		boolean ret = rs.next();
		rs.close();
		ps.close();
		return ret;
	}

	//kinda inefficient
	public void dumpMobSkills(PreparedStatement ps) throws Exception {
		if (!update) {
			delete("DELETE FROM wz_mobskilldata");
			System.out.println("Deleted wz_mobskilldata successfully.");
		}
		final MapleData skillz = skill.getData("MobSkill.img");
		System.out.println("Adding into wz_mobskilldata.....");
	
		for (MapleData ids : skillz.getChildren()) {
			for (MapleData lvlz : ids.getChildByPath("level").getChildren()) {
				this.id = Integer.parseInt(ids.getName());
				int lvl = Integer.parseInt(lvlz.getName());
				if (update && doesExist("SELECT * FROM wz_mobskilldata WHERE skillid = " + id + " AND level = " + lvl)) {
					continue;
				}
				ps.setInt(1, id);
				ps.setInt(2, lvl);
				ps.setInt(3, MapleDataTool.getInt("hp", lvlz, 100));
				ps.setInt(4, MapleDataTool.getInt("mpCon", lvlz, 0));
				ps.setInt(5, MapleDataTool.getInt("x", lvlz, 1));
				ps.setInt(6, MapleDataTool.getInt("y", lvlz, 1));
				ps.setInt(7, MapleDataTool.getInt("time", lvlz, 0)); // * 1000
				ps.setInt(8, MapleDataTool.getInt("prop", lvlz, 100)); // / 100.0
				ps.setInt(9, MapleDataTool.getInt("limit", lvlz, 0));
				ps.setInt(10, MapleDataTool.getInt("summonEffect", lvlz, 0));
				ps.setInt(11, MapleDataTool.getInt("interval", lvlz, 0)); // * 1000

				StringBuilder summ = new StringBuilder();
				List<Integer> toSummon = new ArrayList<Integer>();
				for (int i = 0; i > -1; i++) {
					if (lvlz.getChildByPath(String.valueOf(i)) == null) {
						break;
					}
					toSummon.add(Integer.valueOf(MapleDataTool.getInt(lvlz.getChildByPath(String.valueOf(i)), 0)));
				}
				for (Integer summon : toSummon) {
					if (summ.length() > 0) {
						summ.append(", ");
					}
					summ.append(String.valueOf(summon));
				}
				ps.setString(12, summ.toString());
				if (lvlz.getChildByPath("lt") != null) {
					Point lt = (Point)lvlz.getChildByPath("lt").getData();
					ps.setInt(13, lt.x);
					ps.setInt(14, lt.y);
				} else {
					ps.setInt(13, 0);
					ps.setInt(14, 0);
				}
				if(lvlz.getChildByPath("rb") != null) {
					Point rb = (Point)lvlz.getChildByPath("rb").getData();
					ps.setInt(15, rb.x);
					ps.setInt(16, rb.y);
				} else {
					ps.setInt(15, 0);
					ps.setInt(16, 0);
				}
				ps.setByte(17, (byte)(MapleDataTool.getInt("summonOnce", lvlz, 0) > 0 ? 1 : 0));
				System.out.println("Added skill: " + id + " level " + lvl);
				ps.addBatch();
			}
		}
		System.out.println("Done wz_mobskilldata...");
	}

	public int currentId() {
		return id;
	}

	public static void main(String[] args) {	
		boolean hadError = false;
		boolean update = false;
		long startTime = System.currentTimeMillis();
		for (String file : args) {
			if (file.equalsIgnoreCase("-update")) {
				update = true;
			}
		}
		int currentQuest = 0;
		try {
                        final DumpMobSkills dq = new DumpMobSkills(update);
			System.out.println("Dumping mobskills");
			dq.dumpMobSkills();
			hadError |= dq.isHadError();
			currentQuest = dq.currentId();
		} catch (Exception e) {
			hadError = true;
			e.printStackTrace();
			System.out.println(currentQuest + " skill.");
		}
		long endTime = System.currentTimeMillis();
		double elapsedSeconds = (endTime - startTime) / 1000.0;
		int elapsedSecs = (((int) elapsedSeconds) % 60);
		int elapsedMinutes = (int) (elapsedSeconds / 60.0);
		
		String withErrors = "";
		if (hadError) {
			withErrors = " with errors";
		}
		System.out.println("Finished" + withErrors + " in " + elapsedMinutes + " minutes " + elapsedSecs + " seconds");
	}
}

My DumpQuests.java
PHP:
/*
	This file is part of the ZeroFusion MapleStory Server
    Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc> 
                       Matthias Butz <matze@odinms.de>
                       Jan Christian Meyer <vimes@odinms.de>
    ZeroFusion organized by "RMZero213" <RMZero213@hotmail.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License version 3
    as published by the Free Software Foundation. You may not use, modify
    or distribute this program under any other version of the
    GNU Affero General Public License.

    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 Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package tools.wztosql;

import java.io.File;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.util.List;
import database.DatabaseConnection;
import java.sql.ResultSet;
import java.util.LinkedList;
import provider.MapleData;
import provider.MapleDataProvider;
import provider.MapleDataProviderFactory;
import provider.MapleDataTool;
import server.quest.MapleQuestActionType;
import server.quest.MapleQuestRequirementType;
import tools.Pair;

public class DumpQuests {
	private MapleDataProvider quest;
	protected boolean hadError = false;
	protected boolean update = false;
	protected int id = 0;
	private Connection con = DatabaseConnection.getConnection();

	public DumpQuests(boolean update) throws Exception {
		this.update = update;
		this.quest = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("net.sf.odinms.wzpath") + "/Quest.wz"));
		if (quest == null) {
			hadError = true;
		}
	}

        public boolean isHadError() {
                return hadError;
        }

	public void dumpQuests() throws Exception {
		if (!hadError) {
			PreparedStatement psai = con.prepareStatement("INSERT INTO wz_questactitemdata(uniqueid, itemid, count, period, gender, job, jobEx, prop) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
			PreparedStatement psas = con.prepareStatement("INSERT INTO wz_questactskilldata(uniqueid, skillid, skillLevel, masterLevel) VALUES (?, ?, ?, ?)");
			PreparedStatement psaq = con.prepareStatement("INSERT INTO wz_questactquestdata(uniqueid, quest, state) VALUES (?, ?, ?)");
			PreparedStatement ps = con.prepareStatement("INSERT INTO wz_questdata(questid, name, autoStart, autoPreComplete, viewMedalItem, selectedSkillID, blocked, autoAccept, autoComplete) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");
			PreparedStatement psr = con.prepareStatement("INSERT INTO wz_questreqdata(questid, type, name, stringStore, intStoresFirst, intStoresSecond) VALUES (?, ?, ?, ?, ?, ?)");
			PreparedStatement psq = con.prepareStatement("INSERT INTO wz_questpartydata(questid, rank, mode, property, value) VALUES(?,?,?,?,?)");
			PreparedStatement psa = con.prepareStatement("INSERT INTO wz_questactdata(questid, type, name, intStore, applicableJobs, uniqueid) VALUES (?, ?, ?, ?, ?, ?)");
			try {
				dumpQuests(psai, psas, psaq, ps, psr, psq, psa);
			} catch (Exception e) {
				System.out.println(id + " quest.");
				e.printStackTrace();
				hadError = true;
			} finally {
				psai.executeBatch();
				psai.close();
				psas.executeBatch();
				psas.close();
				psaq.executeBatch();
				psaq.close();
				psa.executeBatch();
				psa.close();
				psr.executeBatch();
				psr.close();
				psq.executeBatch();
				psq.close();
				ps.executeBatch();
				ps.close();	
			}
		}
	}


	public void delete(String sql) throws Exception {
		PreparedStatement ps = con.prepareStatement(sql);
		ps.executeUpdate();
		ps.close();
	}

	public boolean doesExist(String sql) throws Exception {
		PreparedStatement ps = con.prepareStatement(sql);
		ResultSet rs = ps.executeQuery();
		boolean ret = rs.next();
		rs.close();
		ps.close();
		return ret;
	}

	//kinda inefficient
	public void dumpQuests(PreparedStatement psai, PreparedStatement psas, PreparedStatement psaq, PreparedStatement ps, PreparedStatement psr, PreparedStatement psq, PreparedStatement psa) throws Exception {
		if (!update) {
			delete("DELETE FROM wz_questdata");
			delete("DELETE FROM wz_questactdata");
			delete("DELETE FROM wz_questactitemdata");
			delete("DELETE FROM wz_questactskilldata");
			delete("DELETE FROM wz_questactquestdata");
			delete("DELETE FROM wz_questreqdata");
			delete("DELETE FROM wz_questpartydata");
			System.out.println("Deleted wz_questdata successfully.");
		}
		final MapleData checkz = quest.getData("Check.img");
		final MapleData actz = quest.getData("Act.img");
		final MapleData infoz = quest.getData("QuestInfo.img");
		final MapleData pinfoz = quest.getData("PQuest.img");
		System.out.println("Adding into wz_questdata.....");
		int uniqueid = 0;
		for (MapleData qz : checkz.getChildren()) { //requirements first
			this.id = Integer.parseInt(qz.getName());
			if (update && doesExist("SELECT * FROM wz_questdata WHERE questid = " + id)) {
				continue;
			}
			ps.setInt(1, id);
			for (int i = 0; i < 2; i++) {
				MapleData reqData = qz.getChildByPath(String.valueOf(i));
				if (reqData != null) {
					psr.setInt(1, id);
					psr.setInt(2, i); //0 = start
					for (MapleData req : reqData.getChildren()) {
						if (MapleQuestRequirementType.getByWZName(req.getName()) == MapleQuestRequirementType.UNDEFINED) {
							continue; //un-needed
						}
						psr.setString(3, req.getName());
						if (req.getName().equals("fieldEnter")) { //diff
							psr.setString(4, String.valueOf(MapleDataTool.getIntConvert("0", req, 0)));
						} else if (req.getName().equals("end") || req.getName().equals("startscript") || req.getName().equals("endscript")) {
							psr.setString(4, MapleDataTool.getString(req, ""));
						} else {
							psr.setString(4, String.valueOf(MapleDataTool.getInt(req, 0)));
						}
						StringBuilder intStore1 = new StringBuilder();
						StringBuilder intStore2 = new StringBuilder();
						List<Pair<Integer, Integer>> dataStore = new LinkedList<Pair<Integer, Integer>>();
						if (req.getName().equals("job")) {
                					final List<MapleData> child = req.getChildren();
                					for (int x = 0; x < child.size(); x++) {
                    						dataStore.add(new Pair<Integer, Integer>(i, MapleDataTool.getInt(child.get(x), -1)));
                					}
						} else if (req.getName().equals("skill")) {
                					final List<MapleData> child = req.getChildren();
                					for (int x = 0; x < child.size(); x++) {
                    						final MapleData childdata = child.get(x);
		    						if (childdata == null) {
									continue;
		    						}
                    						dataStore.add(new Pair<Integer, Integer>(MapleDataTool.getInt(childdata.getChildByPath("id"), 0),
                            						MapleDataTool.getInt(childdata.getChildByPath("acquire"), 0)));
                					}
						} else if (req.getName().equals("quest")) {
                					final List<MapleData> child = req.getChildren();
                					for (int x = 0; x < child.size(); x++) {
                    						final MapleData childdata = child.get(x);
		    						if (childdata == null) {
									continue;
		    						}
                    						dataStore.add(new Pair<Integer, Integer>(MapleDataTool.getInt(childdata.getChildByPath("id"), 0),
                            						MapleDataTool.getInt(childdata.getChildByPath("state"), 0)));
                					}
						} else if (req.getName().equals("item") || req.getName().equals("mob")) {
                					final List<MapleData> child = req.getChildren();
                					for (int x = 0; x < child.size(); x++) {
                    						final MapleData childdata = child.get(x);
		    						if (childdata == null) {
									continue;
		    						}
                    						dataStore.add(new Pair<Integer, Integer>(MapleDataTool.getInt(childdata.getChildByPath("id"), 0),
                            						MapleDataTool.getInt(childdata.getChildByPath("count"), 0)));
                					}
						} else if (req.getName().equals("mbcard")) {
                					final List<MapleData> child = req.getChildren();
                					for (int x = 0; x < child.size(); x++) {
                    						final MapleData childdata = child.get(x);
		    						if (childdata == null) {
									continue;
		    						}
                    						dataStore.add(new Pair<Integer, Integer>(MapleDataTool.getInt(childdata.getChildByPath("id"), 0),
                            						MapleDataTool.getInt(childdata.getChildByPath("min"), 0)));
                					}
						} else if (req.getName().equals("pet")) {
                					final List<MapleData> child = req.getChildren();
                					for (int x = 0; x < child.size(); x++) {
                    						final MapleData childdata = child.get(x);
		    						if (childdata == null) {
									continue;
		    						}
                    						dataStore.add(new Pair<Integer, Integer>(i,
                            						MapleDataTool.getInt(childdata.getChildByPath("id"), 0)));
                					}
						}
						for (Pair<Integer, Integer> data : dataStore) {
							if (intStore1.length() > 0) {
								intStore1.append(", ");
								intStore2.append(", ");
							}
							intStore1.append(data.getLeft());
							intStore2.append(data.getRight());
						}
						psr.setString(5, intStore1.toString());
						psr.setString(6, intStore2.toString());
						psr.addBatch();
					}
				}
				MapleData actData = actz.getChildByPath(id + "/" + i);
				if (actData != null) {
					psa.setInt(1, id);
					psa.setInt(2, i); //0 = start
					for (MapleData act : actData.getChildren()) {
						if (MapleQuestActionType.getByWZName(act.getName()) == MapleQuestActionType.UNDEFINED) {
							continue; //un-needed
						}
						psa.setString(3, act.getName());
						if (act.getName().equals("sp")) {
							psa.setInt(4, MapleDataTool.getIntConvert("0/sp_value", act, 0));
						} else {
							psa.setInt(4, MapleDataTool.getInt(act, 0));
						}
						StringBuilder applicableJobs = new StringBuilder();
						if (act.getName().equals("sp") || act.getName().equals("skill")) {
							int index = 0;
							while(true) {
								if (act.getChildByPath(index + "/job") != null) {
									for (MapleData d : act.getChildByPath(index + "/job")) {
										if (applicableJobs.length() > 0) {
											applicableJobs.append(", ");
										}
										applicableJobs.append(MapleDataTool.getInt(d,0));
									}
									index++;
								} else {
									break;
								}
							}
						} else {
							if (act.getChildByPath("job") != null) {
								for (MapleData d : act.getChildByPath("job")) {
									if (applicableJobs.length() > 0) {
										applicableJobs.append(", ");
									}
									applicableJobs.append(MapleDataTool.getInt(d,0));
								}
							}
						}
						psa.setString(5, applicableJobs.toString());
						psa.setInt(6, -1);
						if (act.getName().equals("item")) { //prop, job, gender, id, count
							uniqueid++;
							psa.setInt(6, uniqueid);
							psai.setInt(1, uniqueid);
							for (MapleData iEntry : act.getChildren()) {
								psai.setInt(2, MapleDataTool.getInt("id", iEntry, 0));
								psai.setInt(3, MapleDataTool.getInt("count", iEntry, 0));
								psai.setInt(4, MapleDataTool.getInt("period", iEntry, 0));
								psai.setInt(5, MapleDataTool.getInt("gender", iEntry, 2));
								psai.setInt(6, MapleDataTool.getInt("job", iEntry, -1));
								psai.setInt(7, MapleDataTool.getInt("jobEx", iEntry, -1));
								if (iEntry.getChildByPath("prop") == null) {
									psai.setInt(8, -2);
								} else {
									psai.setInt(8, MapleDataTool.getInt("prop", iEntry, -1));
								}
								psai.addBatch();
							}
						} else if (act.getName().equals("skill")) {
							uniqueid++;
							psa.setInt(6, uniqueid);
							psas.setInt(1, uniqueid);
							for (MapleData sEntry : act) {
								psas.setInt(2, MapleDataTool.getInt("id", sEntry, 0));
								psas.setInt(3, MapleDataTool.getInt("skillLevel", sEntry, 0));
								psas.setInt(4, MapleDataTool.getInt("masterLevel", sEntry, 0));
								psas.addBatch();
							}
						} else if (act.getName().equals("quest")) {
							uniqueid++;
							psa.setInt(6, uniqueid);
							psaq.setInt(1, uniqueid);
							for (MapleData sEntry : act) {
								psaq.setInt(2, MapleDataTool.getInt("id", sEntry, 0));
								psaq.setInt(3, MapleDataTool.getInt("state", sEntry, 0));
								psaq.addBatch();
							}
						}
						psa.addBatch();
					}
				}
			}
			MapleData infoData = infoz.getChildByPath(String.valueOf(id));
			if (infoData != null) {
				ps.setString(2, MapleDataTool.getString("name", infoData, ""));
				ps.setInt(3, MapleDataTool.getInt("autoStart", infoData, 0) > 0 ? 1 : 0);
				ps.setInt(4, MapleDataTool.getInt("autoPreComplete", infoData, 0) > 0 ? 1 : 0);
				ps.setInt(5, MapleDataTool.getInt("viewMedalItem", infoData, 0));
				ps.setInt(6, MapleDataTool.getInt("selectedSkillID", infoData, 0));
				ps.setInt(7, MapleDataTool.getInt("blocked", infoData, 0));
				ps.setInt(8, MapleDataTool.getInt("autoAccept", infoData, 0));
				ps.setInt(9, MapleDataTool.getInt("autoComplete", infoData, 0));
			} else {
				ps.setString(2, "");
				ps.setInt(3, 0);
				ps.setInt(4, 0);
				ps.setInt(5, 0);
				ps.setInt(6, 0);
				ps.setInt(7, 0);
				ps.setInt(8, 0);
				ps.setInt(9, 0);
			}
			ps.addBatch();

			MapleData pinfoData = pinfoz.getChildByPath(String.valueOf(id));
			if (pinfoData != null && pinfoData.getChildByPath("rank") != null) {
				psq.setInt(1, id);
            			for (MapleData d : pinfoData.getChildByPath("rank")) {
					psq.setString(2, d.getName());
                			for (MapleData c : d) {
						psq.setString(3, c.getName());
                    				for (MapleData b : c) {
                        				psq.setString(4, b.getName());
							psq.setInt(5, MapleDataTool.getInt(b, 0));
							psq.addBatch();
                    				}
                			}
            			}
			}
			System.out.println("Added quest: " + id);
		}
		System.out.println("Done wz_questdata...");
	}

	public int currentId() {
		return id;
	}

	public static void main(String[] args) {	
		boolean hadError = false;
		boolean update = false;
		long startTime = System.currentTimeMillis();
		for (String file : args) {
			if (file.equalsIgnoreCase("-update")) {
				update = true;
			}
		}
		int currentQuest = 0;
		try {
                        final DumpQuests dq = new DumpQuests(update);
			System.out.println("Dumping quests");
			dq.dumpQuests();
			hadError |= dq.isHadError();
			currentQuest = dq.currentId();
		} catch (Exception e) {
			hadError = true;
			e.printStackTrace();
			System.out.println(currentQuest + " quest.");
		}
		long endTime = System.currentTimeMillis();
		double elapsedSeconds = (endTime - startTime) / 1000.0;
		int elapsedSecs = (((int) elapsedSeconds) % 60);
		int elapsedMinutes = (int) (elapsedSeconds / 60.0);
		
		String withErrors = "";
		if (hadError) {
			withErrors = " with errors";
		}
		System.out.println("Finished" + withErrors + " in " + elapsedMinutes + " minutes " + elapsedSecs + " seconds");
	}
}

My db.properties
PHP:
url=jdbc:mysql://localhost:3306/Lithium?autoReconnect=true
user = root
password =

Please I really need help on this.
 
Initiate Mage
Joined
Feb 13, 2011
Messages
1
Reaction score
0
I've been trying to download the WZ files for hours...

It keeps stopping the download at 20.6MB, instead of 40.4MB

EDIT: Nevermind, I just went ahead and dumped them myself.
 
Last edited:
Newbie Spellweaver
Joined
Aug 24, 2012
Messages
12
Reaction score
1
Hi everyone i just wanted to help people with the unable to connect to the game server problem,
step 1: open navicat
step 2: Open Lithium
Step 3: go to accounts
Step 4: scroll >>>> way til you see Session Ip
Step 5:change 127.0.0.1 to YOUR IP
Thats all you have to do :)

Like this comment if i helped you
 
Back
Top