Several PQ platform patches + Quest complete count + Fast meso drop
Implemented CPQ challenges using the matching system. Fixed LanguageConstants statically acting for all players. Fixed OPQ's <On the Way Up> stage sometimes leading players to unexpected platforms. Fixed EllinPQ fountain not giving Altaire Fragment to players. Fixed "Lab - Unit" stage on RnJPQ, now using correlated sequences between the units. Fixed Fredrick handing out negative values of mesos to players. Improved "goto" command info. Implemented quest complete count. Fixed mobs still being "controlled" by players even though it's already dead. Concurrently protected adding items into inventory. Concurrently protected EXP gain through Writs of Solomon. Adjusted smoothly respawn rate of mobs in map (solo players in a map now experiences 75% of mobs spawned). Fixed mesos not being able to drop so frequently (prior 200ms threshold between drops). Tweaked matchchecking so that match checking doesn't outright dispose matching members on dismissal (match still sticks to the player until they answer or timeout). Fixed a dupe case within storage's item store. Added any-NPC scriptable to the source.
This commit is contained in:
73
tools/MapleSkillbookStackUpdate/build.xml
Normal file
73
tools/MapleSkillbookStackUpdate/build.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
||||
<!-- By default, only the Clean and Build commands use this build script. -->
|
||||
<!-- Commands such as Run, Debug, and Test only use this build script if -->
|
||||
<!-- the Compile on Save feature is turned off for the project. -->
|
||||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
|
||||
<!-- in the project's Project Properties dialog box.-->
|
||||
<project name="MapleSkillbookStackUpdate" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project MapleSkillbookStackUpdate.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
<!--
|
||||
|
||||
There exist several targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-pre-compile: called before javac compilation
|
||||
-post-compile: called after javac compilation
|
||||
-pre-compile-single: called before javac compilation of single file
|
||||
-post-compile-single: called after javac compilation of single file
|
||||
-pre-compile-test: called before javac compilation of JUnit tests
|
||||
-post-compile-test: called after javac compilation of JUnit tests
|
||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||
-pre-jar: called before JAR building
|
||||
-post-jar: called after JAR building
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of inserting an obfuscator after compilation could look like this:
|
||||
|
||||
<target name="-post-compile">
|
||||
<obfuscate>
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
</obfuscate>
|
||||
</target>
|
||||
|
||||
For list of available properties check the imported
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
|
||||
Another way to customize the build is by overriding existing main targets.
|
||||
The targets of interest are:
|
||||
|
||||
-init-macrodef-javac: defines macro for javac compilation
|
||||
-init-macrodef-junit: defines macro for junit execution
|
||||
-init-macrodef-debug: defines macro for class debugging
|
||||
-init-macrodef-java: defines macro for class execution
|
||||
-do-jar: JAR building
|
||||
run: execution of project
|
||||
-javadoc-build: Javadoc generation
|
||||
test-report: JUnit report generation
|
||||
|
||||
An example of overriding the target for project execution could look like this:
|
||||
|
||||
<target name="run" depends="MapleSkillbookStackUpdate-impl.jar">
|
||||
<exec dir="bin" executable="launcher.exe">
|
||||
<arg file="${dist.jar}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
Notice that the overridden target depends on the jar target and not only on
|
||||
the compile target as the regular run target does. Again, for a list of available
|
||||
properties which you can use, check the target you are overriding in the
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
-->
|
||||
</project>
|
||||
3
tools/MapleSkillbookStackUpdate/manifest.mf
Normal file
3
tools/MapleSkillbookStackUpdate/manifest.mf
Normal file
@@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
X-COMMENT: Main-Class will be added automatically by build
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
/*
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package mapleskillbookstackupdate;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*
|
||||
* This application parses skillbook XMLs, filling up stack amount of those
|
||||
* items to 100 (eliminating limitations on held skillbooks, now using
|
||||
* default stack quantity expected by USE items).
|
||||
*
|
||||
* Estimated parse time: 10 seconds
|
||||
*/
|
||||
public class MapleSkillbookStackUpdate {
|
||||
|
||||
static String wzPath = "../../wz";
|
||||
static String outputWzPath = "lib";
|
||||
|
||||
|
||||
static Connection con = null;
|
||||
static PrintWriter printWriter = null;
|
||||
static InputStreamReader fileReader = null;
|
||||
static BufferedReader bufferedReader = null;
|
||||
|
||||
static int initialLength = 200;
|
||||
static int initialStringLength = 50;
|
||||
static boolean displayExtraInfo = true; // display items with zero quantity over the quest act WZ
|
||||
|
||||
static int status = 0;
|
||||
|
||||
private static boolean isSkillMasteryBook(int itemid) {
|
||||
return itemid >= 2280000 && itemid < 2300000;
|
||||
}
|
||||
|
||||
private static String getName(String token) {
|
||||
int i, j;
|
||||
char[] dest;
|
||||
String d;
|
||||
|
||||
i = token.lastIndexOf("name");
|
||||
i = token.indexOf("\"", i) + 1; //lower bound of the string
|
||||
j = token.indexOf("\"", i); //upper bound
|
||||
|
||||
if(j < i) return "0"; //node value containing 'name' in it's scope, cheap fix since we don't deal with strings anyway
|
||||
|
||||
dest = new char[initialStringLength];
|
||||
token.getChars(i, j, dest, 0);
|
||||
|
||||
d = new String(dest);
|
||||
return(d.trim());
|
||||
}
|
||||
|
||||
private static String getValue(String token) {
|
||||
int i, j;
|
||||
char[] dest;
|
||||
String d;
|
||||
|
||||
i = token.lastIndexOf("value");
|
||||
i = token.indexOf("\"", i) + 1; //lower bound of the string
|
||||
j = token.indexOf("\"", i); //upper bound
|
||||
|
||||
dest = new char[initialStringLength];
|
||||
token.getChars(i, j, dest, 0);
|
||||
|
||||
d = new String(dest);
|
||||
return(d.trim());
|
||||
}
|
||||
|
||||
private static void forwardCursor(int st) {
|
||||
String line = null;
|
||||
|
||||
try {
|
||||
while(status >= st && (line = bufferedReader.readLine()) != null) {
|
||||
simpleToken(line);
|
||||
}
|
||||
}
|
||||
catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static void simpleToken(String token) {
|
||||
if(token.contains("/imgdir")) {
|
||||
status -= 1;
|
||||
}
|
||||
else if(token.contains("imgdir")) {
|
||||
status += 1;
|
||||
}
|
||||
printWriter.println(token);
|
||||
}
|
||||
|
||||
private static void translateItemToken(String token) {
|
||||
if(token.contains("/imgdir")) {
|
||||
status -= 1;
|
||||
}
|
||||
else if(token.contains("imgdir")) {
|
||||
status += 1;
|
||||
|
||||
if(status == 2) { //itemid
|
||||
int itemid = Integer.valueOf(getName(token));
|
||||
|
||||
if (!isSkillMasteryBook(itemid)) {
|
||||
printWriter.println(token);
|
||||
forwardCursor(status);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(status == 3) {
|
||||
if (getName(token).contentEquals("slotMax")) {
|
||||
printWriter.println(" <int name=\"slotMax\" value=\"100\"/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
printWriter.println(token);
|
||||
}
|
||||
|
||||
private static void parseItemFile(File file, String outputName) {
|
||||
// This will reference one line at a time
|
||||
String line = null;
|
||||
|
||||
try {
|
||||
printWriter = new PrintWriter(outputName);
|
||||
fileReader = new InputStreamReader(new FileInputStream(file), "UTF-8");
|
||||
bufferedReader = new BufferedReader(fileReader);
|
||||
|
||||
while((line = bufferedReader.readLine()) != null) {
|
||||
translateItemToken(line);
|
||||
}
|
||||
|
||||
bufferedReader.close();
|
||||
fileReader.close();
|
||||
printWriter.close();
|
||||
}
|
||||
catch(IOException ex) {
|
||||
System.out.println("Error reading file '" + file.getName() + "'");
|
||||
}
|
||||
|
||||
catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static void parseItemDirectory(String wzPath, String outputPath) {
|
||||
File wzDir = new File(wzPath);
|
||||
|
||||
for (File f : wzDir.listFiles()) {
|
||||
parseItemFile(f, outputPath + f.getName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Reading item files...");
|
||||
parseItemDirectory(wzPath + "/Item.wz/Consume/", outputWzPath + "/");
|
||||
System.out.println("Done!");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user