diff --git a/tools/MapleGachaponItemidRetriever/src/maplegachaponitemidretriever/MapleGachaponItemidRetriever.java b/src/main/java/tools/mapletools/GachaponItemIdRetriever.java similarity index 67% rename from tools/MapleGachaponItemidRetriever/src/maplegachaponitemidretriever/MapleGachaponItemidRetriever.java rename to src/main/java/tools/mapletools/GachaponItemIdRetriever.java index c539bd4f52..0761d804a1 100644 --- a/tools/MapleGachaponItemidRetriever/src/maplegachaponitemidretriever/MapleGachaponItemidRetriever.java +++ b/src/main/java/tools/mapletools/GachaponItemIdRetriever.java @@ -1,68 +1,36 @@ -/* - This file is part of the HeavenMS MapleStory Server - Copyleft (L) 2016 - 2018 RonanLana - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as - published by the Free Software Foundation 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 . -*/ -package maplegachaponitemidretriever; +package tools.mapletools; import java.io.*; -import java.sql.*; +import java.nio.charset.StandardCharsets; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; /** - * * @author RonanLana - * + *

* This application reads metadata for the gachapons found on the "gachapon_items.txt" * recipe file, then checks up the Handbook DB (installed through MapleIdRetriever) * and translates the item names from the recipe file into their respective itemids. * The translated itemids are then stored in specific gachapon files inside the * "lib/gachapons" folder. - * + *

* Estimated parse time: 1 minute */ -public class MapleGachaponItemidRetriever { +public class GachaponItemIdRetriever { + private static final File INPUT_FILE = ToolConstants.getInputFile("gachapon_items.txt"); + private static final File OUTPUT_DIRECTORY = ToolConstants.getOutputFile("gachapons"); + private static final Connection con = SimpleDatabaseConnection.getConnection(); + private static final Pattern pattern = Pattern.compile("(\\d*)%"); + private static final int[] scrollsChances = new int[]{10, 15, 30, 60, 65, 70, 100}; + private static final Map> scrollItemids = new HashMap<>(); + + private static PrintWriter printWriter = null; - static String host = "jdbc:mysql://localhost:3306/cosmic"; - static String driver = "com.mysql.jdbc.Driver"; - static String username = "cosmic_server"; - static String password = "snailshell"; - - static Connection con = null; - static InputStreamReader fileReader = null; - static BufferedReader bufferedReader = null; - static PrintWriter printWriter = null; - - // ------- SET-UP section arguments -------- - - static String directoryName = "./handbook/"; - - // ------- SEARCH section arguments -------- - - static String inputName = "lib/gachapon_items.txt"; - static String outputPath = "lib/gachapons/"; - - static Pattern p = Pattern.compile("(\\d*)%"); - static int[] scrollsChances = new int[]{10, 15, 30, 60, 65, 70, 100}; - - static Map> scrollItemids = new HashMap<>(); - private static void insertGachaponScrollItemid(Integer id, String name, String description, boolean both) { GachaponScroll gachaScroll = getGachaponScroll(name, description, both); @@ -74,25 +42,25 @@ public class MapleGachaponItemidRetriever { list.add(id); } - + private static void loadHandbookUseNames() throws SQLException { PreparedStatement ps = con.prepareStatement("SELECT * FROM `handbook` WHERE `id` >= 2040000 AND `id` < 2050000 ORDER BY `id` ASC;"); ResultSet rs = ps.executeQuery(); - while(rs.next()) { + while (rs.next()) { Integer id = rs.getInt("id"); String name = rs.getString("name"); - + if (isUpgradeScroll(name)) { String description = rs.getString("description"); insertGachaponScrollItemid(id, name, description, false); insertGachaponScrollItemid(id, name, description, true); } } - + rs.close(); ps.close(); - + /* for (Entry> e : scrollItemids.entrySet()) { System.out.println(e); @@ -100,41 +68,41 @@ public class MapleGachaponItemidRetriever { System.out.println("------------"); */ } - + private static class GachaponScroll { private String header; private String target; private String buff; private int prop; - + private GachaponScroll(GachaponScroll from, int prop) { this.header = from.header; this.target = from.target; this.buff = from.buff; this.prop = prop; } - + private GachaponScroll(String name, String description, boolean both) { String[] params = name.split(" for "); if (params.length < 3) { return; } - + String header = both ? "scroll" : " " + params[0]; String target = params[1]; int prop = 0; String buff = params[2]; - Matcher m = p.matcher(buff); + Matcher m = pattern.matcher(buff); if (m.find()) { - prop = Integer.valueOf(m.group(1)); + prop = Integer.parseInt(m.group(1)); buff = buff.substring(0, m.start() - 1).trim(); } else { - m = p.matcher(description); - + m = pattern.matcher(description); + if (m.find()) { - prop = Integer.valueOf(m.group(1)); + prop = Integer.parseInt(m.group(1)); } } @@ -143,45 +111,54 @@ public class MapleGachaponItemidRetriever { buff = buff.substring(0, idx); } buff = buff.replace(".", ""); - + this.header = header; this.target = target; this.buff = buff; this.prop = prop; } - - @Override + + @Override public int hashCode() { int result = prop ^ (prop >>> 32); - result = 31 * result + (header != null ? header.hashCode() : 0); + result = 31 * result + (header != null ? header.hashCode() : 0); result = 31 * result + (target != null ? target.hashCode() : 0); result = 31 * result + (buff != null ? buff.hashCode() : 0); - return result; + return result; } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - GachaponScroll sc = (GachaponScroll) o; - if (header != null ? !header.equals(sc.header) : sc.header != null) return false; - if (target != null ? !target.equals(sc.target) : sc.target != null) return false; - if (buff != null ? !buff.equals(sc.buff) : sc.buff != null) return false; - if (prop != sc.prop) return false; - return true; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GachaponScroll sc = (GachaponScroll) o; + if (header != null ? !header.equals(sc.header) : sc.header != null) { + return false; + } + if (target != null ? !target.equals(sc.target) : sc.target != null) { + return false; + } + if (buff != null ? !buff.equals(sc.buff) : sc.buff != null) { + return false; + } + return prop == sc.prop; } - + @Override public String toString() { return header + " for " + target + " for " + buff + " - " + prop + "%"; } - + } - + private static String getGachaponScrollResults(String line, boolean both) { String str = ""; List gachaScrollList; - + GachaponScroll gachaScroll = getGachaponScroll(line, "", both); if (gachaScroll.prop != 0) { gachaScrollList = Collections.singletonList(gachaScroll); @@ -192,7 +169,7 @@ public class MapleGachaponItemidRetriever { gachaScrollList.add(new GachaponScroll(gachaScroll, prop)); } } - + for (GachaponScroll gs : gachaScrollList) { List gachaItemids = scrollItemids.get(gs); if (gachaItemids != null) { @@ -209,10 +186,10 @@ public class MapleGachaponItemidRetriever { } } } - + return str; } - + private static GachaponScroll getGachaponScroll(String name, String description, boolean both) { name = name.toLowerCase(); name = name.replace("for acc ", "for accuracy "); @@ -222,22 +199,22 @@ public class MapleGachaponItemidRetriever { name = name.replace("for attack", "for att"); name = name.replace("1-handed", "one-handed"); name = name.replace("2-handed", "two-handed"); - + return new GachaponScroll(name, description, both); } - + private static boolean isUpgradeScroll(String name) { return name.matches("^(([D|d]ark )?[S|s]croll for).*"); } - + private static void fetchLineOnMapleHandbook(String line, String rarity) throws SQLException { String str = ""; if (!isUpgradeScroll(line)) { - PreparedStatement ps = con.prepareStatement("SELECT `id` FROM `handbook` WHERE `name` LIKE ? COLLATE latin1_general_ci ORDER BY `id` ASC;"); + PreparedStatement ps = con.prepareStatement("SELECT `id` FROM `handbook` WHERE `name` LIKE ? ORDER BY `id` ASC;"); ps.setString(1, line); ResultSet rs = ps.executeQuery(); - while(rs.next()) { + while (rs.next()) { int id = rs.getInt("id"); str += Integer.toString(id); @@ -250,37 +227,37 @@ public class MapleGachaponItemidRetriever { str += getGachaponScrollResults(line, false); if (str.isEmpty()) { str += getGachaponScrollResults(line, true); - + if (str.isEmpty()) { System.out.println("NONE for '" + line + "' : " + getGachaponScroll(line, "", false)); } } } - + if (str.isEmpty()) { str += line; } - + if (rarity != null) { str += ("- " + rarity); } printWriter.println(str); } - + private static void fetchDataOnMapleHandbook() throws SQLException { String line; - + try { - fileReader = new InputStreamReader(new FileInputStream(inputName), "UTF-8"); - bufferedReader = new BufferedReader(fileReader); - + InputStreamReader fileReader = new InputStreamReader(new FileInputStream(INPUT_FILE), StandardCharsets.UTF_8); + BufferedReader bufferedReader = new BufferedReader(fileReader); + int skip = 0; boolean lineHeader = false; - while((line = bufferedReader.readLine()) != null) { + while ((line = bufferedReader.readLine()) != null) { if (skip > 0) { skip--; - + if (lineHeader) { if (!line.isEmpty()) { lineHeader = false; @@ -291,14 +268,19 @@ public class MapleGachaponItemidRetriever { } else if (line.isEmpty()) { printWriter.println(""); } else if (line.startsWith("Gachapon ")) { - String s[] = line.split("� "); + String[] s = line.split("� "); String gachaponName = s[s.length - 1]; gachaponName = gachaponName.replace(" ", "_"); gachaponName = gachaponName.toLowerCase(); - - if (printWriter != null) printWriter.close(); - printWriter = new PrintWriter(outputPath + gachaponName + ".txt", "UTF-8"); - + + if (printWriter != null) { + printWriter.close(); + } + File outputFile = new File(OUTPUT_DIRECTORY, gachaponName + ".txt"); + setupDirectories(outputFile); + + printWriter = new PrintWriter(outputFile, StandardCharsets.UTF_8); + skip = 2; lineHeader = true; } else if (line.startsWith(".")) { @@ -316,44 +298,33 @@ public class MapleGachaponItemidRetriever { } } - if (printWriter != null) printWriter.close(); + if (printWriter != null) { + printWriter.close(); + } bufferedReader.close(); fileReader.close(); - } - catch(FileNotFoundException ex) { - System.out.println(ex.getMessage()); - } - catch(IOException ex) { + } catch (IOException ex) { System.out.println(ex.getMessage()); + ex.printStackTrace(); } } - + + private static void setupDirectories(File file) { + if (!file.getParentFile().exists()) { + file.getParentFile().mkdirs(); + } + } + public static void main(String[] args) { - try { - Class.forName(driver).newInstance(); - con = DriverManager.getConnection(host, username, password); - loadHandbookUseNames(); fetchDataOnMapleHandbook(); con.close(); - } - - catch(SQLException e) { + } catch (SQLException e) { System.out.println("Error: invalid SQL syntax"); System.out.println(e.getMessage()); } - - catch(ClassNotFoundException e) { - System.out.println("Error: could not find class"); - System.out.println(e.getMessage()); - } - - catch(InstantiationException | IllegalAccessException e) { - System.out.println("Error: instantiation failure"); - System.out.println(e.getMessage()); - } } - } + diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapons/aquarium.txt b/tools/MapleGachaponItemidRetriever/lib/gachapons/aquarium.txt deleted file mode 100644 index d96deb4d5c..0000000000 --- a/tools/MapleGachaponItemidRetriever/lib/gachapons/aquarium.txt +++ /dev/null @@ -1,98 +0,0 @@ - -Scroll: -2040605 -2040626 -2040609 -2040607 -2041029 -2041027 -2041031 -2041037 -2041033 -2041039 -2041041 -2041035 -2040811 - uncommon -2040809 -2040813 -2040815 - uncommon -2040015 -2040009 -2040011 -2040013 -2040509 -2040521 -2040519 -2040507 -2040905 -2040909 -2040907 -2040713 -2040715 -2040717 -2040405 -2040409 -2040407 -2040426 -2040303 -2040307 -2040309 -2044505 -2044705 -2044605 -2043305 -2043105 -2043205 -2043005 -2043007 -2044405 -2044305 -2043805 -2044105 -2044205 -2044005 -2043705 - -Useable drop: -2012000 -2000004 2000012 2002012 2022175 2022456 -2020008 -2000005 2000019 2002013 2022176 2022457 -2012002 -2101001 - uncommon -2101004 -2101005 -2101002 -2101003 -4006000 - -Warrior equipment: -1092014 -1402017 - -Magician equipment: -1002037 -1002034 -1002064 -1002038 -1382037 -1372000 -1002013 -1002035 -1002065 -1382000 - -Bowman equipment: -1452018 - -Thief equipment: -1472010 1472034 1472039 1472045 -1002175 -1472017 -1472025 1472036 1472041 1472047 - -Pirate Scroll: -2044901 - -Pirate equipment: -1002637 diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapons/el_nath.txt b/tools/MapleGachaponItemidRetriever/lib/gachapons/el_nath.txt deleted file mode 100644 index 2060fce7e0..0000000000 --- a/tools/MapleGachaponItemidRetriever/lib/gachapons/el_nath.txt +++ /dev/null @@ -1,216 +0,0 @@ - -Scroll: -2041012 -2048003 -[2043800 2043803 2043812 ] -2043301 -2040301 -[2040804 2040826 ]- uncommon -2043101 -2043201 -2043001 -2044301 -2043801 -2044201 -2043701 -2044502 -2041011 -2041014 -2044602 -2043302 -2040805 - uncommon -2043202 -2043002 -2048005 -2044402 -2044302 -2043802 -2044102 -2044202 -2043702 - -Useable drop: -2340000 - uncommon -2000004 2000012 2002012 2022175 2022456 -2000005 2000019 2002013 2022176 2022457 - -Common equipment: -1402010 -1032003 -1442013 -1432009 -1302022 -1302029 -1322021 -1302026 -1442017 -1322023 -1102011 -1032008 4031568 -1322026 -1442016 -1312000 -1032007 -1322025 -1322027 -1032020 -1442015 -1432017 -1302027 -1302049 -1372006 -1032022 -1032021 -1372004 -1332020 -1322007 -1032006 -1302028 -1322003 1702020 -1302007 -1092030 -1302021 -1322024 -1322012 -1032005 -1322022 -1032013 -1302025 -1302013 -1032017 -1032002 -1032001 -1302017 -1432018 -1442012 -1302000 -1032000 -1102013 -1442022 -1372005 -1442021 -1032009 -1302016 - -Warrior equipment: -1442003 -1312007 -1402008 -1312008 1312018 1312022 1312026 -1412008 1412015 1412019 1412024 -1442009 -1302004 -1312006 -1442016 -1402012 1402022 1402027 1402033 -1302003 -1312005 -1432002 1432019 1432024 1432031 -1432001 -1302008 1302038 1302043 1302050 -1040030 -1402015 1402023 1402028 1402034 -1322015 -1432006 1432021 1432026 1432033 -1322002 -1302010 1302039 1302044 1302051 -1322017 1322036 1322041 1322047 -1402003 1402020 1402025 1402031 -1402006 -1322000 -1422001 -1442001 -1422004 -1412004 -1322009 -1322011 -1442000 -1412005 -1402002 1402019 1402024 1402030 -1432004 1432020 1432025 1432032 -1442010 1442032 1442036 1442041 -1422008 -1442007 -1422009 1422016 1422020 1422024 -1322019 1322038 1322043 1322049 -1412003 1412013 1412017 1412022 -1412007 1412014 1412018 1412023 -1302009 -1412000 -1322014 1322035 1322040 1322046 -1402001 -1402007 -1432005 - -Magician equipment: -1382001 1382020 1382025 1382030 -1372007 1372019 1372023 1372028 -1382010 1382023 1382028 1382033 -1382007 1382022 1382027 1382032 -1372000 -1372003 -1382011 -1382006 1382021 1382026 1382031 -1382000 - -Bowman equipment: -1452004 1452029 1452034 1452040 -1452000 -1452010 -1452015 1452031 1452036 1452042 -1452014 -1462012 -1462010 -1452017 -1462000 1462023 1462028 1462033 -1452008 1452028 1452033 1452039 -1452006 -1462006 -1452007 -1452002 -1402001 - -Thief equipment: -1472006 -1472010 1472034 1472039 1472045 -1332022 -1332011 -1472015 -1472016 -1472023 -1472028 -1472022 -1472011 -1472026 -1332024 -1332009 -1472017 -1472013 -1472029 1472037 1472042 1472048 -1472021 1472035 1472040 1472046 -1332015 1332035 1332040 1332045 -1332031 -1332023 1332037 1332042 1332047 -1332004 -1472000 -1332019 -1472027 -1332018 1332036 1332041 1332046 -1472007 -1332012 1332033 1332038 1332043 -1332016 -1472024 -1332017 -1332003 1332034 1332039 1332044 -1472012 -1472014 -1472005 -1472018 -1472001 - -Pirate Scroll: -2044812 - -Pirate equipment: -1072294 -1492009 1492018 diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapons/ellinia.txt b/tools/MapleGachaponItemidRetriever/lib/gachapons/ellinia.txt deleted file mode 100644 index 2bf74ba510..0000000000 --- a/tools/MapleGachaponItemidRetriever/lib/gachapons/ellinia.txt +++ /dev/null @@ -1,255 +0,0 @@ - -Scroll: -2043302 -2040002 -2043102 -2043002 -2044402 -2044302 -2043802 -2044002 -2041017 2041053 2041016 2041052 2041015 - -Useable drop: -2000004 2000012 2002012 2022175 2022456 -2000005 2000019 2002013 2022176 2022457 -2022025 -2022026 - -Common equipment: -1402010 -1442013 -1432009 -1002060 -1002063 -1322023 -1002042 -1050018 -1082147 -1002026 -1002392 -1082149 - uncommon -1062024 -1442016 -1322025 -1322027 -1002391 - uncommon -1302027 -1372006 -1002419 - uncommon -1302019 -1092022 -1302021 -1041004 -1002395 1002448 -1322024 -1082148 -1002012 -1322012 -1032028 -1102012 -1322022 -1051017 -1302013 -1082146 -1442014 -1302017 -1102013 -1102003 -1002041 -1002097 -1302016 -1082145 - -Warrior equipment: -1412006 -1040029 5000032 -1040086 -1050005 -1060028 -1002059 -1060008 -1061088 -1402012 1402022 1402027 1402033 -1302003 -1432002 1432019 1432024 1432031 -1312011 1312021 1312025 1312029 -1302008 1302038 1302043 1302050 -1040030 -1002004 -1402015 1402023 1402028 1402034 -1322028 1322039 1322044 1322050 -1322015 -1432006 1432021 1432026 1432033 -1442006 -1322000 -1002085 -1002056 -1092013 -1002058 -1002050 -1060011 -1322009 -1322011 -1442000 -1051011 -1061016 -1060018 -1041024 -1061020 -1302005 -1402002 1402019 1402024 1402030 -1002030 -1092004 -1041023 -1422008 -1060009 -1051000 -1002021 -1442005 1442031 1442035 1442040 -1412003 1412013 1412017 1412022 -1412007 1412014 1412018 1412023 -1422007 -1302009 -1402000 -1402001 -1402007 -1432005 - -Magician equipment: -1382001 1382020 1382025 1382030 -1002037 -1060014 -1040018 -1061027 -1050002 -1002152 -1051027 -1050035 -1050056 -1051047 -1051030 -1002274 -1050074 -1002218 -1002254 -1082088 -1382007 1382022 1382027 1382032 -1002013 -1082087 -1372008 -1382008 1382024 1382029 1382034 -1372002 -1372003 -1382011 -1382004 -1050047 -1040019 -1041041 -1061034 -1041051 -1051045 -1051024 -1082081 -1041030 -1040018 -1002073 -1382003 -1082086 -1382014 1702033 -1050055 -1050025 -1002155 -1060015 - -Bowman equipment: -1452004 1452029 1452034 1452040 -1462003 -1060070 -1002118 -1061058 -1040003 -1002160 -1002121 -1040068 -1061063 -1040080 -1462004 -1041008 -1061006 -1061009 -1040022 1041032 -1002168 -1040067 -1060056 -1041054 -1041067 -1060063 -1002213 -1002119 -1462005 -1452001 -1462000 1462023 1462028 1462033 -1040025 1041033 -1002166 -1002161 -1040069 -1051039 -1452006 -1462006 -1452007 -1402001 -1041062 - -Thief equipment: -1472010 1472034 1472039 1472045 -1472006 -1332011 -1472031 1472038 1472043 1472049 -1041048 -1472019 -1041095 -1040095 -1002128 -1061077 -1060025 -1041040 -1061033 -1472028 -1472022 -1472011 -1040096 -1062002 -1002129 -1472026 -1332009 -1060043 -1002249 -1472021 1472035 1472040 1472046 -1040084 1041076 -1332015 1332035 1332040 1332045 -1002173 -1002148 -1332004 -1332018 1332036 1332041 1332046 -1472009 -1061069 -1002176 -1041044 -1061037 -1060032 -1472020 -1040060 -1472018 -1332013 -1332002 -1402001 - -Pirate Scroll: -2044902 2044907 2044904 2044901 2044906 2044903 [2044900 2044908 ] - -Pirate equipment: -1052107 -1082189 -1052116 -1072309 diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapons/henesys.txt b/tools/MapleGachaponItemidRetriever/lib/gachapons/henesys.txt deleted file mode 100644 index f6fa09f500..0000000000 --- a/tools/MapleGachaponItemidRetriever/lib/gachapons/henesys.txt +++ /dev/null @@ -1,174 +0,0 @@ - -Scroll: -2040001 -2041002 -2040805 - uncommon -2040702 -2043802 -2040402 -2043702 - -Useable Drops: -2000004 2000012 2002012 2022175 2022456 -2000005 2000019 2002013 2022176 2022457 -2020012 -2030007 - -Common equipment: -1432009 -1302022 -1322021 -1302026 -1442017 -1082147 -1102043 -1322026 -1442016 -1402012 1402022 1402027 1402033 -1322025 -1322027 -1302027 -1312012 -1062000 -1332020 -1302028 -1372002 -1002033 -1092022 -1302021 -1102041 - uncommon -1322009 -1102042 - uncommon -1322024 -1082148 -1002012 -1322012 -1322022 -1002020 1002454 -1302013 -1082146 -1442014 -1002096 -1302017 -1442012 - -Beginner equipment: -1442018 1442039 - uncommon - -Warrior equipment: -1092011 -1092014 -1302003 -1432001 -1312011 1312021 1312025 1312029 -1002088 -1041020 -1322015 -1442004 -1422008 -1302056 1402011 1402021 1402026 1402032 -1432000 -1442005 1442031 1442035 1442040 - -Magician equipment: -1382001 1382020 1382025 1382030 -1041053 -1041029 -1050053 -1051032 -1050073 -1061036 -1002253 -1002034 -1051025 -1050067 -1051052 -1002072 -1002144 -1051054 -1050069 -1372007 1372019 1372023 1372028 -1050056 -1050074 -1002254 -1002274 -1002218 -1051055 -1382010 1382023 1382028 1382033 -1002246 -1050039 -1382007 1382022 1382027 1382032 -1372000 -1002013 -1050072 -1002036 -1002244 -1372008 -1382008 1382024 1382029 1382034 -1382011 -1092021 -1051034 -1050047 -1040019 -1041031 -1051033 -1002153 -1002252 -1051024 -1051053 -1050068 -1382003 -1382006 1382021 1382026 1382031 -1050055 -1051031 -1050025 -1002155 -1002245 -1372001 1372018 1372022 1372027 - -Bowman equipment: -1452004 1452029 1452034 1452040 -1452023 1702035 -1060057 -1432001 -1040071 -1002137 -1462009 1462026 1462031 1462036 -1452017 -1040025 1041033 -1041027 -1452005 1452027 1452032 1452038 -1452007 -1061057 - -Thief equipment: -1472006 -1472019 -1060084 -1472028 -1472004 -1002179 -1082074 -1472029 1472037 1472042 1472048 -1040100 -1332015 1332035 1332040 1332045 -1432001 -1040097 -1060071 -1472007 -1472002 -1051009 -1041044 -1041003 -1332016 -1472020 -1332003 1332034 1332039 1332044 - -Pirate Scroll: -2044813 - -Pirate equipment: -1002622 -1082204 -1082213 -1082198 diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapons/kerning_city.txt b/tools/MapleGachaponItemidRetriever/lib/gachapons/kerning_city.txt deleted file mode 100644 index c47981fd21..0000000000 --- a/tools/MapleGachaponItemidRetriever/lib/gachapons/kerning_city.txt +++ /dev/null @@ -1,117 +0,0 @@ - -Scroll: -2041016 -2043302 -2040805 - uncommon -2040902 - -Useable drop: -2000004 2000012 2002012 2022175 2022456 -2000005 2000019 2002013 2022176 2022457 -2022025 -2022027 - -Common equipment: -1442013 -1432009 -1322021 -1050018 -1002392 -1082149 - uncommon -1002394 -1442004 -1372002 -1002418 -1002033 -1092008 -1102041 - uncommon -1082148 -1062001 -1302017 -1032023 -1102013 -1102040 -1002041 -1002097 - -Warrior equipment: -1332026 -1051010 -1432001 -1422005 1422015 1422019 1422023 -1332019 -1302010 1302039 1302044 1302051 -1002056 -1060011 -1322011 -1432004 1432020 1432025 1432032 -1002028 -1051000 -1442007 -1302002 - -Magician equipment: -1002037 -1002034 -1082020 -1050039 -1372000 -1002215 -1051034 -1040019 -1061034 -1382003 -1382006 1382021 1382026 1382031 -1050025 - -Bowman equipment: -1002118 -1061081 -1452011 1452030 1452035 1452041 -1462012 -1452006 -1452007 - -Thief equipment: -1472010 1472034 1472039 1472045 -1472029 1472037 1472042 1472048 -1041048 -1041095 -1060031 -1061033 -1041049 -1472011 -1040096 -1472033 -1332026 -1051006 -1082074 -1472025 1472036 1472041 1472047 -1061106 -1040084 1041076 -1332015 1332035 1332040 1332045 -1472000 -1332019 -1002183 -1002209 -1092020 -1332029 -1092019 -1061099 -1060106 1061116 -1040032 1041036 -1040059 -1332003 1332034 1332039 1332044 -1040060 -1060046 -1472005 -1332027 - -Pirate Scroll: -2044804 -2044906 - -Pirate equipment: -1482004 1482015 -1072318 -1492007 1492016 diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapons/leafre.txt b/tools/MapleGachaponItemidRetriever/lib/gachapons/leafre.txt deleted file mode 100644 index 4d85851b1b..0000000000 --- a/tools/MapleGachaponItemidRetriever/lib/gachapons/leafre.txt +++ /dev/null @@ -1,113 +0,0 @@ - -Scroll: -2040407 2040406 -2040409 2040408 -2040405 2040404 -2040411 2040410 -2040409 2040408 -2044405 2044404 -2040611 2040610 -2040607 2040606 -2040813 2040812 -2041039 2041038 -2041041 2041040 -2041035 2041034 -2041031 2041030 -2041037 2041036 -2043105 2043104 -2043305 2043304 -2040103 2040104 -2040605 2040604 -2040611 2040610 -2043005 2043004 -2043205 2043204 -2044205 2044204 -2044005 2044004 -2040521 -2040511 2040510 -2043305 2043304 -2040909 2040908 -2040905 2040904 -2040907 2040906 -2040809 2040808 -2040813 2040812 -2040811 - uncommon -2040015 2040014 -2040715 2040714 -2040713 2040712 -2044005 2044004 -2043705 2043704 -2044505 2044504 -2040519 2040518 -2040203 2040204 -2040103 2040104 -2040108 2040109 -2044705 2044704 -2040907 2040906 -2040815 2040814 - uncommon -2044305 2044304 -2043007 2043006 -2040307 -2040305 2040304 -2040309 2040308 -2040811 - uncommon -2040208 -2040209 - -Useable drop: - -Common equipment: -1102040 -1102041 - uncommon -1102042 - uncommon -1102086 -1082145 -1032027 -1082146 -1002395 1002448 -1002083 -1002392 -1082149 - uncommon -1002587 -1022047 - -Beginner equipment: - -Warrior equipment: -1312002 -1432013 -1060030 -1422008 -1050022 -1050011 -1402013 -1402017 -1302012 1302041 1302046 1302053 - -Mage equipment: -1002074 -1050029 -1040093 -1050056 -1050039 -1382008 1382024 1382029 1382034 - -Bowman equipment: -1002159 -1061051 -1040023 - -Thief equipment: -1061054 -1061106 -1002249 -1040084 1041076 -1060052 -1472054 - -Pirate Scroll: -2044803 - -Pirate equipment: -1482009 1482018 -1072303 diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapons/ludibrium.txt b/tools/MapleGachaponItemidRetriever/lib/gachapons/ludibrium.txt deleted file mode 100644 index 26b5c0d7a7..0000000000 --- a/tools/MapleGachaponItemidRetriever/lib/gachapons/ludibrium.txt +++ /dev/null @@ -1,159 +0,0 @@ - -Scroll: -2048000 -2040601 -2041019 -2041007 -2041016 -2041022 -2041001 -2041010 -2041013 -2041004 -2044701 -2043301 -2040301 -2048004 -2048001 -2040901 -2040701 -2040704 -2040707 -2040602 -2041020 -2041008 -2041017 -2041023 -2041002 -2041011 -2041014 -2041005 -2044702 -2043302 -[2040302 2040330 ] -2040805 - uncommon -2040002 -2044402 -2048005 -2048002 -2040702 -2040705 -2040708 -2044302 -2043802 -2040402 -2043702 - -Useable drop: -2000004 2000012 2002012 2022175 2022456 -2000005 2000019 2002013 2022176 2022457 -4006000 -4006001 - -Common equipment: -1032003 -1432009 -1302022 -1302029 -1102014 -1102018 -1312014 -1302026 -1102015 -1032011 1041078 -1312013 -1032008 4031568 -1032019 -1032007 -1332030 -1032020 -1032004 -1302027 -1032022 -1312012 -1032021 -1032006 -1302028 -1322003 1702020 -1002419 - uncommon -1032016 -1032015 -1302024 -1092008 -1032018 -1302021 -1032014 -1332021 -1322012 -1032005 -1032013 -1102012 -1302025 -1302013 -1032002 -1032001 -1032012 -1302017 -1032010 -1402014 -1102017 -1102013 -1442021 -1032009 - -Beginner equipment: -1442018 1442039 - uncommon -1332021 -1422011 - -Warrior equipment: -1402017 -1422005 1422015 1422019 1422023 -1002023 -1332016 -1432005 - -Magician equipment: -1002037 -1002034 -1002064 -1002038 -1002013 -1002036 -1382011 -1002035 -1002065 -1382014 1702033 -1372001 1372018 1372022 1372027 - -Bowman equipment: -1452026 -1002162 -1002164 -1462018 -1002165 -1452014 -1002163 -1452012 -1002161 -1452009 -1462007 1462024 1462029 1462034 - -Thief Equipment: -1332022 -1002175 -1002172 -1002174 -1040096 -1472033 -1002173 -1332054 -1472054 -1002171 -1332016 - -Pirate Scroll: -2044811 - -Pirate equipment: -1002646 diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapons/mushroom_shrine.txt b/tools/MapleGachaponItemidRetriever/lib/gachapons/mushroom_shrine.txt deleted file mode 100644 index 068c099704..0000000000 --- a/tools/MapleGachaponItemidRetriever/lib/gachapons/mushroom_shrine.txt +++ /dev/null @@ -1,119 +0,0 @@ - -Scroll: -2040305 2040304 -2040306 -2040309 2040308 -2044604 -2041039 -2041037 -2041035 -2041034 -2041041 -2040608 -2040605 -2040604 -2040611 -2040610 -2040811 - uncommon -2040810 - uncommon -2040813 2040812 -2040815 2040814 - uncommon -2040809 2040808 -2043004 -2040017 -2040015 -2040011 -2040013 2040012 -2040405 -2040407 2040406 -2040411 2040410 -2040511 -2040509 -2040508 -2040519 -2040521 2040520 -2040108 2040109 -2040904 -2040909 2040908 -2043105 2043104 -2044105 2044104 -2043005 -2043004 -2043007 2043006 -2044005 2044004 -2044205 2044204 -2043305 2043304 -2040607 2040606 -2040715 2040714 -2040713 -2044305 2044304 - -Useable drop: - -Common equipment: -1102041 - uncommon -1102042 - uncommon -1102040 -1102084 -1002392 -1432009 -1002393 1002903 -1002394 -1082149 - uncommon -1082147 -1082148 -1032028 -1002585 -1002586 -1432013 -1022047 -1322027 -1432018 - -Beginner equipment: -1072264 -1072262 -1072263 - -Warrior equipment: -1060074 -1322002 -1002340 -1442004 -1402037 -1422008 -1050022 - -Mage equipment: -1382037 -1060014 -1051026 -1050056 -1050029 -1051030 -1382036 -1372032 -1041015 -1382015 3300001 -1372008 -1382008 1382024 1382029 1382034 - -Bowman equipment: -1452018 -1041068 -1462007 1462024 1462029 1462034 - -Thief equipment: -1060052 -1472013 -1002180 -1002170 -1060073 1061071 -1060099 - -Pirate Scroll: -2044904 - -Pirate equipment: -1492004 1492015 -1492012 diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapons/perion.txt b/tools/MapleGachaponItemidRetriever/lib/gachapons/perion.txt deleted file mode 100644 index a64db932f0..0000000000 --- a/tools/MapleGachaponItemidRetriever/lib/gachapons/perion.txt +++ /dev/null @@ -1,117 +0,0 @@ - -Useable drop: -2000004 2000012 2002012 2022175 2022456 -2000005 2000019 2002013 2022176 2022457 - -Common equipment: -1402010 -1302022 -1002060 -1322021 -1082147 -1002006 -1002026 -1002392 -1082149 - uncommon -1322025 -1322027 -1002391 - uncommon -1102000 -1082150 -1332020 -1322007 -1002419 - uncommon -1302021 -1102041 - uncommon -1002395 1002448 -1082148 -1322012 -1302017 -1322010 -1032000 -1102013 -1002097 - -Warrior equipment: -1322020 -1312007 -1312008 1312018 1312022 1312026 -1302004 -1312006 -1082036 -1082117 -1061088 -1302008 1302038 1302043 1302050 -1422005 1422015 1422019 1422023 -1002048 -1061087 -1302018 1302042 1302047 1302054 -1322017 1322036 1322041 1322047 -1422001 -1040103 -1060077 -1002022 -1002050 -1442000 -1432030 -1402037 -1092002 -1041092 -1050006 -1432004 1432020 1432025 1432032 -1061019 -1432000 -1060009 -1051000 -1002021 -1322014 1322035 1322040 1322046 -1432005 - -Magician equipment: -1051032 -1040018 -1051027 -1372007 1372019 1372023 1372028 -1050049 -1002036 -1382012 -1002217 -1051033 -1382006 1382021 1382026 1382031 -1050048 - -Bowman equipment: -1061061 -1060062 -1040075 -1462013 1462027 1462032 1462037 -1041065 -1452006 - -Thief equipment: -1040095 -1060084 -1002182 -1041049 -1002247 -1332024 -1332009 -1060024 -1332015 1332035 1332040 1332045 -1041060 -1061032 -1041074 -1041003 -1332016 -1472020 -1332003 1332034 1332039 1332044 -1041059 - -Pirate Scroll: -2044907 -2044802 2044804 2044801 2044803 [2044800 2044815 ] - -Pirate equipment: -1002631 -1052122 -1482012 diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapons/showa_spa_female.txt b/tools/MapleGachaponItemidRetriever/lib/gachapons/showa_spa_female.txt deleted file mode 100644 index acecbf0b79..0000000000 --- a/tools/MapleGachaponItemidRetriever/lib/gachapons/showa_spa_female.txt +++ /dev/null @@ -1,69 +0,0 @@ - -Scroll: -2048005 -2048002 -2043202 -2044602 -2043214 -2041307 -2040916 - uncommon -2041035 -2044104 -2044505 -2044305 -2043304 -2041309 -2044010 - -Useable drop: -2022016 -2000005 2000019 2002013 2022176 2022457 -2022025 -2022027 - -Common equipment: -1402000 -1402013 -1002418 -1022047 -1102042 - uncommon -1082145 -1082147 -1082146 -1082178 -1082175 - -Common setup: -3010073 -3010099 - -Beginner equipment: - -Warrior equipment: -1422013 -1432030 - -Magician equipment: -1372002 -1382003 - -Bowman equipment: -1040023 - -Thief equipment: -1332003 1332034 1332039 1332044 -1002209 - -Pirate Scroll: -2044803 -2044814 -2044904 -2044902 -2044901 - -Pirate equipment: -1082198 -1082213 -1482007 1482016 -1492004 1492015 -1002646 diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapons/showa_spa_male.txt b/tools/MapleGachaponItemidRetriever/lib/gachapons/showa_spa_male.txt deleted file mode 100644 index 521dea07cf..0000000000 --- a/tools/MapleGachaponItemidRetriever/lib/gachapons/showa_spa_male.txt +++ /dev/null @@ -1,109 +0,0 @@ - -Scroll: -2048005 -2048002 -2043202 -2044602 -2043214 -2041307 -2040916 - uncommon -2041035 -2044104 -2044505 -2044305 -2043304 - -Useable drop: -2022016 -2000005 2000019 2002013 2022176 2022457 -2022025 -2022027 - -Common equipment: -1332020 -1312004 -1332032 5010034 9250053 -1322023 -1322026 -1322022 -1322012 -1302014 -1302049 -1302017 -1332007 -1432009 -1432016 -1432017 -1432009 -1402013 -1402044 -1442014 -1442017 -1442016 -1442025 -1002418 -1082178 -1082179 -1082148 -1032027 -1032032 -1102028 -1102086 -1102042 - uncommon - -Common setup: -3010073 -3010111 - -Beginner equipment: - -Warrior equipment: -1412005 -1402048 -1402049 -1322011 -1302003 -1302004 -1302008 1302038 1302043 1302050 - -Magician equipment: -1372000 -1372009 -1372001 1372018 1372022 1372027 -1372011 1702032 -1382006 1382021 1382026 1382031 -1382014 1702033 - -Bowman equipment: -1452018 -1452006 -1452008 1452028 1452033 1452039 -1452005 1452027 1452032 1452038 -1462002 -1462007 1462024 1462029 1462034 -1462003 -1002169 - -Thief equipment: -1472023 -1332012 1332033 1332038 1332043 -1332017 -1332022 -1332006 -1332029 -1040097 - -Pirate Scroll: -2044902 -2044901 -2044811 -2044903 -2044804 - -Pirate equipment: -1052107 -1082204 -1072318 -1002637 -1482009 1482018 -1492007 1492016 diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapons/sleepywood.txt b/tools/MapleGachaponItemidRetriever/lib/gachapons/sleepywood.txt deleted file mode 100644 index e9f5dad0a1..0000000000 --- a/tools/MapleGachaponItemidRetriever/lib/gachapons/sleepywood.txt +++ /dev/null @@ -1,165 +0,0 @@ - -Scroll: -2048003 -2048000 -2040601 -2044501 -2041019 -2041016 -2041022 -2041010 -2041013 -2043301 -2040301 -[2040804 2040826 ]- uncommon -2040801 -2040817 - uncommon -2040001 -2040004 -2043101 -2043201 -2043001 -2040504 -2040501 -2048004 -2048001 -2044401 -2040901 -2040701 -2040704 -2040707 -2044301 -2043801 -2044101 -2044201 -2044001 -2040602 -2044502 -2041020 -2041017 -2041023 -2041014 -2041005 -2044702 -2044602 -2043302 -[2040302 2040330 ] -2040805 - uncommon -2040802 -2040005 -2043202 -2043002 -2040505 -2040502 -2048005 -2048002 -2044402 -2040902 -2040702 -2040705 -2040708 -2044302 -2043802 -2044202 -2044002 - -Useable drop: -2340000 - uncommon -2012000 -2012003 -2020007 -2000004 2000012 2002012 2022175 2022456 -2012001 -2020008 -2070006 -2020012 -2000005 2000019 2002013 2022176 2022457 -2030007 -2012002 -2002001 -2070005 - -Common equipment: -1032003 -1432009 -1102014 -1102018 -1002392 -1082149 - uncommon -1322026 -1032022 -1312012 -1332020 -1092030 -1032016 -1032015 -1032014 -1322024 -1032013 -1322022 -1102016 -1032012 -1032023 -1402014 -1032000 -1102017 - -Beginner equipment: -1442018 1442039 - uncommon - -Warrior equipment: -1402017 -1051010 -1432011 -1442006 -1322002 -1422004 -1432010 1432023 1432028 1432035 -1051011 -1060018 -1432000 -1422003 -1412003 1412013 1412017 1412022 -1422000 - -Magician equipment: -1002034 -1002142 -1382010 1382023 1382028 1382033 -1002013 -1382008 1382024 1382029 1382034 -1382011 -1050047 -1002065 - -Bowman equipment: -1452003 -1002165 -1040068 -1462013 1462027 1462032 1462037 -1462011 -1462012 -1061050 -1462010 -1002161 - -Thief equipment: -1332022 -1002175 -1040042 -1472004 -1040057 -1332031 -1332023 1332037 1332042 1332047 -1332010 -1002171 -1060046 - -Pirate Scroll: -2044801 -2044903 -2044814 - -Pirate equipment: -1052131 -1482007 1482016 diff --git a/tools/input/.gitignore b/tools/input/.gitignore index ff456c3654..5a82606193 100644 --- a/tools/input/.gitignore +++ b/tools/input/.gitignore @@ -2,4 +2,5 @@ !*/ !/cosmetics/** !.gitignore -!CouponCodes.img.xml \ No newline at end of file +!CouponCodes.img.xml +!gachapon_items.txt \ No newline at end of file diff --git a/tools/MapleGachaponItemidRetriever/lib/gachapon_items.txt b/tools/input/gachapon_items.txt similarity index 100% rename from tools/MapleGachaponItemidRetriever/lib/gachapon_items.txt rename to tools/input/gachapon_items.txt