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.
63 lines
2.0 KiB
JavaScript
63 lines
2.0 KiB
JavaScript
/**
|
|
-- Version Info -----------------------------------------------------------------------------------
|
|
1.0 - First Version by Drago (MapleStorySA)
|
|
2.0 - Second Version by Jayd - translated CPQ contents to English
|
|
---------------------------------------------------------------------------------------------------
|
|
**/
|
|
|
|
importPackage(Packages.constants);
|
|
|
|
var status = 0;
|
|
var party;
|
|
|
|
function start(chrs) {
|
|
status = -1;
|
|
party = chrs;
|
|
action(1, 0, 0);
|
|
}
|
|
|
|
function action(mode, type, selection) {
|
|
if (mode == -1) {
|
|
cm.answerCPQChallenge(false);
|
|
cm.getChar().setChallenged(false);
|
|
cm.dispose();
|
|
} else {
|
|
if (mode == 0) {
|
|
cm.answerCPQChallenge(false);
|
|
cm.getChar().setChallenged(false);
|
|
cm.dispose();
|
|
return;
|
|
}
|
|
}
|
|
if (mode == -1)
|
|
cm.dispose();
|
|
else {
|
|
if (mode == 1)
|
|
status++;
|
|
else
|
|
status--;
|
|
|
|
if (status == 0) {
|
|
if (cm.getParty().getMembers().size() == party.size()) {
|
|
cm.getPlayer().setChallenged(true);
|
|
var snd = "";
|
|
for (var i = 0; i < party.size(); i++)
|
|
snd += "#bName: " + party.get(i).getName() + " / (Level: " + party.get(i).getLevel() + ") / " + GameConstants.getJobName(party.get(i).getJobId()) + "#k\r\n\r\n";
|
|
cm.sendAcceptDecline(snd + "Would you like to fight this party at the Monster Carnival?");
|
|
} else {
|
|
cm.answerCPQChallenge(false);
|
|
cm.getChar().setChallenged(false);
|
|
cm.dispose();
|
|
}
|
|
} else if (status == 1) {
|
|
if (party.size() == cm.getParty().getMembers().size()) {
|
|
cm.answerCPQChallenge(true);
|
|
} else {
|
|
cm.answerCPQChallenge(false);
|
|
cm.getChar().setChallenged(false);
|
|
cm.sendOk("The number of players between the teams is not the same.");
|
|
}
|
|
cm.dispose();
|
|
}
|
|
}
|
|
} |