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

@@ -28,40 +28,41 @@ var status = 0;
function start() {
status = -1;
cm.sendSimple("Man... It is hot!!!~ How can I help you?\r\n#L0##bLeave the event game.#l\r\n#L1#Buy the weapon (Wooden Club 1 meso)");
cm.sendSimple("Man... It is hot!!!~ How can I help you?\r\n#L0##bLeave the event game.#l\r\n#L1#Buy the weapon (Wooden Club 1 meso)");
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}else if (mode == 0){
} else if (mode == 0) {
cm.dispose();
}else{
if (mode == 1)
} else {
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
if (selection == 0) {
cm.sendYesNo("If you leave now, you can't participate in this event for the next 24 hours. Are you sure you want to leave?");
} else if (selection == 1) {
if (cm.getMesos < 1 && !cm.canHold(1322005)) {
}
if (status == 0) {
if (selection == 0) {
cm.sendYesNo("If you leave now, you can't participate in this event for the next 24 hours. Are you sure you want to leave?");
} else if (selection == 1) {
if (cm.getMesos < 1 && !cm.canHold(1322005)) {
cm.sendOk("You don't have enough mesos or you don't have any space in your inventory.");
cm.dispose();
} else {
} else {
cm.gainItem(1322005);
cm.gainMeso(-1);
cm.gainMeso(-1);
cm.dispose();
}
}
} else if (status == 1) {
if (cm.getEvent() != null) {
cm.getEvent().addLimit();
}
cm.warp(109050001, 0);
cm.dispose();
}
}
}
} else if (status == 1) {
if (cm.getEvent() != null) {
cm.getEvent().addLimit();
}
cm.warp(109050001, 0);
cm.dispose();
}
}