Quest progress overview + Raise UI scripting + Shelved events loadout

Performed a syllabus over quest progress tracking. Quests that were supposed to show up as startable/completable upon achieved progress should be able to do so. Reviewed progress tracking on scripts to adequate to this scenario.
Fixed some scenarios on where quest dialog popups would appear when updating a quest progress.
Fixed some scripts not using updated package addresses after the recent package refactor.
Reviewed Raise UI, no longer rendering players unable to access CS/MTS in certain scenarios.
Fixed a check of available space in inventory, when trying to obtain items from quests, not informing the player it happened due to a one-of-a-kind item already present.
Fixed quest dialog (feature present in many quests) not showing to players when completing it.
Fixed several issues with the Cygnus 1st job advancement quests.
Added scripting within Raise UI open action. Mimiana egg uses this to keep track of player's EXP progress.
Fixed pets not getting despawned as expiration takes place.
Fixed hidden players being able to control mobs when either entering map or hidden state.
Fixed estimated HP/MP alert not taking bonuses (such as from buffs or equipments) into account.
Fixed Energy Charge refreshing buff time upon touching mobs, skewing the  uptime of the skill's stat buffs.
Switched SnakeYaml for YamlBeans, which makes up for a single JAR artifact.
Refactored a channel's event scripts loadout, now taking place after the server bootup phase.
This commit is contained in:
ronancpl
2019-10-03 20:01:09 -03:00
parent eae6dccbc0
commit 7ee947b404
190 changed files with 3281 additions and 1880 deletions

View File

@@ -174,11 +174,11 @@ server:
CHANNEL_LOAD: 100 #Max players per channel (limit actually used to calculate the World server capacity).
CHANNEL_LOCKS: 20 #Total number of structure management locks each channel has.
RESPAWN_INTERVAL: 10000 #10 seconds, 10000.
PURGING_INTERVAL: 300000 #5 minutes, 300000.
RANKING_INTERVAL: 3600000 #60 minutes, 3600000.
COUPON_INTERVAL: 3600000 #60 minutes, 3600000.
UPDATE_INTERVAL: 777 #Dictates the frequency on which the "centralized server time" is updated.
RESPAWN_INTERVAL: 10000 #10 seconds, 10000.
PURGING_INTERVAL: 300000 #5 minutes, 300000.
RANKING_INTERVAL: 3600000 #60 minutes, 3600000.
COUPON_INTERVAL: 3600000 #60 minutes, 3600000.
UPDATE_INTERVAL: 777 #Dictates the frequency on which the "centralized server time" is updated.
ENABLE_PIC: false #Pick true/false to enable or disable Pic. Delete character requires PIC available.
ENABLE_PIN: false #Pick true/false to enable or disable Pin.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
cores/yamlbeans-1.13.jar Normal file

Binary file not shown.

View File

@@ -2143,4 +2143,41 @@ Adicionado checagem no uso de autopots ao usar HP/MP, limites são calculados ba
20 Setembro 2019,
Adicionado update de macros ao usar SP reset.
Refatorado vários pacotes Java contendo classes diversificadas.
Corrigido nomenclatura errônea de "worker" introduzida, querendo significar "task".
Corrigido nomenclatura errônea de "worker" introduzida, querendo significar "task".
21 - 24 Setembro 2019,
Corrigido ferramenta detectora de métodos estáticos não realizando varredura completa em arquivos, parando em casos onde um método estático é encontrado em cada.
Implementado ferramenta detectora de scripts de quest que estiveram sendo usados como paliativo.
Refatorado amplamente métodos que lidam com atribuição de progresso de quests.
Revisado uso de vários scripts de quest que estiveram sendo usados como paliativo.
Alterado declaração de "MapleCharacter c", considerado ambíguo à de MapleClient.
Revisado uso de progresso de quests feito pelos scripts, de forma a parear com o novo modelo.
26 - 28 Setembro 2019,
Corrigido casos no novo modelo onde algumas quests utilizando informações de progresso não conseguiriam ser completadas.
Corrigido uso envio desnecessário de pacote ao atualizar progresso de quest causando popup inesperado de mensagens de quests para jogadores.
Corrigido alguns scripts não levando a atualização dos endereços dos pacotes alterados na última refatoração.
Corrigido script de quest de Magatia checando errado quantidade de livros adquiridos pelo jogador no progresso de quest.
29 Setembro 2019,
Revisado Raise UI, agora utilizando o novo sistema de progressão.
Corrigido checagem por espaço no inventário, ao tentar ganhar itens via quest, não informando o jogador adequadamente sobre itens one-of-a-kind.
Corrigido uso de itens na Raise UI, quando não atualizando progresso algum (nenhum pacote enviado ao jogador), não permitindo jogador acesso a certos recursos (como Cash Shop/MTS).
Revisado aplicação geral do novo modelo de progressão de quests implementado.
01 - 02 Outubro 2019,
Corrigido caso de exceção de modificação concorrente dentro de módulo de incremento de progresso de mob em quests.
Corrigido caixa de diálogo com conteúdo extra, ao terminar uma quest, não sendo enviada ao jogador.
Corrigido retransmissão de pacotes de movimentos com sequência vazia crashando outros jogadores.
Refatorado checagem por pacotes de movimentos com sequência vazia, agora atuando no módulo abstrato.
Corrigido progresso de mobs em quests não atualizando o infoex devidamente ao jogador, levando à falta do balão de "quest completa".
Corrigido quest de 1o job de Cygnus permitindo retornar para estado que tenta concluir quest, permitindo assim múltiplas instâncias de conclusão da mesma.
Adicionado scripting atuante ao abrir Raise UI, permitindo assim utilizar ações elaboradas, tais como EXP de combate para Mimiana.
Corrigido pets não sendo despawnados assim que se dá o tempo de expiração.
Corrigido jogadores com "hide" controlando mobs em certas situações.
Corrigido análise de alerta de HP/MP lado-servidor não contando com os atributos de HP/MP de equipamentos e buffs.
03 Outubro 2019,
Corrigido skill "Energy Charge" levando atualização de buff ao tocar em mobs, levando a casos onde o buff nos stats poderia inesperadamente ficar retido além do tempo de atuação previsto.
Substituído utilização de "Jackson annotations + SnakeYaml" por "YamlBeans", utilizando-se assim menos artefatos JARs no processo (anteriormente 5, agora somente 1). Nota: na transição, fora constatado que a utilização da tecnologia anterior era mais permissiva perante o arquivo de configurações, porém estrutura do novo arquivo foi normalizado e está agora funcional.
Refatorado inicialização de eventos ao iniciar o servidor, em busca de melhorar o tempo de startup.

View File

@@ -29,16 +29,12 @@ dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.HikariCP-java7-2.4.13.jar=cores/HikariCP-java7-2.4.13.jar
file.reference.jackson-annotations-2.9.9.jar=cores/jackson-annotations-2.9.9.jar
file.reference.jackson-core-2.9.9.jar=cores/jackson-core-2.9.9.jar
file.reference.jackson-databind-2.9.9.3.jar=cores/jackson-databind-2.9.9.3.jar
file.reference.jackson-dataformat-yaml-2.9.9.jar=cores/jackson-dataformat-yaml-2.9.9.jar
file.reference.MapleSolaxia-src=src
file.reference.mina-core-2.0.19.jar=cores/mina-core-2.0.19.jar
file.reference.mysql-connector-java-bin.jar=cores/mysql-connector-java-bin.jar
file.reference.slf4j-api-1.7.21.jar=cores/slf4j-api-1.7.21.jar
file.reference.slf4j-jdk14-1.7.5.jar=cores/slf4j-jdk14-1.7.5.jar
file.reference.snakeyaml-1.25.jar=cores/snakeyaml-1.25.jar
file.reference.yamlbeans-1.13.jar=cores/yamlbeans-1.13.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=true
@@ -49,11 +45,7 @@ javac.classpath=\
${file.reference.HikariCP-java7-2.4.13.jar}:\
${file.reference.mysql-connector-java-bin.jar}:\
${file.reference.slf4j-jdk14-1.7.5.jar}:\
${file.reference.jackson-annotations-2.9.9.jar}:\
${file.reference.jackson-core-2.9.9.jar}:\
${file.reference.jackson-databind-2.9.9.3.jar}:\
${file.reference.jackson-dataformat-yaml-2.9.9.jar}:\
${file.reference.snakeyaml-1.25.jar}
${file.reference.yamlbeans-1.13.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false

View File

@@ -244,8 +244,8 @@ function monsterKilled(mob, eim) {
eim.showClearEffect();
eim.clearPQ();
eim.dispatchUpdateQuestMobCount(bossMobId, entryMap);
eim.dispatchUpdateQuestMobCount(9101003, entryMap); // thanks Atoot for noticing quest not getting updated after boss kill
eim.dispatchRaiseQuestMobCount(bossMobId, entryMap);
eim.dispatchRaiseQuestMobCount(9101003, entryMap); // thanks Atoot for noticing quest not getting updated after boss kill
mob.getMap().broadcastBalrogVictory(eim.getLeader().getName());
} else {
if(count == 1) {

View File

@@ -244,7 +244,7 @@ function monsterKilled(mob, eim) {
eim.showClearEffect();
eim.clearPQ();
eim.dispatchUpdateQuestMobCount(bossMobId, entryMap);
eim.dispatchRaiseQuestMobCount(bossMobId, entryMap);
mob.getMap().broadcastBalrogVictory(eim.getLeader().getName());
} else {
if(count == 1) {

View File

@@ -214,7 +214,7 @@ function monsterKilled(mob, eim) {
eim.showClearEffect(mob.getMap().getId());
eim.clearPQ();
eim.dispatchUpdateQuestMobCount(8810018, 240060200);
eim.dispatchRaiseQuestMobCount(8810018, 240060200);
mob.getMap().broadcastHorntailVictory();
} else if(isHorntailHead(mob)) {
var killed = eim.getIntProperty("defeatedHead");

View File

@@ -52,7 +52,7 @@ function primeMinisterCheck(eim) {
var pIter = map.getAllPlayers().iterator();
while (pIter.hasNext()) {
var player = pIter.next();
if (player.getQuestStatus(2333) == 1 && player.getAbstractPlayerInteraction().getQuestProgress(2333, mobId) == 0) {
if (player.getQuestStatus(2333) == 1 && player.getAbstractPlayerInteraction().getQuestProgressInt(2333, mobId) == 0) {
return true;
}
}

View File

@@ -21,5 +21,5 @@
*/
function start(ms) {
ms.getPlayer().updateQuestInfo(20010, "1");
ms.setQuestProgress(20010, 20022, 1);
}

View File

@@ -21,5 +21,5 @@
*/
function start(ms) {
ms.getPlayer().updateQuestInfo(20010, "1");
ms.setQuestProgress(20010, 20022, 1);
}

View File

@@ -5,11 +5,11 @@ function start(ms){
var map = player.getMap();
if(player.isCygnus()) {
if(ms.isQuestStarted(20730) && ms.getQuestProgress(20730, 9300285) == 0) {
if(ms.isQuestStarted(20730) && ms.getQuestProgressInt(20730, 9300285) == 0) {
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300285), new java.awt.Point(680, 258));
}
} else {
if(ms.isQuestStarted(21731) && ms.getQuestProgress(21731, 9300344) == 0) {
if(ms.isQuestStarted(21731) && ms.getQuestProgressInt(21731, 9300344) == 0) {
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300344), new java.awt.Point(680, 258));
}
}

View File

@@ -21,5 +21,5 @@
*/
function start(ms) {
ms.getPlayer().updateQuestInfo(21000, "1");
ms.setQuestProgress(21000, 21002, 1);
}

View File

@@ -4,7 +4,7 @@ function start(ms){
var player = ms.getPlayer();
var map = player.getMap();
if(ms.isQuestStarted(21747) && ms.getQuestProgress(21747, 9300351) == 0) {
if(ms.isQuestStarted(21747) && ms.getQuestProgressInt(21747, 9300351) == 0) {
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300351), new java.awt.Point(897, 51));
}
}

View File

@@ -34,7 +34,7 @@ spawnPnpcFee = 7000000;
jobType = 3;
function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -93,7 +93,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -35,7 +35,7 @@ spawnPnpcFee = 7000000;
jobType = 1;
function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -94,7 +94,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -35,7 +35,7 @@ spawnPnpcFee = 7000000;
jobType = 2;
function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -94,7 +94,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -34,7 +34,7 @@ spawnPnpcFee = 7000000;
jobType = 4;
function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -95,7 +95,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -22,11 +22,11 @@
var status = -1;
function activateShamanRock(slot,progress) {
var active = (progress >> slot) % 2;
if(!active) {
progress |= (1 << slot);
var ch = progress[slot];
if(ch == '0') {
var nextProgress = progress.substr(0, slot) + '1' + progress.substr(slot + 1);
cm.updateQuest(2236, progress);
cm.setQuestProgress(2236, nextProgress);
cm.gainItem(4032263, -1);
cm.sendOk("The seal took it's place, repelling the evil in the area.");
return 1;
@@ -45,7 +45,11 @@ function start() {
else if(map == 105070000) activateShamanRock(2,progress);
else if(map == 105090000) { // workaround... TWO SAME NPC ID ON SAME MAP
if(!activateShamanRock(3,progress)) {
var npcOid = cm.getQuestProgressInt(2236, 1);
if (npcOid == 0) {
activateShamanRock(3,progress);
cm.setQuestProgress(2236, 1, cm.getNpcObjectId());
} else if (cm.getNpcObjectId() != npcOid) {
activateShamanRock(4,progress);
}
}

View File

@@ -22,11 +22,11 @@
var status = -1;
function activateShamanRock(slot,progress) {
var active = (progress >> slot) % 2;
if(!active) {
progress |= (1 << slot);
var ch = progress[slot];
if(ch == '0') {
var nextProgress = progress.substr(0, slot) + '1' + progress.substr(slot + 1);
cm.updateQuest(2236, progress);
cm.setQuestProgress(2236, nextProgress);
cm.gainItem(4032263, -1);
cm.sendOk("The seal took it's place, repelling the evil in the area.");
return 1;
@@ -45,7 +45,11 @@ function start() {
else if(map == 105070000) activateShamanRock(2,progress);
else if(map == 105090000) { // workaround... TWO SAME NPC ID ON SAME MAP
if(!activateShamanRock(3,progress)) {
var npcOid = cm.getQuestProgressInt(2236, 1);
if (npcOid == 0) {
activateShamanRock(3,progress);
cm.setQuestProgress(2236, 1, cm.getNpcObjectId());
} else if (cm.getNpcObjectId() != npcOid) {
activateShamanRock(4,progress);
}
}

View File

@@ -39,8 +39,7 @@ function start() {
if (cm.getEventInstance() != null) { // missing script for skill test found thanks to Lost(tm)
advQuest = 5; // string visibility thanks to iPunchEm & Glvelturall
cm.sendNext("Not bad at all. Let's discuss this outside!");
cm.setQuestProgress(6330, 0, 1);
} else if (cm.getQuestProgress(6330, 0) == 0) {
} else if (cm.getQuestProgressInt(6330, 6331) == 0) {
advQuest = 1;
cm.sendNext("You're ready, right? Now try to withstand my attacks for 2 minutes. I won't go easy on you. Good luck, because you will need it.");
} else {
@@ -54,8 +53,7 @@ function start() {
if (cm.getEventInstance() != null) {
advQuest = 6;
cm.sendNext("Not bad at all. Let's discuss this outside!");
cm.setQuestProgress(6370, 0, 1);
} else if (cm.getQuestProgress(6370, 0) == 0) {
} else if (cm.getQuestProgressInt(6370, 6371) == 0) {
advQuest = 2;
cm.sendNext("You're ready, right? Now try to withstand my attacks for 2 minutes. I won't go easy on you. Good luck, because you will need it.");
} else {
@@ -65,7 +63,7 @@ function start() {
cm.sendNext("Congratulations. You have managed to pass my test. I'll teach you a new skill called \"Battleship\".\r\n\r\n #s5221006# #b#q5221006##k");
}
} else if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
} else if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -126,6 +124,12 @@ function action(mode, type, selection) {
cm.sendOk("Unlike most of the other skills you used as a Pirate, this one definitely is different. You can actually ride the 'Battleship' and attack enemies with it. Your DEF level will increase for the time you're on board, so that'll help you tremendously in combat situations. May you become the best Gunslinger out there...");
}
} else {
if (advQuest < 6) {
cm.setQuestProgress(6330, 6331, 2);
} else {
cm.setQuestProgress(6370, 6371, 2);
}
cm.warp(120000101);
}
@@ -138,7 +142,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -64,7 +64,7 @@ function action(mode, type, selection) {
cm.sendOk("Who are you talking to me? If you're just bored, go bother somebody else.");
cm.dispose();
} else {
seagullProgress = cm.getQuestProgress(6400, 0);
seagullProgress = cm.getQuestProgressInt(6400, 1);
if (seagullProgress == 0) {
seagullIdx = Math.floor(Math.random() * seagullQuestion.length);
@@ -90,7 +90,7 @@ function action(mode, type, selection) {
var answer = cm.getText();
if (answer == seagullAnswer[seagullIdx]) {
cm.sendNext("What! I can't believe how incredibly smart you are! Incredible! In the seagull world, that kind of intellingence would give you a Ph.D. and then some. You're really amazing... I can't believe it... I simply can't believe it!");
cm.setQuestProgress(6400, 0, 1);
cm.setQuestProgress(6400, 1, 1);
cm.dispose();
} else {
cm.sendOk("Hmm, that's not quite how I recall it. Try again!");
@@ -99,9 +99,11 @@ function action(mode, type, selection) {
} else if (seagullProgress != 2) {
cm.sendNextPrev("Anyway, only one of 9 Barts is the real Bart. You know that Pirates are known for the strength of their friendships and camaraderie with their fellow pirates. If you're a true pirate, you should be able to find your own mate with ease. Alright then, I'll send you to the room where Bart is.");
} else {
cm.gainExp(1000000);
cm.teachSkill(5221003, 0, 10, -1);
cm.forceCompleteQuest(6400);
//cm.gainExp(1000000);
//cm.teachSkill(5221003, 0, 10, -1);
//cm.forceCompleteQuest(6400);
cm.sendNextPrev("You have met all my challenges, and passed! Good job!");
cm.dispose();
}
} else if (status == 3) {

View File

@@ -21,7 +21,7 @@
*/
function start() {
if(cm.getQuestProgress(2180, 0) == 1) {
if(cm.getQuestProgressInt(2180, 1) == 1) {
cm.sendNext("You have taken milk from this cow recently, check another cow.");
cm.dispose();
return;
@@ -32,19 +32,19 @@ function start() {
cm.gainItem(4031847, -1);
cm.gainItem(4031848, 1);
cm.setQuestProgress(2180, 0, 1);
cm.setQuestProgress(2180, 1, 1);
} else if (cm.canHold(4031849, 1) && cm.haveItem(4031848)) {
cm.sendNext("Now filling up the bottle with milk. The bottle is now 2/3 full of milk.");
cm.gainItem(4031848, -1);
cm.gainItem(4031849, 1);
cm.setQuestProgress(2180, 0, 1);
cm.setQuestProgress(2180, 1, 1);
} else if (cm.canHold(4031850) && cm.haveItem(4031849)) {
cm.sendNext("Now filling up the bottle with milk. The bottle is now completely full of milk.");
cm.gainItem(4031849, -1);
cm.gainItem(4031850, 1);
cm.setQuestProgress(2180, 0, 1);
cm.setQuestProgress(2180, 1, 1);
} else {
cm.sendNext("Your inventory is full, and there's no room for a milk bottle.");
}

View File

@@ -21,7 +21,7 @@
*/
function start() {
if(cm.getQuestProgress(2180, 0) == 2) {
if(cm.getQuestProgressInt(2180, 1) == 2) {
cm.sendNext("You have taken milk from this cow recently, check another cow.");
cm.dispose();
return;
@@ -32,19 +32,19 @@ function start() {
cm.gainItem(4031847, -1);
cm.gainItem(4031848, 1);
cm.setQuestProgress(2180, 0, 2);
cm.setQuestProgress(2180, 1, 2);
} else if(cm.canHold(4031849) && cm.haveItem(4031848)){
cm.sendNext("Now filling up the bottle with milk. The bottle is now 2/3 full of milk.");
cm.gainItem(4031848, -1);
cm.gainItem(4031849, 1);
cm.setQuestProgress(2180, 0, 2);
cm.setQuestProgress(2180, 1, 2);
} else if(cm.canHold(4031850) && cm.haveItem(4031849)){
cm.sendNext("Now filling up the bottle with milk. The bottle is now completely full of milk.");
cm.gainItem(4031849, -1);
cm.gainItem(4031850, 1);
cm.setQuestProgress(2180, 0, 2);
cm.setQuestProgress(2180, 1, 2);
} else {
cm.sendNext("Your inventory is full, and there's no room for a milk bottle.");
}

View File

@@ -3,7 +3,7 @@
Map(s): Erev
Description: 3rd job KoC Buff
*/
importPackage(Packages.constants);
importPackage(Packages.constants.game);
function start() {
if (cm.getPlayer().isCygnus() && GameConstants.getJobBranch(cm.getJob()) > 2) {

View File

@@ -31,7 +31,7 @@ var maxJobType = 15;
function start() {
var jobType = parseInt(cm.getJobId() / 100);
if (jobType >= minJobType && jobType <= maxJobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (jobType >= minJobType && jobType <= maxJobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -62,7 +62,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -39,7 +39,7 @@ function action(mode, type, selection) {
status--;
if(status == 0) {
if (!(cm.isQuestCompleted(20407) || cm.isQuestStarted(20407) && cm.getQuestProgress(20407, 9001010) != 0) && cm.getMap().countMonster(9001010) == 0 && cm.getMap().getNPCById(1104002) == null) {
if (!(cm.isQuestCompleted(20407) || cm.isQuestStarted(20407) && cm.getQuestProgressInt(20407, 9001010) != 0) && cm.getMap().countMonster(9001010) == 0 && cm.getMap().getNPCById(1104002) == null) {
cm.sendOk("... Hnngh... #b#h0##k, is that you...? #r#p1104002##k... She's already here... #b#h0##k, I'm truly sorry I can't help you right now in this state, just when a bigger threat appeared I could do nothing for my people.... Please I beg you, please defeat her, #b#h0##k!! ....");
cm.spawnNpc(1104002, new java.awt.Point(850, 0), cm.getMap());
} else {

View File

@@ -5,7 +5,7 @@ var spawnPnpcFee = 7000000;
var jobType = 21;
function start() {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()))) {
if (parseInt(cm.getJobId() / 100) == jobType && cm.canSpawnPlayerNpc(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()))) {
spawnPnpc = true;
var sendStr = "You have walked a long way to reach the power, wisdom and courage you hold today, haven't you? What do you say about having right now #ra NPC on the Hall of Fame holding the current image of your character#k? Do you like it?";
@@ -36,7 +36,7 @@ function action(mode, type, selection) {
return;
}
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
if(Packages.server.life.MaplePlayerNPC.spawnPlayerNPC(Packages.constants.game.GameConstants.getHallOfFameMapid(cm.getJob()), cm.getPlayer())) {
cm.sendOk("There you go! Hope you will like it.");
cm.gainMeso(-spawnPnpcFee);
} else {

View File

@@ -46,7 +46,7 @@ function action(mode, type, selection) {
} else if (status == 2) {
cm.sendNext("The other heroes? They've left to fight the Black Mage. They're buying us time to escape. What? You want to fight with them? No! You can't! You're hurt. You must leave with us!");
} else if (status == 3) {
cm.updateQuest(21002, "1");
//cm.setQuestProgress(21002, 1);
cm.showIntro("Effect/Direction1.img/aranTutorial/Trio");
cm.dispose();
}

View File

@@ -62,7 +62,7 @@ function action(mode, type, selection){
}
}
} else {
var questProgress = cm.getQuestProgress(2330, 3300005) + cm.getQuestProgress(2330, 3300006) + cm.getQuestProgress(2330, 3300007); //3 Yetis
var questProgress = cm.getQuestProgressInt(2330, 3300005) + cm.getQuestProgressInt(2330, 3300006) + cm.getQuestProgressInt(2330, 3300007); //3 Yetis
if (!(cm.isQuestStarted(2330) && questProgress < 3)) { // thanks Vcoc for finding an exploit with boss entry through NPC
cm.dispose();
return;

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114); // infoEx without infoNumber, must use one progress only, critical hit!
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114);
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114);
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114);
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114);
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114);
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -50,13 +50,13 @@ function action(mode, type, selection) {
cm.getMap().broadcastMessage(MaplePacketCreator.playSound("orbis/" + harpSounds[cm.getNpc() - 2012027]));
if(cm.isQuestStarted(3114)) {
var idx = cm.getQuestProgress(3114, 7777);
var idx = -1 * cm.getQuestProgressInt(3114);
if(idx != -1) {
if(idx > -1) {
var nextNote = harpSong[idx];
if(harpNote != nextNote) {
cm.setQuestProgress(3114, 7777, 0);
cm.setQuestProgress(3114, 0);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/wrong_kor"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Failed"));
@@ -70,7 +70,7 @@ function action(mode, type, selection) {
if(idx == 45) { // finished lullaby
cm.message("Twinkle, twinkle, little star, how I wonder what you are.");
cm.setQuestProgress(3114, 7777, -1);
cm.setQuestProgress(3114, 42);
cm.getPlayer().announce(MaplePacketCreator.showEffect("quest/party/clear"));
cm.getPlayer().announce(MaplePacketCreator.playSound("Party1/Clear"));
@@ -88,7 +88,7 @@ function action(mode, type, selection) {
}
}
cm.setQuestProgress(3114, 7777, idx + 1);
cm.setQuestProgress(3114, -1 * (idx + 1));
}
}
}

View File

@@ -45,13 +45,13 @@ function action(mode, type, selection) {
if(cm.isQuestStarted(3421)) {
var meteoriteId = cm.getNpc() - 2050014;
var progress = cm.getQuestProgress(3421, 0);
var progress = cm.getQuestProgressInt(3421, 1);
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
if (cm.canHold(4031117, 1)) {
progress |= (1 << meteoriteId);
cm.gainItem(4031117, 1);
cm.setQuestProgress(3421, 0, progress);
cm.setQuestProgress(3421, 1, progress);
} else {
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
}

View File

@@ -45,13 +45,13 @@ function action(mode, type, selection) {
if(cm.isQuestStarted(3421)) {
var meteoriteId = cm.getNpc() - 2050014;
var progress = cm.getQuestProgress(3421, 0);
var progress = cm.getQuestProgressInt(3421, 1);
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
if (cm.canHold(4031117, 1)) {
progress |= (1 << meteoriteId);
cm.gainItem(4031117, 1);
cm.setQuestProgress(3421, 0, progress);
cm.setQuestProgress(3421, 1, progress);
} else {
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
}

View File

@@ -45,13 +45,13 @@ function action(mode, type, selection) {
if(cm.isQuestStarted(3421)) {
var meteoriteId = cm.getNpc() - 2050014;
var progress = cm.getQuestProgress(3421, 0);
var progress = cm.getQuestProgressInt(3421, 1);
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
if (cm.canHold(4031117, 1)) {
progress |= (1 << meteoriteId);
cm.gainItem(4031117, 1);
cm.setQuestProgress(3421, 0, progress);
cm.setQuestProgress(3421, 1, progress);
} else {
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
}

View File

@@ -45,13 +45,13 @@ function action(mode, type, selection) {
if(cm.isQuestStarted(3421)) {
var meteoriteId = cm.getNpc() - 2050014;
var progress = cm.getQuestProgress(3421, 0);
var progress = cm.getQuestProgressInt(3421, 1);
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
if (cm.canHold(4031117, 1)) {
progress |= (1 << meteoriteId);
cm.gainItem(4031117, 1);
cm.setQuestProgress(3421, 0, progress);
cm.setQuestProgress(3421, 1, progress);
} else {
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
}

View File

@@ -45,13 +45,13 @@ function action(mode, type, selection) {
if(cm.isQuestStarted(3421)) {
var meteoriteId = cm.getNpc() - 2050014;
var progress = cm.getQuestProgress(3421, 0);
var progress = cm.getQuestProgressInt(3421, 1);
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
if (cm.canHold(4031117, 1)) {
progress |= (1 << meteoriteId);
cm.gainItem(4031117, 1);
cm.setQuestProgress(3421, 0, progress);
cm.setQuestProgress(3421, 1, progress);
} else {
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
}

View File

@@ -45,13 +45,13 @@ function action(mode, type, selection) {
if(cm.isQuestStarted(3421)) {
var meteoriteId = cm.getNpc() - 2050014;
var progress = cm.getQuestProgress(3421, 0);
var progress = cm.getQuestProgressInt(3421, 1);
if((progress >> meteoriteId) % 2 == 0 || (progress == 63 && !cm.haveItem(4031117, 6))) {
if (cm.canHold(4031117, 1)) {
progress |= (1 << meteoriteId);
cm.gainItem(4031117, 1);
cm.setQuestProgress(3421, 0, progress);
cm.setQuestProgress(3421, 1, progress);
} else {
cm.getPlayer().dropMessage(1, "Have a ETC slot available for this item.");
}

View File

@@ -23,7 +23,7 @@ function action(mode, type, selection) {
status--;
if(status == 0) {
if(cm.getQuestProgress(23647, 0) != 0) {
if(cm.getQuestProgressInt(23647, 1) != 0) {
cm.dispose();
return;
}
@@ -39,7 +39,7 @@ function action(mode, type, selection) {
cm.sendNext("Teehehee~ That's your reward for taking it from me, serves you well.");
cm.gainItem(4031793, -1);
cm.gainFame(-5);
cm.setQuestProgress(23647, 0, 1);
cm.setQuestProgress(23647, 1, 1);
cm.dispose();
}

View File

@@ -36,7 +36,7 @@ function action(mode, type, selection) {
status++;
if(status == 0) {
if(cm.isQuestStarted(6180)) {
if(cm.isQuestStarted(6180) && cm.getQuestProgressInt(6180, 9300096) < 200) {
cm.sendYesNo("Pay attention: during the time you stay inside the training ground make sure you #bhave equipped your #t1092041##k, it is of the utmost importance. Are you ready to proceed to the training area?");
}
@@ -47,10 +47,15 @@ function action(mode, type, selection) {
}
else if(status == 1) {
cm.warp(924000001, 0);
cm.sendOk("Have your shield equipped until the end of the quest, or else you will need to start all over again!");
cm.resetQuestProgress(6180,9300096);
if (cm.getPlayer().haveItemEquipped(1092041)) {
cm.sendNext("Have your shield equipped until the end of the quest, or else you will need to start all over again!");
} else {
cm.sendOk("Please equip the #r#t1092041##k before entering the training ground.");
cm.dispose();
}
}
else {
cm.warp(924000001, 0);
cm.dispose();
}
}

View File

@@ -27,10 +27,10 @@ function action(mode, type, selection){
return;
}
if(cm.getText() == "Actions speak louder than words"){
if(cm.isQuestStarted(21747) && cm.getQuestProgress(21747, 9300351) == 0)
if(cm.isQuestStarted(21747) && cm.getQuestProgressInt(21747, 9300351) == 0)
cm.warp(925040100, 0);
else
cm.playerMessage(5, "Although you said the right answer, some mysterious forces is blocking the way in.");
cm.playerMessage(5, "Although you said the right answer, some mysterious forces are blocking the way in.");
cm.dispose();
}

View File

@@ -115,7 +115,7 @@ function action(mode, type, selection) {
status = 2;
}
}
} else if (Packages.constants.GameConstants.isAriantColiseumArena(cm.getPlayer().getMapId())) {
} else if (Packages.constants.game.GameConstants.isAriantColiseumArena(cm.getPlayer().getMapId())) {
if (cm.getPlayer().getMapId() == 980010101) {
exped = MapleExpeditionType.ARIANT;
expedicao = cm.getExpedition(exped);

View File

@@ -40,9 +40,9 @@ function action(mode, type, selection) {
else
status--;
if (status == 0 && mode == 1) {
if(cm.isQuestStarted(3900) && cm.getPlayer().getQuestInfo(3900) != 5) {
if(cm.isQuestStarted(3900) && cm.getQuestProgressInt(3900) != 5) {
cm.sendOk("#b(You drink the water from the oasis and feel refreshed.)", 2);
cm.getPlayer().updateQuestInfo(3900, "5");
cm.setQuestProgress(3900, 5);
} else if(cm.isQuestCompleted(3938)) {
if(cm.canHold(2210005)) {
if(!cm.haveItem(2210005) && !isTigunMorphed(cm.getPlayer())) {

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3929)) {
if(cm.getQuestProgress(3929, 0) != 1) {
if(cm.haveItem(4031580)) {
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, 0, 1);
}
var progress = cm.getQuestProgress(3929);
var slot = 0;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3929)) {
if(cm.getQuestProgress(3929, 2) != 1) {
if(cm.haveItem(4031580)) {
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, 2, 1);
}
var progress = cm.getQuestProgress(3929);
var slot = 2;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3929)) {
if(cm.getQuestProgress(3929, 1) != 1) {
if(cm.haveItem(4031580)) {
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, 1, 1);
}
var progress = cm.getQuestProgress(3929);
var slot = 1;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3929)) {
if(cm.getQuestProgress(3929, 3) != 1) {
if(cm.haveItem(4031580)) {
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, 3, 1);
}
var progress = cm.getQuestProgress(3929);
var slot = 3;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031580, -1);
cm.setQuestProgress(3929, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3926)) {
if(cm.getQuestProgress(3926, 0) != 1) {
if(cm.haveItem(4031579)) {
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, 0, 1);
}
var progress = cm.getQuestProgress(3926);
var slot = 0;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3926)) {
if(cm.getQuestProgress(3926, 2) != 1) {
if(cm.haveItem(4031579)) {
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, 2, 1);
}
var progress = cm.getQuestProgress(3926);
var slot = 2;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3926)) {
if(cm.getQuestProgress(3926, 1) != 1) {
if(cm.haveItem(4031579)) {
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, 1, 1);
}
var progress = cm.getQuestProgress(3926);
var slot = 1;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, nextProgress);
}
}

View File

@@ -43,11 +43,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3926)) {
if(cm.getQuestProgress(3926, 3) != 1) {
if(cm.haveItem(4031579)) {
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, 3, 1);
}
var progress = cm.getQuestProgress(3926);
var slot = 3;
var ch = progress[slot];
if(ch == '2') {
var nextProgress = progress.substr(0, slot) + '3' + progress.substr(slot + 1);
cm.gainItem(4031579, -1);
cm.setQuestProgress(3926, nextProgress);
}
}

View File

@@ -66,7 +66,7 @@ function action(mode, type, selection) {
} else if (selection == 4) {
cm.sendNext("Inside Pharaoh Yeti's Tomb, you can acquire a #e#b#t2022613##k#n by proving yourself capable of defeating the #bPharaoh Jr. Yeti#k, the Pharaoh's clone. Inside that box lies a very special treasure. It is the #e#b#t1132012##k#n.\r\n#i1132012:# #t1132012#\r\n\r\n And if you are somehow able to survive Hell Mode, you will receive the #e#b#t1132013##k#n.\r\n\r\n#i1132013:# #t1132013#\r\n\r\n Though, of course, Nett won't allow that to happen.");
} else if (selection == 5) {
var progress = cm.getQuestProgress(29932);
var progress = cm.getQuestProgressInt(29932);
if (progress >= 50000)
cm.dispose();
else

25
scripts/npc/2111011.js Normal file
View File

@@ -0,0 +1,25 @@
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.dispose();
}
}
}

25
scripts/npc/2111012.js Normal file
View File

@@ -0,0 +1,25 @@
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.dispose();
}
}
}

View File

@@ -40,7 +40,17 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3311)) {
cm.setQuestProgress(3311, 0, 1);
var slot = 2;
var progress = cm.getQuestProgressInt(3311);
if (progress == 4) {
progress = 7;
} else {
progress = 5;
}
cm.setQuestProgress(3311, progress);
cm.sendOk("This is a mug picture of Dr. De Lang. It seems he is adorning a locket with the emblem of the Alcadno academy, he is a retainer of the Alcadno society.", 2);
}

View File

@@ -40,7 +40,17 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3311)) {
cm.setQuestProgress(3311, 1, 1);
var slot = 0;
var progress = cm.getQuestProgressInt(3311);
if (progress == 4) {
progress = 7;
} else {
progress = 5;
}
cm.setQuestProgress(3311, progress);
cm.sendOk("The diary of Dr. De Lang. A lot of formulas and pompous scientific texts can be found all way through the pages, but it is worth noting that in the last entry (3 weeks ago), it is written that he concluded the researches on an improvement on the blueprints for the Neo Huroids, thus making the last preparations to show it to the 'society'... No words after this...", 2);
} else if(cm.isQuestStarted(3322) && !cm.haveItem(4031697, 1)) {
if(cm.canHold(4031697, 1))

25
scripts/npc/2111016.js Normal file
View File

@@ -0,0 +1,25 @@
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.dispose();
}
}
}

View File

@@ -40,15 +40,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3339)) {
var progress = cm.getQuestProgress(3339, 0);
var progress = cm.getQuestProgressInt(23339, 1);
if(progress == 3) {
cm.sendGetText("The pipe reacts as the water starts flowing. A secret compartment with a keypad shows up. #bPassword#k!");
} else if(progress == 0) {
cm.setQuestProgress(3339, 0, 1);
cm.setQuestProgress(23339, 1, 1);
cm.dispose();
} else if(progress < 3) {
cm.setQuestProgress(3339, 0, 0);
cm.setQuestProgress(23339, 1, 0);
cm.dispose();
} else {
cm.warp(261000001, 1);
@@ -63,7 +63,7 @@ function action(mode, type, selection) {
}
} else if(status == 1) {
if(cm.getText() == "my love Phyllia") {
cm.setQuestProgress(3339, 0, 4);
cm.setQuestProgress(23339, 1, 4);
cm.warp(261000001, 1);
cm.dispose();
}

View File

@@ -40,15 +40,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3339)) {
var progress = cm.getQuestProgress(3339, 0);
var progress = cm.getQuestProgressInt(23339, 1);
if(progress == 3) {
cm.sendGetText("The pipe reacts as the water starts flowing. A secret compartment with a keypad shows up. #bPassword#k!");
} else if(progress == 2) {
cm.setQuestProgress(3339, 0, 3);
cm.setQuestProgress(23339, 1, 3);
cm.sendGetText("The pipe reacts as the water starts flowing. A secret compartment with a keypad shows up. #bPassword#k!");
} else if(progress < 3) {
cm.setQuestProgress(3339, 0, 0);
cm.setQuestProgress(23339, 1, 0);
cm.dispose();
} else {
cm.warp(261000001, 1);
@@ -63,7 +63,7 @@ function action(mode, type, selection) {
}
} else if(status == 1) {
if(cm.getText() == "my love Phyllia") {
cm.setQuestProgress(3339, 0, 4);
cm.setQuestProgress(23339, 1, 4);
cm.warp(261000001, 1);
cm.dispose();
}

View File

@@ -40,15 +40,15 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3339)) {
var progress = cm.getQuestProgress(3339, 0);
var progress = cm.getQuestProgressInt(23339, 1);
if(progress == 3) {
cm.sendGetText("The pipe reacts as the water starts flowing. A secret compartment with a keypad shows up. #bPassword#k!");
} else if(progress == 1) {
cm.setQuestProgress(3339, 0, 2);
cm.setQuestProgress(23339, 1, 2);
cm.dispose();
} else if(progress < 3) {
cm.setQuestProgress(3339, 0, 0);
cm.setQuestProgress(23339, 1, 0);
cm.dispose();
} else {
cm.warp(261000001, 1);
@@ -63,7 +63,7 @@ function action(mode, type, selection) {
}
} else if(status == 1) {
if(cm.getText() == "my love Phyllia") {
cm.setQuestProgress(3339, 0, 4);
cm.setQuestProgress(23339, 1, 4);
cm.warp(261000001, 1);
cm.dispose();
}

View File

@@ -40,13 +40,13 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3345)) {
var progress = cm.getQuestProgress(3345, 0);
var progress = cm.getQuestProgressInt(3345);
if(progress == 0) {
cm.setQuestProgress(3345, 0, 1);
cm.setQuestProgress(3345, 1);
cm.dispose();
} else if(progress < 4) {
cm.setQuestProgress(3345, 0, 0);
cm.setQuestProgress(3345, 0);
cm.dispose();
} else {
cm.dispose();

View File

@@ -40,13 +40,13 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3345)) {
var progress = cm.getQuestProgress(3345, 0);
var progress = cm.getQuestProgressInt(3345);
if(progress == 1) {
cm.setQuestProgress(3345, 0, 2);
cm.setQuestProgress(3345, 2);
cm.dispose();
} else if(progress < 4) {
cm.setQuestProgress(3345, 0, 0);
cm.setQuestProgress(3345, 0);
cm.dispose();
} else {
cm.dispose();

View File

@@ -40,13 +40,13 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3345)) {
var progress = cm.getQuestProgress(3345, 0);
var progress = cm.getQuestProgressInt(3345);
if(progress == 2) {
cm.setQuestProgress(3345, 0, 3);
cm.setQuestProgress(3345, 3);
cm.dispose();
} else if(progress < 4) {
cm.setQuestProgress(3345, 0, 0);
cm.setQuestProgress(3345, 0);
cm.dispose();
} else {
cm.dispose();

View File

@@ -40,10 +40,10 @@ function action(mode, type, selection) {
if(status == 0) {
if(cm.isQuestStarted(3345)) {
var progress = cm.getQuestProgress(3345, 0);
var progress = cm.getQuestProgressInt(3345);
if(progress == 3 && cm.haveItem(4031739, 1) && cm.haveItem(4031740, 1) && cm.haveItem(4031741, 1)) {
cm.setQuestProgress(3345, 0, 4);
cm.setQuestProgress(3345, 4);
cm.gainItem(4031739, -1);
cm.gainItem(4031740, -1);
cm.gainItem(4031741, -1);
@@ -51,7 +51,7 @@ function action(mode, type, selection) {
cm.sendOk("(As you place the shards a light shines over the circle, repelling whatever omens were brewing inside the artifact.)", 2);
cm.dispose();
} else if(progress < 4) {
cm.setQuestProgress(3345, 0, 0);
cm.setQuestProgress(3345, 0);
cm.dispose();
} else {
cm.dispose();

View File

@@ -26,15 +26,15 @@
function start() {
if(cm.isQuestStarted(3367)) {
var c = cm.getQuestProgress(3367, 30);
if(c == 30) {
var c = cm.getQuestProgressInt(3367, 30);
if(c >= 30) {
cm.sendNext("(All files have been organized. Report the found files to Yulete.)", 2);
cm.dispose();
return;
}
var book = (cm.getNpcObjectId() % 30);
var prog = cm.getQuestProgress(3367, book);
var prog = cm.getQuestProgressInt(3367, book);
if(prog == 0) {
c++;
@@ -45,7 +45,7 @@ function start() {
return;
} else {
cm.gainItem(4031797, 1);
cm.setQuestProgress(3367, 31, cm.getQuestProgress(3367, 31) + 1);
cm.setQuestProgress(3367, 31, cm.getQuestProgressInt(3367, 31) + 1);
}
}

View File

@@ -63,7 +63,7 @@ function action(mode, type, selection) {
cm.sendOk("Hello we're Mom and Dad...");
cm.dispose();
} else {
if (cm.getQuestProgress(100400, 1) == 0) {
if (cm.getQuestProgressInt(100400, 1) == 0) {
cm.sendNext("Mom, dad, I have a request to do to both of you... I wanna know more about the path you've already been walking since always, the path of loving and caring for someone dear to me.", 2);
} else {
if(!hasProofOfLoves(cm.getPlayer())) {

View File

@@ -77,6 +77,7 @@ function writeFeatureTab_Quests() {
addFeature("3rd job quiz with all 40-question pool available.");
addFeature("Item raising functional.");
addFeature("Cleared issue with player movement during NPC talk.");
addFeature("Reviewed usage of quest progress data as requirement.");
}
function writeFeatureTab_PlayerSocialNetwork() {

View File

@@ -19,9 +19,10 @@ function action(mode, type, selection){
cm.sendGetText("The door reacts to the entry pass inserted. #bPassword#k!");
}
else if(status == 1){
if(cm.getText() == cm.getStringQuestProgress(3360, 0)){
cm.setQuestProgress(3360, 1, 1);
cm.warp((cm.getMapId() == 261010000) ? 261020200 : 261010000, "secret00");
if(cm.getText() == cm.getQuestProgress(3360)){
cm.setQuestProgress(3360, 1);
cm.getPlayer().announce(Packages.tools.MaplePacketCreator.playPortalSound());
cm.warp(261030000, "sp_" + ((cm.getMapId() == 261010000) ? "jenu" : "alca"));
}
else {
cm.sendOk("#rWrong!");

View File

@@ -20,7 +20,7 @@ function action(mode, type, selection){
if(status == 0){
if(cm.isQuestStarted(21728)) {
cm.sendOk("You search for any hints of the Puppeteer, but it seems a powerful force blocks the path... Better return to #b#p1061019##k.");
cm.setQuestProgress(21728, 0, 1);
cm.setQuestProgress(21728, 21761, 0);
cm.dispose();
return;
}
@@ -29,12 +29,12 @@ function action(mode, type, selection){
}
else if(status == 1){
if(cm.getText() == "Francis is a genius Puppeteer!"){
if(cm.isQuestStarted(20730) && cm.getQuestProgress(20730, 9300285) == 0)
if(cm.isQuestStarted(20730) && cm.getQuestProgressInt(20730, 9300285) == 0)
cm.warp(910510001, 1);
else if(cm.isQuestStarted(21731) && cm.getQuestProgress(21731, 9300346) == 0)
else if(cm.isQuestStarted(21731) && cm.getQuestProgressInt(21731, 9300346) == 0)
cm.warp(910510001, 1);
else
cm.playerMessage(5, "Although you said the right answer, some mysterious forces is blocking the way in.");
cm.playerMessage(5, "Although you said the right answer, some mysterious forces are blocking the way in.");
cm.dispose();
}

View File

@@ -5,7 +5,7 @@
---------------------------------------------------------------------------------------------------
**/
importPackage(Packages.constants);
importPackage(Packages.constants.game);
var status = 0;
var party;

View File

@@ -5,7 +5,7 @@
---------------------------------------------------------------------------------------------------
**/
importPackage(Packages.constants);
importPackage(Packages.constants.game);
var status = 0;
var party;

View File

@@ -93,6 +93,9 @@ function writeServerStaff_OdinMS() {
}
function writeServerStaff_Contributors() {
addPerson("IxianMace", "Contributor");
addPerson("Conrad", "Contributor");
addPerson("inhyuk", "Contributor");
addPerson("Jayd", "Contributor");
addPerson("Dragohe4rt", "Contributor");
addPerson("Jvlaple", "Contributor");

View File

@@ -21,7 +21,7 @@
* @Author Ronan
* Player NPC Ranking System */
importPackage(Packages.constants);
importPackage(Packages.constants.game);
var status;

View File

@@ -1,5 +1,5 @@
function enter(pi) {
var questProgress = pi.getQuestProgress(2330, 3300005) + pi.getQuestProgress(2330, 3300006) + pi.getQuestProgress(2330, 3300007); //3 Yetis
var questProgress = pi.getQuestProgressInt(2330, 3300005) + pi.getQuestProgressInt(2330, 3300006) + pi.getQuestProgressInt(2330, 3300007); //3 Yetis
if(pi.isQuestStarted(2330) && questProgress < 3){
pi.openNpc(1300013);

View File

@@ -10,7 +10,7 @@ function enter(pi) {
for(var i = 0; i < quests.length; i++) {
if (pi.isQuestActive(quests[i])) {
if(pi.getQuestProgress(quests[i], mobs[i]) != 0) {
if(pi.getQuestProgressInt(quests[i], mobs[i]) != 0) {
pi.message("You already faced Nex. Complete your mission.");
return false;
}

View File

@@ -1,7 +1,8 @@
function enter(pi) {
var mapobj = pi.getWarpMap(104000004);
if(pi.isQuestActive(21733) && pi.getQuestProgress(21733, 9300345) == 0 && mapobj.countMonsters() == 0) {
if(pi.isQuestActive(21733) && pi.getQuestProgressInt(21733, 9300345) == 0 && mapobj.countMonsters() == 0) {
mapobj.spawnMonsterOnGroundBelow(Packages.server.life.MapleLifeFactory.getMonster(9300345), new java.awt.Point(0, 0));
pi.setQuestProgress(21733, 21762, 2);
}
pi.playPortalSound();

View File

@@ -9,8 +9,7 @@ function enter(pi) {
pi.playPortalSound();
pi.warp(i, "out00");
pi.getPlayer().updateQuestInfo(21202, "0");
//pi.getPlayer().announce(Packages.tools.MaplePacketCreator.questProgress(21203, "21203"));
pi.setQuestProgress(21202, 21203, 0);
return true;
}
pi.message("The mirror is blank due to many players recalling their memories. Please wait and try again.");
@@ -24,7 +23,7 @@ function enter(pi) {
spawnMob(-210, 454, 9001013, map);
pi.playPortalSound();
pi.getPlayer().updateQuestInfo(21203, "1");
pi.setQuestProgress(21303, 21203, 1);
pi.warp(108010701, "out00");
return true;
}

View File

@@ -22,7 +22,7 @@
importPackage(Packages.server.life);
function enter(pi) {
if(pi.isQuestStarted(21301) && pi.getQuestProgress(21301, 9001013) == 0) {
if(pi.isQuestStarted(21301) && pi.getQuestProgressInt(21301, 9001013) == 0) {
if(pi.getPlayerCount(108010700) != 0) {
pi.message("The portal is blocked from the other side. I wonder if someone is already fighting the Thief Crow?");
return false;

View File

@@ -5,7 +5,7 @@ function enter(pi) {
eim.dispose();
}
var questProgress = pi.getQuestProgress(2330, 3300005) + pi.getQuestProgress(2330, 3300006) + pi.getQuestProgress(2330, 3300007); //3 Yetis
var questProgress = pi.getQuestProgressInt(2330, 3300005) + pi.getQuestProgressInt(2330, 3300006) + pi.getQuestProgressInt(2330, 3300007); //3 Yetis
if(questProgress == 3 && !pi.hasItem(4032388)) {
if(pi.canHold(4032388)){
pi.getPlayer().message("You have aquired a key to the Wedding Hall. King Pepe must have dropped it.");

View File

@@ -19,8 +19,11 @@
*/
function enter(pi) {
if(pi.isQuestStarted(3367)) {
if(pi.getQuestProgress(3367, 31) < pi.getItemQuantity(4031797)) {
pi.gainItem(4031797, pi.getQuestProgress(3367, 31) - pi.getItemQuantity(4031797));
var booksDone = pi.getQuestProgressInt(3367, 31);
var booksInv = pi.getItemQuantity(4031797);
if(booksInv < booksDone) {
pi.gainItem(4031797, booksDone - booksInv);
}
pi.playPortalSound(); pi.warp(926130102, 0);

View File

@@ -23,7 +23,7 @@ function enter(pi) {
return false;
} else {
if (pi.isQuestStarted(6410)) {
pi.setQuestProgress(6410, 0, 1);
pi.setQuestProgress(6410, 6411, "p2");
}
pi.playPortalSound();

View File

@@ -30,7 +30,8 @@ function enter(pi) {
if(pi.isQuestCompleted(3360)) {
return doorCross(pi);
} else if(pi.isQuestStarted(3360)) {
if(pi.getQuestProgress(3360, 1) == 0) {
var pw = pi.getQuestProgress(3360);
if(pw.length() > 1) {
pi.openNpc(2111024, "MagatiaPassword");
return false;
} else {

View File

@@ -43,7 +43,7 @@ function start(mode, type, selection) {
status--;
if (status == 0)
qm.sendNext("Hey, Man~ What's up? Haha! I am Roger who can teach you adorable new Maplers lots of information.");
qm.sendNext("Hey, " + (qm.getPlayer().getGender() == 0 ? "Man" : "Miss") + "~ What's up? Haha! I am Roger who can teach you adorable new Maplers lots of information.");
else if (status == 1)
qm.sendNextPrev("You are asking who made me do this? Ahahahaha!\r\nMyself! I wanted to do this and just be kind to you new travellers.");
else if (status == 2)
@@ -60,7 +60,7 @@ function start(mode, type, selection) {
qm.forceStartQuest();
qm.sendNext("Surprised? If HP becomes 0, then you are in trouble. Now, I will give you #rRoger's Apple#k. Please take it. You will feel stronger. Open the Item window and double click to consume. Hey, it's very simple to open the Item window. Just press #bI#k on your keyboard.");
} else if (status == 4) {
qm.sendNextPrev("Please take all Roger's Apples that I gave you. You will be able to see the HP bar increasing. Please talk to me again when you recover your HP 100%.");
qm.sendPrev("Please take all Roger's Apples that I gave you. You will be able to see the HP bar increasing. Please talk to me again when you recover your HP 100%.");
} else if (status == 5) {
qm.showInfo("UI/tutorial.img/28");
qm.dispose();
@@ -91,7 +91,7 @@ function end(mode, type, selection) {
else if (status == 1)
qm.sendNextPrev("Alright! Now that you have learned alot, I will give you a present. This is a must for your travel in Maple World, so thank me! Please use this under emergency cases!");
else if (status == 2)
qm.sendNextPrev("Okay, this is all I can teach you. I know it's sad but it is time to say good bye. Well take care if yourself and Good luck my friend!\r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0#\r\n#v2010000# 3 #t2010000#\r\n#v2010009# 3 #t2010009#\r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0# 10 exp");
qm.sendPrev("Okay, this is all I can teach you. I know it's sad but it is time to say good bye. Well take care if yourself and Good luck my friend!\r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0#\r\n#v2010000# 3 #t2010000#\r\n#v2010009# 3 #t2010009#\r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0# 10 exp");
else if (status == 3) {
if(qm.isQuestCompleted(1021))
qm.dropMessage(1,"Unknown Error");

View File

@@ -5,6 +5,12 @@ function start(mode, type, selection) {
qm.sendNext("Whoa, whoa! Are you really declining my offer? Well, you'll be able to #blevel-up quicker #kwith our help, so let me know if you change your mind. Even if you've declined a Quest, you can receive the Quest again if you just come and talk to me.");
qm.dispose();
} else {
if(mode == 0 && type > 0) {
qm.sendNext("Whoa, whoa! Are you really declining my offer? Well, you'll be able to #blevel-up quicker #kwith our help, so let me know if you change your mind. Even if you've declined a Quest, you can receive the Quest again if you just come and talk to me.");
qm.dispose();
return;
}
if (mode == 1)
status++;
else
@@ -14,7 +20,7 @@ function start(mode, type, selection) {
} else if (status == 1) {
qm.sendNextPrev("If you want to officially become a part of Cygnus Knights, you must first meet the Empress. She's at the center of this island, accompained by Shinsoo. My brothers and I would like to share with you a few things that are considered #bBasic Knowledge#k in Maple World before you go. Would that be okay?");
} else if (status == 2) {
qm.sendOk("Oh, let me warn you that this is a Quest. You may have noticed that NPCs around Maple World occasionally ask you for various favors. A favor of that sort is called a #bQuest#k. You will receive reward items or EXP upon completing Quests, so I strongly suggest you diligently fulfill the favors of Maple NPCs.");
qm.sendNextPrev("Oh, let me warn you that this is a Quest. You may have noticed that NPCs around Maple World occasionally ask you for various favors. A favor of that sort is called a #bQuest#k. You will receive reward items or EXP upon completing Quests, so I strongly suggest you diligently fulfill the favors of Maple NPCs.");
} else if (status == 3) {
qm.sendAcceptDecline("Would you like to meet #bKizan#k, who can tell you about hunting? You can find Kizan by following the arrow to the left.");
} else if (status == 4) {
@@ -31,7 +37,7 @@ function end(mode, type, selection) {
qm.dispose();
} else {
if (status == 0) {
qm.sendNext("Are you the Noblesse my brother Kimu sent? Nice to meet you! I'm Kizan. I'll give you the reward Kimu asked me to give you. Remember, you can check your Inventory by pressing the #bI key#k. Red potions help you recover HP, and blue ones help recover MP. It's a good idea to learn how to use them beforehand so you'll be ready with them when you're in danger. \r\n\r\n#fUI/UIWindow.img/Quest/reward# \r\n\r\n#v2000020# #z2000020# \r\n#v2000021# #z2000021# \r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0#15 exp");
qm.sendOk("Are you the Noblesse my brother Kimu sent? Nice to meet you! I'm Kizan. I'll give you the reward Kimu asked me to give you. Remember, you can check your Inventory by pressing the #bI key#k. Red potions help you recover HP, and blue ones help recover MP. It's a good idea to learn how to use them beforehand so you'll be ready with them when you're in danger. \r\n\r\n#fUI/UIWindow.img/Quest/reward# \r\n\r\n#v2000020# #z2000020# \r\n#v2000021# #z2000021# \r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0#15 exp");
} else if (status == 1) {
if(qm.canHold(2000022) && qm.canHold(2000023)){
if(!qm.isQuestCompleted(21010)) {

View File

@@ -48,7 +48,7 @@ function end(mode, type, selection) {
if (status == 0) {
qm.sendNext("Ah, it seems like you've successfully hunted a #o100120#. Pretty simple, right? Regular Attacks may be easy to use, but they are pretty weak. Don't worry, though. #p1102006# will teach you how to use more powerful skills. Wait, let me give you a well-deserved quest reward before you go.");
} else if (status == 1) {
qm.sendNextPrev("This equipment is for Noblesses. It's much cooler than what you're wearing right now, isn't it? Follow the arrows to your left to meet my younger brother #b#p1102006##k. How about you change into your new Noblesse outfit before you go? \r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0# \r\n#i1002869# #t1002869# - 1 \r\n#i1052177# #t1052177# - 1 \r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0# 30 exp");
qm.sendPrev("This equipment is for Noblesses. It's much cooler than what you're wearing right now, isn't it? Follow the arrows to your left to meet my younger brother #b#p1102006##k. How about you change into your new Noblesse outfit before you go? \r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0# \r\n#i1002869# #t1002869# - 1 \r\n#i1052177# #t1052177# - 1 \r\n\r\n#fUI/UIWindow.img/QuestIcon/8/0# 30 exp");
} else if (status == 2) {
qm.gainItem(1002869, 1);
qm.gainItem(1052177, 1);

View File

@@ -52,7 +52,7 @@ function end(mode, type, selection) {
if (status == 0) {
qm.sendNext("Did you bring me a Building Stone and a Drape? Let's see. Ah, these are just what I need! They indeed are a #t4032267# and a #t4032268#! I'll make you a Chair right away.");
} else if (status == 1) {
qm.sendNextPrev("Here it is, a #t3010060#. What do you think? Nifty, huh? You can #bquickly recover your HP by sitting in this Chair#k. It will be stored in the #bSet-up#k window in your Inventory, so confirm that you've received the chair and head over to #b#p1102008##k. You'll see him if you keep following the arrow to the left. \r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0# \r\n#i3010060# 1 #t3010060# \r\n#fUI/UIWindow.img/QuestIcon/8/0# 95 exp");
qm.sendPrev("Here it is, a #t3010060#. What do you think? Nifty, huh? You can #bquickly recover your HP by sitting in this Chair#k. It will be stored in the #bSet-up#k window in your Inventory, so confirm that you've received the chair and head over to #b#p1102008##k. You'll see him if you keep following the arrow to the left. \r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0# \r\n#i3010060# 1 #t3010060# \r\n#fUI/UIWindow.img/QuestIcon/8/0# 95 exp");
} else if (status == 2) {
qm.gainItem(4032267, -1);
qm.gainItem(4032268, -1);

38
scripts/quest/20020.js Normal file
View File

@@ -0,0 +1,38 @@
/*
NPC Name: Nineheart
Description: Quest - Cygnus movie Intro
*/
var status = -1;
function start(mode, type, selection) {
if (mode == -1) {
qm.sendOk("Talk to me after you have decided what you really want to do. Whatever you choose, you will not miss out or lose privileges, so don't take this too seriously...");
qm.dispose();
} else {
if(mode == 0 && type > 0 || selection == 1) {
qm.sendOk("Talk to me after you have decided what you really want to do. Whatever you choose, you will not miss out or lose privileges, so don't take this too seriously...");
qm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
qm.sendNext("I can tell you've worked really hard by seeing that you're already at Level 10. I think it's time now for you to break out as a Nobless and officially become the Knight-in-Training. Before doing that, however, I want to ask you one thing. Have you decided which Knight you'd want to beome?");
} else if (status == 1) {
qm.sendNextPrev("There isn't a single path to becoming a Knight. In fact, there are five of them laid out for you. It's up to you to choose which path you'd like to take, but it should definitely be something you will not regret. That's why... I am offering to show you what you'll look like once you become a Knight.");
} else if (status == 2) {
qm.sendSimple("What do you think? Are you interested in seeing yourself as the leader of the Knights? If you have already decided what kind of Knight you'd like to become, then you won't necessarily have to look at it...\r\n\r\n#b#L0#Show me how I'd look like as the leader of the Knights.#l ..#b#L1#No, I'm okay.");
} else if (status == 3) {
qm.sendYesNo("Would you like to see for it yourself right now? A short clip will come out soon. Be prepared for what you are about to witness.");
} else if (status == 4) {
qm.forceStartQuest();
qm.forceCompleteQuest();
//qm.warp(913040100, 0);
qm.dispose();
}
}
}

View File

@@ -6,6 +6,7 @@ importPackage(Packages.client);
var status = -1;
var jobType = 1;
var canTryFirstJob = true;
function end(mode, type, selection) {
if (mode == 0) {
@@ -21,32 +22,35 @@ function end(mode, type, selection) {
if (status == 0) {
qm.sendYesNo("Have you made your decision? The decision will be final, so think carefully before deciding what to do. Are you sure you want to become a Dawn Warrior?");
} else if (status == 1) {
if(!qm.canGetFirstJob(jobType)) {
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rDawn Warrior#k.");
qm.dispose();
return;
if (canTryFirstJob) {
canTryFirstJob = false;
if (qm.getPlayer().getJob().getId() != 1100) {
if(!qm.canGetFirstJob(jobType)) {
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rDawn Warrior#k.");
qm.dispose();
return;
}
if (!(qm.canHoldAll([1302077, 1142066]))) {
qm.sendOk("Make some room in your inventory and talk back to me.");
qm.dispose();
return;
}
qm.gainItem(1302077, 1);
qm.gainItem(1142066, 1);
qm.changeJob(MapleJob.DAWNWARRIOR1);
qm.getPlayer().resetStats();
}
qm.forceCompleteQuest();
}
if (!(qm.canHoldAll([1302077, 1142066]))) {
qm.sendOk("Make some room in your inventory and talk back to me.");
qm.dispose();
return;
}
qm.sendNext("I have just molded your body to make it perfect for a Dawn Warrior. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
if (qm.getPlayer().getJob().getId() != 1100) {
qm.gainItem(1302077, 1);
qm.gainItem(1142066, 1);
qm.changeJob(MapleJob.DAWNWARRIOR1);
qm.getPlayer().resetStats();
}
qm.forceCompleteQuest();
qm.sendNext("I have just molded your body to make it perfect for a Dawn Warrior. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
} else if (status == 2) {
qm.sendNextPrev("I have also expanded your inventory slot counts for your equipment and etc. inventory. Use those slots wisely and fill them up with items required for Knights to carry.");
} else if (status == 3) {
qm.sendNextPrev("I have also given you a hint of #bSP#k, so open the #bSkill Menu#k to acquire new skills. Of course, you can't raise them at all once, and there are some skills out there where you won't be able to acquire them unless you master the basic skills first.");
} else if (status == 4) {
qm.sendNextPrev("Unlike your time as a Nobless, once you become the Dawn Warrior, you will lost a portion of your EXP when you run out of HP, okay?");
qm.sendNextPrev("Unlike your time as a Noblesse, once you become the Dawn Warrior, you will lost a portion of your EXP when you run out of HP, okay?");
} else if (status == 5) {
qm.sendNextPrev("Now... I want you to go out there and show the world how the Knights of Cygnus operate.");
} else if (status == 6) {

View File

@@ -6,6 +6,7 @@ importPackage(Packages.client);
var status = -1;
var jobType = 2;
var canTryFirstJob = true;
function end(mode, type, selection) {
if (mode == 0) {
@@ -21,32 +22,35 @@ function end(mode, type, selection) {
if (status == 0) {
qm.sendYesNo("Have you made your decision? The decision will be final, so think carefully before deciding what to do. Are you sure you want to become a Blaze Wizard?");
} else if (status == 1) {
if(!qm.canGetFirstJob(jobType)) {
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rBlaze Wizard#k.");
qm.dispose();
return;
if (canTryFirstJob) {
canTryFirstJob = false;
if (qm.getPlayer().getJob().getId() != 1200) {
if(!qm.canGetFirstJob(jobType)) {
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rBlaze Wizard#k.");
qm.dispose();
return;
}
if (!(qm.canHoldAll([1372043, 1142066]))) {
qm.sendOk("Make some room in your inventory and talk back to me.");
qm.dispose();
return;
}
qm.gainItem(1372043, 1);
qm.gainItem(1142066, 1);
qm.changeJob(MapleJob.BLAZEWIZARD1);
qm.getPlayer().resetStats();
}
qm.forceCompleteQuest();
}
if (!(qm.canHoldAll([1372043, 1142066]))) {
qm.sendOk("Make some room in your inventory and talk back to me.");
qm.dispose();
return;
}
qm.sendNext("I have just molded your body to make it perfect for a Blaze Wizard. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
if (qm.getPlayer().getJob().getId() != 1200) {
qm.gainItem(1372043, 1);
qm.gainItem(1142066, 1);
qm.changeJob(MapleJob.BLAZEWIZARD1);
qm.getPlayer().resetStats();
}
qm.forceCompleteQuest();
qm.sendNext("I have just molded your body to make it perfect for a Blaze Wizard. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
} else if (status == 2) {
qm.sendNextPrev("I have also expanded your inventory slot counts for your equipment and etc. inventory. Use those slots wisely and fill them up with items required for Knights to carry.");
} else if (status == 3) {
qm.sendNextPrev("I have also given you a hint of #bSP#k, so open the #bSkill Menu#k to acquire new skills. Of course, you can't raise them at all once, and there are some skills out there where you won't be able to acquire them unless you master the basic skills first.");
} else if (status == 4) {
qm.sendNextPrev("Unlike your time as a Nobless, once you become the Blaze Wizard, you will lost a portion of your EXP when you run out of HP, okay?");
qm.sendNextPrev("Unlike your time as a Noblesse, once you become the Blaze Wizard, you will lost a portion of your EXP when you run out of HP, okay?");
} else if (status == 5) {
qm.sendNextPrev("Now... I want you to go out there and show the world how the Knights of Cygnus operate.");
} else if (status == 6) {

View File

@@ -6,6 +6,7 @@ importPackage(Packages.client);
var status = -1;
var jobType = 3;
var canTryFirstJob = true;
function end(mode, type, selection) {
if (mode == 0) {
@@ -21,33 +22,36 @@ function end(mode, type, selection) {
if (status == 0) {
qm.sendYesNo("Have you made your decision? The decision will be final, so think carefully before deciding what to do. Are you sure you want to become a Wind Archer?");
} else if (status == 1) {
if(!qm.canGetFirstJob(jobType)) {
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rWind Archer#k.");
qm.dispose();
return;
if (canTryFirstJob) {
canTryFirstJob = false;
if (qm.getPlayer().getJob().getId() != 1300) {
if(!qm.canGetFirstJob(jobType)) {
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rWind Archer#k.");
qm.dispose();
return;
}
if (!(qm.canHoldAll([1452051, 1142066]) && qm.canHold(2070000))) {
qm.sendOk("Make some room in your inventory and talk back to me.");
qm.dispose();
return;
}
qm.gainItem(2060000, 2000);
qm.gainItem(1452051, 1);
qm.gainItem(1142066, 1);
qm.changeJob(MapleJob.WINDARCHER1);
qm.getPlayer().resetStats();
}
qm.forceCompleteQuest();
}
if (!(qm.canHoldAll([1452051, 1142066]) && qm.canHold(2070000))) {
qm.sendOk("Make some room in your inventory and talk back to me.");
qm.dispose();
return;
}
qm.sendNext("I have just molded your body to make it perfect for a Wind Archer. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
if (qm.getPlayer().getJob().getId() != 1300) {
qm.gainItem(2060000, 2000);
qm.gainItem(1452051, 1);
qm.gainItem(1142066, 1);
qm.changeJob(MapleJob.WINDARCHER1);
qm.getPlayer().resetStats();
}
qm.forceCompleteQuest();
qm.sendNext("I have just molded your body to make it perfect for a Wind Archer. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
} else if (status == 2) {
qm.sendNextPrev("I have also expanded your inventory slot counts for your equipment and etc. inventory. Use those slots wisely and fill them up with items required for Knights to carry.");
} else if (status == 3) {
qm.sendNextPrev("I have also given you a hint of #bSP#k, so open the #bSkill Menu#k to acquire new skills. Of course, you can't raise them at all once, and there are some skills out there where you won't be able to acquire them unless you master the basic skills first.");
} else if (status == 4) {
qm.sendNextPrev("Unlike your time as a Nobless, once you become the Wind Archer, you will lost a portion of your EXP when you run out of HP, okay?");
qm.sendNextPrev("Unlike your time as a Noblesse, once you become the Wind Archer, you will lost a portion of your EXP when you run out of HP, okay?");
} else if (status == 5) {
qm.sendNextPrev("Now... I want you to go out there and show the world how the Knights of Cygnus operate.");
} else if (status == 6) {

View File

@@ -6,6 +6,7 @@ importPackage(Packages.client);
var status = -1;
var jobType = 4;
var canTryFirstJob = true;
function end(mode, type, selection) {
if (mode == 0) {
@@ -21,33 +22,36 @@ function end(mode, type, selection) {
if (status == 0) {
qm.sendYesNo("Have you made your decision? The decision will be final, so think carefully before deciding what to do. Are you sure you want to become a Night Walker?");
} else if (status == 1) {
if(!qm.canGetFirstJob(jobType)) {
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rNight Walker#k.");
qm.dispose();
return;
if (canTryFirstJob) {
canTryFirstJob = false;
if (qm.getPlayer().getJob().getId() != 1400) {
if(!qm.canGetFirstJob(jobType)) {
qm.sendOk("Train a bit more until you reach #blevel 10, " + qm.getFirstJobStatRequirement(jobType) + "#k and I can show you the way of the #rNight Walker#k.");
qm.dispose();
return;
}
if (!(qm.canHoldAll([1472061, 1142066]) && qm.canHold(2070000))) {
qm.sendOk("Make some room in your inventory and talk back to me.");
qm.dispose();
return;
}
qm.gainItem(1472061, 1);
qm.gainItem(2070000, 800);
qm.gainItem(1142066, 1);
qm.changeJob(MapleJob.NIGHTWALKER1);
qm.getPlayer().resetStats();
}
qm.forceCompleteQuest();
}
if (!(qm.canHoldAll([1472061, 1142066]) && qm.canHold(2070000))) {
qm.sendOk("Make some room in your inventory and talk back to me.");
qm.dispose();
return;
}
qm.sendNext("I have just molded your body to make it perfect for a Night Walker. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
if (qm.getPlayer().getJob().getId() != 1400) {
qm.gainItem(1472061, 1);
qm.gainItem(2070000, 800);
qm.gainItem(1142066, 1);
qm.changeJob(MapleJob.NIGHTWALKER1);
qm.getPlayer().resetStats();
}
qm.forceCompleteQuest();
qm.sendNext("I have just molded your body to make it perfect for a Night Walker. If you wish to become more powerful, use Stat Window (S) to raise the appropriate stats. If you aren't sure what to raise, just click on #bAuto#k.");
} else if (status == 2) {
qm.sendNextPrev("I have also expanded your inventory slot counts for your equipment and etc. inventory. Use those slots wisely and fill them up with items required for Knights to carry.");
} else if (status == 3) {
qm.sendNextPrev("I have also given you a hint of #bSP#k, so open the #bSkill Menu#k to acquire new skills. Of course, you can't raise them at all once, and there are some skills out there where you won't be able to acquire them unless you master the basic skills first.");
} else if (status == 4) {
qm.sendNextPrev("Unlike your time as a Nobless, once you become the Night Walker, you will lost a portion of your EXP when you run out of HP, okay?");
qm.sendNextPrev("Unlike your time as a Noblesse, once you become the Night Walker, you will lost a portion of your EXP when you run out of HP, okay?");
} else if (status == 5) {
qm.sendNextPrev("Now... I want you to go out there and show the world how the Knights of Cygnus operate.");
} else if (status == 6) {

Some files were not shown because too many files have changed in this diff Show More