Files
sweetgum-server/scripts/npc/1012119.js
ronancpl 0d47edf1a7 Persistent diseases + PQ request system + GuildPQ fix
Implemented persistent diseases. Players now keep their disease status when logging out the game.
Solved several concurrent access issues in MapleMap and MapleMonster.
Implemented an option where an account's character slots can be accounted either by each world or all-server range.
Fixed some issues with character slot count when entering/exiting Cash Shop.
Fixed an exploit with Papulatus, on where players could create cracks of dimension infinitely.
Solved an issue with the "reach" command not working properly when the targeted player is on an event instance.
Devised an advanced and secure "PQ request" system. The service revolves around expecting massive number of players requesting a "pass" simultaneously, and fairly & swiftly responsing as much people as possible.
Improved overall Whisper handler performance.
Fixed GPQ Stage 1 statues not working as expected, which rendered the instance unplayable until now.
Added commands for start, complete and reset quests.
2018-08-18 11:38:55 -03:00

51 lines
1.3 KiB
JavaScript

var status = -1;
var map = 910060000;
var num = 5;
var maxp = 5;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
} else {
if (status <= 1) {
cm.dispose();
return;
}
status--;
}
if (status == 0) {
if(cm.getLevel() >= 20) {
cm.sendOk("This training ground is available only for those under level 20.");
cm.dispose();
return;
} else if (cm.isQuestActive(22515) || cm.isQuestActive(22516) || cm.isQuestActive(22517) || cm.isQuestActive(22518)) {
cm.sendYesNo("Would you like to enter the special Training Center?");
status = 1;
} else {
var selStr = "Would you like to go into the Training Center?";
for (var i = 0; i < num; i++) {
selStr += "\r\n#b#L" + i + "#Training Center " + i + " (" + cm.getPlayerCount(map + i) + "/" + maxp + ")#l#k";
}
cm.sendSimple(selStr);
}
} else if (status == 1) {
if (selection < 0 || selection >= num) {
cm.dispose();
} else if (cm.getPlayerCount(map + selection) >= maxp) {
cm.sendNext("This training center is full.");
status = -1;
} else {
cm.warp(map + selection, 0);
cm.dispose();
}
} else if (status == 2) {
cm.warp(910060100,0);
cm.dispose();
}
}