Fixed an issue with delayed item pickups. Fixed ClearSlot command not removing rechargeables from inventory. Fixed Resurrection and Hyper Body animation effect not working for other players. Implemented bypassable PIN/PIC, applied on accounts after a successful authentication, remaining active while activity is detected for that account. Fixed anti-multiclient system not properly registering players logged in via all-chars-view. Fixed cases where players still could gain EXP from much higher-leveled mobs if they were on an event instance. Optimized scroll result method performance. Added a server flag for SP cap limit on the player's current job (missing amount are reobtained after changing jobs). PlayerNPCs now have overridable scripts. Fixed some mapobject issues with PlayerNPCs, potencially leading to disappearing from maps in certain circumstances. Fixed SpawnAllPnpcs command not properly spawning all PlayersNPCs. Added extra info on Abdula, now stating whether a book can be obtained from questline or not. Fixed marriage ring effects. Fixed some cases where marriage rings were being able to be sent out from the character owner. Fixed Duey allowing send untradeable items. New tool: MapleWorldmapChecker. It reads Map.wz XMLs, fetching mapids not properly referenced on the worldmap nodes.
100 lines
4.8 KiB
JavaScript
100 lines
4.8 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/>.
|
||
*/
|
||
/* Harp String C
|
||
Hidden Street - Eliza’s Garden (200010303)
|
||
*/
|
||
|
||
importPackage(Packages.tools);
|
||
|
||
var status;
|
||
var harpNote = 'C';
|
||
var harpSounds = ["do", "re", "mi", "pa", "sol", "la", "si"]; // musical order detected thanks to Arufonsu
|
||
var harpSong = "CCGGAAGFFEEDDC|GGFFEED|GGFFEED|CCGGAAGFFEEDDC|";
|
||
|
||
function start() {
|
||
status = -1;
|
||
action(1, 0, 0);
|
||
}
|
||
|
||
function action(mode, type, selection) {
|
||
if (mode == -1) {
|
||
cm.dispose();
|
||
} else {
|
||
if (mode == 0 && type > 0) {
|
||
cm.dispose();
|
||
return;
|
||
}
|
||
if (mode == 1)
|
||
status++;
|
||
else
|
||
status--;
|
||
|
||
if(status == 0) {
|
||
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
|
||
|
||
if(cm.isQuestStarted(3114)) {
|
||
var idx = cm.getQuestProgress(3114, 7777);
|
||
|
||
if(idx != -1) {
|
||
var nextNote = harpSong[idx];
|
||
|
||
if(harpNote != nextNote) {
|
||
cm.setQuestProgress(3114, 7777, 0);
|
||
|
||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
|
||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
|
||
|
||
cm.message("You've missed the note... Start over again.");
|
||
} else {
|
||
nextNote = harpSong[idx + 1];
|
||
|
||
if(nextNote == '|') {
|
||
idx++;
|
||
|
||
if(idx == 45) { // finished lullaby
|
||
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
|
||
cm.setQuestProgress(3114, 7777, -1);
|
||
|
||
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
|
||
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
|
||
|
||
cm.dispose();
|
||
return;
|
||
} else {
|
||
if(idx == 14) {
|
||
cm.message("Twinkle, twinkle, little star, how I wonder what you are!");
|
||
} else if(idx == 22) {
|
||
cm.message("Up above the world so high,");
|
||
} else if(idx == 30) {
|
||
cm.message("like a diamond in the sky.");
|
||
}
|
||
}
|
||
}
|
||
|
||
cm.setQuestProgress(3114, 7777, idx + 1);
|
||
}
|
||
}
|
||
}
|
||
|
||
cm.dispose();
|
||
}
|
||
}
|
||
}
|