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.
This commit is contained in:
ronancpl
2019-05-02 11:02:07 -03:00
parent b6a91c523f
commit c2fa7883fe
90 changed files with 1454 additions and 611 deletions

View File

@@ -8,66 +8,89 @@ import client.MapleCharacter;
*/
public class LanguageConstants {
public static String CPQBlue;
public static String CPQError;
public static String CPQEntry;
public static String CPQFindError;
public static String CPQRed;
public static String CPQPlayerExit;
public static String CPQEntryLobby;
public static String CPQPickRoom;
public static String CPQExtendTime;
public static String CPQLeaderNotFound;
public static String CPQChallengeRoomAnswer;
public static String CPQChallengeRoomSent;
public static LanguageConstants Languages(MapleCharacter chr) {
if (chr.getLanguage() == 0) {
LanguageConstants.CPQBlue = "Maple Azul";
LanguageConstants.CPQRed = "Maple Vermelho";
LanguageConstants.CPQExtendTime = "O tempo foi estendido.";
LanguageConstants.CPQPlayerExit = " deixou o Carnaval de Monstros.";
LanguageConstants.CPQError = "Ocorreu um problema. Favor recriar a sala.";
LanguageConstants.CPQLeaderNotFound = "Nao foi possivel encontrar o Lider.";
LanguageConstants.CPQPickRoom = "Inscreva-se no Festival de Monstros!\r\n";
LanguageConstants.CPQChallengeRoomAnswer = "O grupo esta respondendo um desafio no momento.";
LanguageConstants.CPQChallengeRoomSent = "Um desafio foi enviado para o grupo na sala. Aguarde um momento.";
LanguageConstants.CPQFindError = "Nao foi possivel encontrar um grupo nesta sala.\r\nProvavelmente o grupo foi desfeito dentro da sala!";
LanguageConstants.CPQEntryLobby = "Agora voce ira receber desafios de outros grupos. Se voce nao aceitar um desafio em 3 minutos, voce sera levado para fora.";
LanguageConstants.CPQEntry = "Voce pode selecionar \"Invocar Monstros\", \"Habilidade\", ou \"Protetor\" como sua tatica durante o Carnaval dos Monstros. Use Tab a F1~F12 para acesso rapido!";
} else if (chr.getLanguage() == 1) {
LanguageConstants.CPQBlue = "Maple Azul";
LanguageConstants.CPQRed = "Maple Rojo";
LanguageConstants.CPQExtendTime = "El tiempo se ha ampliado.";
LanguageConstants.CPQPlayerExit = " ha dejado el Carnaval de Monstruos.";
LanguageConstants.CPQLeaderNotFound = "No se pudo encontrar el Lider.";
LanguageConstants.CPQPickRoom = "!Inscribete en el Festival de Monstruos!\r\n";
LanguageConstants.CPQError = "Se ha producido un problema. Por favor, volver a crear una sala.";
LanguageConstants.CPQChallengeRoomAnswer = "El grupo esta respondiendo un desafio en el momento.";
LanguageConstants.CPQChallengeRoomSent = "Un desafio fue enviado al grupo en la sala. Espera un momento.";
LanguageConstants.CPQFindError = "No se pudo encontrar un grupo en esta sala.\r\nProbablemente el grupo fue deshecho dentro de la sala!";
LanguageConstants.CPQEntryLobby = "Ahora usted recibira los retos de otros grupos. Si usted no acepta un desafio en 3 minutos, usted sera llevado hacia fuera.";
LanguageConstants.CPQEntry = "Usted puede seleccionar \"Invocar Monstruos \", \"Habilidad \", o \"Protector \" como su tactica durante el Carnaval de los Monstruos. Utilice Tab y F1 ~ F12 para acceso rapido!";
} else if (chr.getLanguage() == 2) {
LanguageConstants.CPQBlue = "Maple Blue";
LanguageConstants.CPQRed = "Maple Red";
LanguageConstants.CPQPlayerExit = " left the Carnival of Monsters.";
LanguageConstants.CPQExtendTime = "The time has been extended.";
LanguageConstants.CPQLeaderNotFound = "Could not find the Leader.";
LanguageConstants.CPQError = "There was a problem. Please re-create a room.";
LanguageConstants.CPQPickRoom = "Sign up for the Monster Festival!\r\n";
LanguageConstants.CPQChallengeRoomAnswer = "The group is currently facing a challenge.";
LanguageConstants.CPQChallengeRoomSent = "A challenge has been sent to the group in the room. Please wait a while.";
LanguageConstants.CPQFindError = "We could not find a group in this room.\r\nProbably the group was scrapped inside the room!";
LanguageConstants.CPQEntryLobby = "You will now receive challenges from other groups. If you do not accept a challenge within 3 minutes, you will be taken out.";
LanguageConstants.CPQEntry = "You can select \"Summon Monsters \", \"Ability \", or \"Protector \" as your tactic during the Monster Carnival. Use Tab and F1 ~ F12 for quick access!";
enum Language {
LANG_PRT(0),
LANG_ESP(1),
LANG_ENG(2);
int lang;
private Language(int lang) {
this.lang = lang;
}
return null;
private int getValue() {
return this.lang;
}
}
public static String CPQBlue[] = new String[3];
public static String CPQError[] = new String[3];
public static String CPQEntry[] = new String[3];
public static String CPQFindError[] = new String[3];
public static String CPQRed[] = new String[3];
public static String CPQPlayerExit[] = new String[3];
public static String CPQEntryLobby[] = new String[3];
public static String CPQPickRoom[] = new String[3];
public static String CPQExtendTime[] = new String[3];
public static String CPQLeaderNotFound[] = new String[3];
public static String CPQChallengeRoomAnswer[] = new String[3];
public static String CPQChallengeRoomSent[] = new String[3];
public static String CPQChallengeRoomDenied[] = new String[3];
static {
int lang;
lang = Language.LANG_PRT.getValue();
LanguageConstants.CPQBlue[lang] = "Maple Azul";
LanguageConstants.CPQRed[lang] = "Maple Vermelho";
LanguageConstants.CPQExtendTime[lang] = "O tempo foi estendido.";
LanguageConstants.CPQPlayerExit[lang] = " deixou o Carnaval de Monstros.";
LanguageConstants.CPQError[lang] = "Ocorreu um problema. Favor recriar a sala.";
LanguageConstants.CPQLeaderNotFound[lang] = "Nao foi possivel encontrar o Lider.";
LanguageConstants.CPQPickRoom[lang] = "Inscreva-se no Festival de Monstros!\r\n";
LanguageConstants.CPQChallengeRoomAnswer[lang] = "O grupo esta respondendo um desafio no momento.";
LanguageConstants.CPQChallengeRoomSent[lang] = "Um desafio foi enviado para o grupo na sala. Aguarde um momento.";
LanguageConstants.CPQChallengeRoomDenied[lang] = "O grupo na sala cancelou seu desafio.";
LanguageConstants.CPQFindError[lang] = "Nao foi possivel encontrar um grupo nesta sala.\r\nProvavelmente o grupo foi desfeito dentro da sala!";
LanguageConstants.CPQEntryLobby[lang] = "Agora voce ira receber desafios de outros grupos. Se voce nao aceitar um desafio em 3 minutos, voce sera levado para fora.";
LanguageConstants.CPQEntry[lang] = "Voce pode selecionar \"Invocar Monstros\", \"Habilidade\", ou \"Protetor\" como sua tatica durante o Carnaval dos Monstros. Use Tab a F1~F12 para acesso rapido!";
lang = Language.LANG_ESP.getValue();
LanguageConstants.CPQBlue[lang] = "Maple Azul";
LanguageConstants.CPQRed[lang] = "Maple Rojo";
LanguageConstants.CPQExtendTime[lang] = "El tiempo se ha ampliado.";
LanguageConstants.CPQPlayerExit[lang] = " ha dejado el Carnaval de Monstruos.";
LanguageConstants.CPQLeaderNotFound[lang] = "No se pudo encontrar el Lider.";
LanguageConstants.CPQPickRoom[lang] = "!Inscribete en el Festival de Monstruos!\r\n";
LanguageConstants.CPQError[lang] = "Se ha producido un problema. Por favor, volver a crear una sala.";
LanguageConstants.CPQChallengeRoomAnswer[lang] = "El grupo esta respondiendo un desafio en el momento.";
LanguageConstants.CPQChallengeRoomSent[lang] = "Un desafio fue enviado al grupo en la sala. Espera un momento.";
LanguageConstants.CPQChallengeRoomDenied[lang] = "El grupo en la sala cancelo su desafio.";
LanguageConstants.CPQFindError[lang] = "No se pudo encontrar un grupo en esta sala.\r\nProbablemente el grupo fue deshecho dentro de la sala!";
LanguageConstants.CPQEntryLobby[lang] = "Ahora usted recibira los retos de otros grupos. Si usted no acepta un desafio en 3 minutos, usted sera llevado hacia fuera.";
LanguageConstants.CPQEntry[lang] = "Usted puede seleccionar \"Invocar Monstruos\", \"Habilidad\", o \"Protector\" como su tactica durante el Carnaval de los Monstruos. Utilice Tab y F1 ~ F12 para acceso rapido!";
lang = Language.LANG_ENG.getValue();
LanguageConstants.CPQBlue[lang] = "Maple Blue";
LanguageConstants.CPQRed[lang] = "Maple Red";
LanguageConstants.CPQPlayerExit[lang] = " left the Carnival of Monsters.";
LanguageConstants.CPQExtendTime[lang] = "The time has been extended.";
LanguageConstants.CPQLeaderNotFound[lang] = "Could not find the Leader.";
LanguageConstants.CPQError[lang] = "There was a problem. Please re-create a room.";
LanguageConstants.CPQPickRoom[lang] = "Sign up for the Monster Festival!\r\n";
LanguageConstants.CPQChallengeRoomAnswer[lang] = "The group is currently facing a challenge.";
LanguageConstants.CPQChallengeRoomSent[lang] = "A challenge has been sent to the group in the room. Please wait a while.";
LanguageConstants.CPQChallengeRoomDenied[lang] = "The group in the room canceled your challenge.";
LanguageConstants.CPQFindError[lang] = "We could not find a group in this room.\r\nProbably the group was scrapped inside the room!";
LanguageConstants.CPQEntryLobby[lang] = "You will now receive challenges from other groups. If you do not accept a challenge within 3 minutes, you will be taken out.";
LanguageConstants.CPQEntry[lang] = "You can select \"Summon Monsters\", \"Ability\", or \"Protector\" as your tactic during the Monster Carnival. Use Tab and F1 ~ F12 for quick access!";
}
public static String getMessage(MapleCharacter chr, String[] message) {
return message[chr.getLanguage()];
}
}

View File

@@ -0,0 +1,23 @@
package constants;
/**
* @brief ScriptableNPCConstants
* @author GabrielSin <gabrielsin@playellin.net>
* @date 16/09/2018
*
* Adaptations to use Pair and Set, in order to suit a one-packet marshall,
* by Ronan
*/
import java.util.HashSet;
import java.util.Set;
import tools.Pair;
public class ScriptableNPCConstants {
public static final Set<Pair<Integer, String>> SCRIPTABLE_NPCS = new HashSet<Pair<Integer, String>>(){{
add(new Pair<>(9200000, "Cody"));
}};
}

View File

@@ -64,6 +64,7 @@ public class ServerConstants {
public static boolean USE_DEBUG_SHOW_RCVD_MVLIFE = false; //Prints on the cmd all received move life content.
public static final boolean USE_DEBUG_SHOW_PACKET = false;
public static boolean USE_SUPPLY_RATE_COUPONS = true; //Allows rate coupons to be sold through the Cash Shop.
public static final boolean USE_IP_VALIDATION = true; //Enables IP checking when logging in.
public static final boolean USE_MAXRANGE = true; //Will send and receive packets from all events on a map, rather than those of only view range.
public static final boolean USE_MAXRANGE_ECHO_OF_HERO = true;
@@ -112,6 +113,7 @@ public class ServerConstants {
public static final boolean USE_REBIRTH_SYSTEM = false; //Flag to enable/disable rebirth system
public static final boolean USE_MAP_OWNERSHIP_SYSTEM = true; //Flag to enable/disable map ownership system
public static final boolean USE_FISHING_SYSTEM = true; //Flag to enable/disable fishing system
public static final boolean USE_NPCS_SCRIPTABLE = true; //Flag to enable/disable serverside predefined script NPCs.
//Events/PQs Configuration
public static final boolean USE_OLD_GMS_STYLED_PQ_NPCS = true; //Enables PQ NPCs with similar behaviour to old GMS style, that skips info about the PQs and immediately tries to register the party in.
@@ -164,6 +166,7 @@ public class ServerConstants {
public static final long PET_LOOT_UPON_ATTACK = (long)(0.7 * 1000); //Time the pet must wait before trying to pick items up.
public static final int TOT_MOB_QUEST_REQUIREMENT = 77; //Overwrites old 999-mobs requirement for the ToT questline with new requirement value, set 0 for default.
public static final int MOB_REACTOR_REFRESH_TIME = 30 * 1000; //Overwrites refresh time for those reactors oriented to inflict damage to bosses (Ice Queen, Riche), set 0 for default.
public static final int PARTY_SEARCH_REENTRY_LIMIT = 10; //Max amount of times a party leader is allowed to persist on the Party Search before entry expiration (thus needing to manually restart the Party Search to be able to search for members).
//Dangling Items/Locks Configuration
public static final int ITEM_EXPIRE_TIME = 3 * 60 * 1000; //Time before items start disappearing. Recommended to be set up to 3 minutes.