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

@@ -1,37 +1,37 @@
var status = -1;
function start() {
action(1, 0, 0);
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 0 && type == 0) {
status--;
} else if (mode == -1) {
cm.dispose();
return;
} else {
status++;
}
if (status == 0) {
cm.sendDirectionInfo(4, 1096005);//else you will crash sending sendNext
cm.sendNext("All right! Let's go!");
} else if (status == 1) {
cm.removeNPC(579711);
cm.updateInfo("fire", "0");
cm.playSound("cannonshooter/fire");
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/flying/0", 7000, 0, 0, -1, -1);
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/flying1/0", 7000, 0, 0, -1, -1);
cm.sendDirectionInfo(1, 800);
} else if (status == 2) {
cm.warp(912060300, 0);
} else if (status == 3) {
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/balloon/1", 9000, 0, 0, 0, -1);
cm.sendDirectionInfo(1, 1500);
} else if (status == 4) {
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/balloon/2", 9000, 0, 0, 0, -1);
cm.showIntro("Effect/Direction4.img/cannonshooter/face04");
cm.showIntro("Effect/Direction4.img/cannonshooter/out01");
cm.dispose();
}
if (mode == 0 && type == 0) {
status--;
} else if (mode == -1) {
cm.dispose();
return;
} else {
status++;
}
if (status == 0) {
cm.sendDirectionInfo(4, 1096005);//else you will crash sending sendNext
cm.sendNext("All right! Let's go!");
} else if (status == 1) {
cm.removeNPC(579711);
cm.updateInfo("fire", "0");
cm.playSound("cannonshooter/fire");
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/flying/0", 7000, 0, 0, -1, -1);
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/flying1/0", 7000, 0, 0, -1, -1);
cm.sendDirectionInfo(1, 800);
} else if (status == 2) {
cm.warp(912060300, 0);
} else if (status == 3) {
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/balloon/1", 9000, 0, 0, 0, -1);
cm.sendDirectionInfo(1, 1500);
} else if (status == 4) {
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/balloon/2", 9000, 0, 0, 0, -1);
cm.showIntro("Effect/Direction4.img/cannonshooter/face04");
cm.showIntro("Effect/Direction4.img/cannonshooter/out01");
cm.dispose();
}
}