Rewrote Doric's Quest

This commit is contained in:
bushtail
2023-07-30 08:24:22 +00:00
committed by Ryan
parent 9b08f2175b
commit 3cf73ba09a
7 changed files with 335 additions and 337 deletions
+12 -1
View File
@@ -1760,6 +1760,17 @@ fun isQuestComplete(player: Player, quest: String): Boolean {
return player.questRepository.getStage(quest) == 100
}
/**
* Get the quest for a player.
* @param player The player to get the quest for.
* @param quest The quest name string
* @return the quest object
*/
fun getQuest(player: Player, quest: String): Quest {
return player.questRepository.getQuest(quest)
}
/**
* Check if a player meets the requirements to start a quest, and then starts it if they do. Returns success bool
*/
@@ -1868,7 +1879,7 @@ fun runcs2 (player: Player, scriptId: Int, vararg arguments: Any) {
* @param player the player we are openinig the prompt for
* @param options the right-click options the items should have
* @param keepAlive whether or not the selection prompt should remain open for multiple interactions
* @param callback a callback to handle the selection. The parameters passed to the callback are the slot in the inventory of the selected item, and the 0-9 index of the option clicked.
* @param callback a callback to handle the selection. The parameters passed to the callback are the slot in the inventory of the selected item, and the 0-9 index of the option clicked.
**/
@JvmOverloads
fun sendItemSelect (player: Player, vararg options: String, keepAlive: Boolean = false, callback: (slot: Int, optionIndex: Int) -> Unit) {