From b649831071c06def75c876eb453a45e617e03983 Mon Sep 17 00:00:00 2001 From: Syntax <79747812+Zag-bop@users.noreply.github.com> Date: Wed, 8 May 2024 18:14:21 +0100 Subject: [PATCH] * Add `exitArea` so if a player were to enter the wilderness with the overload boosts it will be reapplied once they leave. * Change parsed string for `enterArea` from `wilderness*` to `wilderness` --- .../entity/player/combat/consume/drink/Overload.kts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/game/src/main/kotlin/world/gregs/voidps/world/interact/entity/player/combat/consume/drink/Overload.kts b/game/src/main/kotlin/world/gregs/voidps/world/interact/entity/player/combat/consume/drink/Overload.kts index c6d488fda..012ad5bdf 100644 --- a/game/src/main/kotlin/world/gregs/voidps/world/interact/entity/player/combat/consume/drink/Overload.kts +++ b/game/src/main/kotlin/world/gregs/voidps/world/interact/entity/player/combat/consume/drink/Overload.kts @@ -2,6 +2,7 @@ package world.gregs.voidps.world.interact.entity.player.combat.consume.drink import world.gregs.voidps.engine.client.message import world.gregs.voidps.engine.entity.character.mode.move.enterArea +import world.gregs.voidps.engine.entity.character.mode.move.exitArea import world.gregs.voidps.engine.entity.character.player.Player import world.gregs.voidps.engine.entity.character.player.chat.ChatType import world.gregs.voidps.engine.entity.character.player.skill.Skill @@ -34,14 +35,18 @@ canConsume("overload*") { player -> } } -enterArea("wilderness*") { +enterArea("wilderness") { if (player.timers.contains("overload")) { - player.timers.stop("overload") - player["overload_refreshes_remaining"] = 0 removeBoost(player) } } +exitArea("wilderness") { + if (player.timers.contains("overload")) { + applyBoost(player) + } +} + playerSpawn { player -> if (player["overload_refreshes_remaining", 0] > 0) { player.timers.restart("overload")