Files
sweetgum-server/scripts/npc/1300013.js
ronancpl a39a210c1f Conditional Buffs & M. Magnet & Loot Patch + Exp Split + Duey Rework
Fixed Monster Magnet skill when used on bosses disconnecting the caster.
Improved conditional buff system, no longer updating buffs that are not supposed to toggle.
Added party hunting in the conditional buffs system.
Refactored usage of DB by Duey. Registered Duey items now make use of the same table as the other inventory items.
Fixed non-encapsulated unlocking in reactor class.
Fixed stylish NPCs disconnecting players when trying to display empty styles list.
Fixed a deadlock case within recently implemented update buff effects (conditional buffs mechanic).
Fixed AOE mobskills not behaving well for fixed mobs (those shouldn't take into account attribute "facingLeft").
Fixed non-flipping mobs having attribute "facingLeft" updated according to controller position.
Revised aggro system no longer having bosses expire player chase.
Fixed chalkboard being depleted upon use.
Refactored MapleMapFactory, looking for normalization of the Factory design pattern the class was intended to make use at its conception.
Added MP replenishing system for mobs, gains based on its level.
Fixed indisponibility of one-of-a-kind loots due to the killer's team already having one sample each.
Reworked the EXP split system within the source. New behavior is expected to be GMS-like.
Adjusted interaction within the NPC Nein Spirit's Baby Dragon area. Only players who interacts with quests within can access the area now. One player at a time, with a timeout timer.
Fixed check of level requisites for expeditions.
2019-06-15 15:10:56 -03:00

84 lines
3.2 KiB
JavaScript

/*
NPC: Blocked Entrance (portal?)
MAP: Mushroom Castle - East Castle Tower (106021400)
*/
var status;
function start(){
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection){
if(mode == -1){
cm.dispose();
return;
}
else if(mode == 0 && status == 0){
cm.dispose();
return;
}
else if(mode == 0)
status--;
else
status++;
if(cm.getMapId() == 106021402) {
if (!(cm.isQuestCompleted(2331))) {
cm.dispose();
return;
}
if(status == 0){
cm.sendSimple("#L0#Enter to fight #bKing Pepe#k and #bYeti Brothers#k.#l\r\n#L1#Enter to fight #bPrime Minister#k.#l");
}
else if(status == 1){
if(selection == 0){
var pepe = cm.getEventManager("KingPepeAndYetis");
pepe.setProperty("player", cm.getPlayer().getName());
pepe.startInstance(cm.getPlayer());
cm.dispose();
return;
}
else if(selection == 1){
var em = cm.getEventManager("MK_PrimeMinister2");
var party = cm.getPlayer().getParty();
if (party != null) {
if (!em.startInstance(party, cm.getMap(), 1)) {
cm.sendOk("Another party is already challenging the boss in this channel.");
}
} else {
if (!em.startInstance(cm.getPlayer())) {
cm.sendOk("Another party is already challenging the boss in this channel.");
}
}
cm.dispose();
return;
}
}
} else {
var questProgress = cm.getQuestProgress(2330, 3300005) + cm.getQuestProgress(2330, 3300006) + cm.getQuestProgress(2330, 3300007); //3 Yetis
if (!(cm.isQuestStarted(2330) && questProgress < 3)) { // thanks Vcoc for finding an exploit with boss entry through NPC
cm.dispose();
return;
}
if(status == 0){
cm.sendSimple("#L1#Enter to fight #bKing Pepe#k and #bYeti Brothers#k.#l");
}
else if(status == 1){
if(selection == 1){
var pepe = cm.getEventManager("KingPepeAndYetis");
pepe.setProperty("player", cm.getPlayer().getName());
pepe.startInstance(cm.getPlayer());
cm.dispose();
return;
}
}
}
}