Reformat and clean up portal scripts

This commit is contained in:
P0nk
2021-09-09 23:35:59 +02:00
parent d893309b4f
commit a78ca88a02
435 changed files with 2712 additions and 2287 deletions

View File

@@ -22,23 +22,24 @@
*/
function doorCross(pi) {
pi.playPortalSound(); pi.warp(261030000, "sp_" + ((pi.getMapId() == 261010000) ? "jenu" : "alca"));
return true;
pi.playPortalSound();
pi.warp(261030000, "sp_" + ((pi.getMapId() == 261010000) ? "jenu" : "alca"));
return true;
}
function enter(pi) {
if(pi.isQuestCompleted(3360)) {
return doorCross(pi);
} else if(pi.isQuestStarted(3360)) {
var pw = pi.getQuestProgress(3360);
if(pw.length() > 1) {
pi.openNpc(2111024, "MagatiaPassword");
return false;
} else {
return doorCross(pi);
}
if (pi.isQuestCompleted(3360)) {
return doorCross(pi);
} else if (pi.isQuestStarted(3360)) {
var pw = pi.getQuestProgress(3360);
if (pw.length() > 1) {
pi.openNpc(2111024, "MagatiaPassword");
return false;
} else {
pi.message("This door is locked.");
return false;
return doorCross(pi);
}
} else {
pi.message("This door is locked.");
return false;
}
}