mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-12 09:30:19 -07:00
Reverted Lumbridge random event teleport fix due to trapping players in random event
Spam clicking maze shrine now handled
This commit is contained in:
parent
bcc3bc069e
commit
3d7f1689f3
2 changed files with 4 additions and 10 deletions
|
|
@ -7,7 +7,7 @@ import core.game.node.entity.player.link.TeleportManager.TeleportType
|
||||||
import core.game.world.map.Location
|
import core.game.world.map.Location
|
||||||
|
|
||||||
fun kidnapPlayer(player: Player, loc: Location, type: TeleportType) {
|
fun kidnapPlayer(player: Player, loc: Location, type: TeleportType) {
|
||||||
setAttribute(player, "kidnapped-by-random", true)
|
setAttribute(player, "kidnapped-by-random", true) //only used in POH code when you leave the hut, so does not need /save. Do not rely on this outside of its intended POH use case.
|
||||||
if (getAttribute(player, "/save:original-loc", null) == null) {
|
if (getAttribute(player, "/save:original-loc", null) == null) {
|
||||||
setAttribute(player, "/save:original-loc", player.location)
|
setAttribute(player, "/save:original-loc", player.location)
|
||||||
}
|
}
|
||||||
|
|
@ -15,11 +15,6 @@ fun kidnapPlayer(player: Player, loc: Location, type: TeleportType) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun returnPlayer(player: Player) {
|
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()
|
player.locks.unlockTeleport()
|
||||||
val destination = getAttribute(player, "/save:original-loc", ServerConstants.HOME_LOCATION ?: Location.create(3222, 3218, 0))
|
val destination = getAttribute(player, "/save:original-loc", ServerConstants.HOME_LOCATION ?: Location.create(3222, 3218, 0))
|
||||||
teleport(player, destination)
|
teleport(player, destination)
|
||||||
|
|
|
||||||
|
|
@ -199,17 +199,16 @@ class MazeInterface : InteractionListener, EventHook<TickEvent>, MapArea {
|
||||||
|
|
||||||
on(Scenery.STRANGE_SHRINE_3634, IntType.SCENERY, "touch") { player, node ->
|
on(Scenery.STRANGE_SHRINE_3634, IntType.SCENERY, "touch") { player, node ->
|
||||||
player.unhook(this)
|
player.unhook(this)
|
||||||
|
lock(player, 12)
|
||||||
closeOverlay(player)
|
closeOverlay(player)
|
||||||
queueScript(player, 0, QueueStrength.SOFT) { stage: Int ->
|
queueScript(player, 0, QueueStrength.SOFT) { stage: Int ->
|
||||||
when (stage) {
|
when (stage) {
|
||||||
0 -> {
|
0 -> {
|
||||||
lock(player, 6)
|
|
||||||
sendGraphics(Graphics(86, 0, 3), player.location)
|
sendGraphics(Graphics(86, 0, 3), player.location)
|
||||||
animate(player,862)
|
animate(player,862)
|
||||||
return@queueScript delayScript(player, 6)
|
return@queueScript delayScript(player, 6)
|
||||||
}
|
}
|
||||||
1 -> {
|
1 -> {
|
||||||
lock(player, 6)
|
|
||||||
sendGraphics(Graphics(1576, 0, 0), player.location)
|
sendGraphics(Graphics(1576, 0, 0), player.location)
|
||||||
animate(player,8939)
|
animate(player,8939)
|
||||||
playAudio(player, Sounds.TELEPORT_ALL_200)
|
playAudio(player, Sounds.TELEPORT_ALL_200)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue