Skip to content

Commit

Permalink
* Add exitArea so if a player were to enter the wilderness with the…
Browse files Browse the repository at this point in the history
… overload boosts it will be reapplied once they leave.

* Change parsed string for `enterArea` from `wilderness*` to `wilderness`
  • Loading branch information
Syntax2022 committed May 8, 2024
1 parent cfd7e2b commit b649831
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit b649831

Please sign in to comment.