Files
sweetgum-server/scripts/portal/TD_neo_inTree.js
ronancpl 8f76e7be25 Event disposing patch + Papulatus rework + V. scroll exploit patch
Solved issues with PQs/events in progress not disposing properly party leavers (warping them out of the event maps).
Solved issues with cleared PQs/events disposing players unproperly when leaving or disbanding the party.
Reworked Papulatus battle now working as an event instance, similar to how Capt Latanica battle is dealt.
Fixed a possible PE exploit with Vega's scroll.
2018-02-17 00:07:10 -02:00

30 lines
1016 B
JavaScript

function enter(pi) {
var nex = pi.getEventManager("GuardianNex");
if(nex == null) {
pi.message("Guardian Nex event encontered 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++) {
if (pi.isQuestActive(quests[i])) {
if(pi.getQuestProgress(quests[i], mobs[i]) != 0) {
pi.message("You already faced Nex. Complete your mission.");
return false;
}
if(!nex.startInstance(i, pi.getPlayer())) {
pi.message("Someone is already challenging Nex. Wait for them to finish before you enter.");
return false;
} else {
pi.playPortalSound();
return true;
}
}
}
pi.message("A mysterious force won't let you in.");
return false;
}