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.
53 lines
1.9 KiB
JavaScript
53 lines
1.9 KiB
JavaScript
var status = 0;
|
|
|
|
var spawnPnpc = false;
|
|
var spawnPnpcFee = 7000000;
|
|
var jobType = 21;
|
|
|
|
function start() {
|
|
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?";
|
|
if(spawnPnpcFee > 0) {
|
|
sendStr += " I can do it for you, for the fee of #b " + cm.numberWithCommas(spawnPnpcFee) + " mesos.#k";
|
|
}
|
|
|
|
cm.sendYesNo(sendStr);
|
|
} else {
|
|
cm.sendOk("Behold, the distinguished brave heroes of Rien! Those stout hearts are who have been protecting our people since long ago, our valiant comrades.");
|
|
cm.dispose();
|
|
}
|
|
}
|
|
|
|
function action(mode, type, selection) {
|
|
status++;
|
|
if (mode == 0 && type != 1)
|
|
status -= 2;
|
|
if (status == -1){
|
|
start();
|
|
return;
|
|
} else {
|
|
if(spawnPnpc) {
|
|
if(mode > 0) {
|
|
if(cm.getMeso() < spawnPnpcFee) {
|
|
cm.sendOk("Sorry, you don't have enough mesos to purchase your place on the Hall of Fame.");
|
|
cm.dispose();
|
|
return;
|
|
}
|
|
|
|
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 {
|
|
cm.sendOk("Sorry, the Hall of Fame is currently full...");
|
|
}
|
|
}
|
|
|
|
cm.dispose();
|
|
return;
|
|
} else {
|
|
// do nothing
|
|
}
|
|
}
|
|
} |