Merge branch 'master' of https://github.com/ronancpl/HeavenMS into credits_update

This commit is contained in:
ronancpl
2019-11-14 22:35:43 -03:00
864 changed files with 20650 additions and 11188 deletions

View File

@@ -26,6 +26,7 @@
*/
var status = -1;
var canComplete;
function end(mode, type, selection) {
if (mode == -1) {
@@ -45,26 +46,30 @@ function end(mode, type, selection) {
var hourDay = qm.getHourOfDay();
if(!(hourDay >= 17 && hourDay < 20)) {
qm.sendNext("(Hmm, I'm searching the trash can but can't find the #t4031894# JM was talking about, maybe it's not time yet...)");
qm.dispose();
canComplete = false;
return;
}
if(qm.getMeso() < 2000) {
qm.sendNext("(Oh, I don't have the combined fee amount yet.)");
qm.dispose();
canComplete = false;
return;
}
if(!qm.canHold(4031894, 1)) {
qm.sendNext("(Eh, I can't hold the #t4031894# right now, I need an ETC slot available.)");
qm.dispose();
canComplete = false;
return;
}
canComplete = true;
qm.sendNext("(Alright, now I will deposit the fee there and get the paper... That's it, yea, that's done.)");
qm.gainItem(4031894, 1);
qm.gainMeso(-2000);
qm.forceCompleteQuest();
} else if (status == 1) {
if (canComplete) {
qm.gainMeso(-2000);
qm.forceCompleteQuest();
qm.gainItem(4031894, 1);
}
qm.dispose();
}