version without npcs, levels work, everything is build

This commit is contained in:
2024-08-14 14:44:31 +02:00
parent bc51d6899f
commit a21af04b9e
20 changed files with 103 additions and 22 deletions

View File

@@ -126,6 +126,8 @@ system.runInterval(async () => {
gateState = GateState.open;
}
break;
case 11:
Pupeteer.setActionBar("You completed the mission.");
}
}
});
@@ -149,7 +151,7 @@ world.afterEvents.chatSend.subscribe(async (event: ChatSendAfterEvent) => {
world.getDimension("Overworld").runCommand("/fill -128 71 255 -128 74 276 barrier replace air");
world.getDimension("Overworld").runCommand("/fill -154 69 255 -154 74 276 barrier replace air");
world.getDimension("Overworld").runCommand("/fill -182 69 255 -182 74 276 barrier replace air");
mindKeeper.set(CURRENT_LEVEL, 8);
mindKeeper.set(CURRENT_LEVEL, 0);
world.sendMessage("currentlevel = " + mindKeeper.get(CURRENT_LEVEL));
}
});
@@ -269,6 +271,12 @@ triggerManager.RegisterFunctionTrigger("PastLevel4", async (event) => {
}
});
triggerManager.RegisterFunctionTrigger("CompletedTheMission", async (event) => {
if (mindKeeper.get(CURRENT_LEVEL) == 10) {
mindKeeper.increment(CURRENT_LEVEL);
}
});
Commands.register(PREFIX, "info", (arg) => {
world.sendMessage("-----------------");
world.sendMessage("Current level: " + mindKeeper.get(CURRENT_LEVEL));