Files
sweetgum-server/scripts/quest/20104.js
ronancpl 7ee947b404 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.
2019-10-03 20:01:09 -03:00

60 lines
2.7 KiB
JavaScript

/*
* Cygnus 1st Job advancement - Night Walker
*/
importPackage(Packages.client);
var status = -1;
var jobType = 4;
var canTryFirstJob = true;
function end(mode, type, selection) {
if (mode == 0) {
if (status == 0) {
qm.sendNext("This is an important decision to make.");
qm.dispose();
return;
}
status--;
} else {
status++;
}
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 (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();
}
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 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) {
qm.dispose();
}
}