Zipangu overhaul + Quest take-item & Boss HP bar patch + 3rd job quiz

Added drop data on missing mobs and EXP gain on several quests around World Tour (Japan).
Added a bonus feature for the Showa expedition, accessible when there is no casualties at the time of completion.
Added missing shop data at the NPCs in Singapore.
Patched quests that should be taking some items but weren't doing that properly.
Patched some bosses with boss HP bar not having the "boss" label defined on Mob.wz, rendering some inconsistencies with the bar in-game.
Overhauled the 3rd job quiz mechanic, adding missed questions to the pool.
This commit is contained in:
ronancpl
2018-03-31 00:21:30 -03:00
parent cd16117553
commit 6da5edd837
54 changed files with 4599 additions and 161 deletions
+10 -1
View File
@@ -55,4 +55,13 @@
/tools/MapleSkillMakerReagentIndexer/dist/
/tools/MapleSkillMakerReagentIndexer/nbproject/private/
/out
/out
/tools/MapleQuestItemQuantityFetcher/nbproject/private/
/tools/MapleQuestItemQuantityFetcher/build/
/tools/MapleQuestItemQuantityFetcher/dist/
/tools/MapleQuestItemCountFetcher/nbproject/private/
/tools/MapleQuestItemCountFetcher/build/
/tools/MapleQuestItemCountFetcher/dist/
/tools/MapleBossHpBarFetcher/nbproject/private/
/tools/MapleBossHpBarFetcher/build/
/tools/MapleBossHpBarFetcher/dist/
+3
View File
@@ -43,6 +43,7 @@ Quests:
* Loads of quests have been patched.
* Quest rewards according to jobs works properly.
* Enchanced rewarding system: checks for stacking opportunities on the inventory before checking for new slots.
* Complete overhaul on the 3rd job quiz (explorers), with all 40-question pool now made available.
Player Social Network:
@@ -116,6 +117,7 @@ Admin/GM commands:
External tools:
* MapleArrowFetcher - Updates min/max quantity dropped on all arrows drop data, calculations based on mob level and whether it's a boss or not.
* MapleBossHpBarFetcher - Searches the quest WZ files and reports in all relevant data regarding mobs that has a boss HP bar whilst not having a proper "boss" label.
* MapleCouponInstaller - Retrieves coupon info from the WZ and makes a SQL table with it. The server will use that table to gather info regarding rates and intervals.
* MapleIdRetriever - Two behaviors: generates a SQL table with relation (id, name) of the handbook given as input. Given a file with names, outputs a file with ids.
* MapleInvalidItemIdFetcher - Generates a file listing all inexistent itemid's currently laying on the DB.
@@ -123,6 +125,7 @@ External tools:
* MapleMesoFetcher - Creates meso drop data for mobs with more than 4 items (thus overworld mobs), calculations based on mob level and whether it's a boss or not.
* MapleMobBookIndexer - Generates a SQL table with all relations of cardid and mobid present in the mob book.
* MapleMobBookUpdate - Generates a wz.xml that is a copy of the original MonsterBook.wz.xml, except it updates the drop data info in the book with those currently on DB.
* MapleQuestItemCountFetcher - Searches the quest WZ files and reports in all relevant data regarding missing "count" labels on item acts at "complete quest".
* MapleQuestItemFetcher - Searches the SQL tables and project files and reports in all relevant data regarding missing/erroneous quest items.
* MapleQuestMesoFetcher - Searches the quest WZ files and reports in all relevant data regarding missing/erroneous quest fee checks.
* MapleSkillMakerFetcher - Updates the DB Maker-related tables with the current info present on the WZs.
+10 -1
View File
@@ -839,4 +839,13 @@ Corrigido tempo de duração do Body Pressure sendo resetado sempre que acerta u
26 - 27 Março 2018,
Corrigido animação de spawn dos bosses do dojo que foi quebrada recentemente.
Corrigido autoassigner para piratas somente preenchendo requisitos de gunslinger.
Mobs agora podem dropar mais de um equip de mesmo tipo, sistema utiliza quantidades min/max na tabela de drops.
Mobs agora podem dropar mais de um equip de mesmo tipo, sistema utiliza quantidades min/max na tabela de drops.
Nova ferramenta: MapleQuestItemCountFetcher. Localiza no Quest.wz possíveis locais onde um item deveria estar sendo tirado ao completar determinada quest, mas não o é (caso comum onde campo "count" não existe).
28 - 29 Março 2018,
Adicionado itens de pirata nas lojas de NPC em Singapore.
Adicionado drop data para Flaming Racoon e Big Cloud Fox.
Adicionado ganho de EXP em várias quests da região de Zipangu.
Adicionado sistema de bonus para expedição de Showa, atingível se nenhum jogador morrer no evento.
Nova ferramenta: MapleBossHpBarFetcher. Localiza no Mob.wz ids de mobs que possuem um boss hp bar mas não são labelados como "boss".
Incrementado quiz de 3rd job, agora utilizando um pool de 40 perguntas com escolha arbitrária.
+11 -2
View File
@@ -12,7 +12,7 @@ var recruitMap = 801040004;
var clearMap = 801040101;
var minMapId = 801040100;
var maxMapId = 801040100;
var maxMapId = 801040101;
var eventTime = 60; // 60 minutes for boss stg
@@ -68,6 +68,7 @@ function afterSetup(eim) {}
function setup(channel) {
var eim = em.newInstance("Showa" + channel);
eim.setProperty("canJoin", 1);
eim.setProperty("playerDied", 0);
var level = 1;
eim.getInstanceMap(801040100).resetPQ(level);
@@ -112,7 +113,9 @@ function changedMap(eim, player, mapid) {
function changedLeader(eim, leader) {}
function playerDead(eim, player) {}
function playerDead(eim, player) {
eim.setIntProperty("playerDied", 1);
}
function playerRevive(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
@@ -170,6 +173,12 @@ function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
if(eim.getIntProperty("playerDied") == 0) {
var mob = eim.getMonster(9400114);
eim.getMapInstance(801040101).spawnMonsterOnGroundBelow(mob, new java.awt.Point(500, -50));
eim.dropMessage(5, "Konpei: The Boss has been defeated with no casualties, well done! We found a suspicious machine inside, we're moving it out.");
}
}
function isTheBoss(mob) {
+14 -12
View File
@@ -18,17 +18,19 @@ function action(mode, type, selection) {
else
status--;
if(status == 0){
cm.sendYesNo("Would you like to leave?");
}else if(status == 1){
if(cm.getMapId() == 108010101)cm.getPlayer().changeMap(105040305);
if(cm.getMapId() == 108010201)cm.getPlayer().changeMap(100040106);
if(cm.getMapId() == 108010301)cm.getPlayer().changeMap(105070001);
if(cm.getMapId() == 108010401)cm.getPlayer().changeMap(107000402);
if(cm.getMapId() == 108010501)cm.getPlayer().changeMap(105040305);
var em = cm.getEventManager("3rdjob");
em.getInstance(cm.getPlayer().getName()).unregisterPlayer(cm.getPlayer());
cm.dispose();
}
if(status == 0){
cm.sendYesNo("Would you like to leave?");
}else if(status == 1){
var mapid = cm.getMapId();
if(mapid == 108010101) cm.getPlayer().changeMap(105040305);
else if(mapid == 108010201) cm.getPlayer().changeMap(100040106);
else if(mapid == 108010301) cm.getPlayer().changeMap(105070001);
else if(mapid == 108010401) cm.getPlayer().changeMap(107000402);
else if(mapid == 108010501) cm.getPlayer().changeMap(105070200);
var em = cm.getEventManager("3rdjob");
em.getInstance(cm.getPlayer().getName()).unregisterPlayer(cm.getPlayer());
cm.dispose();
}
}
}
+171 -34
View File
@@ -1,8 +1,6 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <[email protected]>
Matthias Butz <[email protected]>
Jan Christian Meyer <[email protected]>
This file is part of the HeavenMS (MapleSolaxiaV2) MapleStory Server
Copyleft (L) 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
@@ -19,44 +17,183 @@
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/>.
*/
status = -1;
//Need more questions.
quest = ["Which of these NPC's will you NOT see at Ellinia of Victoria Island#b\r\n#L0#Shane\r\n#L1#Francois\r\n#L2#Grendel the Really Old\r\n#L3#Arwen the Fairy\r\n#L4#Roel", "Which of these monsters will you NOT be facing at Ossyria...?#b\r\n#L0#White Fang\r\n#L1#Croco\r\n#L2#Yeti\r\n#L3#Lycanthrope\r\n#L4#Luster Pixie", "Which of these monsters have the highest level...?#b\r\n#L0#Octopus\r\n#L1#Ribbon Pig\r\n#L2#Green Mushroom\r\n#L3#Axe Stump\r\n#L4#Bubbling", "In MapleStory, which of these pairings of potion/results doesn't match...?#b\r\n#L0#Holy Water - Recover from the state of being cursed or sealed up.\r\n#L1#Sunrise Dew - Recover MP 3000\r\n#L2#Hamburger - Recover HP 400\r\n#L3#Salad - Recover MP 200\r\n#L4#Blue Potion - Recover MP 100", "Which of these NPC's have NOTHING to do with pets...?#b\r\n#L0#Cloy\r\n#L1#Mar the Fairy\r\n#L2#Trainer Frod\r\n#L3#Vicious\r\n#L4#Doofus"];
ans = [4, 1, 3, 1, 3];
rand = parseInt(Math.random() * quest.length);
/* Holy Stone
Holy Ground at the Snowfield (211040401)
3rd job advancement - Question trial.
*/
var questionTree = [
//Questions Related to CHARACTERS
["In MapleStory, what is the EXP needed to level up from Lv1 to Lv2?", ["20", "15", "4", "12", "16"], 1],
["In 1st job adv. which of the following is WRONG requirement?", ["Magician - Level 8", "Pirate - 20 DEX or more", "Archer - 25 DEX or more", "Thief - 20 LUK or more", "Swordman - 35 STR or more"], 3],
["When you hit by monster, which of the following is not fully explained?", ["Sealed - skills become disabled", "Undead - turns undead & halved recovery amounts", "Weaken - slow down moving speed", "Cursed - EXP received are decreased", "Stunned - cannot move"], 2],
["For the 1st job adv. Which job fully states the job adv. requirement?", ["Pirate - 25 LUK", "Magician - Level 10", "Thief - 25 LUK", "Warrior - 30 STR", "Bowman - 25 DEX"], 4],
//Questions Related to ITEMS
["Which of following monsters got CORRECT item corresponding to the monster?", ["Royal cactus - Needle", "Wild Boar - Boar fang", "Lazy Buffy - Buffy hat", "Chipmunk - Nut", "Stirge - Stirge's wing"], 4],
["Which of following monsters got WRONG item corresponding to the monster?", ["Greatest Oldies - Greatest oldies", "Nependeath - Nependeath's leaf", "Ghost stump - Seedling", "Sparker - Seal tooth", "Miner Zombie - Zombie's lost tooth"], 1],
["In GM Event, how many FRUIT CAKE you can get as reward?", ["20", "200", "5", "25", "100"], 2],
["Which of following potions got CORRECT info.?", ["Warrior Elixir - Attack +5 for 3 minutes", "Pure Water - Recover 700 MP", "Cake - Recover 150 HP & MP", "Salad - Recover 300 MP", "Pizza - Recover 400 HP"], 4],
["Which of following potions got WRONG info.?", ["Mana Elixir - Recover 300 MP", "Tonic - Cures state of weakness", "Apple - Recover 30 HP", "Sunrise Dew - Recover 3000 MP", "Ramen - Recover 1000 HP"], 3],
//Questions Related to MONSTERS
["Green Mushroom, Tree Stump, Bubbling, Axe Stump, Octopus, which is highest level of all?", ["Tree Stump", "Bubbling", "Axe Stump", "Octopus", "Green Mushroom"], 2],
["Which monster will be seen during the ship trip to Orbis/Ellinia?", ["Werewolf", "Slime", "Crimson Balrog", "Zakum", "Star Pixie"], 2],
["Maple Island doesn't have which following monsters?", ["Shroom", "Blue Snail", "Orange Mushroom", "Red Snail", "Pig"], 4],
["Which monster is not at Victoria Island and Sleepywood?", ["Evil Eye", "Sentinel", "Jr. Balrog", "Ghost Stump", "Snail"], 1],
["El Nath doesn't have which following monsters?", ["Dark Yeti", "Dark Ligator", "Yeti & Pepe", "Bain", "Coolie Zombie"], 1],
["Which of following monsters can fly?", ["Malady", "Ligator", "Cold Eye", "Meerkat", "Alishar"], 0],
["Which of these monsters will you NOT be facing in Ossyria?", ["Lunar Pixie", "Lioner", "Cellion", "Croco", "Hector"], 3],
["Which monster has not appeared in Maple Island?", ["Snail", "Shroom", "Evil Eye", "Orange Mushroom", "Blue Snail"], 2],
//Questions Related to QUESTS
["Which material doesn't need for awaken Hero's Gladius?", ["Flaming Feather", "Old Gladius", "Piece of Ice", "Ancient Scroll", "Fairy Wing"], 4],
["Which of following quests can be repeated?", ["Mystery of Niora Hospital", "Rightful Donation Culture", "The Ghost Whereabout", "Arwen and the Glass Shoe", "Maya and the Weird Medicine"], 3],
["Which of following are not 2nd job adv.?", ["Mage", "Cleric", "Assassin", "Gunslinger", "Fighter"], 0],
["Which of following is the highest level quest?", ["Cupid's Courier", "Lost in the Ocean", "Alcaster and the Dark Crystal", "Eliminating the Drumming Bunny", "War of Pang Pang"], 2],
//Questions Related to TOWN/NPC
["Which town is not at Victoria Island?", ["Florina Beach or Nautilus", "Amherst or Southperry", "Kerning City & Square", "Perion or Ellinia", "Sleepywood"], 1],
["Which is the first NPC you meet in Maple Island?", ["Sera", "Heena", "Lucas", "Roger", "Shanks"], 1],
["Which NPC cannot be seen in El Nath?", ["Vogen", "Sophia", "Pedro", "Master Sergeant Fox", "Rumi"], 1],
["Which NPC cannot be seen in El Nath snowfield?", ["Hidden Rock", "Glibber", "Jeff", "Holy Stone", "Elma the Housekeeper"], 4],
["Which NPC cannot be seen in Perion?", ["Ayan", "Sophia", "Mr. Smith", "Francois", "Manji"], 3],
["Which NPC cannot be seen in Henesys?", ["Teo", "Vicious", "Mia", "Doofus", "Casey"], 0],
["Which NPC cannot be seen in Ellinia?", ["Mr. Park", "Mar the Fairy", "Roel", "Ria", "Shane"], 2],
["Which NPC cannot be seen in Kerning City?", ["Dr. Faymus", "Mong from Kong", "Ervine", "Luke", "Nella"], 3],
["Which NPC is not related to pets?", ["Doofus", "Vicious", "Patricia", "Weaver", "Cloy"], 1],
["In Kerning City, who is the father of Alex, the runaway kid?", ["Chief Stan", "JM From tha Streetz", "Dr. Faymus", "Vicious", "Luke"], 0],
["Which NPC is not belong to Alpha Platoon's Network of Communication?", ["Staff Sergeant Charlie", "Sergeant Bravo", "Corporal Easy", "Master Sergeant Fox", "Peter"], 4],
["What do you receive in return from giving 30 Dark Marbles to the 2nd job advancement NPC?", ["Old Ring", "Memory Powder", "Fairy Dust", "Proof of Hero", "Scroll of Secrets"], 3],
["Which item you give Maya at Henesys in order to cure her sickness?", ["Apple", "Power Elixir", "Weird Medicine", "Chrysanthemum", "Orange Juice"], 2],
["Which of following NPC is not related to item synthesis/refine?", ["Neve", "Serryl", "Shane", "Francois", "JM From tha Streetz"], 2],
["Which NPC cannot be seen in Maple Island?", ["Bari", "Teo", "Pio", "Sid", "Maria"], 1],
["Who do you see in the monitor in the navigation room with Kyrin?", ["Lucas", "Dr. Kim", "Chief Stan", "Scadur", "Professor Foxwit"], 1],
["You know Athena Pierce in Henesys? What color are her eyes?", ["Blue", "Green", "Brown", "Red", "Black"], 1],
["How many feathers are there on Dances with Barlog's Hat?", ["7", "8", "3", "13", "16"], 3],
["What's the color of the marble Grendel the Really Old from Ellinia carries with him?", ["White", "Orange", "Blue", "Purple", "Green"], 2]
];
var status;
var question;
var unusedQuestions;
var unusedQuestionsCursor;
function start() {
if (cm.getPlayer().gotPartyQuestItem("JBQ") && !cm.haveItem(4031058))
if (cm.haveItem(4005004)) {
cm.sendNext("Alright... I'll be testing out your wisdom here. Answer all the questions correctly, and you will pass the test BUT, if you even lie to me once, then you'll have to start over again ok, here we go.");
return;
} else
cm.sendNext("Bring me a #b#t4005004##k to proceed with the questions.");
cm.dispose();
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
if (mode == -1) {
cm.dispose();
return;
}
if (status == 0)
cm.gainItem(4005004, -1);
if (status > 0)
if (selection != ans[rand]) {
cm.sendNext("You have failed the question.");
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
while (quest[rand].equals("") && status <= 4)
rand = parseInt(Math.random() * quest.length);
if (status <= 4) {
cm.sendSimple("Here's the " + (status + 1) + (status == 0 ? "st" : status == 1 ? "nd" : status == 2 ? "rd" : "th") + " question. " + quest[rand]);
quest[rand] = "";
} else {
cm.sendOk("Alright. All your answers have been proven as the truth. Your wisdom has been proven.\r\nTake this necklace and go back.");
cm.gainItem(4031058, 1);
cm.dispose();
if (mode == 1)
status++;
else
status--;
if(status == 0) {
if(cm.getPlayer().gotPartyQuestItem("JBQ") && !cm.haveItem(4031058, 1)) {
if(cm.haveItem(4005004, 1)) {
if(!cm.canHold(4031058)) {
cm.sendNext("Have a free ETC slot available before accepting this trial.");
cm.dispose();
} else {
instantiateUnusedQuestions();
cm.sendNext("Alright... I'll be testing out your wisdom here. Answer all the questions correctly, and you will pass the test BUT, if you even lie to me once, then you'll have to start over again ok, here we go.");
}
} else {
cm.sendNext("Bring me a #b#t4005004##k to proceed with the trial.");
cm.dispose();
}
} else {
cm.dispose();
}
} else if(status == 1) {
cm.gainItem(4005004, -1);
question = fetchNextQuestion();
var questionHead = generateQuestionHeading();
var questionEntry = questionTree[question][0];
var questionOptions = generateSelectionMenu(questionTree[question][1]);
cm.sendSimple(questionHead + questionEntry + "\r\n\r\n#b" + questionOptions + "#k");
} else if(status >= 2 && status <= 5) {
if(!evaluateAnswer(selection)) {
cm.sendNext("You have failed the question.");
cm.dispose();
return;
}
question = fetchNextQuestion();
var questionHead = generateQuestionHeading();
var questionEntry = questionTree[question][0];
var questionOptions = generateSelectionMenu(questionTree[question][1]);
cm.sendSimple(questionHead + questionEntry + "\r\n\r\n#b" + questionOptions + "#k");
} else if(status == 6) {
if(!evaluateAnswer(selection)) {
cm.sendNext("You have failed the question.");
cm.dispose();
return;
}
cm.sendOk("Alright. All your answers have been proven as the truth. Your wisdom has been proven.\r\nTake this necklace and go back.");
cm.gainItem(4031058, 1);
cm.dispose();
} else {
cm.sendOk("Unexpected branch.");
cm.dispose();
}
}
}
function evaluateAnswer(selection) {
return selection == questionTree[question][2];
}
function generateQuestionHeading() {
return "Here's the " + (status) + (status == 1 ? "st" : status == 2 ? "nd" : status == 3 ? "rd" : "th") + " question. ";
}
function shuffleArray(array) {
for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = array[j];
array[j] = temp;
}
}
function instantiateUnusedQuestions() {
unusedQuestions = [];
for(var i = 0; i < questionTree.length; i++) {
unusedQuestions.push(i);
}
shuffleArray(unusedQuestions);
unusedQuestionsCursor = 0;
}
function fetchNextQuestion() {
var next = unusedQuestions[unusedQuestionsCursor];
unusedQuestionsCursor++;
return next;
}
function generateSelectionMenu(array) { // nice tool for generating a string for the sendSimple functionality
var menu = "";
for (var i = 0; i < array.length; i++) {
menu += "#L" + i + "#" + array[i] + "#l\r\n";
}
return menu;
}
+66
View File
@@ -0,0 +1,66 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <[email protected]>
Matthias Butz <[email protected]>
Jan Christian Meyer <[email protected]>
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/>.
*/
status = -1;
//Need more questions.
quest = ["Which of these NPC's will you NOT see at Ellinia of Victoria Island#b\r\n#L0#Shane\r\n#L1#Francois\r\n#L2#Grendel the Really Old\r\n#L3#Arwen the Fairy\r\n#L4#Roel", "Which of these monsters will you NOT be facing at Ossyria...?#b\r\n#L0#White Fang\r\n#L1#Croco\r\n#L2#Yeti\r\n#L3#Lycanthrope\r\n#L4#Luster Pixie", "Which of these monsters have the highest level...?#b\r\n#L0#Octopus\r\n#L1#Ribbon Pig\r\n#L2#Green Mushroom\r\n#L3#Axe Stump\r\n#L4#Bubbling", "In MapleStory, which of these pairings of potion/results doesn't match...?#b\r\n#L0#Holy Water - Recover from the state of being cursed or sealed up.\r\n#L1#Sunrise Dew - Recover MP 3000\r\n#L2#Hamburger - Recover HP 400\r\n#L3#Salad - Recover MP 200\r\n#L4#Blue Potion - Recover MP 100", "Which of these NPC's have NOTHING to do with pets...?#b\r\n#L0#Cloy\r\n#L1#Mar the Fairy\r\n#L2#Trainer Frod\r\n#L3#Vicious\r\n#L4#Doofus"];
ans = [4, 1, 3, 1, 3];
rand = parseInt(Math.random() * quest.length);
function start() {
if (cm.getPlayer().gotPartyQuestItem("JBQ") && !cm.haveItem(4031058))
if (cm.haveItem(4005004)) {
if(!cm.canHold(4031058)) {
cm.sendNext("Have a free ETC slot available before accepting this trial.");
} else {
cm.sendNext("Alright... I'll be testing out your wisdom here. Answer all the questions correctly, and you will pass the test BUT, if you even lie to me once, then you'll have to start over again ok, here we go.");
return;
}
} else
cm.sendNext("Bring me a #b#t4005004##k to proceed with the questions.");
cm.dispose();
}
function action(mode, type, selection) {
status++;
if (mode != 1) {
cm.dispose();
return;
}
if (status == 0)
cm.gainItem(4005004, -1);
if (status > 0)
if (selection != ans[rand]) {
cm.sendNext("You have failed the question.");
cm.dispose();
return;
}
while (quest[rand].equals("") && status <= 4)
rand = parseInt(Math.random() * quest.length);
if (status <= 4) {
cm.sendSimple("Here's the " + (status + 1) + (status == 0 ? "st" : status == 1 ? "nd" : status == 2 ? "rd" : "th") + " question. " + quest[rand]);
quest[rand] = "";
} else {
cm.sendOk("Alright. All your answers have been proven as the truth. Your wisdom has been proven.\r\nTake this necklace and go back.");
cm.gainItem(4031058, 1);
cm.dispose();
}
}
+13 -13
View File
@@ -22,17 +22,17 @@
var status = 0;
var eQuestChoices = new Array (4000064,4000065,4000066,4000075,4000077,4000089,4000090,4000091,4000092,4000093,4000094);
var eQuestPrizes = new Array();
eQuestPrizes[0] = new Array ([2000000,1],[2000006,1],[2000003,5],[2000002,5],[4020006,2],[4020000,2],[4020004,2],[2000003,10],[2000003,20],[2000002,10],[2000002,20],[2022026,15],[2022024,15],[1002393,1]); // Pink Bandana
eQuestPrizes[1] = new Array ([2000006,1],[2000002,5],[4020006,2],[2000002,10],[2000003,10],[2000002,20],[2000003,20],[2022024,15],[2022026,15]); // Yakisoba
eQuestPrizes[2] = new Array ([2000006,1],[2000002,5],[2000003,5],[4020000,2],[2000003,10],[2000002,10],[2000003,20],[2000002,20],[2022024,15],[1002393,1]); // Pink Bandana
eQuestPrizes[3] = new Array ([2060003,1000],[4010004,2],[4010006,2],[2022022,5],[2022022,10],[2022022,15],[2022019,5],[2022019,10],[2022019,15],[2001002,15],[2001001,15],[1102040,1],[1102043,1]); // Brown Adventurer Cape
eQuestPrizes[4] = new Array ([2000003,1],[2022019,5],[2000006,5],[4010002,2],[4010003,2],[2000006,10],[2000006,15],[2022019,10],[2022019,15],[2060003,1000],[2061003,1000],[1082150,1],[1082149,1]); // Brown Work Gloves
eQuestPrizes[5] = new Array ([2000006,1],[2000003,5],[2000002,5],[2000003,10],[2000003,20],[2000002,10],[2000002,15],[2060003,1000],[2061003,1000], [2022026,15],[1002395,1]);
eQuestPrizes[6] = new Array ([2022019,5],[2000006,5],[4010003,2],[2022019,10],[2022019,15],[2000006,10],[2000006,15],[2060003,1000],[2061003,1000]); // Blue Arrow for Crossbow
eQuestPrizes[7] = new Array ([2000003,1], [2000006,1],[2022019,1],[2000006,5],[4010002,2],[4020001,2],[2022019,10],[2022019,15],[2000006,10],[2000006,15],[2060003,1000],[2061003,1000]);
eQuestPrizes[8] = new Array ([2022019,5],[2022022,5],[4010006,2],[2022019,10],[2022019,15],[2022022,10],[2022022,15],[2001002,15],[2001001,15],[1102043,1]); // Brown Adventurer Cape
eQuestPrizes[9] = new Array ([4010004,5],[2022019,5],[2022022,15],[2022019,15],[2001002,15],[2001001,15],[1102043,1]); // Brown Adventurer Cape
eQuestPrizes[10] = new Array([2000006,1],[4020008,15],[2022018,5],[2022018,10],[2022018,15],[2022000,10],[2022000,20],[2022025,15]); // Takoyaki (Jumbo)
eQuestPrizes[0] = new Array ([2000000,1],[2000006,1],[2000003,5],[2000002,5],[4020006,2],[4020000,2],[4020004,2],[2000003,10],[2000003,20],[2000002,10],[2000002,20],[2022026,15],[2022024,15],[1002393,1]); // Crow feather
eQuestPrizes[1] = new Array ([2000006,1],[2000002,5],[4020006,2],[2000002,10],[2000003,10],[2000002,20],[2000003,20],[2022024,15],[2022026,15]); // Raccoon firewood
eQuestPrizes[2] = new Array ([2000006,1],[2000002,5],[2000003,5],[4020000,2],[2000003,10],[2000002,10],[2000003,20],[2000002,20],[2022024,15],[1002393,1]); // Cloud foxtail
eQuestPrizes[3] = new Array ([2060003,1000],[4010004,2],[4010006,2],[2022022,5],[2022022,10],[2022022,15],[2022019,5],[2022019,10],[2022019,15],[2001002,15],[2001001,15],[1102040,1],[1102043,1]); // Tringular bandana of the nightghost
eQuestPrizes[4] = new Array ([2000003,1],[2022019,5],[2000006,5],[4010002,2],[4010003,2],[2000006,10],[2000006,15],[2022019,10],[2022019,15],[2060003,1000],[2061003,1000],[1082150,1],[1082149,1]); // Dark cloud foxtail
eQuestPrizes[5] = new Array ([2000006,1],[2000003,5],[2000002,5],[2000003,10],[2000003,20],[2000002,10],[2000002,15],[2060003,1000],[2061003,1000],[2022026,15],[1002395,1]); // Littleman A's badge
eQuestPrizes[6] = new Array ([2022019,5],[2000006,5],[4010003,2],[2022019,10],[2022019,15],[2000006,10],[2000006,15],[2060003,1000],[2061003,1000]); // Littleman B's name plate
eQuestPrizes[7] = new Array ([2000003,1], [2000006,1],[2022019,1],[2000006,5],[4010002,2],[4020001,2],[2022019,10],[2022019,15],[2000006,10],[2000006,15],[2060003,1000],[2061003,1000]); // Littleman C's necklace
eQuestPrizes[8] = new Array ([2022019,5],[2022022,5],[4010006,2],[2022019,10],[2022019,15],[2022022,10],[2022022,15],[2001002,15],[2001001,15],[1102043,1]); // Leader A's shades
eQuestPrizes[9] = new Array ([4010004,5],[2022019,5],[2022022,15],[2022019,15],[2001002,15],[2001001,15],[1102043,1]); // Leader B's charm
eQuestPrizes[10] = new Array([1102207,1],[1442026,1],[1302037,1],[2070007,1],[2340000,1],[2330005,1],[2022060,25],[2022061,20],[2022062,15]); // Boss pomade
var requiredItem = 0;
var lastSelection = 0;
var prizeItem = 0;
@@ -73,10 +73,10 @@ function action(mode, type, selection) {
prizeQuantity = reward[itemSet][1];
if (!cm.canHold(prizeItem)){
cm.sendNext("I can't give you the reward if your equip, use, or etc. inventory is full. Please go take a look right now.");
} else if (hasItem(requiredItem, 100)){ // check they have >= 100 in Inventory
} else if (cm.hasItem(requiredItem, 100)){ // check they have >= 100 in Inventory
cm.gainItem(requiredItem,-100);
cm.gainItem(prizeItem,prizeQuantity);
cm.sendOk("Hmmm ... if not for this minor scratch ... sigh. I'm afaird I can only deem this a standard-quality item. Well, here's \r\n#t"+ prizeItem +"# for you.");
cm.sendOk("Hmmm ... if not for this minor scratch ... sigh. I'm afraid I can only deem this a standard-quality item. Well, here's \r\n#t"+ prizeItem +"# for you.");
} else{
cm.sendOk("Hey, what do you think you're doing? Go lie to someone that DOESN'T know what he's talking about. Not me!");
}
+3 -3
View File
@@ -11431,7 +11431,7 @@ INSERT IGNORE INTO `temp_data` (`id`, `dropperid`, `itemid`, `minimum_quantity`,
(11209, 9001001, 4031059, 1, 1, 0, 999999),
(11210, 9001002, 4031059, 1, 1, 0, 999999),
(11211, 9001003, 4031059, 1, 1, 0, 999999),
(11212, 9001008, 4031059, 1, 1, 0, 499999),
(11212, 9001004, 4031059, 1, 1, 0, 999999),
(11213, 9001005, 4031857, 1, 1, 0, 300000),
(11214, 9001012, 4032311, 1, 1, 0, 300000),
(11215, 9001012, 4032311, 1, 1, 0, 300000),
@@ -20045,7 +20045,7 @@ INSERT INTO `shopitems` (`shopitemid`, `shopid`, `itemid`, `price`, `pitch`, `po
(2657, 9120002, 2001001, 2300, 0, 132),
(2658, 9120002, 2000002, 320, 0, 136),
(2659, 9120002, 2000001, 160, 0, 140),
(2660, 9120002, 2060003, 40, 0, 144),
(2660, 9120002, 2060003, 40, 0, 100),
(2661, 9120004, 2070000, 500, 0, 104),
(2662, 9120004, 2030010, 500, 0, 108),
(2663, 9120004, 2030009, 500, 0, 112),
@@ -21323,7 +21323,7 @@ INSERT INTO `shopitems` ( `shopid`, `itemid`, `price`, `position`) VALUES
(1052116, 2000002, 320, 212),
(1052116, 2000001, 160, 216),
(1052116, 2000000, 50, 220),
(9120002, 2061003, 40, 100),
(9120002, 2061003, 40, 96),
(2030009, 2022001, 700, 100),
(1337, 1912005, 1, 35),
(1337, 1902005, 1, 36),
+104 -22
View File
@@ -19771,28 +19771,27 @@ USE `heavenms`;
(9300347, 4001272, 1, 1, 0, 400000),
(9300347, 4032324, 1, 1, 21736, 40000),
(9300344, 4032322, 1, 1, 21731, 999999),
(3400008, 1302008, 1, 1, 0, 8500),
(3400008, 1412004, 1, 1, 0, 8500),
(3400008, 1422007, 1, 1, 0, 8500),
(3400008, 1442009, 1, 1, 0, 8500),
(3400008, 1332010, 1, 1, 0, 8500),
(3400008, 1372001, 1, 1, 0, 8500),
(3400008, 1382002, 1, 1, 0, 8500),
(3400008, 1002013, 1, 1, 0, 8500),
(3400008, 1002152, 1, 1, 0, 8500),
(3400008, 1061047, 1, 1, 0, 8500),
(3400008, 1072090, 1, 1, 0, 8500),
(3400008, 1002137, 1, 1, 0, 8500),
(3400008, 1040023, 1, 1, 0, 8500),
(3400008, 1040072, 1, 1, 0, 8500),
(3400008, 1060062, 1, 1, 0, 8500),
(3400008, 1082049, 1, 1, 0, 8500),
(3400008, 1082072, 1, 1, 0, 8500),
(3400008, 1072081, 1, 1, 0, 8500),
(3400008, 1332031, 1, 1, 0, 8500),
(3400008, 1482003, 1, 1, 0, 8500),
(3400008, 1302008, 1, 1, 0, 4200),
(3400008, 1412004, 1, 1, 0, 4200),
(3400008, 1422007, 1, 1, 0, 4200),
(3400008, 1442009, 1, 1, 0, 4200),
(3400008, 1332010, 1, 1, 0, 4200),
(3400008, 1372001, 1, 1, 0, 4200),
(3400008, 1382002, 1, 1, 0, 4200),
(3400008, 1002013, 1, 1, 0, 4200),
(3400008, 1002152, 1, 1, 0, 4200),
(3400008, 1061047, 1, 1, 0, 4200),
(3400008, 1072090, 1, 1, 0, 4200),
(3400008, 1002137, 1, 1, 0, 4200),
(3400008, 1040023, 1, 1, 0, 4200),
(3400008, 1040072, 1, 1, 0, 4200),
(3400008, 1060062, 1, 1, 0, 4200),
(3400008, 1082049, 1, 1, 0, 4200),
(3400008, 1082072, 1, 1, 0, 4200),
(3400008, 1072081, 1, 1, 0, 4200),
(3400008, 1332031, 1, 1, 0, 4200),
(3400008, 1482003, 1, 1, 0, 4200),
(3400008, 4032508, 1, 1, 2273, 80000),
(8140101, 4032511, 1, 1, 3718, 60000),
(8140102, 4032511, 1, 1, 3718, 60000),
(8140103, 4032511, 1, 1, 3718, 60000),
@@ -20101,7 +20100,90 @@ USE `heavenms`;
(9400748, 1002858, 1, 1, 0, 40000),
(9400748, 1002859, 1, 1, 0, 40000),
(9400748, 1002860, 1, 1, 0, 40000),
(9400748, 1002861, 1, 1, 0, 80000);
(9400748, 1002861, 1, 1, 0, 80000),
(9400001, 0, 56, 84, 0, 400000),
(9400001, 4000065, 1, 1, 0, 400000),
(9400001, 4130013, 1, 1, 0, 7000),
(9400001, 4130002, 1, 1, 0, 7000),
(9400001, 4130001, 1, 1, 0, 7000),
(9400001, 1332020, 1, 1, 0, 800),
(9400001, 1032004, 1, 1, 0, 1000),
(9400001, 1442021, 1, 1, 0, 700),
(9400001, 1432016, 1, 1, 0, 700),
(9400001, 1322015, 1, 1, 0, 800),
(9400001, 1322010, 1, 1, 0, 800),
(9400001, 1322011, 1, 1, 0, 800),
(9400001, 1072076, 1, 1, 0, 800),
(9400001, 1072077, 1, 1, 0, 800),
(9400001, 1041067, 1, 1, 0, 800),
(9400001, 1041068, 1, 1, 0, 800),
(9400001, 1060063, 1, 1, 0, 800),
(9400001, 1060064, 1, 1, 0, 800),
(9400001, 1051008, 1, 1, 0, 800),
(9400001, 4010006, 1, 1, 0, 7000),
(9400001, 4020004, 1, 1, 0, 9000),
(9400001, 2022020, 1, 1, 0, 32000),
(9400001, 2022023, 1, 1, 0, 32000),
(9400001, 2022024, 1, 1, 0, 32000),
(9400001, 2040404, 1, 1, 0, 1000),
(9400001, 2044205, 1, 1, 0, 1000),
(9400004, 1302025, 1, 1, 0, 800),
(9400004, 1032011, 1, 1, 0, 800),
(9400004, 1402014, 1, 1, 0, 800),
(9400004, 1060077, 1, 1, 0, 800),
(9400004, 1382001, 1, 1, 0, 800),
(9400004, 1061080, 1, 1, 0, 800),
(9400004, 1061079, 1, 1, 0, 800),
(9400004, 0, 148, 222, 0, 400000),
(9400004, 4000077, 1, 1, 0, 400000),
(9400004, 4130008, 1, 1, 0, 7000),
(9400004, 4130009, 1, 1, 0, 7000),
(9400004, 4130010, 1, 1, 0, 7000),
(9400004, 4010002, 1, 1, 0, 7000),
(9400004, 4020002, 1, 1, 0, 7000),
(9400004, 4020007, 1, 1, 0, 9000),
(9400004, 4004004, 1, 1, 0, 9000),
(9400004, 2022019, 1, 1, 0, 32000),
(9400004, 2022022, 1, 1, 0, 32000),
(9400004, 2022026, 1, 1, 0, 32000),
(9400004, 2070004, 1, 1, 0, 400),
(9400004, 2040510, 1, 1, 0, 1000),
(9400004, 2043305, 1, 1, 0, 1000),
(9400114, 1122001, 5, 5, 0, 20000),
(9400114, 1122002, 1, 2, 0, 20000),
(9400114, 1122003, 5, 5, 0, 20000),
(9400114, 1122004, 2, 3, 0, 20000),
(9400114, 1122005, 1, 2, 0, 20000),
(9400114, 1122006, 2, 3, 0, 20000),
(9400114, 1012181, 3, 4, 0, 20000),
(9400114, 1012182, 2, 2, 0, 20000),
(9400114, 1012183, 1, 2, 0, 20000),
(9400114, 1112407, 3, 4, 0, 20000),
(9400114, 1112408, 3, 4, 0, 20000),
(9400114, 1132005, 3, 4, 0, 20000),
(9400114, 1132006, 2, 3, 0, 20000),
(9400114, 1132007, 2, 2, 0, 20000),
(9400114, 1132008, 2, 2, 0, 20000),
(9400114, 1132009, 1, 1, 0, 20000),
(9400114, 1102084, 2, 2, 0, 20000),
(9400114, 1102085, 2, 2, 0, 20000),
(9400114, 1102086, 2, 2, 0, 20000),
(9400114, 1102087, 2, 2, 0, 20000),
(9400114, 1402013, 1, 1, 0, 50000),
(9400114, 1332030, 1, 1, 0, 50000),
(9400114, 1032030, 1, 1, 0, 40000),
(9400114, 1032070, 1, 1, 0, 40000),
(9400114, 4005000, 1, 1, 0, 70000),
(9400114, 4005001, 1, 1, 0, 70000),
(9400114, 4005002, 1, 1, 0, 70000),
(9400114, 4005003, 1, 1, 0, 70000),
(9400114, 4005004, 1, 1, 0, 70000),
(9400114, 2022015, 10, 30, 0, 200000),
(9400114, 2022016, 10, 30, 0, 200000),
(9400114, 2022063, 10, 30, 0, 200000),
(9400114, 2022064, 10, 30, 0, 200000),
(9400120, 4000094, 1, 1, 0, 400000),
(9400122, 4000094, 1, 1, 0, 400000);
# (dropperid, itemid, minqty, maxqty, questid, chance)
+14 -2
View File
@@ -166,7 +166,7 @@ INSERT IGNORE INTO `shopitems` (`shopid`, `itemid`, `price`, `pitch`, `position`
(9270022, 2030100, 450, 0, 118);
# Thanks to Vcoc
# GMShop: Sacks, GmEquip, Cheese & Onix, Utils,
# GMShop: Sacks, GmEquip, Cheese & Onyx, Utils,
# Arrows, Bullets, Throwings and Capsules,
# Others, Equips, Mounts, Scrolls.
@@ -335,4 +335,16 @@ INSERT INTO `shopitems` ( `shopid`, `itemid`, `price`, `pitch`, `position`) VALU
(1301000, 2000003, 200, 0, 160),
(1301000, 2000002, 320, 0, 164),
(1301000, 2000015, 160, 0, 168),
(1301000, 2000000, 50, 0, 172);
(1301000, 2000000, 50, 0, 172);
# adding missing pirate items at Singapore npc's
INSERT INTO `shopitems` ( `shopid`, `itemid`, `price`, `pitch`, `position`) VALUES
(9270019, 1492006, 160000, 0, 80),
(9270019, 1492005, 100000, 0, 84),
(9270019, 1492004, 75000, 0, 88),
(9270019, 1482006, 150000, 0, 92),
(9270019, 1482005, 100000, 0, 96),
(9270019, 1482004, 75000, 0, 100),
(9270020, 1052113, 120000, 0, 92),
(9270020, 1052110, 100000, 0, 96),
(9270020, 1002625, 75000, 0, 100);
+1
View File
@@ -923,6 +923,7 @@ public class Commands {
case "cleardrops":
player.getMap().clearDrops(player);
player.dropMessage(5, "Cleared dropped items");
break;
case "clearslot":
@@ -28,6 +28,7 @@ import tools.MaplePacketCreator;
import tools.data.input.SeekableLittleEndianAccessor;
public final class MonsterBombHandler extends AbstractMaplePacketHandler {
@Override
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
int oid = slea.readInt();
MapleMonster monster = c.getPlayer().getMap().getMonsterByOid(oid);
@@ -271,10 +271,8 @@ public class EventInstanceManager {
}
public void dropMessage(int type, String message) {
if(!eventCleared) {
for (MapleCharacter chr : getPlayers()) {
chr.dropMessage(type, message);
}
for (MapleCharacter chr : getPlayers()) {
chr.dropMessage(type, message);
}
}
+11 -11
View File
@@ -114,11 +114,11 @@ public class EventManager {
try {
return convertToIntegerArray((List<Double>)iv.invokeFunction("setLobbyRange", (Object) null));
} catch (ScriptException | NoSuchMethodException ex) { // they didn't define a lobby range
List<Integer> defaultList = new ArrayList<>();
defaultList.add(0);
defaultList.add(maxLobbys);
List<Integer> defaultRange = new ArrayList<>();
defaultRange.add(0);
defaultRange.add(maxLobbys);
return defaultList;
return defaultRange;
}
}
@@ -502,13 +502,13 @@ public class EventManager {
private static String ordinal(int i) {
String[] sufixes = new String[] { "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th" };
switch (i % 100) {
case 11:
case 12:
case 13:
return i + "th";
default:
return i + sufixes[i % 10];
case 11:
case 12:
case 13:
return i + "th";
default:
return i + sufixes[i % 10];
}
}
+21 -3
View File
@@ -3364,13 +3364,31 @@ public class MaplePacketCreator {
return mplew.getPacket();
}
public static byte[] customShowBossHP(byte call, int oid, int currHP, int maxHP, byte tagColor, byte tagBgColor) {
private static Pair<Integer, Integer> normalizedCustomMaxHP(long currHP, long maxHP) {
int sendHP, sendMaxHP;
if(maxHP <= Integer.MAX_VALUE) {
sendHP = (int) currHP;
sendMaxHP = (int) maxHP;
} else {
float f = ((float) currHP) / maxHP;
sendHP = (int) (Integer.MAX_VALUE * f);
sendMaxHP = Integer.MAX_VALUE;
}
return new Pair<>(sendHP, sendMaxHP);
}
public static byte[] customShowBossHP(byte call, int oid, long currHP, long maxHP, byte tagColor, byte tagBgColor) {
Pair<Integer, Integer> customHP = normalizedCustomMaxHP(currHP, maxHP);
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.FIELD_EFFECT.getValue());
mplew.write(call);
mplew.writeInt(oid);
mplew.writeInt(currHP);
mplew.writeInt(maxHP);
mplew.writeInt(customHP.left);
mplew.writeInt(customHP.right);
mplew.write(tagColor);
mplew.write(tagBgColor);
return mplew.getPacket();
+73
View 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="MapleBossHpBarFetcher" default="default" basedir=".">
<description>Builds, tests, and runs the project MapleBossHpBarFetcher.</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="MapleBossHpBarFetcher-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>
@@ -0,0 +1,14 @@
# Report File autogenerated from the MapleBossHpBarFetcher feature by Ronan Lana.
# Generated data takes into account several data info from the server-side WZ.xmls.
Missing 'isBoss' on id: 3300005
Missing 'isBoss' on id: 3300006
Missing 'isBoss' on id: 3300007
Missing 'isBoss' on id: 8820010
Missing 'isBoss' on id: 8820011
Missing 'isBoss' on id: 8820012
Missing 'isBoss' on id: 8820013
Missing 'isBoss' on id: 8820014
Missing 'isBoss' on id: 8830003
Missing 'isBoss' on id: 8830010
Missing 'isBoss' on id: 9001008
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
build.xml.data.CRC32=55ba2920
build.xml.script.CRC32=0d90f850
build.xml.stylesheet.CRC32=[email protected]
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=55ba2920
nbproject/build-impl.xml.script.CRC32=bcc6d523
nbproject/build-impl.xml.stylesheet.CRC32=[email protected]
@@ -0,0 +1,79 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=MapleBossHpBarFetcher
application.vendor=USER
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# Os arquivos em build.classes.dir que devem ser exclu\u00eddos do jar de distribui\u00e7\u00e3o
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/MapleBossHpBarFetcher.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.commons-io-2.6.jar=lib/commons-io-2.6.jar
file.reference.mysql-connector-java-bin.jar=../../cores/mysql-connector-java-bin.jar
includes=**
jar.compress=false
javac.classpath=\
${file.reference.mysql-connector-java-bin.jar}:\
${file.reference.commons-io-2.6.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.7
javac.target=1.7
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=maplebosshpbarfetcher.MapleBossHpBarFetcher
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=JDK_1.7
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>MapleBossHpBarFetcher</name>
<explicit-platform explicit-source-supported="true"/>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
</configuration>
</project>
@@ -0,0 +1,240 @@
/*
This file is part of the HeavenMS (MapleSolaxiaV2) MapleStory Server
Copyleft (L) 2017 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 maplebosshpbarfetcher;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.sql.Connection;
import java.util.LinkedList;
import java.util.List;
import java.io.File;
/**
*
* @author RonanLana
This application parses the Mob.wz file inputted and generates a report showing
all cases where a mob has a boss HP bar and doesn't have a "boss" label.
Running it should generate a report file under "lib" folder with the search results.
*/
public class MapleBossHpBarFetcher {
static String mobDirectory = "../../wz/Mob.wz/";
static String newFile = "lib/Report.txt";
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 byte status = 0;
static int curBoss;
static int curHpTag;
static int curMobId;
static List<Integer> missingBosses = new LinkedList<>();
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
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;
}
}
private static void readMobLabel(String token) {
String name = getName(token);
String value = getValue(token);
switch(name) {
case "boss":
curBoss = Integer.parseInt(value);
break;
case "hpTagColor":
curHpTag = Integer.parseInt(value);
break;
}
}
private static void processMobData() {
if(curHpTag != Integer.MAX_VALUE && curBoss == Integer.MAX_VALUE) {
missingBosses.add(curMobId);
}
}
private static void translateToken(String token) {
String d;
if(token.contains("/imgdir")) {
status -= 1;
if(status == 1) {
processMobData();
}
}
else if(token.contains("imgdir")) {
if(status == 0) {
String mobText = getName(token);
curMobId = Integer.valueOf(mobText.substring(0, mobText.lastIndexOf('.')));
}
else if(status == 1) { //getting info
d = getName(token);
if(!d.contentEquals("info")) {
forwardCursor(status);
} else {
curBoss = Integer.MAX_VALUE;
curHpTag = Integer.MAX_VALUE;
}
}
else if(status == 2) {
forwardCursor(status);
}
status += 1;
}
else {
if(status == 2) { //info tags
readMobLabel(token);
}
}
}
private static void readBossHpBarData() throws IOException {
String line;
File folder = new File(mobDirectory);
for(File file : folder.listFiles()) {
if (file.isFile()) {
fileReader = new InputStreamReader(new FileInputStream(file), "UTF-8");
bufferedReader = new BufferedReader(fileReader);
while((line = bufferedReader.readLine()) != null) {
translateToken(line);
}
bufferedReader.close();
fileReader.close();
}
}
}
private static void printReportFileHeader() {
printWriter.println(" # Report File autogenerated from the MapleBossHpBarFetcher feature by Ronan Lana.");
printWriter.println(" # Generated data takes into account several data info from the server-side WZ.xmls.");
printWriter.println();
}
private static void printReportFileResults() {
for(Integer mid : missingBosses) {
printWriter.println("Missing 'isBoss' on id: " + mid);
}
}
private static void ReportBossHpBarData() {
// This will reference one line at a time
try {
System.out.println("Reading WZs...");
readBossHpBarData();
System.out.println("Reporting results...");
printWriter = new PrintWriter(newFile, "UTF-8");
printReportFileHeader();
printReportFileResults();
printWriter.close();
System.out.println("Done!");
}
catch(FileNotFoundException ex) {
System.out.println("Unable to open mob file.");
}
catch(IOException ex) {
System.out.println("Error reading mob file.");
}
catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
ReportBossHpBarData();
}
}
Binary file not shown.
+25 -24
View File
@@ -1,24 +1,25 @@
Gladius
Niam
Titan
Crescent Polearm
Iron Dagger
White Crusader Chainmail (Male)
Wizard Wand
Wizard Staff
Golden Pride
Blue Guiltian
Red Amorian Skirt (Female)
Red Salt Shoes
Green Pole-Feather Hat
Black Bennis Chainmail (Male)
Red Legolier (Male)
Blue Legolier Pants (Male)
Green Marker
Gold Brace
Green Hunter Boots
Dragon Toenail
Rouge Way
Guardian Katara
Justice Katara
Norman Grip
Dark Cloud Foxtail
Pole Arm Forging Stimulator
Spear Forging Stimulator
Wand Production Stimulator
Red Umbrella
Blue Moon
Thermometer
Oaker Shouldermail Pants
Arc Staff
White Piettra Skirt
Red Moon Pants
Mithril Ore
Aquamarine Ore
Diamond Ore
Dark Crystal Ore
Kinoko Ramen (Pig Head)
Yakisoba
Fish Cake (Dish)
Tobi Throwing-Star
Dark Scroll for Overall Armor for DEF 70%
Dark Scroll for Dagger for ATT 30%
+26 -20
View File
@@ -1,20 +1,26 @@
1302008
1412004
1422007
1442009
1332010
1372001
1382002
1002013
1002152
1061047
1072090
1002137
1040023
1040072
1060062
1082049
1082072
1072081
1332031
1482003
4000077
4130009
4130008
4130010
1302025
1032011 1041078
1402014
1060077
1382001 1382020 1382025 1382030
1061080
1061079
4010002
4020002
4020007
4004004
2022019
2022026
2022022
2070004 *
2040510
2043305
@@ -2,6 +2,8 @@
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group/>
<group>
<file>file:/C:/Nexon/MapleSolaxia/HeavenMS/tools/MapleIdRetriever/src/mapleidretriever/MapleIdRetriever.java</file>
</group>
</open-files>
</project-private>
@@ -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="MapleQuestItemCountFetcher" default="default" basedir=".">
<description>Builds, tests, and runs the project MapleQuestItemCountFetcher.</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="MapleQuestItemCountFetcher-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>
@@ -0,0 +1,22 @@
# Report File autogenerated from the MapleQuestItemCountFetcher feature by Ronan Lana.
# Generated data takes into account several data info from the server-side WZ.xmls.
Questid 2167 : Itemid 4031841 should have qty -1
Questid 1018 : Itemid 4000142 should have qty -1
Questid 6361 : Itemid 4031870 should have qty -1
Questid 6360 : Itemid 4031869 should have qty -1
Questid 10430 : Itemid 4220152 should have qty -1
Questid 6390 : Itemid 4031874 should have qty -50
Questid 2173 : Itemid 4031846 should have qty -1
Questid 2169 : Itemid 4031843 should have qty -1
Questid 2168 : Itemid 4031842 should have qty -1
Questid 2185 : Itemid 4031852 should have qty -1
Questid 6380 : Itemid 4031873 should have qty -50
Questid 6350 : Itemid 4031871 should have qty -50
Questid 2052 : Itemid 4031025 should have qty -10
Questid 2053 : Itemid 4031026 should have qty -20
Questid 2054 : Itemid 4031028 should have qty -30
Questid 6340 : Itemid 4031872 should have qty -50
Questid 28120 : Itemid 4032306 should have qty -4
Questid 2180 : Itemid 4031850 should have qty -1
Questid 2183 : Itemid 4031851 should have qty -1
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
build.xml.data.CRC32=012f695b
build.xml.script.CRC32=254e2ce9
build.xml.stylesheet.CRC32=[email protected]
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=012f695b
nbproject/build-impl.xml.script.CRC32=fa2290c4
nbproject/build-impl.xml.stylesheet.CRC32=[email protected]
@@ -0,0 +1,79 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=MapleQuestItemCountFetcher
application.vendor=USER
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# Os arquivos em build.classes.dir que devem ser exclu\u00eddos do jar de distribui\u00e7\u00e3o
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/MapleQuestItemCountFetcher.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.commons-io-2.6.jar=lib/commons-io-2.6.jar
file.reference.mysql-connector-java-bin.jar=../../cores/mysql-connector-java-bin.jar
includes=**
jar.compress=false
javac.classpath=\
${file.reference.mysql-connector-java-bin.jar}:\
${file.reference.commons-io-2.6.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.7
javac.target=1.7
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=maplequestitemcountfetcher.MapleQuestItemCountFetcher
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=JDK_1.7
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>MapleQuestItemCountFetcher</name>
<explicit-platform explicit-source-supported="true"/>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
</configuration>
</project>
@@ -0,0 +1,331 @@
/*
This file is part of the HeavenMS (MapleSolaxiaV2) MapleStory Server
Copyleft (L) 2017 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 maplequestitemcountfetcher;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import java.util.LinkedHashMap;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.HashSet;
import java.util.Set;
/**
*
* @author RonanLana
This application parses the Quest.wz file inputted and generates a report showing
all cases where a quest requires an item, but doesn't take them, which may happen
because the node representing the item doesn't have a "count" clause.
Running it should generate a report file under "lib" folder with the search results.
*/
public class MapleQuestItemCountFetcher {
static String actName = "../../wz/Quest.wz/Act.img.xml";
static String checkName = "../../wz/Quest.wz/Check.img.xml";
static String directoryName = "../..";
static String newFile = "lib/QuestReport.txt";
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 byte status = 0;
static int questId = -1;
static int isCompleteState = 0;
static int curItemId;
static int curItemCount;
static Map<Integer, Map<Integer, Integer>> checkItems = new HashMap<>();
static Map<Integer, Map<Integer, Integer>> actItems = new HashMap<>();
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
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;
}
}
private static void readItemLabel(String token) {
String name = getName(token);
String value = getValue(token);
switch(name) {
case "id":
curItemId = Integer.parseInt(value);
break;
case "count":
curItemCount = Integer.parseInt(value);
break;
}
}
private static void commitQuestItemPair(Map<Integer, Map<Integer, Integer>> map) {
Map<Integer, Integer> list = map.get(questId);
if(list == null) {
list = new LinkedHashMap<>();
map.put(questId, list);
}
list.put(curItemId, curItemCount);
}
private static void translateTokenAct(String token) {
String d;
if(token.contains("/imgdir")) {
status -= 1;
if(status == 4) {
if(curItemCount == Integer.MAX_VALUE && isCompleteState == 1) {
commitQuestItemPair(actItems);
}
}
}
else if(token.contains("imgdir")) {
if(status == 1) { //getting QuestId
d = getName(token);
questId = Integer.parseInt(d);
}
else if(status == 2) { //start/complete
d = getName(token);
isCompleteState = Integer.parseInt(d);
}
else if(status == 3) {
if(!token.contains("item")) {
forwardCursor(status);
}
}
else if(status == 4) {
curItemId = Integer.MAX_VALUE;
curItemCount = Integer.MAX_VALUE;
}
status += 1;
}
else {
if(status == 5) {
readItemLabel(token);
}
}
}
private static void translateTokenCheck(String token) {
String d;
if(token.contains("/imgdir")) {
status -= 1;
if(status == 4) {
Map<Integer, Integer> missedItems = actItems.get(questId);
if(missedItems != null && missedItems.containsKey(curItemId) && isCompleteState == 1) {
commitQuestItemPair(checkItems);
}
}
}
else if(token.contains("imgdir")) {
if(status == 1) { //getting QuestId
d = getName(token);
questId = Integer.parseInt(d);
}
else if(status == 2) { //start/complete
d = getName(token);
isCompleteState = Integer.parseInt(d);
}
else if(status == 3) {
if(!token.contains("item")) {
forwardCursor(status);
}
}
else if(status == 4) {
curItemId = Integer.MAX_VALUE;
curItemCount = Integer.MAX_VALUE;
}
status += 1;
}
else {
if(status == 5) {
readItemLabel(token);
}
}
}
private static void readQuestItemCountData() throws IOException {
String line;
fileReader = new InputStreamReader(new FileInputStream(actName), "UTF-8");
bufferedReader = new BufferedReader(fileReader);
while((line = bufferedReader.readLine()) != null) {
translateTokenAct(line);
}
bufferedReader.close();
fileReader.close();
fileReader = new InputStreamReader(new FileInputStream(checkName), "UTF-8");
bufferedReader = new BufferedReader(fileReader);
while((line = bufferedReader.readLine()) != null) {
translateTokenCheck(line);
}
bufferedReader.close();
fileReader.close();
}
private static void printReportFileHeader() {
printWriter.println(" # Report File autogenerated from the MapleQuestItemCountFetcher feature by Ronan Lana.");
printWriter.println(" # Generated data takes into account several data info from the server-side WZ.xmls.");
printWriter.println();
}
private static void printReportFileResults() {
List<Pair<Integer, Pair<Integer, Integer>>> reports = new ArrayList<>();
List<Pair<Integer, Integer>> notChecked = new ArrayList<>();
for(Entry<Integer, Map<Integer, Integer>> actItem : actItems.entrySet()) {
int questid = actItem.getKey();
for(Entry<Integer, Integer> actData : actItem.getValue().entrySet()) {
int itemid = actData.getKey();
Map<Integer, Integer> checkData = checkItems.get(questid);
if(checkData != null) {
Integer count = checkData.get(itemid);
if(count != null) {
reports.add(new Pair<>(questid, new Pair<>(itemid, -count)));
}
} else {
notChecked.add(new Pair<>(questid, itemid));
}
}
}
for(Pair<Integer, Pair<Integer, Integer>> r : reports) {
printWriter.println("Questid " + r.left + " : Itemid " + r.right.left + " should have qty " + r.right.right);
}
for(Pair<Integer, Integer> r : notChecked) {
printWriter.println("Questid " + r.left + " : Itemid " + r.right + " is unchecked");
}
}
private static void ReportQuestItemCountData() {
// This will reference one line at a time
try {
System.out.println("Reading WZs...");
readQuestItemCountData();
System.out.println("Reporting results...");
printWriter = new PrintWriter(newFile, "UTF-8");
printReportFileHeader();
printReportFileResults();
printWriter.close();
System.out.println("Done!");
}
catch(FileNotFoundException ex) {
System.out.println("Unable to open quest file.");
}
catch(IOException ex) {
System.out.println("Error reading quest file.");
}
catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
ReportQuestItemCountData();
}
}
@@ -0,0 +1,121 @@
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 ~ 2010 Patrick Huy <[email protected]>
Matthias Butz <[email protected]>
Jan Christian Meyer <[email protected]>
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 maplequestitemcountfetcher;
/**
* Represents a pair of values.
*
* @author Frz
* @since Revision 333
* @version 1.0
*
* @param <E> The type of the left value.
* @param <F> The type of the right value.
*/
public class Pair<E, F> {
public E left;
public F right;
/**
* Class constructor - pairs two objects together.
*
* @param left The left object.
* @param right The right object.
*/
public Pair(E left, F right) {
this.left = left;
this.right = right;
}
/**
* Gets the left value.
*
* @return The left value.
*/
public E getLeft() {
return left;
}
/**
* Gets the right value.
*
* @return The right value.
*/
public F getRight() {
return right;
}
/**
* Turns the pair into a string.
*
* @return Each value of the pair as a string joined by a colon.
*/
@Override
public String toString() {
return left.toString() + ":" + right.toString();
}
/**
* Gets the hash code of this pair.
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((left == null) ? 0 : left.hashCode());
result = prime * result + ((right == null) ? 0 : right.hashCode());
return result;
}
/**
* Checks to see if two pairs are equal.
*/
@SuppressWarnings("unchecked")
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Pair other = (Pair) obj;
if (left == null) {
if (other.left != null) {
return false;
}
} else if (!left.equals(other.left)) {
return false;
}
if (right == null) {
if (other.right != null) {
return false;
}
} else if (!right.equals(other.right)) {
return false;
}
return true;
}
}
+1 -1
View File
@@ -140,7 +140,7 @@
<string name="id" value="9400120"/>
<int name="x" value="1273"/>
<int name="y" value="306"/>
<int name="mobTime" value="10"/>
<int name="mobTime" value="14400"/>
<int name="f" value="0"/>
<int name="fh" value="114"/>
<int name="cy" value="335"/>
+1 -1
View File
@@ -182,7 +182,7 @@
<string name="id" value="9400122"/>
<int name="x" value="511"/>
<int name="y" value="147"/>
<int name="mobTime" value="0"/>
<int name="mobTime" value="7200"/>
<int name="f" value="0"/>
<int name="hide" value="0"/>
<int name="fh" value="7"/>
+1 -1
View File
@@ -119,7 +119,7 @@
<string name="id" value="9400122"/>
<int name="x" value="409"/>
<int name="y" value="149"/>
<int name="mobTime" value="300"/>
<int name="mobTime" value="1200"/>
<int name="f" value="0"/>
<int name="hide" value="0"/>
<int name="fh" value="6"/>
+1
View File
@@ -32,6 +32,7 @@
<int name="hpTagBgcolor" value="5"/>
<int name="HPgaugeHide" value="1"/>
<int name="explosiveReward" value="1"/>
<int name="boss" value="1"/>
</imgdir>
<imgdir name="move">
<canvas name="0" width="127" height="163">
+1
View File
@@ -32,6 +32,7 @@
<int name="hpTagBgcolor" value="5"/>
<int name="HPgaugeHide" value="1"/>
<int name="explosiveReward" value="1"/>
<int name="boss" value="1"/>
</imgdir>
<imgdir name="move">
<canvas name="0" width="127" height="163">
+1
View File
@@ -32,6 +32,7 @@
<int name="hpTagBgcolor" value="5"/>
<int name="HPgaugeHide" value="1"/>
<int name="explosiveReward" value="1"/>
<int name="boss" value="1"/>
</imgdir>
<imgdir name="move">
<canvas name="0" width="127" height="163">
+1
View File
@@ -29,6 +29,7 @@
<int name="5" value="8820027"/>
</imgdir>
<int name="noFlip" value="1"/>
<int name="boss" value="1"/>
</imgdir>
<imgdir name="stand">
<canvas name="0" width="4" height="4">
+1
View File
@@ -29,6 +29,7 @@
<int name="5" value="8820027"/>
</imgdir>
<int name="noFlip" value="1"/>
<int name="boss" value="1"/>
</imgdir>
<imgdir name="stand">
<canvas name="0" width="4" height="4">
+1
View File
@@ -29,6 +29,7 @@
<int name="5" value="8820019"/>
</imgdir>
<int name="noFlip" value="1"/>
<int name="boss" value="1"/>
</imgdir>
<imgdir name="stand">
<canvas name="0" width="4" height="4">
+1
View File
@@ -29,6 +29,7 @@
<int name="5" value="8820002"/>
</imgdir>
<int name="noFlip" value="1"/>
<int name="boss" value="1"/>
</imgdir>
<imgdir name="stand">
<canvas name="0" width="4" height="4">
+1
View File
@@ -24,6 +24,7 @@
<imgdir name="revive">
<int name="0" value="8820001"/>
</imgdir>
<int name="boss" value="1"/>
</imgdir>
<imgdir name="stand">
<canvas name="0" width="4" height="4">
+1
View File
@@ -35,6 +35,7 @@
<imgdir name="speak">
<int name="chatBalloon" value="1"/>
</imgdir>
<int name="boss" value="1"/>
</imgdir>
<imgdir name="stand">
<canvas name="0" width="827" height="561">
+1
View File
@@ -40,6 +40,7 @@
<string name="0" value="Not...not yet. I will show you my true power! "/>
</imgdir>
</imgdir>
<int name="boss" value="1"/>
</imgdir>
<imgdir name="stand">
<canvas name="0" width="827" height="561">
+1
View File
@@ -41,6 +41,7 @@
<int name="HPgaugeHide" value="1"/>
<int name="hpTagBgcolor" value="5"/>
<int name="hpTagColor" value="1"/>
<int name="boss" value="1"/>
</imgdir>
<imgdir name="move">
<canvas name="0" width="56" height="66">
+49 -1
View File
@@ -1 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><imgdir name="9500340.img"><imgdir name="info"><int name="bodyAttack" value="1"/><int name="level" value="40"/><int name="maxHP" value="8000"/><int name="maxMP" value="100"/><int name="speed" value="-20"/><int name="PADamage" value="130"/><int name="PDDamage" value="160"/><int name="MADamage" value="165"/><int name="MDDamage" value="160"/><int name="acc" value="140"/><int name="eva" value="10"/><int name="exp" value="800"/><int name="undead" value="0"/><int name="pushed" value="300"/><string name="elemAttr" value="I2F2L2H2"/><float name="fs" value="10.0"/><int name="summonType" value="0"/><string name="link" value="9300003"/><int name="ignoreFieldOut" value="1"/><imgdir name="revive"><int name="0" value="9500100"/><int name="1" value="9500100"/><int name="2" value="9500100"/><int name="3" value="9500100"/><int name="4" value="9500100"/><int name="5" value="9500100"/><int name="6" value="9500100"/><int name="7" value="9500100"/><int name="8" value="9500100"/><int name="9" value="9500100"/><int name="10" value="9500100"/></imgdir><imgdir name="skill"><imgdir name="0"><int name="skill" value="200"/><int name="action" value="1"/><int name="level" value="2"/><int name="effectAfter" value="0"/></imgdir></imgdir><int name="hpTagColor" value="1"/><int name="hpTagBgcolor" value="5"/><int name="HPgaugeHide" value="1"/><int name="boss" value="1"/></imgdir></imgdir>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<imgdir name="9500340.img">
<imgdir name="info">
<int name="bodyAttack" value="1"/>
<int name="level" value="40"/>
<int name="maxHP" value="8000"/>
<int name="maxMP" value="100"/>
<int name="speed" value="-20"/>
<int name="PADamage" value="130"/>
<int name="PDDamage" value="160"/>
<int name="MADamage" value="165"/>
<int name="MDDamage" value="160"/>
<int name="acc" value="140"/>
<int name="eva" value="10"/>
<int name="exp" value="800"/>
<int name="undead" value="0"/>
<int name="pushed" value="300"/>
<string name="elemAttr" value="I2F2L2H2"/>
<float name="fs" value="10.0"/>
<int name="summonType" value="0"/>
<string name="link" value="9300003"/>
<int name="ignoreFieldOut" value="1"/>
<imgdir name="revive">
<int name="0" value="9500100"/>
<int name="1" value="9500100"/>
<int name="2" value="9500100"/>
<int name="3" value="9500100"/>
<int name="4" value="9500100"/>
<int name="5" value="9500100"/>
<int name="6" value="9500100"/>
<int name="7" value="9500100"/>
<int name="8" value="9500100"/>
<int name="9" value="9500100"/>
<int name="10" value="9500100"/>
</imgdir>
<imgdir name="skill">
<imgdir name="0">
<int name="skill" value="200"/>
<int name="action" value="1"/>
<int name="level" value="2"/>
<int name="effectAfter" value="0"/>
</imgdir>
</imgdir>
<int name="hpTagColor" value="1"/>
<int name="hpTagBgcolor" value="5"/>
<int name="HPgaugeHide" value="1"/>
<int name="boss" value="1"/>
</imgdir>
</imgdir>
+45 -4
View File
@@ -1846,6 +1846,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4000142"/>
<int name="count" value="-1"/>
</imgdir>
</imgdir>
</imgdir>
@@ -3986,6 +3987,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4220152"/>
<int name="count" value="-1"/>
</imgdir>
<imgdir name="1">
<int name="id" value="1052217"/>
@@ -7129,6 +7131,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031025"/>
<int name="count" value="-10"/>
</imgdir>
<imgdir name="1">
<int name="id" value="4003000"/>
@@ -7306,6 +7309,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031026"/>
<int name="count" value="-20"/>
</imgdir>
<imgdir name="1">
<int name="id" value="1082002"/>
@@ -7395,6 +7399,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031028"/>
<int name="count" value="-30"/>
</imgdir>
<imgdir name="1">
<int name="id" value="1032014"/>
@@ -11046,6 +11051,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031841"/>
<int name="count" value="-1"/>
</imgdir>
</imgdir>
</imgdir>
@@ -11065,6 +11071,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031842"/>
<int name="count" value="-1"/>
</imgdir>
</imgdir>
</imgdir>
@@ -11085,6 +11092,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031843"/>
<int name="count" value="-1"/>
</imgdir>
</imgdir>
</imgdir>
@@ -11496,6 +11504,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031846"/>
<int name="count" value="-1"/>
</imgdir>
</imgdir>
</imgdir>
@@ -11969,6 +11978,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031850"/>
<int name="count" value="-1"/>
</imgdir>
</imgdir>
</imgdir>
@@ -12022,6 +12032,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031851"/>
<int name="count" value="-1"/>
</imgdir>
</imgdir>
</imgdir>
@@ -14526,6 +14537,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4032306"/>
<int name="count" value="-4"/>
</imgdir>
<imgdir name="1">
<int name="id" value="2210032"/>
@@ -36690,6 +36702,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031872"/>
<int name="count" value="-50"/>
</imgdir>
</imgdir>
<imgdir name="skill">
@@ -36711,6 +36724,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031871"/>
<int name="count" value="-50"/>
</imgdir>
</imgdir>
<imgdir name="skill">
@@ -36741,6 +36755,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031869"/>
<int name="count" value="-1"/>
</imgdir>
</imgdir>
</imgdir>
@@ -36759,6 +36774,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031870"/>
<int name="count" value="-1"/>
</imgdir>
</imgdir>
</imgdir>
@@ -36836,6 +36852,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031873"/>
<int name="count" value="-50"/>
</imgdir>
</imgdir>
<imgdir name="skill">
@@ -36865,6 +36882,7 @@
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4031874"/>
<int name="count" value="-50"/>
</imgdir>
</imgdir>
<imgdir name="skill">
@@ -37657,6 +37675,7 @@
<int name="count" value="-1"/>
</imgdir>
</imgdir>
<int name="exp" value="5000"/>
</imgdir>
</imgdir>
<imgdir name="8003">
@@ -37686,6 +37705,7 @@
<int name="count" value="20"/>
</imgdir>
</imgdir>
<int name="exp" value="15000"/>
</imgdir>
</imgdir>
<imgdir name="8007">
@@ -37699,6 +37719,7 @@
<int name="count" value="-1"/>
</imgdir>
</imgdir>
<int name="exp" value="12000"/>
</imgdir>
</imgdir>
<imgdir name="8008">
@@ -37740,6 +37761,7 @@
<int name="count" value="1"/>
</imgdir>
</imgdir>
<int name="exp" value="17000"/>
</imgdir>
</imgdir>
<imgdir name="8013">
@@ -37756,6 +37778,7 @@
<int name="count" value="1"/>
</imgdir>
</imgdir>
<int name="exp" value="50000"/>
</imgdir>
</imgdir>
<imgdir name="8018">
@@ -37837,7 +37860,7 @@
<imgdir name="0">
</imgdir>
<imgdir name="1">
<int name="exp" value="3000"/>
<int name="exp" value="16000"/>
<imgdir name="item">
<imgdir name="0">
<int name="id" value="2040509"/>
@@ -37864,6 +37887,7 @@
<int name="count" value="50"/>
</imgdir>
</imgdir>
<int name="exp" value="28000"/>
</imgdir>
</imgdir>
<imgdir name="8029">
@@ -37878,6 +37902,7 @@
<int name="count" value="10"/>
</imgdir>
</imgdir>
<int name="exp" value="4000"/>
</imgdir>
<imgdir name="0">
</imgdir>
@@ -37903,6 +37928,7 @@
<int name="prop" value="1"/>
</imgdir>
</imgdir>
<int name="exp" value="8000"/>
</imgdir>
<imgdir name="0">
</imgdir>
@@ -37959,6 +37985,7 @@
<int name="count" value="-30"/>
</imgdir>
</imgdir>
<int name="exp" value="18000"/>
</imgdir>
</imgdir>
<imgdir name="8033">
@@ -37975,6 +38002,7 @@
<int name="count" value="-50"/>
</imgdir>
</imgdir>
<int name="exp" value="22000"/>
</imgdir>
</imgdir>
<imgdir name="8034">
@@ -37996,6 +38024,7 @@
<int name="count" value="-50"/>
</imgdir>
</imgdir>
<int name="exp" value="15000"/>
</imgdir>
</imgdir>
<imgdir name="8035">
@@ -38017,13 +38046,14 @@
<int name="count" value="-30"/>
</imgdir>
</imgdir>
<int name="exp" value="25000"/>
</imgdir>
</imgdir>
<imgdir name="8036">
<imgdir name="0">
</imgdir>
<imgdir name="1">
<int name="exp" value="3000"/>
<int name="exp" value="30000"/>
<int name="money" value="10000"/>
<imgdir name="item">
<imgdir name="0">
@@ -38059,11 +38089,12 @@
<int name="count" value="-50"/>
</imgdir>
</imgdir>
<int name="exp" value="16000"/>
</imgdir>
</imgdir>
<imgdir name="8039">
<imgdir name="1">
<int name="exp" value="5000"/>
<int name="exp" value="30000"/>
<imgdir name="item">
<imgdir name="0">
<int name="id" value="2050004"/>
@@ -38088,6 +38119,7 @@
<int name="count" value="-100"/>
</imgdir>
</imgdir>
<int name="exp" value="30000"/>
</imgdir>
</imgdir>
<imgdir name="8041">
@@ -38111,6 +38143,7 @@
<int name="count" value="1"/>
</imgdir>
</imgdir>
<int name="exp" value="30000"/>
</imgdir>
</imgdir>
<imgdir name="8043">
@@ -38138,6 +38171,7 @@
<int name="prop" value="1"/>
</imgdir>
</imgdir>
<int name="exp" value="30000"/>
</imgdir>
</imgdir>
<imgdir name="8047">
@@ -38152,6 +38186,7 @@
<int name="count" value="50"/>
</imgdir>
</imgdir>
<int name="exp" value="22000"/>
</imgdir>
<imgdir name="0">
</imgdir>
@@ -38179,7 +38214,7 @@
<imgdir name="0">
</imgdir>
<imgdir name="1">
<int name="exp" value="5000"/>
<int name="exp" value="15000"/>
<imgdir name="item">
<imgdir name="0">
<int name="id" value="4000154"/>
@@ -38239,6 +38274,7 @@
<int name="count" value="1"/>
</imgdir>
</imgdir>
<int name="exp" value="20000"/>
</imgdir>
<imgdir name="0">
</imgdir>
@@ -38524,6 +38560,7 @@
<int name="prop" value="1"/>
</imgdir>
</imgdir>
<int name="exp" value="15000"/>
</imgdir>
<imgdir name="0">
</imgdir>
@@ -38658,6 +38695,7 @@
<int name="prop" value="1"/>
</imgdir>
</imgdir>
<int name="exp" value="33000"/>
</imgdir>
</imgdir>
<imgdir name="8069">
@@ -38671,6 +38709,7 @@
<int name="count" value="-1"/>
</imgdir>
</imgdir>
<int name="exp" value="5000"/>
</imgdir>
</imgdir>
<imgdir name="8070">
@@ -38780,6 +38819,7 @@
<int name="prop" value="2"/>
</imgdir>
</imgdir>
<int name="exp" value="80000"/>
</imgdir>
<imgdir name="0">
</imgdir>
@@ -38872,6 +38912,7 @@
<int name="count" value="1"/>
</imgdir>
</imgdir>
<int name="exp" value="55000"/>
</imgdir>
</imgdir>
<imgdir name="8082">