Reviewed Monster Magnet skill effect on mobs, now properly showing up to other players. Reworked concurrency protection on login handler, now properly synchronizing requests for the same accountId. Reviewed an expedition issue with attempting to send packets on loggedoff players. Expeditions no longer holds a character object list of its own, rather finding players through their id on the world storage. Added stat requirement definition as first message on 1st job NPCs. Fixed an issue with area triggered NPC conversations not getting properly disposed. Reviewed "launch.bat", internally referencing Java7 engine. Assuming it has been installed in the default directory on the system, it's no longer necessary to set precedence on PATH for it. Fixed need for "reapproval from the 3rd job instructors" to attempt Zakum once more. Reviewed goto command. Non-GM's no longer has access to area maps, only towns. Implemented a new server flag for enforcing base rates (server rate: 1x) on players level 10 or lower. Fixed player guild tooltips not being properly marshalled to others on the map, at the event of several guild actions. Reviewed event system allowing creation of same-name events, potentially leading to null EIM problems. Refactored some locks on MapleCharacter, potentially solving a deadlock case within expiring/forfeiting quest methods. Implemented a major overhaul on mob aggro system, now updating player aggro in real-time based on their latest DPS. Properly refactored and encapsulated aggro mechanics. Fixed NPE on disposing events with alive mobs. Added server-side birthday check handling when opening player shops or merchants having cash items in store. Fixed player shop tooltip not finishing properly when shop owner closes store with visitors still in there. Fixed forceChangeMap method not warping players to the designated event map (rather sending them to the starting event map). Reviewed "summon" command, now using forceChangeMap, also changing channels if needed. Reworked HeavenMS autoassigner: STR-based classes now ups a bit more DEX than before, since its a vital attribute for accuracy on their actions. Added meso ceil check on player transactions. Trades now gets suspended if the max amount is reached. Implemented server-side item limit check on player shops and merchants. Fixed an exploit with merchants, on where players would be able to save the selling item on DB before taking from inventory.
134 lines
5.3 KiB
JavaScript
134 lines
5.3 KiB
JavaScript
/*
|
|
This file is part of the OdinMS Maple Story Server
|
|
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
|
Matthias Butz <matze@odinms.de>
|
|
Jan Christian Meyer <vimes@odinms.de>
|
|
|
|
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/>.
|
|
*/
|
|
/* Adobis
|
|
*
|
|
* El Nath - The Door to Zakum (211042300)
|
|
*
|
|
* Vs Zakum Recruiter NPC
|
|
*
|
|
* Custom Quest 100200 = Whether you can start Zakum PQ
|
|
* Custom Quest 100201 = Whether you have done the trials
|
|
*/
|
|
|
|
var status;
|
|
var em;
|
|
var selectedType;
|
|
var gotAllDocs;
|
|
|
|
function start() {
|
|
status = -1;
|
|
action(1, 0, 0);
|
|
}
|
|
|
|
function action(mode, type, selection) {
|
|
if (mode == -1)
|
|
cm.dispose();
|
|
else {
|
|
if (mode == 0) {
|
|
cm.dispose();
|
|
return;
|
|
}
|
|
if (mode == 1)
|
|
status++;
|
|
else
|
|
status--;
|
|
|
|
if(cm.haveItem(4001109, 1)) {
|
|
cm.warp(921100000, "out00");
|
|
cm.dispose();
|
|
return;
|
|
}
|
|
|
|
if(!(cm.isQuestStarted(100200) || cm.isQuestCompleted(100200))) { // thanks Vcoc for finding out a need of reapproval from the masters for Zakum expeditions
|
|
cm.sendOk("Beware, for the power of olde has not been forgotten... ");
|
|
cm.dispose();
|
|
return;
|
|
}
|
|
|
|
em = cm.getEventManager("ZakumPQ");
|
|
if(em == null) {
|
|
cm.sendOk("The Zakum PQ has encountered an error.");
|
|
cm.dispose();
|
|
return;
|
|
}
|
|
|
|
if (status == 0) {
|
|
cm.sendSimple("#e#b<Party Quest: Zakum Campaign>\r\n#k#n" + em.getProperty("party") + "\r\n\r\nBeware, for the power of olde has not been forgotten... #b\r\n#L0#Enter the Unknown Dead Mine (Stage 1)#l\r\n#L1#Face the Breath of Lava (Stage 2)#l\r\n#L2#Forging the Eyes of Fire (Stage 3)#l");
|
|
}
|
|
else if (status == 1) {
|
|
if (selection == 0) {
|
|
if (cm.getParty() == null) {
|
|
cm.sendOk("You can participate in the party quest only if you are in a party.");
|
|
cm.dispose();
|
|
} else if(!cm.isLeader()) {
|
|
cm.sendOk("Your party leader must talk to me to start this party quest.");
|
|
cm.dispose();
|
|
} else {
|
|
var eli = em.getEligibleParty(cm.getParty());
|
|
if(eli.size() > 0) {
|
|
if(!em.startInstance(cm.getParty(), cm.getPlayer().getMap(), 1)) {
|
|
cm.sendOk("Another party has already entered the #rParty Quest#k in this channel. Please try another channel, or wait for the current party to finish.");
|
|
}
|
|
}
|
|
else {
|
|
cm.sendOk("You cannot start this party quest yet, because either your party is not in the range size, some of your party members are not eligible to attempt it or they are not in this map. If you're having trouble finding party members, try Party Search.");
|
|
}
|
|
|
|
cm.dispose();
|
|
}
|
|
} else if(selection == 1) {
|
|
if (cm.haveItem(4031061) && !cm.haveItem(4031062))
|
|
cm.sendYesNo("Would you like to attempt the #bBreath of Lava#k? If you fail, there is a very real chance you will die.");
|
|
else {
|
|
if (cm.haveItem(4031062)) cm.sendNext("You've already got the #bBreath of Lava#k, you don't need to do this stage.");
|
|
else cm.sendNext("Please complete the earlier trials first.");
|
|
|
|
cm.dispose();
|
|
}
|
|
} else {
|
|
if(cm.haveItem(4031061) && cm.haveItem(4031062)) {
|
|
if(!cm.haveItem(4000082, 30)) {
|
|
cm.sendOk("You have completed the trials, however there's still the need of #b30 #t4000082##k to forge 5 #t4001017#.");
|
|
} else {
|
|
cm.completeQuest(100201);
|
|
cm.gainItem(4031061, -1);
|
|
cm.gainItem(4031062, -1);
|
|
cm.gainItem(4000082, -30);
|
|
|
|
cm.gainItem(4001017, 5);
|
|
cm.sendNext("You #rhave completed the trials#k, from now on having my approval to challenge Zakum.");
|
|
}
|
|
|
|
cm.dispose();
|
|
} else {
|
|
cm.sendOk("You lack some of the required items to forge the #b#t4001017##k.");
|
|
cm.dispose();
|
|
}
|
|
}
|
|
}
|
|
else if (status == 2) {
|
|
cm.warp(280020000, 0);
|
|
cm.dispose();
|
|
}
|
|
}
|
|
}
|