Files
sweetgum-server/scripts/quest/2293.js
ronancpl 4c25c07e28 Mystic Doors review + Togglable SrvMessage-BossHP + Map-Event patch
Reviewed Mystic Doors.
Fixed several issues showing up on Duey in uncommon scenarios.
Fixed a concurrency issue with XMLDomMapleData.
Scheduled forward the "lock disposal" action within the source. Now, it's expected that, after a set while, no method should require usage of a disposed lock and, during that while, a supposed "disposed lock" is still available to run (although no new processes is expected to require use of these locks).
Fixed concurrency issues with player's current event instance, generating several inconsistencies when swiftly registering/unregistering from events.
Implemented a mutually exclusive approach for server message - Boss HPbar.
Fixed item-making Kage requiring lv71~80 ETC instead of the expected 81~90.
Removed the possibility to buy cosmetic coupons with mesos through the NPCs.
Sleepywood JQ's no longer gives cash items when they finish the quest repeatedly.
Added Duey trucks in several maps lacking it. Added NPC Duey in New Leaf City.
Fixed scripted quests not calculating QUEST_RATE (if applied) when rewarding experience and meso.
2018-08-07 23:37:24 -03:00

110 lines
3.5 KiB
JavaScript

/*
This file is part of the DietStory Maple Story Server
Copyright (C) 2017
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/>.
*/
/* Author: Benji
NPC Name: Maestro Rho
Map(s): Kerning Square Lobby
Description: The Last Song
*/
importPackage(Packages.client);
var status = -1;
function start(mode, type, selection) {
if(mode == -1 || (mode == 0 && status == 0)){
qm.dispose();
return;
}
else if(mode == 0)
status--;
else
status++;
if(status == 0)
{
qm.sendNext("Do you remember the last song that the Spirit of Rock played? I can think of a few songs that he may be imitating, so listen carefully and tell me which song it is. #bYou only get one chance,#k so please choose wisely.");
}
qm.forceStartQuest();
qm.dispose();
}
function end(mode, type, selection)
{
if(mode == -1 || (mode == 0 && status == 0)){
qm.dispose();
return;
}
else if(mode == 0)
status--;
else
status++;
if (status == 0)
{
qm.sendSimple("Here, I'll give you some samples. Please listen to them and choose one. Please listen carefully before making your choide.\r\n\
\t#b#L1# Listen to song No. 1#l \r\n\
\t#L2# Listen to Song No. 2#l \r\n\
\t#L3# Listen to Song No. 3#l \r\n\
\r\n\
\t#e#L4# Enter the correct song.#l");
}
else if(status == 1)
{
if(selection == 1)
{
qm.playSound("Party1/Failed");
qm.sendOk("Awkwardly familiar...");
status = -1;
}
else if(selection == 2)
{
qm.playSound("Coconut/Failed");
qm.sendOk("Was it this?");
status = -1;
}
else if(selection == 3)
{
qm.playSound("quest2293/Die");
qm.sendOk("You heard that?");
status = -1;
}
else if(selection == 4)
{
qm.sendGetNumber("Now, please tell me the answer. You only get #bone chance#k, so please choose wisely. Please enter #b1, 2, or 3#k in the window below.\r\n",1,1,3);
}
}
else if(status == 2)
{
if(selection == 1)
{
qm.sendOk("Obviously you don't enjoy music.");
qm.dispose();
}
else if(selection == 2)
{
qm.sendOk("I suppose you could get #b#eone#n#k more chance.");
qm.dispose();
}
else if(selection == 3)
{
qm.sendOk("So that was the song he was playing... Well, it wasn't my song after all, but I'm glad I can know that now with certainty. Thank you so much.");
qm.gainExp(32500);
qm.forceCompleteQuest();
qm.dispose();
}
}
}