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.
58 lines
1.9 KiB
JavaScript
58 lines
1.9 KiB
JavaScript
/*
|
|
Author: BubblesDev 0.75
|
|
Quest: Abel Glasses Quest
|
|
*/
|
|
|
|
var status = -1; // thanks IxianMace for noticing missing status declaration
|
|
|
|
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.isQuestCompleted(2186)) {
|
|
if(qm.haveItem(4031853)){
|
|
if(qm.canHold(2030019)) {
|
|
qm.gainItem(4031853, -1);
|
|
qm.gainExp(1700);
|
|
qm.gainItem(2030019, 10);
|
|
|
|
qm.sendOk("Geez, you found my glasses! Thank you, thank you so much. Now I'm able to see everything again!");
|
|
qm.forceCompleteQuest();
|
|
}
|
|
else {
|
|
qm.sendOk("I need you to have an USE slot available to reward you properly!");
|
|
}
|
|
}else if(qm.haveItem(4031854) || qm.haveItem(4031855)){ //When I figure out how to make a completance with just a pickup xD
|
|
if(qm.canHold(2030019)) {
|
|
if(qm.haveItem(4031854))
|
|
qm.gainItem(4031854, -1);
|
|
else
|
|
qm.gainItem(4031855, -1);
|
|
|
|
qm.gainExp(1000);
|
|
qm.gainItem(2030019, 5);
|
|
|
|
qm.sendOk("Hm, those aren't my glasses... But alas, I'll take it anyway. Thanks.");
|
|
qm.forceCompleteQuest();
|
|
}
|
|
else {
|
|
qm.sendOk("I need you to have an USE slot available to reward you properly!");
|
|
}
|
|
}
|
|
}
|
|
} else if (status == 1) {
|
|
qm.dispose();
|
|
}
|
|
}
|
|
} |