Files
sweetgum-server/scripts/portal/TD_MC_enterboss2.js
ronancpl c2fa7883fe Several PQ platform patches + Quest complete count + Fast meso drop
Implemented CPQ challenges using the matching system.
Fixed LanguageConstants statically acting for all players.
Fixed OPQ's <On the Way Up> stage sometimes leading players to unexpected platforms.
Fixed EllinPQ fountain not giving Altaire Fragment to players.
Fixed "Lab - Unit" stage on RnJPQ, now using correlated sequences between the units.
Fixed Fredrick handing out negative values of mesos to players.
Improved "goto" command info.
Implemented quest complete count.
Fixed mobs still being "controlled" by players even though it's already dead.
Concurrently protected adding items into inventory.
Concurrently protected EXP gain through Writs of Solomon.
Adjusted smoothly respawn rate of mobs in map (solo players in a map now experiences 75% of mobs spawned).
Fixed mesos not being able to drop so frequently (prior 200ms threshold between drops).
Tweaked matchchecking so that match checking doesn't outright dispose matching members on dismissal (match still sticks to the player until they answer or timeout).
Fixed a dupe case within storage's item store.
Added any-NPC scriptable to the source.
2019-05-02 11:02:07 -03:00

73 lines
2.6 KiB
JavaScript

function enter(pi) {
if(pi.isQuestCompleted(2331)) {
pi.openNpc(1300013);
return false;
}
if(pi.isQuestCompleted(2333) && pi.isQuestStarted(2331) && !pi.hasItem(4001318)){
pi.getPlayer().message("Lost the Royal Seal, eh? Worry not! Kevin's code here to save your hide.");
if(pi.canHold(4001318)){
pi.gainItem(4001318, 1);
}
else{
pi.getPlayer().message("Hey, how do you plan to hold this Seal when your inventory is full?");
}
}
if(pi.isQuestCompleted(2333)){
pi.playPortalSound();
pi.warp(106021600, 1);
return true;
}
else if(pi.isQuestStarted(2332) && pi.hasItem(4032388)){
pi.forceCompleteQuest(2332, 1300002);
pi.getPlayer().message("You've found the princess!");
pi.giveCharacterExp(4400 * 1.5, pi.getPlayer());
var em = pi.getEventManager("MK_PrimeMinister");
var party = pi.getPlayer().getParty();
if (party != null) {
if (em.startInstance(party, pi.getMap())) {
pi.playPortalSound();
return true;
} else {
pi.message("Another party is already challenging the boss in this channel.");
return false;
}
} else {
if (em.startInstance(pi.getPlayer())) { // thanks RedHat for noticing an issue here
pi.playPortalSound();
return true;
} else {
pi.message("Another party is already challenging the boss in this channel.");
return false;
}
}
}
else if(pi.isQuestStarted(2333) || (pi.isQuestCompleted(2332) && !pi.isQuestStarted(2333))){
var em = pi.getEventManager("MK_PrimeMinister");
var party = pi.getPlayer().getParty();
if (party != null) {
if (em.startInstance(1, party, pi.getMap())) {
pi.playPortalSound();
return true;
} else {
pi.message("Another party is already challenging the boss in this channel.");
return false;
}
} else {
if (em.startInstance(pi.getPlayer())) {
pi.playPortalSound();
return true;
} else {
pi.message("Another party is already challenging the boss in this channel.");
return false;
}
}
}
else{
pi.getPlayer().message("The door seems to be locked. Perhaps I can find a key to open it...");
return false;
}
}