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

@@ -1,21 +1,21 @@
function enter(pi) {
var nex = pi.getEventManager("GuardianNex");
if(nex == null) {
if (nex == null) {
pi.message("Guardian Nex challenge encountered an error and is unavailable.");
return false;
}
var quests = [3719, 3724, 3730, 3736, 3742, 3748];
var mobs = [7120100, 7120101, 7120102, 8120100, 8120101, 8140510];
for(var i = 0; i < quests.length; i++) {
for (var i = 0; i < quests.length; i++) {
if (pi.isQuestActive(quests[i])) {
if(pi.getQuestProgressInt(quests[i], mobs[i]) != 0) {
if (pi.getQuestProgressInt(quests[i], mobs[i]) != 0) {
pi.message("You already faced Nex. Complete your mission.");
return false;
}
if(!nex.startInstance(i, pi.getPlayer())) {
if (!nex.startInstance(i, pi.getPlayer())) {
pi.message("Someone is already challenging Nex. Wait for them to finish before you enter.");
return false;
} else {
@@ -24,7 +24,7 @@ function enter(pi) {
}
}
}
pi.message("A mysterious force won't let you in.");
return false;
}