diff --git a/Server/src/main/kotlin/api/ContentAPI.kt b/Server/src/main/kotlin/api/ContentAPI.kt index cc79f5a60..a6ae31eac 100644 --- a/Server/src/main/kotlin/api/ContentAPI.kt +++ b/Server/src/main/kotlin/api/ContentAPI.kt @@ -45,6 +45,7 @@ import rs09.game.content.dialogue.DialogueFile import rs09.game.content.dialogue.SkillDialogueHandler import rs09.game.content.global.GlobalKillCounter import rs09.game.interaction.InteractionListeners +import rs09.game.node.entity.skill.slayer.SlayerManager import rs09.game.system.SystemLogger import rs09.game.system.config.ItemConfigParser import rs09.game.system.config.ServerConfigParser @@ -1564,3 +1565,24 @@ fun getPathableRandomLocalCoordinate(target: Entity, radius: Int, center: Locati return target.location } + + +/** + * Returns the name of the player's active slayer task. + * @author bushtail + * @param player the player whose task we are checking. + * @return the name of the slayer task. + */ +fun getSlayerTaskName(player : Player) : String { + return SlayerManager.getInstance(player).taskName +} + +/** + * Returns the player's remaining kills for their active slayer task. + * @author bushtail + * @param player the player whose task we are checking. + * @return the remaining kills of the slayer task. + */ +fun getSlayerTaskKillsRemaining(player : Player) : Int { + return SlayerManager.getInstance(player).amount +} \ No newline at end of file