Files
sweetgum-server/scripts/quest/21742.js
ronancpl 80b1776ad3 Player/NPC Shop patch + Fredrick/Duey patch + Loot w. time GMS-like
Reading approximated unitPrice value from WZ in such a fashion that the new double value can be represented in float point without losing too much data.
Fixed rechargeables with quantity 0 set on the playershop/hiredmerchant being handed back to the owner with quantity 1.
Solved many concurrecy issues related with items on the field and playershop/hiredmerchant.
Fixed anomalies with waiting time before picking up other players items, now acting GMS-like.
Added/patched copyleft claims in files that are from my own authorship. Please see backtrack_licenses/readme.txt for more info about this move.
Fixed issues with item retrieval when using bundles on playershop/hiredmerchant.
Fixed some exploits with playershop/hiredmerchant.
Fixed a glitch with npcshop when trying to recharge/buy items without having enough mesos.
Added portal sound effect for some scripted portals that still lacked it.
Fixed some exploits with NPCs Fredrick and Duey.
Fixed Body Pressure not displaying damage to other players.
Added a flag that permits town scrolls to act like a "banish" for players. This renders the antibanish scroll effect available.
2018-05-10 13:09:57 -03:00

97 lines
4.3 KiB
JavaScript

/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var status = -1;
function start(mode, type, selection) {
if (mode == -1) {
qm.dispose();
} else {
if(mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
qm.sendNext("Well, I'm not really busy of anything, bit I don't feel like concocting medicine. Can you come back later? If you don't mind, move.", 9);
} else if (status == 1) {
qm.sendNextPrev("I heard you met the Shadow Knight of the Black Wings.", 3);
} else if (status == 2) {
qm.sendNextPrev("Ah, you mean that guy dressed in black with a menacing wrinkle in his forehead? Why, yes I did. I did meet him. I event got an item for him. He asked me to deliver it to that old man, Mu Gong.", 9);
} else if (status == 3) {
qm.sendNextPrev("An item?", 3);
} else if (status == 4) {
qm.sendNextPrev("Yes, a big #bHanging Scroll#k. He gave it to me without saying much. He just asked me to deliver it. He looked scary, as if he would chase me down if I didn't do as he said. Wheeeeeew, that was an experience.", 9);
} else if (status == 5) {
qm.sendNextPrev("So did you deliver the Hanging Scroll to him?", 3);
} else if (status == 6) {
qm.sendAcceptDecline("Well, the thing is... There is a slight problem, care to listen?");
} else if (status == 7) {
qm.sendNext("So what happened was... I was making a new type of medicine, so I filled a pot with water and started boiling some herbs. That's when I made the mistake of... dropping the Hanging Scroll, right into the pot. Oh gosh, I pulled it out as fast as I could, but the Hanging Scroll, was already soaked and the writing on it had already disappeared.", 9);
} else if (status == 8) {
qm.sendNextPrev("So then I thought, well what's the point of delivering it to Mu Gong? I must first restore the writing on Hanging Scroll. That's why I need you to do something for me. The guy down there writing on Hanging Scroll... is #bJin Jin#k, the greatest artist on all of Mu Lung. I'm sure he'd be able to restore the writing on Hanging Scroll.", 9);
} else {
if(!qm.haveItem(4220151, 1)) {
if(!qm.canHold(4220151, 1)) {
qm.sendOk("Please free a room on your ETC inventory.", 9);
qm.dispose();
return;
}
qm.gainItem(4220151, 1);
}
qm.forceStartQuest();
qm.dispose();
}
}
}
function end(mode, type, selection) {
if (mode == -1) {
qm.dispose();
} else {
if(mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
qm.sendNext("Oh, you brought the ink. Now let me pour it, cautiously.... Almost there, almost. ... ..... Kyaaa! Th-the letter. It says: 'I'll be there to take your Seal Rock of Mu Lung.'");
} else if (status == 1) {
qm.gainItem(4032342, -8);
qm.gainItem(4220151, -1);
qm.gainExp(10000 * qm.getPlayer().getExpRate());
qm.forceCompleteQuest();
qm.dispose();
}
}
}