Reformat and clean up npc scripts

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

View File

@@ -12,40 +12,38 @@ function start() {
}
function action(mode, type, selection) {
if (mode == -1)
if (mode == -1) {
cm.dispose();
else {
} else {
if (mode == 0) {
cm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
var eim = cm.getEventInstance();
if(!eim.isEventCleared()) {
if (!eim.isEventCleared()) {
if (status == 0) {
cm.sendYesNo("Do you want to get out now?");
}
else if (status == 1) {
} else if (status == 1) {
cm.warp(270050000, 0);
cm.dispose();
}
} else {
if (status == 0) {
cm.sendYesNo("Pink Bean has been defeated! You guys sure are true heroes of this land! In no time, Temple of Time will shine again as bright as ever, all thanks to your efforts! Hooray to our heroes!! Are you ready to go now?");
}
else if (status == 1) {
if(eim.giveEventReward(cm.getPlayer(), 1)) {
} else if (status == 1) {
if (eim.giveEventReward(cm.getPlayer(), 1)) {
cm.warp(270050000);
}
else {
} else {
cm.sendOk("You cannot receive an instance prize without having an empty room in your EQUIP, USE, SET-UP and ETC inventory.");
}
cm.dispose();
}
}