Implemented Recruitment Drive quest

This commit is contained in:
Oven Bread
2024-08-21 14:04:44 +00:00
committed by Ryan
parent 29fa9a5a21
commit e25c7d7824
28 changed files with 2715 additions and 181 deletions
+20
View File
@@ -919,6 +919,14 @@ fun openDialogue(player: Player, dialogue: Any, vararg args: Any) {
}
}
/**
* Closes any opened dialogue.
*/
fun closeDialogue(player: Player) {
player.dialogueInterpreter.close()
player.interfaceManager.closeChatbox()
}
/**
* Gets an NPC with the given ID from the repository.
* @param id the ID of the NPC to locate
@@ -1647,6 +1655,18 @@ fun sendNPCDialogue(player: Player, npc: Int, msg: String, expr: core.game.dialo
player.dialogueInterpreter.sendDialogues(npc, expr, *splitLines(msg))
}
/**
* Sends a dialogue that uses the player's chathead.
* @param player the player to send the dialogue to
* @param npc the ID of the NPC to use for the chathead
* @param expr the FacialExpression to use. An enum exists for these called FacialExpression.
* @param msg the message to send.
*/
fun sendNPCDialogueLines(player: Player, npc: Int, expr: core.game.dialogue.FacialExpression, hideContinue: Boolean, vararg msgs: String) {
val dialogueComponent = player.dialogueInterpreter.sendDialogues(npc, expr, *msgs)
player.packetDispatch.sendInterfaceConfig(dialogueComponent.id, msgs.size + 4, hideContinue)
}
/**
* Sends an animation to a specific interface child
* @param player the player to send the packet to