From 1b0a7d5fcacb9ab9c70fa0b3de7a4ed2fba08a27 Mon Sep 17 00:00:00 2001 From: Alex Page Date: Tue, 25 Mar 2025 09:51:47 +0000 Subject: [PATCH] Fixed random events returning players to Lumbridge --- Server/src/main/content/global/ame/KidnapHelper.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Server/src/main/content/global/ame/KidnapHelper.kt b/Server/src/main/content/global/ame/KidnapHelper.kt index 2efc90f2d..5cef011ba 100644 --- a/Server/src/main/content/global/ame/KidnapHelper.kt +++ b/Server/src/main/content/global/ame/KidnapHelper.kt @@ -15,6 +15,11 @@ fun kidnapPlayer(player: Player, loc: Location, type: TeleportType) { } fun returnPlayer(player: Player) { + // Prevent returning more than once and sending the player back to HOME_LOCATION + if (getAttribute(player, "kidnapped-by-random", null) == null) { + return + } + player.locks.unlockTeleport() val destination = getAttribute(player, "/save:original-loc", ServerConstants.HOME_LOCATION ?: Location.create(3222, 3218, 0)) teleport(player, destination)