diff --git a/build/built-jar.properties b/build/built-jar.properties
index cbb5c840f2..47998a9aee 100644
--- a/build/built-jar.properties
+++ b/build/built-jar.properties
@@ -1,4 +1,4 @@
-#Sun, 09 Jul 2017 19:55:31 -0300
+#Mon, 10 Jul 2017 22:33:23 -0300
C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2=
diff --git a/build/classes/net/server/channel/handlers/ClickGuideHandler.class b/build/classes/net/server/channel/handlers/ClickGuideHandler.class
index 5c91466689..0971384f3e 100644
Binary files a/build/classes/net/server/channel/handlers/ClickGuideHandler.class and b/build/classes/net/server/channel/handlers/ClickGuideHandler.class differ
diff --git a/build/classes/net/server/channel/handlers/NPCTalkHandler.class b/build/classes/net/server/channel/handlers/NPCTalkHandler.class
index 577606c790..7bb6f0aecf 100644
Binary files a/build/classes/net/server/channel/handlers/NPCTalkHandler.class and b/build/classes/net/server/channel/handlers/NPCTalkHandler.class differ
diff --git a/build/classes/net/server/channel/handlers/RemoteGachaponHandler.class b/build/classes/net/server/channel/handlers/RemoteGachaponHandler.class
index 7d3e23e579..4df8abccd2 100644
Binary files a/build/classes/net/server/channel/handlers/RemoteGachaponHandler.class and b/build/classes/net/server/channel/handlers/RemoteGachaponHandler.class differ
diff --git a/build/classes/net/server/channel/handlers/UseCashItemHandler.class b/build/classes/net/server/channel/handlers/UseCashItemHandler.class
index dd79cb0060..71b020eb3b 100644
Binary files a/build/classes/net/server/channel/handlers/UseCashItemHandler.class and b/build/classes/net/server/channel/handlers/UseCashItemHandler.class differ
diff --git a/build/classes/scripting/AbstractPlayerInteraction.class b/build/classes/scripting/AbstractPlayerInteraction.class
index 20b610c522..7e8adfe927 100644
Binary files a/build/classes/scripting/AbstractPlayerInteraction.class and b/build/classes/scripting/AbstractPlayerInteraction.class differ
diff --git a/build/classes/scripting/npc/NPCConversationManager.class b/build/classes/scripting/npc/NPCConversationManager.class
index 058fd8e17d..28ef56950d 100644
Binary files a/build/classes/scripting/npc/NPCConversationManager.class and b/build/classes/scripting/npc/NPCConversationManager.class differ
diff --git a/build/classes/scripting/npc/NPCScriptManager.class b/build/classes/scripting/npc/NPCScriptManager.class
index 2cb16fd043..4e9ef5d799 100644
Binary files a/build/classes/scripting/npc/NPCScriptManager.class and b/build/classes/scripting/npc/NPCScriptManager.class differ
diff --git a/dist/MapleSolaxia.jar b/dist/MapleSolaxia.jar
index 2541c6a5fb..75767c6b2f 100644
Binary files a/dist/MapleSolaxia.jar and b/dist/MapleSolaxia.jar differ
diff --git a/mychanges_ptbr.txt b/mychanges_ptbr.txt
index 5ac87b8cce..f9ddf5fd2c 100644
--- a/mychanges_ptbr.txt
+++ b/mychanges_ptbr.txt
@@ -355,4 +355,11 @@ Elaborada funcionalidade que permite salvar o "tempo at
03 Julho 2017,
Corrigido cliente não mostrando dano tomado pelo player se ele está com GM escondido para os outros GMs.
-Corrigido cliente não mostrando dano dado pelo summon para outros players.
\ No newline at end of file
+Corrigido cliente não mostrando dano dado pelo summon para outros players.
+
+07 - 09 Julho 2017,
+Corrigido parcialmente Mystic Doors.
+
+10 Julho 2017,
+Abertas novas quests para a região de Masteria (Phantom Woods / Crimsonwood mountain).
+Codificados novos NPCs para a região de Masteria.
\ No newline at end of file
diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml
index e332c7ab8f..5af0ed1acc 100644
--- a/nbproject/private/private.xml
+++ b/nbproject/private/private.xml
@@ -2,18 +2,6 @@
-
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/SendOpcode.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleDoor.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MapleStatEffect.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/world/MaplePartyCharacter.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/DoorHandler.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleBuffStat.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleMap.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleDoorObject.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleCharacter.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleClient.java
- file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/tools/MaplePacketCreator.java
-
+
diff --git a/scripts/npc/9000017.js b/scripts/npc/9000017.js
index d2189b9bbe..1b92265645 100644
--- a/scripts/npc/9000017.js
+++ b/scripts/npc/9000017.js
@@ -32,11 +32,11 @@ function action(mode, type, selection) {
}
if (status == 0) {
- var selStr = "Hey traveler! Come, come closer... We offer a #bhuge opportunity of business#k to you. If you want to know what it is, keep listening..."
+ var selStr = "Hey traveler! Come, come closer... We offer a #bhuge opportunity of business#k to you. If you want to know what it is, keep listening...";
cm.sendNext(selStr);
}
else if (status == 1) {
- var selStr = "We've got here the knowledge to synthetize the mighty #b#t2049100##k! Of course, making one is not an easy task... But worry not! Just gather some material to me and a fee of #b1,200,000 mesos#k for our services to #bobtain it#k. You still want to do it?"
+ var selStr = "We've got here the knowledge to synthetize the mighty #b#t2049100##k! Of course, making one is not an easy task... But worry not! Just gather some material to me and a fee of #b1,200,000 mesos#k for our services to #bobtain it#k. You still want to do it?";
cm.sendYesNo(selStr);
}
diff --git a/scripts/npc/9201096.js b/scripts/npc/9201096.js
new file mode 100644
index 0000000000..9e78d57d8d
--- /dev/null
+++ b/scripts/npc/9201096.js
@@ -0,0 +1,125 @@
+/* Jack
+ Refining NPC:
+ * ITEMMAKE
+ *
+ * By RonanLana
+*/
+
+var status = 0;
+var selectedType = -1;
+var selectedItem = -1;
+var item;
+var mats;
+var matQty;
+var cost;
+var qty;
+var equip;
+var last_use; //last item is a use item
+
+function start() {
+ cm.getPlayer().setCS(true);
+ status = -1;
+ action(1, 0, 0);
+}
+
+function action(mode, type, selection) {
+ if (mode == 1)
+ status++;
+ else {
+ cm.sendOk("Very well, see you around.");
+ cm.dispose();
+ return;
+ }
+
+ if (status == 0) {
+ var selStr = "Hey, are you aware about the expeditions running right now at the Crimsonwood Keep? So, there is a great opportunity for one to improve themselves, one can rack up experience and loot pretty fast there.";
+ cm.sendNext(selStr);
+ }
+ else if (status == 1) {
+ var selStr = "Said so, methinks making use of some strong utility potions can potentially create some differential on the front, and by this I mean to start crafting #b#t2022284##k's to help on the efforts. So, getting right down to business, I'm currently pursuing #rplenty#k of those items: #r#t4032010##k, #r#t4032011##k, #r#t4032012##k, and some funds to support the cause. Would you want to get some of these boosters?";
+ cm.sendYesNo(selStr);
+ }
+
+ else if (status == 2) {
+ //selectedItem = selection;
+ selectedItem = 0;
+
+ var itemSet = new Array(2022284, 7777777);
+ var matSet = new Array(new Array(4032010, 4032011, 4032012));
+ var matQtySet = new Array(new Array(60, 60, 45));
+ var costSet = new Array(75000, 7777777);
+ item = itemSet[selectedItem];
+ mats = matSet[selectedItem];
+ matQty = matQtySet[selectedItem];
+ cost = costSet[selectedItem];
+
+ var prompt = "Ok, I'll be crafting some #t" + item + "#. In that case, how many of those do you want me to make?";
+ cm.sendGetNumber(prompt,1,1,100)
+ }
+
+ else if (status == 3) {
+ qty = selection;
+ last_use = false;
+
+ var prompt = "So, you want me to make ";
+ if (qty == 1)
+ prompt += "a #t" + item + "#?";
+ else
+ prompt += qty + " #t" + item + "#?";
+
+ prompt += " In that case, I'm going to need specific items from you in order to make it. And make sure you have room in your inventory!#b";
+
+ if (mats instanceof Array){
+ for (var i = 0; i < mats.length; i++) {
+ prompt += "\r\n#i"+mats[i]+"# " + matQty[i] * qty + " #t" + mats[i] + "#";
+ }
+ } else {
+ prompt += "\r\n#i"+mats+"# " + matQty * qty + " #t" + mats + "#";
+ }
+
+ if (cost > 0) {
+ prompt += "\r\n#i4031138# " + cost * qty + " meso";
+ }
+ cm.sendYesNo(prompt);
+ }
+
+ else if (status == 4) {
+ var complete = true;
+
+ if (cm.getMeso() < cost * qty) {
+ cm.sendOk("Well, I DID say I would be needing some funds to craft it, wasn't it?");
+ }
+ else if(!cm.canHold(item, qty)) {
+ cm.sendOk("You didn't check if you got a slot to spare on your inventory before crafting, right?");
+ }
+ else {
+ if (mats instanceof Array) {
+ for (var i = 0; complete && i < mats.length; i++) {
+ if (matQty[i] * qty == 1) {
+ complete = cm.haveItem(mats[i]);
+ } else {
+ complete = cm.haveItem(mats[i], matQty[i] * qty);
+ }
+ }
+ } else {
+ complete = cm.haveItem(mats, matQty * qty);
+ }
+
+ if (!complete)
+ cm.sendOk("There are not enough resources on your inventory. Please check it again.");
+ else {
+ if (mats instanceof Array) {
+ for (var i = 0; i < mats.length; i++){
+ cm.gainItem(mats[i], -matQty[i] * qty);
+ }
+ } else {
+ cm.gainItem(mats, -matQty * qty);
+ }
+ cm.gainMeso(-cost * qty);
+ cm.gainItem(item, qty);
+ cm.sendOk("There it is! Thanks for your cooperation.");
+ }
+ }
+ cm.dispose();
+ }
+}
\ No newline at end of file
diff --git a/scripts/npc/9201097.js b/scripts/npc/9201097.js
index 99d42f4750..40d205aef9 100644
--- a/scripts/npc/9201097.js
+++ b/scripts/npc/9201097.js
@@ -71,14 +71,20 @@ function start() {
}
function action(mode, type, selection) {
- if (mode == 0) {
- cm.sendOk("Hmmm...it shouldn't be a bad deal for you. Come see me at the right time and you may get a much better item to be offered. Anyway, let me know when you have a change of mind.");
+ if (mode <= 0) {
+ cm.sendOk("Hmmm...it shouldn't be a bad deal for you. Come see me at the right time and you may get a much better item to be offered. Anyway, let me know if you have a change of mind.");
cm.dispose();
return;
}
status++;
if (status == 0) { // first interaction with NPC
+ if(cm.getQuestStatus(8225) != 2) {
+ cm.sendNext("Hey, I'm not a bandit, ok?");
+ cm.dispose();
+ return;
+ }
+
cm.sendNext("Hey, got a little bit of time? Well, my job is to collect items here and sell them elsewhere, but these days the monsters have become much more hostile so it have been difficult to get good items... What do you think? Do you want to do some business with me?");
} else if (status == 1) {
cm.sendYesNo("The deal is simple. You get me something I need, I get you something you need. The problem is, I deal with a whole bunch of people, so the items I have to offer may change every time you see me. What do you think? Still want to do it?");
diff --git a/scripts/npc/9201098.js b/scripts/npc/9201098.js
new file mode 100644
index 0000000000..10dc2caa63
--- /dev/null
+++ b/scripts/npc/9201098.js
@@ -0,0 +1,21 @@
+/**
+ *9201098 - Lukan
+ *@author Ronan
+ */
+
+function start() {
+ if(cm.getQuestStatus(8223) == 2) {
+ if(cm.haveItem(3992041)) cm.sendOk("We, defenders of Yore, are currenly meeting at the Inner Sactum inside the Keep, about to start an offensive against the Twisted Masters and their army. Join us there anytime.");
+ else {
+ if(!cm.canHold(3992041)) cm.sendOk("Please make a slot on your SETUP ready for the key I have to give to you. It is fundamental to enter the Inner Sanctum, inside the Keep.");
+ else {
+ cm.sendOk("So you did lost your key, right? Very well, I will craft you another one, but please don't lose it again. It is fundamental to enter the Inner Sanctum, inside the Keep.");
+ cm.gainItem(3992041, 1);
+ }
+ }
+ } else {
+ cm.sendOk("O, brave adventurer. The Stormcasters house, from which I belong, guards the surrounding area of Yore, this landscape, from the forces of the Twisted Masters' guard that daily threathens the citizens. Please help us on the defense of Yore.");
+ }
+
+ cm.dispose();
+}
diff --git a/scripts/npc/9201099.js b/scripts/npc/9201099.js
new file mode 100644
index 0000000000..fda4cd9f8c
--- /dev/null
+++ b/scripts/npc/9201099.js
@@ -0,0 +1,14 @@
+/**
+ *9201098 - Mo
+ *@author Ronan
+ */
+
+function start() {
+ if(cm.getQuestStatus(8224) == 2) {
+ cm.openShopNPC(9201099);
+ } else {
+ cm.sendOk("Hm, at who do you think you are looking at?");
+ }
+
+ cm.dispose();
+}
diff --git a/scripts/npc/9201100.js b/scripts/npc/9201100.js
new file mode 100644
index 0000000000..38356190c8
--- /dev/null
+++ b/scripts/npc/9201100.js
@@ -0,0 +1,14 @@
+/**
+ *9201100 - Taggrin
+ *@author Ronan
+ */
+
+function start() {
+ if(cm.getQuestStatus(8224) == 2) {
+ cm.sendOk("Well met, fellow clan member. If you need anything we can be of help, try talking to one of our members.");
+ } else {
+ cm.sendOk("Hello there, stranger. We are the renowned Raven Claw clan of mercenaries, and I'm their leader.");
+ }
+
+ cm.dispose();
+}
diff --git a/scripts/npc/9201103.js b/scripts/npc/9201103.js
new file mode 100644
index 0000000000..90ef86e324
--- /dev/null
+++ b/scripts/npc/9201103.js
@@ -0,0 +1,10 @@
+/**
+ *9201103 - Sage
+ *@author Ronan
+ */
+
+function start() {
+ if(cm.getLevel() >= 100) cm.sendOk("Expeditions are frequently being held inside the Crimsonwood Keep by adventurers like you, where many people from many parties cooperate together, solving puzzles therein and taking down strong enemies, being able to get many prizes in the process. To find more info about this, go ahead inside the keep at the top-right room there.");
+ else cm.sendOk("Inside the Keep, expeditions can be formed to attempt the Crimsonwood Keep PQ, which requires maplers from level 100 or more. It seems you are not suitable for attempting it yet, train some more if you want to attempt it.");
+ cm.dispose();
+}
diff --git a/scripts/npc/9201104.js b/scripts/npc/9201104.js
new file mode 100644
index 0000000000..e63d17a6e2
--- /dev/null
+++ b/scripts/npc/9201104.js
@@ -0,0 +1,12 @@
+/**
+ *9201104 - Sage
+ *@author Ronan
+ */
+
+function start() {
+ if(cm.getMapId() == 610020000) cm.sendOk("O, brave adventurer. Just by reaching this spot, you are truly distinct among the masses, congratulations. However, #rpay heed#k: on the path ahead, which leads to the mighty fortress of #bCrimsonwood Keep#k, #rdeadly Menhirs#k are deployed as traps for those unaware of the dangers ahead. #rOne hit from it is enough to take you down#k, so beware. If you aim to reach the Keep, follow the trail ahead carefully.");
+ else if(cm.getMapId() == 610020003) cm.sendOk("You seem worthy now to receive a hint for what lies ahead. Once inside the main room of the Keep, make sure you remember the layout of the statue you see there. That's it.");
+ else if(cm.getMapId() == 610020004) cm.sendOk("You seem worthy now to receive a hint for what lies ahead. Devices known as Sigils are activated by detection when some skills of certain jobs are activated nearby, make sure your team is made whole for when the time comes. That's it.");
+ else cm.sendOk("So far your progress is splendid, good job. However, to make it to the Keep, you must face and accomplish this ordeal, carry on.");
+ cm.dispose();
+}
diff --git a/scripts/npc/9201105.js b/scripts/npc/9201105.js
new file mode 100644
index 0000000000..ce9a4172ef
--- /dev/null
+++ b/scripts/npc/9201105.js
@@ -0,0 +1,10 @@
+/**
+ *9201105 - Sage
+ *@author Ronan
+ */
+
+function start() {
+ if(cm.getMapId() == 610020005) cm.sendOk("The Crimsonwood Keep lies right ahead, a great feat has been made by you this day, salute to thee. Pass through these woods to enter the gates of the Keep.");
+ else cm.sendOk("So far your progress is splendid, good job. However, to make it to the Keep, you must face and accomplish this ordeal, carry on.");
+ cm.dispose();
+}
diff --git a/scripts/npc/9201110.js b/scripts/npc/9201110.js
index 7406f7716a..53ff9734af 100644
--- a/scripts/npc/9201110.js
+++ b/scripts/npc/9201110.js
@@ -7,7 +7,7 @@ function start() {
cm.sendOk("As every Thief knows, the best attack is the one you never see coming. So, to best illustrate this, you'll be in a chamber with platforms and ledges that you can only get to with Haste, as well as All-Seeing Eyes that your dagger or claw must close--permanently. After all the All-Seeing Eyes have been eliminated, get ti the Thief Statue and lay claim to the Primal Claw! Good luck!");
break;
case 610030000:
- cm.sendOk("Once known as the 'Prince of Shadows', Grandmaster Ryo possessed supreme speed and power with short-ranged daggers and longer chain-like Claw. A part-time member of the Bosshunters, he was reowned for unparalleled ability to blend into the very nigth itself. His legend grew during a battle with Crimson Balrog, where he moved so swiftly that Balrog's attacks only caught air. Ryo also performed occasional 'retrievals' for those less fortunate than himself.");
+ cm.sendOk("Once known as the 'Prince of Shadows', Grandmaster Ryo possessed supreme speed and power with short-ranged daggers and longer chain-like Claw. A part-time member of the Bosshunters, he was reowned for unparalleled ability to blend into the very night itself. His legend grew during a battle with Crimson Balrog, where he moved so swiftly that Balrog's attacks only caught air. Ryo also performed occasional 'retrievals' for those less fortunate than himself.");
break;
case 610030530:
if (cm.isAllReactorState(6108004, 1)) {
diff --git a/scripts/npc/9201113.js b/scripts/npc/9201113.js
index 37c564595c..33ce5ee0fa 100644
--- a/scripts/npc/9201113.js
+++ b/scripts/npc/9201113.js
@@ -56,7 +56,7 @@ function action(mode, type, selection) {
cm.sendOk("You do not meet the criteria to take attempt Crimsonwood Keep Party Quest!");
cm.dispose();
} else if (expedition == null) { //Start an expedition
- cm.sendSimple("#e#b\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to attempt a #rCrimsonwood Keep Party Quest#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
+ cm.sendSimple("#e#b\r\n#k#n" + em.getProperty("party") + "\r\n\r\nWould you like to assemble a team to attempt the #rCrimsonwood Keep Party Quest#k?\r\n#b#L1#Lets get this going!#l\r\n\#L2#No, I think I'll wait a bit...#l");
status = 1;
} else if (expedition.isLeader(player)) { //If you're the leader, manage the exped
cm.sendSimple(list);
diff --git a/scripts/npc/9201114.js b/scripts/npc/9201114.js
index f5f6c28945..c0fa15e75e 100644
--- a/scripts/npc/9201114.js
+++ b/scripts/npc/9201114.js
@@ -19,12 +19,14 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
-/* Door that warps you inside the CWKPQ start map. Needs GMS-like checks.
+/* Door that warps you inside the CWKPQ start map.
*
- * @Author Alan (SharpAceX)
+ * @Author Ronan
*/
function start() {
- cm.warp(610030020);
+ if(cm.haveItem(3992041, 1)) cm.warp(610030020);
+ else cm.getPlayer().dropMessage(5, "The giant gate of iron will not budge no matter what, however there is a key-shaped socket visible.");
+
cm.dispose();
}
\ No newline at end of file
diff --git a/scripts/quest/8219.js b/scripts/quest/8219.js
new file mode 100644
index 0000000000..33f63377ae
--- /dev/null
+++ b/scripts/quest/8219.js
@@ -0,0 +1,61 @@
+/* ===========================================================
+ Ronan Lana
+ NPC Name: Lukan
+ Description: Quest - Storming the Castle
+=============================================================
+Version 1.0 - Script Done.(10/7/2017)
+=============================================================
+*/
+
+var status = -1;
+
+function start(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else{
+ qm.sendOk("Okay, then. See you around.");
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0)
+ qm.sendAcceptDecline("The time is now, kid. We have all the preparations complete to further research for why all these oddities have been happening lately. I also must introduce you to my brother, Jack. ");
+ if (status == 1){
+ qm.sendOk("He is currently wandering around the Crimsonwood Mountain, past the sinister Phantom Forest, in the track to the Crimsonwood Keep. Your next destination is there, may your journey be a safe one.");
+ qm.forceStartQuest();
+ qm.dispose();
+ }
+}
+
+function end(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else{
+ qm.sendOk("Okay, then. See you around.");
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0)
+ qm.sendNext("Who are you? Oh, you came here by my brother John's stead? Great.");
+
+ else if (status == 1){
+ qm.sendOk("It seems you helped the folks at the city at some errands, don't you? I shall appraise you nicely. Take a look on this: this is a map of the Phantom Forest, which I made myself after enough exploration. Take possession of that, and you #bwill be granted passage#k by paths other times undiscoverable. Remember well to #rnever lose it#k, you won't be having that again!\r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0# \r\n#i3992040# #t3992040#\r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0# 175000 EXP");
+ }
+ else if (status == 2){
+ if(qm.canHold(3992040, 1)) {
+ qm.gainItem(3992040, 1);
+ qm.gainExp(175000 * qm.getPlayer().getExpRate());
+ qm.forceCompleteQuest();
+ }
+ else {
+ qm.sendOk("Hey, you don't have a slot in your SETUP inventory for what I have to give to you. Solve that minor issue of yours then talk to me.");
+ }
+
+ qm.dispose();
+ }
+}
diff --git a/scripts/quest/8223.js b/scripts/quest/8223.js
new file mode 100644
index 0000000000..84481e2964
--- /dev/null
+++ b/scripts/quest/8223.js
@@ -0,0 +1,30 @@
+/* ===========================================================
+ Ronan Lana
+ NPC Name: Lukan
+ Description: Quest - Storming the Castle
+=============================================================
+Version 1.0 - Script Done.(10/7/2017)
+=============================================================
+*/
+
+var status = -1;
+
+function start(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else{
+ qm.sendOk("Okay, then. See you around.");
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0)
+ qm.sendAcceptDecline("Oh, Jack sent you here? Good timing, I'm planning alongside Jack and others to storm the Keep and retake it from the Twisted Masters what is ours by right. You seem ready to fight alongside us, right?");
+ if (status == 1){
+ qm.sendOk("Great! Your mission now is to rack down some numbers of their army and weaken their defenses by all effects. Defeat 75 of each: Windraider, Firebrand and Nightshadow, then return to me to report.");
+ qm.forceStartQuest();
+ qm.dispose();
+ }
+}
diff --git a/scripts/quest/8224.js b/scripts/quest/8224.js
new file mode 100644
index 0000000000..04a3c52d39
--- /dev/null
+++ b/scripts/quest/8224.js
@@ -0,0 +1,30 @@
+/* ===========================================================
+ Ronan Lana
+ NPC Name: Taggrin
+ Description: Quest - The Fallen Woods
+=============================================================
+Version 1.0 - Script Done.(10/7/2017)
+=============================================================
+*/
+
+var status = -1;
+
+function start(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else{
+ qm.sendOk("Okay, then. See you around.");
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0)
+ qm.sendAcceptDecline("Hey traveler, come here! I am Taggrin, leader of the Raven Ninja Clan. We are mercenaries currently under the payload of the New Leaf City county. Our job here is to hunt down those creatures that have been lurking around here these days. Are you interested to make a little errand for us? Of course, the pay off will be advantageous for both parties.");
+ else if (status == 1){
+ qm.sendOk("Ok. I need you to hunt down #bthose fake trees#k in the forest, and collect 50 of their drops as proof that you made your part on this.");
+ qm.forceStartQuest();
+ qm.dispose();
+ }
+}
diff --git a/scripts/quest/8225.js b/scripts/quest/8225.js
new file mode 100644
index 0000000000..8bb382d08d
--- /dev/null
+++ b/scripts/quest/8225.js
@@ -0,0 +1,30 @@
+/* ===========================================================
+ Ronan Lana
+ NPC Name: Taggrin
+ Description: Quest - The Right Path
+=============================================================
+Version 1.0 - Script Done.(10/7/2017)
+=============================================================
+*/
+
+var status = -1;
+
+function start(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else{
+ qm.sendOk("Okay, then. See you around.");
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0)
+ qm.sendAcceptDecline("Hey, partner. Now that you make part of the Raven Claws team, I have a task for you. Are you up now?");
+ else if (status == 1){
+ qm.sendOk("Very well. To prove your valor among our ranks, you must first pass on a little challenge: you have to be able to move extraordinaly well around here, known of all secrets these woods holds. Trace a #bmap of the Phantom Forest#k, then come talk to me. I shall then evaluate if you're worth to be with us.");
+ qm.forceStartQuest();
+ qm.dispose();
+ }
+}
diff --git a/scripts/quest/8226.js b/scripts/quest/8226.js
new file mode 100644
index 0000000000..7f84f351b9
--- /dev/null
+++ b/scripts/quest/8226.js
@@ -0,0 +1,30 @@
+/* ===========================================================
+ Ronan Lana
+ NPC Name: Taggrin
+ Description: Quest - The Right Path
+=============================================================
+Version 1.0 - Script Done.(10/7/2017)
+=============================================================
+*/
+
+var status = -1;
+
+function start(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else{
+ qm.sendOk("Okay, then. See you around.");
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0)
+ qm.sendAcceptDecline("Now that you are part of our team, listen to what I have to say. We, Raven Clan of Ninjas, are hired to take care of many issues, and to do so each one works on different sectors of the continent, solving problems for our employers. I'm about to talk about your mission, are you ready?");
+ else if (status == 1){
+ qm.sendOk("Your next mission is: defeat the Elderwraiths that roam this forest. These are a tough bunch though, so stay alert. I need you to bring me 100 #t4032010# as proof of your duty.");
+ qm.forceStartQuest();
+ qm.dispose();
+ }
+}
diff --git a/scripts/quest/8227.js b/scripts/quest/8227.js
new file mode 100644
index 0000000000..4781e2d169
--- /dev/null
+++ b/scripts/quest/8227.js
@@ -0,0 +1,59 @@
+/* ===========================================================
+ Ronan Lana
+ NPC Name: Jack, John
+ Description: Quest - Lost in Translation
+=============================================================
+Version 1.0 - Script Done.(10/7/2017)
+=============================================================
+*/
+
+var status = -1;
+
+function start(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else {
+ qm.sendOk("Come on, the city really needs you cooperating on this one!");
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0)
+ qm.sendAcceptDecline("Hey buddy! Nice timing. There is this communique I've been able to swipe from the officials at the Keep, however it's information is encrypted. I have no use for this as it is like this. So, will you transport this to John and see if he can decode this?");
+ else if (status == 1){
+ if(qm.canHold(4032032, 1)) {
+ qm.gainItem(4032032, 1);
+ qm.sendOk("Very well, I'm counting on you on this one.");
+ qm.forceStartQuest();
+ } else {
+ qm.sendOk("Hey. There's no slot on your ETC.");
+ }
+
+ qm.dispose();
+ }
+}
+
+function end(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else {
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0){
+ if(qm.haveItem(4032032, 1)) {
+ qm.gainItem(4032032, -1);
+ qm.sendOk("Oh you brought a letter from the Keep?! Neat! Let me check if I can decode that right now.");
+ qm.forceCompleteQuest();
+ } else {
+ qm.sendOk("You don't brought the coded letter Jack said? Come on, kid, we need that to decipher our enemies' next step!");
+ }
+
+ qm.dispose();
+ }
+}
diff --git a/scripts/quest/8228.js b/scripts/quest/8228.js
new file mode 100644
index 0000000000..b1352e8cd8
--- /dev/null
+++ b/scripts/quest/8228.js
@@ -0,0 +1,64 @@
+/* ===========================================================
+ Ronan Lana
+ NPC Name: John, Elpam
+ Description: Quest - Lost in Translation
+=============================================================
+Version 1.0 - Script Done.(10/7/2017)
+=============================================================
+*/
+
+var status = -1;
+
+function start(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else {
+ qm.sendOk("Come on, the city really needs you cooperating on this one!");
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0)
+ qm.sendAcceptDecline("Hm, that's no good. I can't seem to make these Hyper Glyphs work, dang it. ... Ah, yea, the outsider! He may know the language this paper is written on. Let Elpam try to read this, maybe he knows something.");
+ else if (status == 1){
+ if(qm.canHold(4032032, 1)) {
+ qm.gainItem(4032032, 1);
+ qm.sendOk("Very well, I'm counting on you on this one.");
+ qm.forceStartQuest();
+ } else {
+ qm.sendOk("Hey. There's no slot on your ETC.");
+ }
+
+ qm.dispose();
+ }
+}
+
+function end(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else {
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0){
+ if(!qm.canHold(4032018, 1)) {
+ qm.sendOk("I'm afraid you don't have a slot available on your ETC inventory.");
+ }
+ else if(qm.haveItem(4032032, 1)) {
+ qm.gainItem(4032032, -1);
+ qm.gainItem(4032018, 1);
+
+ qm.sendOk("Hello, native of this world. So you have a message that needs translation? My people back in Versal is known for mastering many foreign languages, this one may very well be some we know. Please stand by... Here, the translated transcript.");
+ qm.forceCompleteQuest();
+ } else {
+ qm.sendOk("I'm afraid you don't have the letter you claimed to have with you.");
+ }
+
+ qm.dispose();
+ }
+}
diff --git a/scripts/quest/8229.js b/scripts/quest/8229.js
new file mode 100644
index 0000000000..3573a7f136
--- /dev/null
+++ b/scripts/quest/8229.js
@@ -0,0 +1,63 @@
+/* ===========================================================
+ Ronan Lana
+ NPC Name: John, Jack
+ Description: Quest - Lost in Translation
+=============================================================
+Version 1.0 - Script Done.(10/7/2017)
+=============================================================
+*/
+
+var status = -1;
+
+function start(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else {
+ qm.sendOk("Come on, the city really needs you cooperating on this one!");
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0)
+ qm.sendAcceptDecline("I knew we could rely on the outsider on this matter! Now that we have the letter translated by him, head it to Jack, he knows what to do.");
+ else if (status == 1){
+ if(qm.haveItem(4032018, 1)) {
+ qm.forceStartQuest();
+ } else if (qm.canHold(4032018, 1)) {
+ qm.gainItem(4032018, 1);
+ qm.forceStartQuest();
+ } else {
+ qm.sendOk("Hey. There's no slot on your ETC.");
+ }
+
+ qm.dispose();
+ }
+}
+
+function end(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else {
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0){
+ if(qm.haveItem(4032018, 1)) {
+ qm.sendOk("Oh, you brought it. Nicely done, the countermeasure process will be much easier now.\r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0# \r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0# 50000 EXP");
+ } else {
+ qm.sendOk("What's wrong? Why you didn't retrieved the translated message yet? Please bring me the letter's content for me to strategize a countermeasure ASAP.");
+ qm.dispose();
+ }
+ } else if (status == 1){
+ qm.gainItem(4032018, -1);
+ qm.gainExp(50000 * qm.getPlayer().getExpRate());
+ qm.forceCompleteQuest();
+
+ qm.dispose();
+ }
+}
diff --git a/scripts/quest/8230.js b/scripts/quest/8230.js
new file mode 100644
index 0000000000..0f3507e9a2
--- /dev/null
+++ b/scripts/quest/8230.js
@@ -0,0 +1,47 @@
+/* ===========================================================
+ Ronan Lana
+ NPC Name: Jack
+ Description: Quest - Stemming the Tide
+=============================================================
+Version 1.0 - Script Done.(10/7/2017)
+=============================================================
+*/
+
+var status = -1;
+
+function start(mode, type, selection) {
+ status++;
+ if (mode != 1) {
+ if(type == 1 && mode == 0)
+ status -= 2;
+ else{
+ qm.sendOk("Okay, then. See you around.");
+ qm.dispose();
+ return;
+ }
+ }
+ if (status == 0)
+ qm.sendAcceptDecline("Hey, traveler! I need your help. A great threat is about to endanger the folks down there at the New Leaf City, the way I can see it right now. These creatures roaming around here suddenly... That can be no good. Care if you listen to what I have to say?");
+ else if (status == 1) {
+ qm.sendOk("That's the thing: the Twisted Masters, great figures that currently holds seize of the Crimsonwood Keep, have planned a large-scale attack to the New Leaf City, that may be happening on the next few days. I can't just stay here observing while they prepare for this attack. However, I can't just leave this position, I must keep an eye on their moves at all costs. There's where you enter: go find Lukan, knight of the past Crimsonwood Keep, that is currently wandering around the woods, and receive from him further orders, he knows what to do.");
+ qm.forceStartQuest();
+ qm.dispose();
+ }
+}
+
+function end(mode, type, selection) {
+ status++;
+
+ if(status == 0) {
+ if(qm.haveItem(3992041)) {
+ qm.sendOk("Ah, you did accomplish the task I handed to you. Nicely done, now those guys are busy recovering from this offensive. Now, remember: #bthat key must be used to access#k the Inner Sanctum inside the Keep. Hold that with you at all times if you ever want to enter there.");
+ qm.forceCompleteQuest();
+ } else if(qm.getQuestStatus(8223) == 2) {
+ qm.sendOk("You completed the mission but lost the key? That's bad, you NEED this key to enter the inner rooms of the Keep. Check out there with Lukan what you should be doing next, we need you inside the Keep.");
+ } else {
+ qm.sendOk("The folks back there on the city are counting on you on this one. Please hurry up.");
+ }
+
+ qm.dispose();
+ }
+}
\ No newline at end of file
diff --git a/sql/db_database.sql b/sql/db_database.sql
index e24d96ddf4..636c9da263 100644
--- a/sql/db_database.sql
+++ b/sql/db_database.sql
@@ -20744,7 +20744,25 @@ INSERT INTO `shopitems` (`shopitemid`, `shopid`, `itemid`, `price`, `pitch`, `po
(20043, 1338, 2002025, 1500, 0, 192),
(20044, 1338, 2002024, 1500, 0, 196),
(20045, 1338, 2002023, 3800, 0, 200),
-(20046, 1338, 5041000, 1500000, 0, 200);
+(20046, 1338, 5041000, 1500000, 0, 200),
+(20047, 9201099, 2030020, 400, 0, 1),
+(20048, 9201099, 2022002, 1000, 0, 2),
+(20049, 9201099, 2000018, 620, 0, 3),
+(20050, 9201099, 2022003, 1100, 0, 4),
+(20051, 9201099, 2070010, 2000, 0, 5),
+(20052, 9201099, 2061004, 40, 0, 6),
+(20053, 9201099, 2060004, 40, 0, 7),
+(20054, 9201099, 2002017, 5000, 0, 8),
+(20055, 9201099, 2022000, 1650, 0, 9),
+(20056, 9201099, 2050003, 500, 0, 10),
+(20057, 9201099, 2050002, 300, 0, 11),
+(20058, 9201099, 2050001, 200, 0, 12),
+(20059, 9201099, 2020015, 9690, 0, 13),
+(20060, 9201099, 2020014, 8100, 0, 14),
+(20061, 9201099, 2020013, 5000, 0, 15),
+(20062, 9201099, 2020012, 4500, 0, 16),
+(20063, 9201099, 2050000, 200, 0, 17),
+(20064, 9201099, 2050004, 400, 0, 18);
CREATE TABLE IF NOT EXISTS `shops` (
`shopid` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -20837,6 +20855,7 @@ INSERT INTO `shops` (`shopid`, `npcid`) VALUES
(9201058, 9201058),
(9201059, 9201059),
(9201060, 9201060),
+(9201099, 9201099),
(9270019, 9270019),
(9270020, 9270020),
(9270021, 9270021),
diff --git a/sql/db_drops.sql b/sql/db_drops.sql
index cc8cc3c6b7..0825872468 100644
--- a/sql/db_drops.sql
+++ b/sql/db_drops.sql
@@ -11820,7 +11820,7 @@
(9500334, 2040801, 1, 4, 0, 10000),
(9500349, 2040801, 1, 4, 0, 10000),
(9303011, 2040801, 1, 1, 0, 750),
-(9400576, 4032007, 1, 1, 0, 10000),
+(9400576, 4032007, 1, 1, 0, 200000),
(9400576, 2002000, 1, 1, 0, 10000),
(9400576, 4006000, 1, 1, 0, 7000),
(9400576, 2043301, 1, 1, 0, 750),
@@ -13869,7 +13869,7 @@
(9500162, 1040107, 1, 1, 0, 700),
(8140001, 1060095, 1, 1, 0, 700),
(9500162, 1060095, 1, 1, 0, 700),
-(9400581, 4032006, 1, 1, 0, 10000),
+(9400581, 4032006, 1, 1, 0, 200000),
(9400581, 2000006, 1, 1, 0, 40000),
(9400581, 2000004, 1, 1, 0, 40000),
(9400581, 2000005, 1, 1, 0, 40000),
@@ -16168,7 +16168,7 @@
(9400574, 1082158, 1, 1, 0, 700),
(9400574, 1332052, 1, 1, 0, 700),
(9400574, 1332027, 1, 1, 0, 700),
-(9400579, 4032009, 1, 1, 0, 10000),
+(9400579, 4032009, 1, 1, 0, 200000),
(9400579, 4006001, 1, 1, 0, 7000),
(9400579, 2041013, 1, 1, 0, 750),
(9400579, 4020008, 1, 1, 0, 7000),
@@ -18744,7 +18744,7 @@
(3000004, 2381033, 1, 1, 0, 10000),
(2230101, 4032399, 1, 1, 2251, 30000),
(2230131, 4032399, 1, 1, 2251, 30000),
-(9400578, 4032008, 1, 1, 0, 10000),
+(9400578, 4032008, 1, 1, 0, 200000),
(9400578, 2001000, 1, 1, 0, 800),
(9400578, 1032032, 1, 1, 0, 1200),
(9400578, 1032013, 1, 1, 0, 1200),
@@ -19043,7 +19043,17 @@
(9300024, 4001035, 1, 1, 0, 999999),
(9300025, 4001036, 1, 1, 0, 999999),
(9300027, 4001035, 1, 1, 0, 999999),
-(9300033, 4001035, 1, 1, 0, 999999);
+(9300033, 4001035, 1, 1, 0, 999999),
+(9400585, 4032004, 1, 1, 0, 200000),
+(9400585, 0, 310, 500, 0, 200000),
+(9400586, 4032004, 1, 1, 0, 200000),
+(9400586, 0, 310, 500, 0, 200000),
+(9400587, 4000018, 1, 1, 0, 200000),
+(9400587, 4032003, 1, 1, 0, 150000),
+(9400587, 0, 210, 380, 0, 200000),
+(9400588, 4000018, 1, 1, 0, 200000),
+(9400588, 4032003, 1, 1, 0, 150000),
+(9400588, 0, 210, 380, 0, 200000);
# (dropperid, itemid, minqty, maxqty, questid, chance)
diff --git a/src/net/server/channel/handlers/NPCTalkHandler.java b/src/net/server/channel/handlers/NPCTalkHandler.java
index c2bc7688d1..8714934548 100644
--- a/src/net/server/channel/handlers/NPCTalkHandler.java
+++ b/src/net/server/channel/handlers/NPCTalkHandler.java
@@ -28,6 +28,7 @@ import scripting.npc.NPCScriptManager;
import server.life.MapleNPC;
import server.maps.MapleMapObject;
import server.maps.PlayerNPCs;
+import tools.FilePrinter;
import tools.MaplePacketCreator;
import tools.data.input.SeekableLittleEndianAccessor;
@@ -38,8 +39,10 @@ public final class NPCTalkHandler extends AbstractMaplePacketHandler {
return;
}
- if(System.currentTimeMillis() - c.getPlayer().getNpcCooldown() < ServerConstants.BLOCK_NPC_RACE_CONDT)
+ if(System.currentTimeMillis() - c.getPlayer().getNpcCooldown() < ServerConstants.BLOCK_NPC_RACE_CONDT) {
+ c.announce(MaplePacketCreator.enableActions());
return;
+ }
int oid = slea.readInt();
MapleMapObject obj = c.getPlayer().getMap().getMapObject(oid);
@@ -50,11 +53,6 @@ public final class NPCTalkHandler extends AbstractMaplePacketHandler {
if (npc.getId() == 9010009) { //is duey
c.getPlayer().setNpcCooldown(System.currentTimeMillis());
c.announce(MaplePacketCreator.sendDuey((byte) 8, DueyHandler.loadItems(c.getPlayer())));
- } else if (npc.hasShop()) {
- if (c.getPlayer().getShop() != null) {
- return;
- }
- npc.sendShop(c);
} else {
if (c.getCM() != null || c.getQM() != null) {
c.announce(MaplePacketCreator.enableActions());
@@ -64,7 +62,18 @@ public final class NPCTalkHandler extends AbstractMaplePacketHandler {
// Custom handling for gachapon scripts to reduce the amount of scripts needed.
NPCScriptManager.getInstance().start(c, npc.getId(), "gachapon", null);
} else {
- NPCScriptManager.getInstance().start(c, npc.getId(), null);
+ boolean hasNpcScript = NPCScriptManager.getInstance().start(c, npc.getId(), null);
+ if (!hasNpcScript) {
+ if (!npc.hasShop()) {
+ FilePrinter.printError(FilePrinter.NPC_UNCODED, "NPC " + npc.getName() + "(" + npc.getId() + ") is not coded.\r\n");
+ return;
+ } else if(c.getPlayer().getShop() != null) {
+ c.announce(MaplePacketCreator.enableActions());
+ return;
+ }
+
+ npc.sendShop(c);
+ }
}
}
} else if (obj instanceof PlayerNPCs) {
diff --git a/src/scripting/AbstractPlayerInteraction.java b/src/scripting/AbstractPlayerInteraction.java
index 5fe7c2d4ae..c3ff6a8460 100644
--- a/src/scripting/AbstractPlayerInteraction.java
+++ b/src/scripting/AbstractPlayerInteraction.java
@@ -233,13 +233,17 @@ public class AbstractPlayerInteraction {
c.getPlayer().updateQuest(status);
}
- public MapleQuestStatus.Status getQuestStatus(int id) {
- return c.getPlayer().getQuest(MapleQuest.getInstance(id)).getStatus();
+ public int getQuestStatus(int id) {
+ return c.getPlayer().getQuest(MapleQuest.getInstance(id)).getStatus().getId();
}
-
+
+ private MapleQuestStatus.Status getQuestStat(int id) {
+ return c.getPlayer().getQuest(MapleQuest.getInstance(id)).getStatus();
+ }
+
public boolean isQuestCompleted(int quest) {
try {
- return getQuestStatus(quest) == MapleQuestStatus.Status.COMPLETED;
+ return getQuestStat(quest) == MapleQuestStatus.Status.COMPLETED;
} catch (NullPointerException e) {
e.printStackTrace();
return false;
@@ -252,7 +256,7 @@ public class AbstractPlayerInteraction {
public boolean isQuestStarted(int quest) {
try {
- return getQuestStatus(quest) == MapleQuestStatus.Status.STARTED;
+ return getQuestStat(quest) == MapleQuestStatus.Status.STARTED;
} catch (NullPointerException e) {
e.printStackTrace();
return false;
diff --git a/src/scripting/npc/NPCConversationManager.java b/src/scripting/npc/NPCConversationManager.java
index 04fff22d0e..afdcff4d83 100644
--- a/src/scripting/npc/NPCConversationManager.java
+++ b/src/scripting/npc/NPCConversationManager.java
@@ -38,6 +38,7 @@ import provider.MapleDataProviderFactory;
import scripting.AbstractPlayerInteraction;
import server.MapleItemInformationProvider;
import server.MapleStatEffect;
+import server.MapleShopFactory;
import server.events.gm.MapleEvent;
import server.gachapon.MapleGachapon;
import server.gachapon.MapleGachapon.MapleGachaponItem;
@@ -315,6 +316,10 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
public void resetStats() {
getPlayer().resetStats();
}
+
+ public void openShopNPC(int id) {
+ MapleShopFactory.getInstance().getShop(id).sendShop(c);
+ }
public void maxMastery() {
for (MapleData skill_ : MapleDataProviderFactory.getDataProvider(new File(System.getProperty("wzpath") + "/" + "String.wz")).getData("Skill.img").getChildren()) {
diff --git a/src/scripting/npc/NPCScriptManager.java b/src/scripting/npc/NPCScriptManager.java
index 1603e8aad2..26476ca3df 100644
--- a/src/scripting/npc/NPCScriptManager.java
+++ b/src/scripting/npc/NPCScriptManager.java
@@ -50,11 +50,11 @@ public class NPCScriptManager extends AbstractScriptManager {
return instance;
}
- public void start(MapleClient c, int npc, MapleCharacter chr) {
- start(c, npc, null, chr);
+ public boolean start(MapleClient c, int npc, MapleCharacter chr) {
+ return start(c, npc, null, chr);
}
- public void start(MapleClient c, int npc, String fileName, MapleCharacter chr) {
+ public boolean start(MapleClient c, int npc, String fileName, MapleCharacter chr) {
try {
NPCConversationManager cm = new NPCConversationManager(c, npc, fileName);
if (cms.containsKey(c)) {
@@ -69,12 +69,9 @@ public class NPCScriptManager extends AbstractScriptManager {
if (iv == null) {
iv = getInvocable("npc/" + npc + ".js", c);
}
- if (iv == null) {
- FilePrinter.printError(FilePrinter.NPC_UNCODED, "NPC " + MapleLifeFactory.getNPC(npc).getName() + "(" + npc + ") is not coded.\r\n");
- }
if (iv == null || NPCScriptManager.getInstance() == null) {
dispose(c);
- return;
+ return false;
}
engine.put("cm", cm);
scripts.put(c, iv);
@@ -91,12 +88,18 @@ public class NPCScriptManager extends AbstractScriptManager {
} else {
c.announce(MaplePacketCreator.enableActions());
}
+
+ return true;
} catch (final UndeclaredThrowableException | ScriptException ute) {
FilePrinter.printError(FilePrinter.NPC + npc + ".txt", ute);
dispose(c);
+
+ return false;
} catch (final Exception e) {
FilePrinter.printError(FilePrinter.NPC + npc + ".txt", e);
dispose(c);
+
+ return false;
}
}
diff --git a/src/server/quest/MapleQuest.java b/src/server/quest/MapleQuest.java
index c5beb0ae6a..fdb579f331 100644
--- a/src/server/quest/MapleQuest.java
+++ b/src/server/quest/MapleQuest.java
@@ -135,10 +135,10 @@ public class MapleQuest {
if (startActData != null) {
for (MapleData startAct : startActData.getChildren()) {
MapleQuestActionType questActionType = MapleQuestActionType.getByWZName(startAct.getName());
- MapleQuestAction act = this.getAction(questActionType, startAct);
+ MapleQuestAction act = this.getAction(questActionType, startAct);
- if(act == null)
- continue;
+ if(act == null)
+ continue;
startActs.put(questActionType, act);
}
@@ -146,11 +146,11 @@ public class MapleQuest {
MapleData completeActData = actData.getChildByPath("1");
if (completeActData != null) {
for (MapleData completeAct : completeActData.getChildren()) {
- MapleQuestActionType questActionType = MapleQuestActionType.getByWZName(completeAct.getName());
- MapleQuestAction act = this.getAction(questActionType, completeAct);
-
- if(act == null)
- continue;
+ MapleQuestActionType questActionType = MapleQuestActionType.getByWZName(completeAct.getName());
+ MapleQuestAction act = this.getAction(questActionType, completeAct);
+
+ if(act == null)
+ continue;
completeActs.put(questActionType, act);
}
@@ -158,11 +158,11 @@ public class MapleQuest {
}
public boolean isAutoComplete() {
- return autoPreComplete || autoComplete;
+ return autoPreComplete || autoComplete;
}
public boolean isAutoStart() {
- return autoStart;
+ return autoStart;
}
public static MapleQuest getInstance(int id) {
diff --git a/src/server/quest/actions/ItemAction.java b/src/server/quest/actions/ItemAction.java
index fdd516a2d7..0ad572ee72 100644
--- a/src/server/quest/actions/ItemAction.java
+++ b/src/server/quest/actions/ItemAction.java
@@ -80,7 +80,7 @@ public class ItemAction extends MapleQuestAction {
@Override
public void run(MapleCharacter chr, Integer extSelection) {
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
- Map props = new HashMap<>();
+ Map props = new HashMap<>();
for(ItemData item : items.values()) {
if(item.getProp() != null && item.getProp() != -1 && canGetItem(item, chr)) {
for (int i = 0; i < item.getProp(); i++) {
@@ -133,7 +133,7 @@ public class ItemAction extends MapleQuestAction {
@Override
public boolean check(MapleCharacter chr, Integer extSelection) {
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
- EnumMap props = new EnumMap<>(MapleInventoryType.class);
+ EnumMap props = new EnumMap<>(MapleInventoryType.class);
List> itemList = new ArrayList<>();
for(ItemData item : items.values()) {
if (!canGetItem(item, chr)) {
diff --git a/wz/Quest.wz/Act.img.xml b/wz/Quest.wz/Act.img.xml
index ce5235bf35..bec6245b2a 100644
--- a/wz/Quest.wz/Act.img.xml
+++ b/wz/Quest.wz/Act.img.xml
@@ -39358,6 +39358,13 @@
+
+
+
+
+
+
+
@@ -39391,12 +39398,6 @@
-
-
-
-
-
-
diff --git a/wz/Quest.wz/Check.img.xml b/wz/Quest.wz/Check.img.xml
index 24cdfe8e95..73aa09d98f 100644
--- a/wz/Quest.wz/Check.img.xml
+++ b/wz/Quest.wz/Check.img.xml
@@ -63032,11 +63032,9 @@
-
-
@@ -63098,6 +63096,12 @@
+
+
+
+
+
+
@@ -63109,12 +63113,6 @@
-
-
-
-
-
-
@@ -63153,6 +63151,13 @@
+
+
+
+
+
+
+
@@ -63171,8 +63176,8 @@
-
-
+
+
@@ -63181,6 +63186,12 @@
+
+
+
+
+
+
diff --git a/wz/Quest.wz/Say.img.xml b/wz/Quest.wz/Say.img.xml
index 37e263bdd7..e3592323c9 100644
--- a/wz/Quest.wz/Say.img.xml
+++ b/wz/Quest.wz/Say.img.xml
@@ -43323,14 +43323,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+