From d6b9b18ef3e4875f1ed2fb354965da30f099acbe Mon Sep 17 00:00:00 2001 From: DyslexicWolf Date: Fri, 13 Sep 2024 11:33:54 +0200 Subject: [PATCH] efs --- scripts/main.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/main.ts b/scripts/main.ts index ea2ff82..238043a 100644 --- a/scripts/main.ts +++ b/scripts/main.ts @@ -209,7 +209,6 @@ let PlayGateOpenAnimation = async () => { }; let ResetGate = () => { - gateState = GateState.closed; SetFrame(gateFrames[0], gateRoot); }; @@ -294,7 +293,7 @@ Commands.register(PREFIX, "info", (arg) => { system.afterEvents.scriptEventReceive.subscribe((event) => { if (event.id == "cc:getId") { let id = event.message; - world.sendMessage("Script got the id " + id); + // world.sendMessage("Script got the id " + id); mindKeeper.set(AGENT_ID, id); } @@ -337,7 +336,8 @@ world.afterEvents.chatSend.subscribe(async (event: ChatSendAfterEvent) => { triggerManager.OnChat(event); if (command === "!reset") { - mindKeeper.set(CURRENT_LEVEL, 12); + ResetGate(); + mindKeeper.set(CURRENT_LEVEL, 0); world.sendMessage("currentlevel = " + mindKeeper.get(CURRENT_LEVEL)); world.sendMessage("Resetting"); level1.reset(); @@ -345,7 +345,6 @@ world.afterEvents.chatSend.subscribe(async (event: ChatSendAfterEvent) => { level3.reset(); level4.reset(); level5.reset(); - ResetGate(); world.getDimension("Overworld").runCommand("/fill -86 71 253 -86 75 275 barrier replace air"); world.getDimension("Overworld").runCommand("/fill -182 69 255 -182 74 276 barrier replace air"); setNPCDialog("bilal1", "bilal_beforelevel_1_1");