Implemented a new Teleport zone restriction and added a check to the teleport manager to see if the player is teleport zone restricted
The firemaking cape will no longer be deleted when logging out in a darkzone The Stronghold of Security Gift of Peace, Grain of Plenty, and Box of Health will now add coins to already existing stack of coins if inventory is full The Cradle of Life will now unlock emotes from all previous Stronghold of Security levels if completed (This was added for older accounts which have completed the stronghold of security but are missing the emotes) Implemented an Entrana allowed item check If skillcape perks are active then the player is allowed to bring the runecrafting cape(s) to entrana The teleport block in fishing trawler now only applies while on the boat and is cleared upon logout/leave Fixed an issue where you could teleport out of the sunk fishing trawler Fixed an issue where a logout listener was not being removed after failing the fishing trawler causing the player to be teleported to port khazard after their next login Added a check to to see if the player has items banned on entrana Blue dragon scales have had their respawn timer corrected to 18 seconds Fixed the warriors guild cyclops room logout listener to properly be removed when leaving Players will no longer get stuck if logging out during agility obstacles Enchanted jewellery teleports now close any open interface Players can no longer complete the Falador medium diary goal of pickpocketing a guard without 40 thieving
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package content.minigame.fishingtrawler
|
||||
|
||||
import core.api.clearLogoutListener
|
||||
import core.game.activity.ActivityManager
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.node.item.GroundItemManager
|
||||
import core.game.node.item.Item
|
||||
import core.game.system.task.Pulse
|
||||
import core.game.world.map.Location
|
||||
@@ -14,7 +14,6 @@ import core.game.interaction.InteractionListener
|
||||
import core.game.interaction.IntType
|
||||
import core.game.system.command.sets.FISHING_TRAWLER_LEAKS_PATCHED
|
||||
import core.game.system.command.sets.STATS_BASE
|
||||
import core.tools.colorize
|
||||
import kotlin.math.ceil
|
||||
|
||||
/**
|
||||
@@ -89,6 +88,8 @@ class FishingTrawlerInteractionHandler : InteractionListener {
|
||||
player.dialogueInterpreter.sendDialogue("You climb onto the floating barrel and begin to kick your way to the","shore.","You make it to the shore tired and weary.")
|
||||
player.appearance.setDefaultAnimations()
|
||||
player.appearance.sync()
|
||||
clearLogoutListener(player, "ft-logout")
|
||||
player.locks.unlockTeleport()
|
||||
return@on true
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package content.minigame.fishingtrawler
|
||||
|
||||
import core.api.LogoutListener
|
||||
import core.api.MapArea
|
||||
import core.api.getRegionBorders
|
||||
import core.api.*
|
||||
@@ -24,7 +23,6 @@ import org.rs09.consts.Items
|
||||
import core.game.system.command.sets.FISHING_TRAWLER_GAMES_WON
|
||||
import core.game.system.command.sets.FISHING_TRAWLER_SHIPS_SANK
|
||||
import core.game.system.command.sets.STATS_BASE
|
||||
import core.tools.SystemLogger
|
||||
import core.tools.secondsToTicks
|
||||
import core.tools.ticksToSeconds
|
||||
import java.util.concurrent.TimeUnit
|
||||
@@ -43,7 +41,7 @@ private const val HOLE_SOUTH_Y = 23
|
||||
private const val LEAKING_ID = 2167
|
||||
private const val PATCHED_ID = 2168
|
||||
|
||||
class FishingTrawlerSession(val activity: FishingTrawlerActivity? = null) : LogoutListener, MapArea {
|
||||
class FishingTrawlerSession(val activity: FishingTrawlerActivity? = null) : MapArea {
|
||||
constructor(region: DynamicRegion, activity: FishingTrawlerActivity) : this(activity) {this.region = region; this.base = region.baseLocation}
|
||||
var players: ArrayList<Player> = ArrayList()
|
||||
var netRipped = false
|
||||
@@ -80,7 +78,12 @@ class FishingTrawlerSession(val activity: FishingTrawlerActivity? = null) : Logo
|
||||
updateOverlay(player)
|
||||
player.properties.teleportLocation = base.transform(36,24,0)
|
||||
player.setAttribute("ft-session",this)
|
||||
registerTimer (player, spawnTimer("teleblock", timeLeft))
|
||||
registerLogoutListener(player, "ft-logout") {
|
||||
val session = player.getAttribute<FishingTrawlerSession?>("ft-session",null) ?: return@registerLogoutListener
|
||||
player.location = Location.create(2667, 3161, 0)
|
||||
session.players.remove(player)
|
||||
player.locks.unlockTeleport()
|
||||
}
|
||||
}
|
||||
zone.register(getRegionBorders(region.id))
|
||||
}
|
||||
@@ -104,7 +107,6 @@ class FishingTrawlerSession(val activity: FishingTrawlerActivity? = null) : Logo
|
||||
player.appearance.setAnimations(Animation(188))
|
||||
player.properties.teleportLocation = session.base.transform(36,24,0)
|
||||
player.incrementAttribute("/save:$STATS_BASE:$FISHING_TRAWLER_SHIPS_SANK")
|
||||
removeTimer(player, "teleblock")
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -136,6 +138,9 @@ class FishingTrawlerSession(val activity: FishingTrawlerActivity? = null) : Logo
|
||||
session.isActive = false
|
||||
session.swapBoatType(7755)
|
||||
session.zone.unregister(getRegionBorders(session.region.id))
|
||||
for(player in session.players) {
|
||||
player.locks.lockTeleport(1000000)
|
||||
}
|
||||
}
|
||||
|
||||
if(RandomFunction.random(100) <= 9){
|
||||
@@ -148,6 +153,7 @@ class FishingTrawlerSession(val activity: FishingTrawlerActivity? = null) : Logo
|
||||
player.interfaceManager.closeOverlay()
|
||||
player.properties.teleportLocation = Location.create(2666, 3162, 0)
|
||||
player.incrementAttribute("/save:$STATS_BASE:$FISHING_TRAWLER_GAMES_WON")
|
||||
clearLogoutListener(player, "ft-logout")
|
||||
}
|
||||
session.zone.unregister(getRegionBorders(session.region.id))
|
||||
}
|
||||
@@ -278,18 +284,12 @@ class FishingTrawlerSession(val activity: FishingTrawlerActivity? = null) : Logo
|
||||
FishingTrawlerOverlay.sendUpdate(player, ((waterAmount / 500.0) * 100).toInt(), netRipped, fishAmount, TimeUnit.SECONDS.toMinutes(ticksToSeconds(timeLeft).toLong()).toInt() + 1)
|
||||
}
|
||||
|
||||
override fun logout(player: Player) {
|
||||
val session = player.getAttribute<FishingTrawlerSession?>("ft-session",null) ?: return
|
||||
player.location = Location.create(2667, 3161, 0)
|
||||
session.players.remove(player)
|
||||
}
|
||||
|
||||
override fun defineAreaBorders(): Array<ZoneBorders> {
|
||||
return arrayOf()
|
||||
}
|
||||
|
||||
override fun getRestrictions(): Array<ZoneRestriction> {
|
||||
return arrayOf(ZoneRestriction.CANNON, ZoneRestriction.FIRES, ZoneRestriction.RANDOM_EVENTS)
|
||||
return arrayOf(ZoneRestriction.CANNON, ZoneRestriction.FIRES, ZoneRestriction.RANDOM_EVENTS, ZoneRestriction.TELEPORT)
|
||||
}
|
||||
|
||||
override fun areaEnter(entity: Entity) {
|
||||
|
||||
Reference in New Issue
Block a user