Fixed autocommit getting called early/unavailable in a few catch blocks, when trying to save player. Fixed the missing variable declaration in several quest scripts that were recently formatted. Reworked the EXP loss formula applied at a knock-out. The new formula follows past discussions in several MS forums. Fixed a deadlock issue related with party HP and party doors management. Refactored management of packets sent to client through an IoSession. New system no longer makes use of a synchronized statement when calling announce(packet), rather makes use of dedicated threads to send queued packets for the respective players. Fixed SP reset allowing increase of unexpected skills. Refactored storages, no longer instantiated as coupled with the character, rather instantiated in a map within the world object, with accountid as key. Reviewed usage of character objects of offline party members, that weren't being properly checked. Fixed some unexpected cases with buffs and morphs (within the enhanced buff system) making the latter show up as another morph figure. Added a "priority buff" perspective within the enhanced buff system, to let such priority items/skills take awareness over other buffs. (This would be vital for some quests, as the one reported in #514 ) Fixed EXP gains in certain scenarios showing up with less amount than the expected (due to float point operations). Fixed a critical bug that have emerged in a recent mount-skill update, issue happened due to an improper object initialization. Fixed mount information packet not being relayed to the player at world login time, rendering some quests not startable until the mob levels up.
80 lines
3.0 KiB
JavaScript
80 lines
3.0 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/>.
|
|
*/
|
|
/*
|
|
Author : Ronan
|
|
NPC Name: Yulete
|
|
Map(s): Magatia
|
|
Description: Quest - Yulete's Reward
|
|
Quest ID: 3382
|
|
*/
|
|
|
|
var status = -1;
|
|
|
|
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) {
|
|
if(qm.haveItem(4001159, 25) && qm.haveItem(4001160, 25) && !qm.haveItemWithId(1122010, true)) {
|
|
if(qm.canHold(1122010)) {
|
|
qm.gainItem(4001159, -25);
|
|
qm.gainItem(4001160, -25);
|
|
qm.gainItem(1122010, 1);
|
|
|
|
qm.sendOk("Thank you for retrieving the marbles. Accept this pendant as a token of my appreciation.");
|
|
} else {
|
|
qm.sendNext("Free a slot on your EQUIP tab before claiming a prize.");
|
|
return;
|
|
}
|
|
} else if(qm.haveItem(4001159, 10) && qm.haveItem(4001160, 10)) {
|
|
if(qm.canHold(2041212)) {
|
|
qm.gainItem(4001159, -10);
|
|
qm.gainItem(4001160, -10);
|
|
qm.gainItem(2041212, 1);
|
|
|
|
qm.sendOk("Thank you for retrieving the marbles. This rock, that I am giving to you, can be used to improve the stats on the #b#t1122010##k. Take it as a token of my appreciation and use it wisely.");
|
|
} else {
|
|
qm.sendNext("Free a slot on your USE tab before claiming a prize.");
|
|
return;
|
|
}
|
|
} else {
|
|
qm.sendNext("I need at least #b10 of both #t4001159# and #t4001160##k to reward you appropriately. If you happen to come with #b25 of these#k instead, I can reward you with a valuable gear. Fare well.");
|
|
return;
|
|
}
|
|
|
|
qm.forceCompleteQuest();
|
|
} else if (status == 1) {
|
|
qm.dispose();
|
|
}
|
|
}
|
|
}
|