From 621a876091ae1688bf251c5eaa518a6639867a9b Mon Sep 17 00:00:00 2001 From: Vincent Foriel Date: Mon, 30 Oct 2023 14:48:06 +0100 Subject: [PATCH] Wallstreet: fixed next client timer --- minigames/data/wallstreet/functions/config.mcfunction | 2 +- .../functions/villager/gui/refresh/next_client.mcfunction | 2 +- minigames/data/wallstreet/functions/villager/talk/.mcfunction | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/minigames/data/wallstreet/functions/config.mcfunction b/minigames/data/wallstreet/functions/config.mcfunction index 4605ba3..d4a940a 100644 --- a/minigames/data/wallstreet/functions/config.mcfunction +++ b/minigames/data/wallstreet/functions/config.mcfunction @@ -1,7 +1,7 @@ scoreboard players set #wallstreet.game_time data 7200 scoreboard players set #wallstreet.villager.lock_time data 600 -scoreboard players set #wallstreet.villager.interaction_time data 400 +scoreboard players set #wallstreet.villager.interaction_time data 440 scoreboard players set #wallstreet.model.starting_money data 5000 scoreboard players set #wallstreet.model.buy_power data 500 diff --git a/minigames/data/wallstreet/functions/villager/gui/refresh/next_client.mcfunction b/minigames/data/wallstreet/functions/villager/gui/refresh/next_client.mcfunction index d5054ef..48d7d0a 100644 --- a/minigames/data/wallstreet/functions/villager/gui/refresh/next_client.mcfunction +++ b/minigames/data/wallstreet/functions/villager/gui/refresh/next_client.mcfunction @@ -4,7 +4,7 @@ scoreboard players operation #seconds ctx = @e[tag=wallstreet.sit,limit=1,sort=n scoreboard players operation #seconds ctx -= #wallstreet.villager.interaction_time data scoreboard players operation #seconds ctx *= -1 const scoreboard players operation #seconds ctx /= 20 const -scoreboard players operation #seconds ctx += 1 const +scoreboard players operation #seconds ctx -= 1 const scoreboard players operation #modulo ctx = @e[tag=wallstreet.sit,limit=1,sort=nearest] living_time scoreboard players operation #modulo ctx %= 20 const diff --git a/minigames/data/wallstreet/functions/villager/talk/.mcfunction b/minigames/data/wallstreet/functions/villager/talk/.mcfunction index b1ff5ca..987ad52 100644 --- a/minigames/data/wallstreet/functions/villager/talk/.mcfunction +++ b/minigames/data/wallstreet/functions/villager/talk/.mcfunction @@ -11,7 +11,7 @@ tag @e[tag=wallstreet.sit] add walstreet.sit.to_remove execute as @e[tag=wallstreet.sit] on passengers on vehicle run tag @s remove walstreet.sit.to_remove execute at @e[tag=walstreet.sit.to_remove] as @e[tag=wallstreet.villager_marker,limit=1,sort=nearest] at @s run function wallstreet:villager/talk/stop # Exit GUI if he run out of time -execute as @e[tag=wallstreet.sit,scores={living_time=320..}] \ +execute as @e[tag=wallstreet.sit] \ at @s \ if score @s living_time > #wallstreet.villager.interaction_time data \ as @e[tag=wallstreet.villager_marker,limit=1,sort=nearest] \