Reformat and clean up npc scripts

This commit is contained in:
P0nk
2021-09-09 23:35:02 +02:00
parent 0c1545f81d
commit d893309b4f
665 changed files with 19932 additions and 19046 deletions

View File

@@ -1,9 +1,9 @@
/**
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Drago (MapleStorySA)
2.0 - Second Version by Jayd - translated CPQ contents to English
---------------------------------------------------------------------------------------------------
**/
-- Version Info -----------------------------------------------------------------------------------
1.0 - First Version by Drago (MapleStorySA)
2.0 - Second Version by Jayd - translated CPQ contents to English
---------------------------------------------------------------------------------------------------
**/
var cpqMinLvl = 51;
var cpqMaxLvl = 70;
@@ -23,10 +23,11 @@ function action(mode, type, selection) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
if (cm.getParty() == null) {
status = 10;
@@ -43,7 +44,7 @@ function action(mode, type, selection) {
for (var i = 0; i < party.size(); i++) {
if (party.get(i).getLevel() >= cpqMinLvl && party.get(i).getLevel() <= cpqMaxLvl) {
lvlOk++;
if (party.get(i).getPlayer().getMapId() != leaderMapid) {
isOutMap++;
}
@@ -78,9 +79,9 @@ function action(mode, type, selection) {
} else {
var party = cm.getParty().getMembers();
const YamlConfig = Java.type('config.YamlConfig');
if ((selection === 0 || selection === 1 ) && party.size() < (YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
if ((selection === 0 || selection === 1) && party.size() < (YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 2)) {
cm.sendOk("You need at least 2 players to participate in the battle!");
} else if ((selection === 2 ) && party.size() < (YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
} else if ((selection === 2) && party.size() < (YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? 1 : 3)) {
cm.sendOk("You need at least 3 players to participate in the battle!");
} else {
cm.cpqLobby2(selection);