Fixed random events returning players to Lumbridge
This commit is contained in:
@@ -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<Location?>(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)
|
||||
|
||||
Reference in New Issue
Block a user