Buff System & Map skipping fix + properly disposing Storage + Fairness to locks

Fixed buff system behaving oddly if a buff has value zero, that would render some skills "broken".
Fixed players skipping maps when trying to access portals while under a poor Internet connection.
Fixed storage not disposing players properly in cases where the players does not meet the storage conditions.
Set some locks to use fairness strategy when dealing with atomic code, in order to make the calls to it properly synchronized.
Fixed Aran introductory questline stucking players when certain conditions were met.
Added drop data for some mob versions of Fairy, Yeti and Pepe.
This commit is contained in:
ronancpl
2017-10-29 16:02:50 -02:00
parent 5f1abf3fb3
commit 44949aea37
119 changed files with 760 additions and 32399 deletions

11
scripts/npc/1202009.js Normal file
View File

@@ -0,0 +1,11 @@
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
cm.sendOk("Up ahead is the #rMirror Cave#k. Only the chosen ones have permission to access that place.");
cm.dispose();
}

11
scripts/npc/1202010.js Normal file
View File

@@ -0,0 +1,11 @@
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
cm.sendOk("Behold, the distinguished brave heroes of Rien! Those stout hearts are who have been protecting our people since long ago, our valiant comrades.");
cm.dispose();
}

View File

@@ -12,7 +12,7 @@ function action(mode, type, selection) {
status--;
}
if (status == 0) {
cm.sendNext("I'm Francis, the Puppeteer of the Black Wings. How dare you disturb my puppets... It really upsets me, but I''ll let it slide this time. If I catch you doing it again though, I swear in the name of the Black Mage, I will make you pay for it.", 9);
cm.sendNext("I'm Francis, the Puppeteer of the Black Wings. How dare you disturb my puppets... It really upsets me, but I'll let it slide this time. If I catch you doing it again though, I swear in the name of the Black Mage, I will make you pay for it.", 9);
} else if (status == 1) {
cm.sendNextPrev("#b(The Black Wings? Huh? Who are they? And how is all this related to the Black Mage? Hm, maybe you should report this info to Tru.)#k", 3);
} else if (status == 2) {

11
scripts/npc/1209001.js Normal file
View File

@@ -0,0 +1,11 @@
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
cm.sendOk("The #rBlack Mage#k's forces approaches here in an unstoppable pace... We have no other way than to flee this area now, leaving our home behind. Oh, the tragedy!");
cm.dispose();
}

11
scripts/npc/1209002.js Normal file
View File

@@ -0,0 +1,11 @@
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
cm.sendOk("Please calm down, uncle. We are embarking to #bVictoria Island#k, we will be safe once we reach there. So, come on!");
cm.dispose();
}

11
scripts/npc/1209003.js Normal file
View File

@@ -0,0 +1,11 @@
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
cm.sendOk("We are departing to #bVictoria Island#k briefly. I've heard the #rBlack Mage#k himself cannot take that place on his grasp yet, thanks to #bthe seal that has been casted on that area#k. We pray for their safety, but if fortune does not favor the Heroes, at least we will be safe once we reach the continent.");
cm.dispose();
}

11
scripts/npc/1209004.js Normal file
View File

@@ -0,0 +1,11 @@
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
cm.sendOk("I hope for this travel to be a safe one, and that we get to live on a more peaceful place there... Hey, darling, let's go.");
cm.dispose();
}

11
scripts/npc/1209005.js Normal file
View File

@@ -0,0 +1,11 @@
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
cm.sendOk("Alright, embarking in...");
cm.dispose();
}

View File

@@ -1,15 +1,19 @@
function enter(pi) {
if (pi.isQuestStarted(21701)) {
pi.playPortalSound();
pi.warp(914010000, 1);
pi.playPortalSound();
pi.warp(914010000, 1);
return true;
} else if (pi.isQuestStarted(21702)) {
pi.playPortalSound();
pi.warp(914010100, 1);
pi.playPortalSound();
pi.warp(914010100, 1);
return true;
} else if (pi.isQuestStarted(21703)) {
pi.playPortalSound();
pi.warp(914010200, 1);
return true;
} else {
pi.playerMessage(5, "Only if you are recieving a lesson from Puo, you will be allowed to enter the Pengiun Training Ground.");
pi.playerMessage(5, "You will be allowed to enter the Penguin Training Ground only if you are receiving a lesson from Puo.");
return false;
}
}

View File

@@ -6,6 +6,11 @@
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -30,6 +35,11 @@ function start(mode, type, selection) {
}
function end(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -38,13 +48,13 @@ function end(mode, type, selection) {
if (status == 0) {
qm.sendNext("Ah, it seems like you've successfully hunted a #o100120#. Pretty simple, right? Regular Attacks may be easy to use, but they are pretty weak. Don't worry, though. #p1102006# will teach you how to use more powerful skills. Wait, let me give you a well-deserved quest reward before you go.");
} else if (status == 1) {
qm.sendNextPrev("This equipment is for Noblesses. It's much cooler than what you're wearing right now, isn''t it? Follow the arrows to your left to meet my younger brother #b#p1102006##k. How about you change into your new Noblesse outfit before you go? \r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0# \r\n#i1002869# #t1002869# - 1 \r\n#i1052177# #t1052177# - 1 \r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0# 30 exp");
qm.sendNextPrev("This equipment is for Noblesses. It's much cooler than what you're wearing right now, isn't it? Follow the arrows to your left to meet my younger brother #b#p1102006##k. How about you change into your new Noblesse outfit before you go? \r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0# \r\n#i1002869# #t1002869# - 1 \r\n#i1052177# #t1052177# - 1 \r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0# 30 exp");
} else if (status == 2) {
qm.gainItem(1002869, 1);
qm.gainItem(1052177, 1);
qm.forceCompleteQuest();
qm.gainExp(30);
qm.guideHint(6);
qm.dispose();
qm.gainItem(1002869, 1);
qm.gainItem(1052177, 1);
qm.forceCompleteQuest();
qm.gainExp(30);
qm.guideHint(6);
qm.dispose();
}
}

View File

@@ -6,6 +6,11 @@
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -14,7 +19,7 @@ function start(mode, type, selection) {
qm.dispose();
return;
}
status--;
status--;
}
if (status == 0) {
qm.sendNext("I've been waiting for you, #h0#. My name is #p1102006# and I'm the third brother you are going to meet. So, you've learned about using Regular Attacks, correct? Well, next you'll be learning about your #bSkills#k, which you will find very helpful in Maple World.");
@@ -30,17 +35,22 @@ function start(mode, type, selection) {
}
function end(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
qm.sendNext("You've successfully defeated the #o100121#s and brought me a #t4000483#. That's very impressive! #bYou earn 3 Skill Points every time you level up, after you officially become a knight, that is. Keep following the arrow to the left, and you''ll meet #b#p1102007##k, who will guide you through the next step.\r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0# \r\n#fUI/UIWindow.img/QuestIcon/8/0# 40 exp");
qm.sendNext("You've successfully defeated the #o100121#s and brought me a #t4000483#. That's very impressive! #bYou earn 3 Skill Points every time you level up, after you officially become a knight, that is. Keep following the arrow to the left, and you'll meet #b#p1102007##k, who will guide you through the next step.\r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0# \r\n#fUI/UIWindow.img/QuestIcon/8/0# 40 exp");
} else if (status == 1) {
qm.gainItem(4000483, -1);
qm.forceCompleteQuest();
qm.gainExp(40);
qm.dispose();
qm.gainItem(4000483, -1);
qm.forceCompleteQuest();
qm.gainExp(40);
qm.dispose();
}
}

View File

@@ -6,34 +6,44 @@
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
if (status == 2) {
qm.sendNext("Hmm, was that too much to ask? Is it because you don''t know how to break Boxes? I'll tell you how if you accept my Quest. Let me know if you change your mind.");
qm.sendNext("Hmm, was that too much to ask? Is it because you don't know how to break Boxes? I'll tell you how if you accept my Quest. Let me know if you change your mind.");
qm.dispose();
return;
}
status--;
status--;
}
if (status == 0) {
qm.sendNext("#b(*clang clang*)#k");
} else if (status == 1) {
qm.sendNextPrev("Whoa! Hey! You scared me. I didn't know I had a visitor. You must be the Noblesse #p1102006# was talking about. Welcome! I''m #p1102007#, and my hobby is making #bChairs#k. I'm thinking about making you one as a welcome present.");
qm.sendNextPrev("Whoa! Hey! You scared me. I didn't know I had a visitor. You must be the Noblesse #p1102006# was talking about. Welcome! I'm #p1102007#, and my hobby is making #bChairs#k. I'm thinking about making you one as a welcome present.");
} else if (status == 2) {
qm.sendNextPrev("But wait, I can't make you one because I don''t have enough materials. Could you find me the materials I need? Around this area, you will find a lot of Boxes with items inside. Could you bring me back a #t4032267# and a #t4032268# found inside those Boxes?");
qm.sendNextPrev("But wait, I can't make you one because I don't have enough materials. Could you find me the materials I need? Around this area, you will find a lot of Boxes with items inside. Could you bring me back a #t4032267# and a #t4032268# found inside those Boxes?");
} else if (status == 3) {
qm.sendNextPrev("Do you know how to get items from boxes? All you have to do is break the Boxes like you're attacking a monster. The difference is that you can attack monsters using your Skills, but you can #bonly use Regular Attacks to break Boxes#k.");
} else if (status == 4) {
qm.sendAcceptDecline("Please bring me 1 #b#t4032267##k and 1 #b#t4032268##k found inside those Boxes. I'll make you an awesome Chair as soon as I have what I need. I'll wait here!");
} else if (status == 5) {
qm.forceStartQuest();
qm.guideHint(9);
qm.dispose();
qm.forceStartQuest();
qm.guideHint(9);
qm.dispose();
}
}
function end(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -44,16 +54,16 @@ function end(mode, type, selection) {
} else if (status == 1) {
qm.sendNextPrev("Here it is, a #t3010060#. What do you think? Nifty, huh? You can #bquickly recover your HP by sitting in this Chair#k. It will be stored in the #bSet-up#k window in your Inventory, so confirm that you've received the chair and head over to #b#p1102008##k. You'll see him if you keep following the arrow to the left. \r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0# \r\n#i3010060# 1 #t3010060# \r\n#fUI/UIWindow.img/QuestIcon/8/0# 95 exp");
} else if (status == 2) {
qm.gainItem(4032267, -1);
qm.gainItem(4032268, -1);
qm.gainItem(3010060, 1);
qm.forceCompleteQuest();
qm.forceCompleteQuest(20000);
qm.forceCompleteQuest(20001);
qm.forceCompleteQuest(20002);
qm.forceCompleteQuest(20015);
qm.gainExp(95);
qm.guideHint(10);
qm.dispose();
qm.gainItem(4032267, -1);
qm.gainItem(4032268, -1);
qm.gainItem(3010060, 1);
qm.forceCompleteQuest();
qm.forceCompleteQuest(20000);
qm.forceCompleteQuest(20001);
qm.forceCompleteQuest(20002);
qm.forceCompleteQuest(20015);
qm.gainExp(95);
qm.guideHint(10);
qm.dispose();
}
}

View File

@@ -6,6 +6,11 @@
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -14,7 +19,7 @@ function start(mode, type, selection) {
qm.dispose();
return;
}
status--;
status--;
}
if (status == 0) {
qm.sendNext("Hello, #h0#. Welcome to #p1101000# Knights. My name is #p1101002# and I am currently serving as the young Empress's Tactician. We'd better get acquainted since we'll be seeing a lot of each other. Haha!");
@@ -29,23 +34,23 @@ function start(mode, type, selection) {
} else if (status == 5) {
qm.sendNextPrev("But that was ages ago and people today don't realize how scary the Black Mage is. We've all become spoiled by the peaceful Maple World we enjoy today and forgotten how chaotic and frightening Maple World once was. If we don't do something, the Black Mage will once again rule Maple World!");
} else if (status == 6) {
qm.sendNextPrev("This is why the young Empress has decided to take matters into her own hands. She's forming a knighthood of brave Maplers to defeat the Black Mage once and for all. You know what you need to do, right? I''m sure you have an idea since you, yourself, signed up to be a Knight.");
qm.sendNextPrev("This is why the young Empress has decided to take matters into her own hands. She's forming a knighthood of brave Maplers to defeat the Black Mage once and for all. You know what you need to do, right? I'm sure you have an idea since you, yourself, signed up to be a Knight.");
} else if (status == 7) {
qm.sendNextPrev("We have to get stronger so we can defeat the Black Mage if he revives. Our primary goal is to prevent him from destroying Maple World, and you will play a prominent role in that.");
} else if (status == 8) {
qm.sendAcceptDecline("That concludes my explanation. Have I answered all your questions? \r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0# \r\n#fUI/UIWindow.img/QuestIcon/8/0# 380 exp");
} else if (status == 9) {
if (!qm.isQuestStarted(20016)) {
qm.forceStartQuest();
qm.gainExp(380);
}
qm.sendNext("I'm glad you're clear about our current situation, but you know, at your current level, you're not even strong enough to face the Black Mage's minions, let alone the Black Mage himself. Not even his minions' minions, as a matter of fact. How will you protect Maple World at your current level?");
if (!qm.isQuestStarted(20016)) {
qm.forceStartQuest();
qm.gainExp(380);
}
qm.sendNext("I'm glad you're clear about our current situation, but you know, at your current level, you're not even strong enough to face the Black Mage's minions, let alone the Black Mage himself. Not even his minions' minions, as a matter of fact. How will you protect Maple World at your current level?");
} else if (status == 10) {
qm.sendNextPrev("Although you've been accepted into the knighthood, you cannot be recognized as a knight yet. You are not an Official Knight because you're not even a Knight-in-Training. If you remain at your current level, you'll be nothing more than the handyman of #p1101000# Knights.");
} else if (status == 11) {
qm.sendNextPrev("But no one starts as a strong Knight on day one. The Empress didn''t want someone strong. She wanted someone with courage whom she could develop into a strong Knight through rigorous training. So, you should first become a Knight-in-Training. We'll talk about your missions when you get to that point.");
qm.sendNextPrev("But no one starts as a strong Knight on day one. The Empress didn't want someone strong. She wanted someone with courage whom she could develop into a strong Knight through rigorous training. So, you should first become a Knight-in-Training. We'll talk about your missions when you get to that point.");
} else if (status == 12) {
qm.sendPrev("Take the portal on the left to reach the Training Forest. There, you will find #p1102000#, the Training Instructor, who will teach you how to become stronger. I don''t want to find you wandering around aimlessly until you reach Lv. 10, you hear?");
qm.sendPrev("Take the portal on the left to reach the Training Forest. There, you will find #p1102000#, the Training Instructor, who will teach you how to become stronger. I don't want to find you wandering around aimlessly until you reach Lv. 10, you hear?");
qm.forceCompleteQuest();
qm.dispose();
}

View File

@@ -6,6 +6,11 @@
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -14,12 +19,12 @@ function start(mode, type, selection) {
qm.dispose();
return;
}
status--;
status--;
}
if (status == 0) {
qm.sendNext("Hmm? #p1101002# sent you, huh? You must be the newbie that recently joined Cygnus Knights. Welcome, and nice to meet you! My name is #p1102000#. I''m the Training Instructor who trains all Noblesses like yourself. Of course, I'm not a human as you can tell.");
qm.sendNext("Hmm? #p1101002# sent you, huh? You must be the newbie that recently joined Cygnus Knights. Welcome, and nice to meet you! My name is #p1102000#. I'm the Training Instructor who trains all Noblesses like yourself. Of course, I'm not a human as you can tell.");
} else if (status == 1) {
qm.sendNextPrev("We are called Piyos. You''ve seen #p1101001# who is at the Empress''s side all the time, haven't you? Piyos are of the same family as #p1101001#, but we belong to different types. Of course, you haven't seen any of us since we only live in Ereve. You'll get used to Piyos in no time.");
qm.sendNextPrev("We are called Piyos. You've seen #p1101001# who is at the Empress's side all the time, haven't you? Piyos are of the same family as #p1101001#, but we belong to different types. Of course, you haven't seen any of us since we only live in Ereve. You'll get used to Piyos in no time.");
} else if (status == 2) {
qm.sendNextPrev("Oh, and did you know that there are no monsters in Ereve? Not even a smidgeon of evil dare enter Ereve. But don't you worry. You'll be able to train with illusory monsters created by #p1101001# called Mimis.");
} else if (status == 3) {

View File

@@ -6,12 +6,17 @@
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
if (status == 1) {
qm.sendNext("When will you realize how weak you are... When you get yourself in trouble in Victoria Island?");
qm.safeDispose();
qm.dispose();
return;
}
status--;
@@ -19,7 +24,7 @@ function start(mode, type, selection) {
if (status == 0) {
qm.sendNext("You have finally become a Knight-in-Training. I'd like to give you a mission right away, but you still look miles away from even being able to handle a task on your own. Are you sure you can even go to Victoria Island like this?");
} else if (status == 1) {
qm.askAcceptDecline("It's up to you to head over to Victoria Island, but a Knight-in-Training that can't take care of one''s self in battles is likely to cause harm to the Empress''s impeccable reputation. As the Head Tactician of this island, I can't let that happen, period. I want you to keep training until the right time comes.");
qm.askAcceptDecline("It's up to you to head over to Victoria Island, but a Knight-in-Training that can't take care of one's self in battles is likely to cause harm to the Empress's impeccable reputation. As the Head Tactician of this island, I can't let that happen, period. I want you to keep training until the right time comes.");
} else if (status == 2) {
qm.forceCompleteQuest();
qm.sendNext("#p1102000#, the Training Instructor, will help you train into a serviceable knight. Once you reach Level 13, I'll assign you a mission or two. So until then, keep training.");

View File

@@ -48,36 +48,38 @@ function start(mode, type, selection) {
}
function end(mode, type, selection) {
status++;
if (mode != 1) {
if (type == 1 && mode == 0) {
qm.sendNext("What about the child? Please give me the child!");
}
qm.dispose();
return;
}
if (status == 0)
qm.sendYesNo("You made it back safely! What about the child?! Did you bring the child with you?!");
else if (status == 1) {
qm.gainItem(4001271, -1);
qm.removeEquipFromSlot(-11);
qm.forceCompleteQuest();
qm.sendNext("Oh, what a relief. I'm so glad...", 9);
} else if (status == 2)
qm.sendNextPrev("Hurry and board the ship! We don't have much time!", 3);
else if (status == 3)
qm.sendNextPrev("We don't have any time to waste. The Black Mage's forces are getting closer and closer! We're doomed if we don't leave right right this moment!", 9);
else if (status == 4)
qm.sendNextPrev("Leave, now!", 3);
else if (status == 5)
qm.sendNextPrev("Aran, please! I know you want to stay and fight the Black Mage, but it's too late! Leave it to the others and come to Victoria Island with us!", 9);
else if (status == 6)
qm.sendNextPrev("No, I can't!", 3);
else if (status == 7) {
qm.sendNextPrev("Athena Pierce, why don't you leave for Victoria Island first? I promise I'll come for you later. I'll be alright. I must fight the Black Mage with the other heroes!", 3);
} else if (status == 8) {
qm.forceCompleteQuest();
qm.warp(914090010); // Initialize Aran Tutorial Scenes
qm.dispose();
}
}
status++;
if (mode != 1) {
if (type == 1 && mode == 0) {
qm.sendNext("What about the child? Please give me the child!");
}
qm.dispose();
return;
}
if (status == 0)
qm.sendYesNo("You made it back safely! What about the child?! Did you bring the child with you?!");
else if (status == 1) {
qm.sendNext("Oh, what a relief. I'm so glad...", 9);
} else if (status == 2)
qm.sendNextPrev("Hurry and board the ship! We don't have much time!", 3);
else if (status == 3)
qm.sendNextPrev("We don't have any time to waste. The Black Mage's forces are getting closer and closer! We're doomed if we don't leave right right this moment!", 9);
else if (status == 4)
qm.sendNextPrev("Leave, now!", 3);
else if (status == 5)
qm.sendNextPrev("Aran, please! I know you want to stay and fight the Black Mage, but it's too late! Leave it to the others and come to Victoria Island with us!", 9);
else if (status == 6)
qm.sendNextPrev("No, I can't!", 3);
else if (status == 7) {
qm.sendNextPrev("Athena Pierce, why don't you leave for Victoria Island first? I promise I'll come for you later. I'll be alright. I must fight the Black Mage with the other heroes!", 3);
} else if (status == 8) {
qm.gainItem(4001271, -1);
qm.removeEquipFromSlot(-11);
qm.forceCompleteQuest();
qm.warp(914090010); // Initialize Aran Tutorial Scenes
qm.dispose();
}
}

View File

@@ -75,7 +75,7 @@ function end(mode, type, selection) {
qm.gainItem(3010062, 1);
qm.sendNextPrev("Here, a fully-assembled chair, just for you! I've always wanted to give you a chair as a gift, because I know a hero can occasionally use some good rest. Tee hee.", 9);
} else if (status == 2) {
qm.sendNext("A hero is not invincible. A hero is human. I'm sure you will face challenges and even fatter at times. But you are a hero because you have what it takes to overcome any obstacles you may encounter.", 9);
qm.sendNext("A hero is not invincible. A hero is human. I'm sure you will face challenges and even falter at times. But you are a hero because you have what it takes to overcome any obstacles you may encounter.", 9);
} else if (status == 3) {
qm.guideHint(19);
qm.dispose();

View File

@@ -10,7 +10,7 @@ function start(mode, type, selection) {
status++;
}
if (status == 0) {
qm.sendNext("There isn't much record left of the heores that fought against the Black Mage. Even in the Book of Prophecy, the only information available is that there were five of them. There is nothing about who they were or what they looked like. Is there anything you remember? Anything at all?", 8);
qm.sendNext("There isn't much record left of the heroes that fought against the Black Mage. Even in the Book of Prophecy, the only information available is that there were five of them. There is nothing about who they were or what they looked like. Is there anything you remember? Anything at all?", 8);
} else if (status == 1) {
qm.sendNextPrev("I don't remember a thing...", 2);
} else if (status == 2) {

View File

@@ -37,12 +37,12 @@ function start(mode, type, selection) {
qm.sendYesNo("#b(Are you certain that you were the hero that wielded the #p1201001#? Yes, you're sure. You better grab the #p1201001# really tightly. Surely it will react to you.)#k");
} else if (status == 1) {
if (qm.getPlayer().getJob().getId() == 2000) {
if(!qm.canHold(1142129)) {
cm.sendOk("Wow, your #bequip#k inventory is full. I need you to make at least 1 empty slot to complete this quest.");
qm.dispose();
return;
}
qm.gainItem(1142129, true);
if(!qm.canHold(1142129)) {
cm.sendOk("Wow, your #bequip#k inventory is full. I need you to make at least 1 empty slot to complete this quest.");
qm.dispose();
return;
}
qm.gainItem(1142129, true);
qm.completeQuest();
qm.changeJobById(2100);
qm.getPlayer().setStr(35);
@@ -51,8 +51,10 @@ function start(mode, type, selection) {
qm.getPlayer().setRemainingSp((qm.getPlayer().getLevel() - 10) * 3 + 1);
qm.getPlayer().setMaxHp(qm.getPlayer().getMaxHp() + 275);
qm.getPlayer().setMaxMp(qm.getPlayer().getMaxMp() + 15);
qm.teachSkill(21000000, 0, 10, -1);
qm.teachSkill(21001003, 0, 20, -1);
//qm.teachSkill(21000000, 0, 10, -1); //learned later...
//qm.teachSkill(21001003, 0, 20, -1); //learned later...
//qm.getPlayer().changeSkillLevel(SkillFactory.getSkill(20009000), 0, -1);
//qm.getPlayer().changeSkillLevel(SkillFactory.getSkill(20009000), 1, 0);
//qm.showInfo("You have acquired the Pig's Weakness skill.");

View File

@@ -1,6 +1,11 @@
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -28,7 +33,7 @@ function start(mode, type, selection) {
qm.forceStartQuest();
}
} else if (status == 6) {
qm.sendPrev("You'll find a Training Center if you exit to the #bleft#k. There, you''ll meet #b#p1202006##k. I'm a bit worried because I think he may be struggling with bouts of Alzheimer's, but he spent a long time researching skills to help you. I'm sure you'll learn a thing or two from him.");
qm.sendPrev("You'll find a Training Center if you exit to the #bleft#k. There, you'll meet #b#p1202006##k. I'm a bit worried because I think he may be struggling with bouts of Alzheimer's, but he spent a long time researching skills to help you. I'm sure you'll learn a thing or two from him.");
qm.dispose();
}
}

View File

@@ -2,9 +2,12 @@
importPackage(Packages.client);
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -16,27 +19,32 @@ function start(mode, type, selection) {
status--;
}
if (status == 0) {
qm.sendNext("Your abilities are really beginning to take shape. I am surprised that an old man like me was able to help you. I''m tearing up just thinking about how happy it makes me to have been of assistance to you. *Sniff sniff*");
qm.sendNext("Your abilities are really beginning to take shape. I am surprised that an old man like me was able to help you. I'm tearing up just thinking about how happy it makes me to have been of assistance to you. *Sniff sniff*");
} else if (status == 1) {
qm.sendNextPrev("#b(You didn't even train that long with him... Why is he crying?)#k", 2);
} else if (status == 2) {
qm.sendNextPrev("Alright, here''s the third and the final stage of training. Your last opponent is... #r#o9300343#s#k! Do you know anything about #o1210100#s?");
qm.sendNextPrev("Alright, here's the third and the final stage of training. Your last opponent is... #r#o9300343#s#k! Do you know anything about #o1210100#s?");
} else if (status == 3) {
qm.sendNextPrev('Well, a little bit...', 2);
} else if (status == 4) {
qm.sendNextPrev("They are natural warriors! They''re born with a voracious appetite for food. They devour any food that''s visible the moment they sweep by. Terrifying, isn''t it?");
qm.sendNextPrev("They are natural warriors! They're born with a voracious appetite for food. They devour any food that's visible the moment they sweep by. Terrifying, isn't it?");
} else if (status == 5) {
qm.sendNextPrev("#b(Is that really true?)#k", 2);
} else if (status == 6) {
qm.sendAcceptDecline("Okay, now... #bEnter the Training Center again#k, defeat #r30#k #o9300343#s, and show me what you're made of! You'll have to exert all your energy to defeat them! Go, go, go! Rise above me!");
} else if (status == 7) {
qm.forceStartQuest();
qm.sendOk("Now go and take on those monstrous #o9300343#s!");
qm.dispose();
qm.forceStartQuest();
qm.sendOk("Now go and take on those monstrous #o9300343#s!");
qm.dispose();
}
}
function end(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -45,7 +53,7 @@ function end(mode, type, selection) {
qm.dispose();
return;
}
status--;
status--;
}
if (status == 0) {
qm.sendNext("Ah, you've come back after defeating all 30 #o9300343#s. I knew you had it in you... Even though you have no memories and few abilities, I could see that you were different! How? Because you're carrying around a Polearm, obviously!");

View File

@@ -1,6 +1,11 @@
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -8,7 +13,7 @@ function start(mode, type, selection) {
qm.dispose();
return;
}
status--;
status--;
}
if (status == 0) {
qm.sendNext("How did the training go? The Penguin Teacher #p1202006# likes to exaggerate and it worried me knowing that he has bouts of Alzheimer's, but I'm sure he helped you. He's been studying the skills of heroes for a very long time.");
@@ -17,9 +22,9 @@ function start(mode, type, selection) {
} else if (status == 2) {
qm.sendAcceptDecline("That's great! Honestly, though, I think it has less to do with the method of #p1202006#'s training and more to do with your body remembering its old abilities. #bI'm sure your body will remember more skills as you continue to train#k! \r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0# 500 exp");
} else if (status == 3) {
qm.forceCompleteQuest();
qm.gainExp(500);
qm.dispose();
qm.forceCompleteQuest();
qm.gainExp(500);
qm.dispose();
}
}

View File

@@ -1,6 +1,11 @@
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -19,7 +24,7 @@ function start(mode, type, selection) {
qm.forceStartQuest();
qm.sendNext("I wonder what triggered this in the first place. There is no way this puppet was naturally created, which means someone planned this. I should keep an eye on the #o1210102#s.", 9);
} else if (status == 3) {
qm.sendPrev("#b(You were able to find out what caused the changes in the #o1210102#s. You should report to #p1002104# and deliver the information you''ve gathered.)#k", 2);
qm.sendPrev("#b(You were able to find out what caused the changes in the #o1210102#s. You should report to #p1002104# and deliver the information you've gathered.)#k", 2);
qm.dispose();
}
}

View File

@@ -1,11 +1,16 @@
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
if (status == 2) {
qm.sendNext("What? I don''t think there are any suspects besides that kid. Please think again.");
qm.sendNext("What? I don't think there are any suspects besides that kid. Please think again.");
qm.dispose();
return;
}
@@ -19,9 +24,9 @@ function start(mode, type, selection) {
qm.sendAcceptDecline("A kid with a puppet? That seems very suspicious. I am sure that kid is the reason the Green Mushrooms have suddenly turned violent.");
} else if (status == 3) {
qm.forceStartQuest();
qm.sendNext("How dare this kid wreak havoc in the South Forest. Who knows how long it will take to restore the forest... I''ll have to devote most of my time cleaning up the mess.", 2);
qm.sendNext("How dare this kid wreak havoc in the South Forest. Who knows how long it will take to restore the forest... I'll have to devote most of my time cleaning up the mess.", 2);
} else if (status == 4) {
qm.sendPrev("#b(You were able to find out what caused the changes in the Green Mushrooms. You should report #p1002104# and deliver the information you''ve collected.)#k", 2);
qm.sendPrev("#b(You were able to find out what caused the changes in the Green Mushrooms. You should report #p1002104# and deliver the information you've collected.)#k", 2);
} else if (status == 5) {
qm.dispose();
}

View File

@@ -1,6 +1,11 @@
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -11,15 +16,15 @@ function start(mode, type, selection) {
status--;
}
if (status == 0) {
qm.sendNext("Aren''t you the one that used to be in #m101000000# until not too long ago? I finally found you! Do you know how long it took for me to finally find you?", 8);
qm.sendNext("Aren't you the one that used to be in #m101000000# until not too long ago? I finally found you! Do you know how long it took for me to finally find you?", 8);
} else if (status == 1) {
qm.sendNextPrev("Who are you?", 2);
} else if (status == 2) {
qm.sendAcceptDecline("Me? If you want to know, stop by my cave. I'll even send you an invitation. You'll be directly sent to my cave as soon as you accept. Look forward to seeing you there.");
} else if (status == 3) {
qm.forceCompleteQuest();
qm.warp(910510200, 0);
qm.dispose();
qm.forceCompleteQuest();
qm.warp(910510200, 0);
qm.dispose();
}
}

View File

@@ -5,6 +5,11 @@ function start(mode, type, selection) {
}
function end(mode, type, selection) {
if(mode == -1 || mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -19,11 +24,11 @@ function end(mode, type, selection) {
} else if (status == 1) {
qm.sendNextPrev("#b(You tell her about the Puppeteer and the Black Wings, and about their mission.)#k", 2);
} else if (status == 2) {
qm.sendNextPrev("I see... I didn''t know there was a group called the Black Wings... They must be fools if they''re trying to revive the Black Mage, knowing how dangerous he is.", 8);
qm.sendNextPrev("I see... I didn't know there was a group called the Black Wings... They must be fools if they're trying to revive the Black Mage, knowing how dangerous he is.", 8);
} else if (status == 3) {
qm.sendNextPrev("That...that''s true...\r\r#b(She''s definitely not afraid to speak her mind.)#k", 2);
qm.sendNextPrev("That...that's true...\r\r#b(She's definitely not afraid to speak her mind.)#k", 2);
} else if (status == 4) {
qm.sendNextPrev("The Book of Prophecy states that the hero will revive and fight against the Black Mage. I wasn''t sure if that was true, but this confirms that the Black Mage is still around.", 8);
qm.sendNextPrev("The Book of Prophecy states that the hero will revive and fight against the Black Mage. I wasn't sure if that was true, but this confirms that the Black Mage is still around.", 8);
} else if (status == 5) {
qm.sendNextPrev("Aren't you scared?", 2);
} else if (status == 6) {
@@ -34,14 +39,14 @@ function end(mode, type, selection) {
qm.teachSkill(21001003, qm.getPlayer().getSkillLevel(21001003), 20, -1);
qm.gainExp(3900 * qm.getPlayer().getExpRate());
}
qm.showIntro("Effect/BasicEff.img/AranGetSkill");
qm.sendNext('#b(You remembered the Polearm Booster skill!)#k', 2);
qm.showIntro("Effect/BasicEff.img/AranGetSkill");
qm.sendNext('#b(You remembered the Polearm Booster skill!)#k', 2);
} else if (status == 8) {
qm.sendNextPrev("This skill was found in an ancient incomprehensible script. I had a hunch it might be a skill you used in the past, and I think I was right. You're not as strong as you used to be, but you'll get there, in time.", 8);
} else if (status == 9) {
qm.sendNextPrev("You are steadily becoming more powerful, and I''ll be here to keep motivating you. You have nothing to be afraid of. You will not lose the battle. You didn''t emerge from ice only to lose to the Black Mage, did you? This time, you''ll finish him, once and for all!", 8);
qm.sendNextPrev("You are steadily becoming more powerful, and I'll be here to keep motivating you. You have nothing to be afraid of. You will not lose the battle. You didn't emerge from ice only to lose to the Black Mage, did you? This time, you'll finish him, once and for all!", 8);
} else if (status == 10) {
qm.sendPrev("To do so, there''s only one thing you can do. Train, train, train. Head to Victoria Island and continue training. Let''s make sure you become so powerful that the Black Mage doesn''t stand a chance!", 8);
qm.sendPrev("To do so, there's only one thing you can do. Train, train, train. Head to Victoria Island and continue training. Let's make sure you become so powerful that the Black Mage doesn't stand a chance!", 8);
} else if (status == 11) {
qm.dispose();
}

View File

@@ -29,6 +29,11 @@ function start(mode, type, selection) {
if (mode == -1) {
qm.dispose();
} else {
if(mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
@@ -43,7 +48,7 @@ function start(mode, type, selection) {
qm.sendAcceptDecline("All right, now, this key is very long and complex. I need you to memorize it very well. I won't say again, so you'd better write it down somewhere. Are you ready?");
} else if (status == 2) {
var pass = generateString();
qm.sendOk("The key code is #b"+pass+"#k. Got that? Put the key into the door of the secret passage, and you will be able to walk around the passage freely.");
qm.sendOk("The key code is #b" + pass + "#k. Got that? Put the key into the door of the secret passage, and you will be able to walk around the passage freely.");
qm.forceStartQuest(pass);
qm.dispose();
}