function enter(pi) {
if (pi.haveItem(4001094)) {
if (pi.getQuestStatus(3706) > 0) {
if (pi.getQuestStatus(3706) > 2) {
if (pi.getPlayerCount(240040611) == 0) {
pi.removeNpc(240040611, 2081008);
pi.resetMap(240040611);
pi.playPortalSE();
pi.warp(240040611, "sp");
} else {
pi.playerMessage(5, "Someone else is already inside in an attempt to complete the quest. Please try again later.");
}
} else {
pi.playerMessage(5, "The quest for the Nine Spirit's Egg has already been done.");
}
} else {
pi.playerMessage(5, "You do not have the quest started. Please try again later.");
}
} else {
pi.playerMessage(5, "In order to enter the premise, you'll need to have the Nine Spirit's Egg in possession.");
}
}