mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-23 03:15:10 -06:00
Fixed the following:
Auguste dialogue cleaned up and no longer hangs. Assist. dialogue cleaned up. Varbit constants. Constant suffix.
This commit is contained in:
parent
a741ab7f06
commit
3f8a844d1d
6 changed files with 142 additions and 118 deletions
|
|
@ -12,9 +12,9 @@ class BalloonAssistantsDialogue(private val start: BalloonTravelLocation) : Dial
|
|||
override fun addConversation() {
|
||||
npc("Do you want to use the balloon? Just so you know, some locations require special logs and high Firemaking skills.")
|
||||
options(
|
||||
DialogueOption("yes_fly_balloon", "Yes.", "Yes."),
|
||||
DialogueOption("nowhere", "No.", "No."),
|
||||
DialogueOption("who_are_you", "Who are you?", "Who are you?")
|
||||
DialogueOption("yes_fly_balloon", "Yes."),
|
||||
DialogueOption("nowhere", "No."),
|
||||
DialogueOption("who_are_you", "Who are you?")
|
||||
)
|
||||
|
||||
label("yes_fly_balloon")
|
||||
|
|
@ -59,9 +59,9 @@ class BalloonAssistantsDialogue(private val start: BalloonTravelLocation) : Dial
|
|||
label("ask_fly")
|
||||
npc("Do you want to use the balloon?")
|
||||
options(
|
||||
DialogueOption("yes_fly_balloon", "Yes.", "Yes."),
|
||||
DialogueOption("nowhere", "No.", "No.")
|
||||
DialogueOption("yes_fly_balloon", "Yes."),
|
||||
DialogueOption("nowhere", "No.")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -293,7 +293,7 @@ class BalloonFlightInterface : InterfaceListener {
|
|||
teleport(player, BalloonFlightRoutes.TAVERLEY_LANDING)
|
||||
face(player, Location.create(2941, 3421, 0))
|
||||
sendMessage(player, "You arrive safely in Taverley.")
|
||||
setVarbit(player, EnlightenedJourney.VARBIT_TAVERLEY_BALLOON, 1, true)
|
||||
setVarbit(player, EnlightenedJourney.VARBIT_TAVERLEY_BALLOON_2868, EnlightenedJourney.TAVERLEY_BALLOON_AUGUSTE_1, true)
|
||||
setQuestStage(player, Quests.ENLIGHTENED_JOURNEY, EnlightenedJourney.STAGE_CLAIM_REWARD)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class BalloonTravelInterface : InterfaceListener, InteractionListener {
|
|||
|
||||
/** Checks the saved route unlock state. */
|
||||
private fun hasRouteUnlocked(player: Player, destination: BalloonTravelLocation): Boolean {
|
||||
return getVarbit(player, destination.varbit) > 0
|
||||
return getVarbit(player, destination.varbit) > EnlightenedJourney.BALLOON_ROUTE_LOCKED_0
|
||||
}
|
||||
|
||||
/** Checks if the player can use an unlocked route. */
|
||||
|
|
@ -192,7 +192,7 @@ class BalloonTravelInterface : InterfaceListener, InteractionListener {
|
|||
return
|
||||
}
|
||||
|
||||
setVarbit(player, destination.varbit, 1, true)
|
||||
setVarbit(player, destination.varbit, EnlightenedJourney.BALLOON_ROUTE_UNLOCKED_1, true)
|
||||
rewardXP(player, Skills.FIREMAKING, 2000.0)
|
||||
}
|
||||
|
||||
|
|
@ -280,7 +280,7 @@ enum class BalloonTravelLocation(
|
|||
Items.YEW_LOGS_1515,
|
||||
10,
|
||||
50,
|
||||
EnlightenedJourney.VARBIT_CASTLEWARS_BALLOON,
|
||||
EnlightenedJourney.VARBIT_CASTLEWARS_BALLOON_2869,
|
||||
ASSISTANT_MARROW_WRAPPER,
|
||||
19137,
|
||||
),
|
||||
|
|
@ -291,7 +291,7 @@ enum class BalloonTravelLocation(
|
|||
Items.MAGIC_LOGS_1513,
|
||||
3,
|
||||
60,
|
||||
EnlightenedJourney.VARBIT_GRANDTREE_BALLOON,
|
||||
EnlightenedJourney.VARBIT_GRANDTREE_BALLOON_2870,
|
||||
ASSISTANT_LE_SMITH_WRAPPER,
|
||||
19139,
|
||||
),
|
||||
|
|
@ -302,7 +302,7 @@ enum class BalloonTravelLocation(
|
|||
Items.OAK_LOGS_1521,
|
||||
10,
|
||||
30,
|
||||
EnlightenedJourney.VARBIT_CRAFTINGGUILD_BALLOON,
|
||||
EnlightenedJourney.VARBIT_CRAFTINGGUILD_BALLOON_2871,
|
||||
ASSISTANT_BROCK_WRAPPER,
|
||||
19141,
|
||||
),
|
||||
|
|
@ -313,7 +313,7 @@ enum class BalloonTravelLocation(
|
|||
Items.LOGS_1511,
|
||||
1,
|
||||
20,
|
||||
EnlightenedJourney.VARBIT_ENTRANA_BALLOON,
|
||||
EnlightenedJourney.VARBIT_ENTRANA_BALLOON_2867,
|
||||
NPCs.AUGUSTE_5049,
|
||||
19133,
|
||||
),
|
||||
|
|
@ -324,7 +324,7 @@ enum class BalloonTravelLocation(
|
|||
Items.LOGS_1511,
|
||||
1,
|
||||
20,
|
||||
EnlightenedJourney.VARBIT_TAVERLEY_BALLOON,
|
||||
EnlightenedJourney.VARBIT_TAVERLEY_BALLOON_2868,
|
||||
ASSISTANT_STAN_WRAPPER,
|
||||
19135,
|
||||
),
|
||||
|
|
@ -335,7 +335,7 @@ enum class BalloonTravelLocation(
|
|||
Items.WILLOW_LOGS_1519,
|
||||
10,
|
||||
40,
|
||||
EnlightenedJourney.VARBIT_VARROCK_BALLOON,
|
||||
EnlightenedJourney.VARBIT_VARROCK_BALLOON_2872,
|
||||
ASSISTANT_SERF_WRAPPER,
|
||||
19143,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
package content.region.misc.entrana.quest.enlightenedjourney.cutscene
|
||||
|
||||
import content.data.Quests
|
||||
import content.region.misc.entrana.quest.enlightenedjourney.quest.EnlightenedJourney.Companion.ENTRANA_BALLOON_COMPLETE_2
|
||||
import content.region.misc.entrana.quest.enlightenedjourney.quest.EnlightenedJourney.Companion.STAGE_FLIGHT
|
||||
import content.region.misc.entrana.quest.enlightenedjourney.quest.EnlightenedJourney.Companion.VARBIT_ENTRANA_BALLOON
|
||||
import content.region.misc.entrana.quest.enlightenedjourney.quest.EnlightenedJourney.Companion.VARBIT_ENTRANA_BALLOON_2867
|
||||
import core.api.face
|
||||
import core.api.playJingle
|
||||
import core.api.setQuestStage
|
||||
|
|
@ -40,7 +41,7 @@ class BalloonConstructionCutscene(player: Player) : Cutscene(player) {
|
|||
face(player, obj.location)
|
||||
fadeFromBlack()
|
||||
playJingle(player, 116)
|
||||
setVarbit(player, VARBIT_ENTRANA_BALLOON, 2, true)
|
||||
setVarbit(player, VARBIT_ENTRANA_BALLOON_2867, ENTRANA_BALLOON_COMPLETE_2, true)
|
||||
timedUpdate(5)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class AugusteTalkListener : InteractionListener {
|
|||
}
|
||||
}
|
||||
|
||||
private fun checkAllItemsDelivered(player: Player) {
|
||||
private fun checkAllItemsDelivered(player: Player): Boolean {
|
||||
val allDelivered = getAttribute(player, EnlightenedJourney.ATTRIBUTE_YELLOW_DYE_DELIVERED, false) &&
|
||||
getAttribute(player, EnlightenedJourney.ATTRIBUTE_RED_DYE_DELIVERED, false) &&
|
||||
getAttribute(player, EnlightenedJourney.ATTRIBUTE_SANDBAGS_DELIVERED, false) &&
|
||||
|
|
@ -77,6 +77,7 @@ private fun checkAllItemsDelivered(player: Player) {
|
|||
if (allDelivered) {
|
||||
setQuestStage(player, Quests.ENLIGHTENED_JOURNEY, EnlightenedJourney.STAGE_WILLOW_BASKET)
|
||||
}
|
||||
return allDelivered
|
||||
}
|
||||
|
||||
private fun questStageLabel(stage: Int) = "quest_stage_$stage"
|
||||
|
|
@ -120,8 +121,8 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
npc(FacialExpression.NEUTRAL, "I have devised a new way to travel. But I need an assistant balloonist to help me build my design.")
|
||||
npc(FacialExpression.HALF_ASKING, "Are you an experienced adventurer willing to help me?")
|
||||
options(
|
||||
DialogueOption("sign_me_up", "Yes! Sign me up.", "Yes! Sign me up.", FacialExpression.FRIENDLY),
|
||||
DialogueOption("nowhere", "Not right now.", "Not right now.")
|
||||
DialogueOption("sign_me_up", "Yes! Sign me up.", expression = FacialExpression.FRIENDLY),
|
||||
DialogueOption("nowhere", "Not right now.")
|
||||
)
|
||||
|
||||
label("sign_me_up")
|
||||
|
|
@ -152,17 +153,8 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
|
||||
label("ashes_float")
|
||||
options(
|
||||
DialogueOption(
|
||||
"whats_your_point",
|
||||
"Umm, yes. What's your point?",
|
||||
"What's your point?",
|
||||
FacialExpression.THINKING
|
||||
),
|
||||
DialogueOption(
|
||||
"cant_see_detail",
|
||||
"Err, no. I can't see that kind of detail.",
|
||||
"Err, no. I can't see that kind of detail."
|
||||
)
|
||||
DialogueOption("whats_your_point", "Umm, yes. What's your point?", "What's your point?", FacialExpression.THINKING),
|
||||
DialogueOption("cant_see_detail", "Err, no. I can't see that kind of detail.")
|
||||
)
|
||||
|
||||
label("cant_see_detail")
|
||||
|
|
@ -191,9 +183,9 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
label(questStageLabel(EnlightenedJourney.STAGE_GATHER_MATERIALS))
|
||||
npc(FacialExpression.ASKING, "Have you gotten the materials?")
|
||||
options(
|
||||
DialogueOption("are_materials_gathered?", "Yes.", "Yes.", FacialExpression.HAPPY),
|
||||
DialogueOption("failure_not_option", "No.", "No."),
|
||||
DialogueOption("what_materials_needed", "What do I need to get again?", "What do I need to get again?")
|
||||
DialogueOption("are_materials_gathered?", "Yes.", expression = FacialExpression.HAPPY),
|
||||
DialogueOption("failure_not_option", "No."),
|
||||
DialogueOption("what_materials_needed", "What do I need to get again?")
|
||||
)
|
||||
|
||||
label("are_materials_gathered?")
|
||||
|
|
@ -229,7 +221,8 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
|
||||
when {
|
||||
hasNoPapyrus && !wool && !potatoes && !candle -> loadLabel(player, "missing_all_materials")
|
||||
hasSomePapyrus && wool && potatoes && candle -> loadLabel(player, "missing_more_papyrus")
|
||||
hasSomePapyrus && !wool && !potatoes && !candle -> loadLabel(player, "missing_papyrus_wool_candle_and_potatoes")
|
||||
!hasAllPapyrus && wool && potatoes && candle -> loadLabel(player, "missing_more_papyrus")
|
||||
hasAllPapyrus && !wool && potatoes && candle -> loadLabel(player, "missing_wool")
|
||||
hasAllPapyrus && wool && potatoes && !candle -> loadLabel(player, "missing_candle")
|
||||
hasAllPapyrus && wool && !potatoes && candle -> loadLabel(player, "missing_potatoes")
|
||||
|
|
@ -241,11 +234,7 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
hasAllPapyrus && wool && !potatoes && !candle -> loadLabel(player, "missing_candle_and_potatoes")
|
||||
!hasAllPapyrus && !wool && potatoes && !candle -> loadLabel(player, "missing_wool_papyrus_and_candle")
|
||||
!hasAllPapyrus && !wool && !potatoes && candle -> loadLabel(player, "missing_wool_papyrus_and_potatoes")
|
||||
!hasAllPapyrus && wool && !potatoes && !candle -> loadLabel(
|
||||
player,
|
||||
"missing_papyrus_potatoes_and_candle"
|
||||
)
|
||||
|
||||
!hasAllPapyrus && wool && !potatoes && !candle -> loadLabel(player, "missing_papyrus_potatoes_and_candle")
|
||||
hasAllPapyrus && !wool && !potatoes && !candle -> loadLabel(player, "missing_wool_candle_and_potatoes")
|
||||
}
|
||||
}
|
||||
|
|
@ -257,6 +246,9 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
label("missing_more_papyrus")
|
||||
npc(FacialExpression.SAD_TALKING, "You need more papyrus.")
|
||||
|
||||
label("missing_papyrus_wool_candle_and_potatoes")
|
||||
npc(FacialExpression.SAD_TALKING, "You need more papyrus, a ball of wool, an unlit candle, and a full sack of potatoes.")
|
||||
|
||||
label("missing_wool")
|
||||
npc(FacialExpression.SAD_TALKING, "You need a ball of wool.")
|
||||
|
||||
|
|
@ -329,8 +321,8 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
label(questStageLabel(EnlightenedJourney.STAGE_FIRST_EXPERIMENT))
|
||||
npc(FacialExpression.HAPPY, "Do you have the other two sheets of papyrus and a full sack of potatoes?")
|
||||
options(
|
||||
DialogueOption("has_second_materials", "Yes, I have them here.", "Yes, I have them here."),
|
||||
DialogueOption("misplaced_second_materials", "Oh, I've misplaced them.", "Oh, I've misplaced them.")
|
||||
DialogueOption("has_second_materials", "Yes, I have them here."),
|
||||
DialogueOption("misplaced_second_materials", "Oh, I've misplaced them.")
|
||||
)
|
||||
|
||||
label("has_second_materials")
|
||||
|
|
@ -396,9 +388,9 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
label(questStageLabel(EnlightenedJourney.STAGE_MAIN_BALLOON))
|
||||
npc(FacialExpression.HAPPY, "Do you have anything for me?")
|
||||
options(
|
||||
DialogueOption("yes_give_items", "Yes, I want to give you some items.", "Yes, I want to give you some items."),
|
||||
DialogueOption("trouble_finding_items", "I'm having trouble finding some items.", "I'm having trouble finding some items."),
|
||||
DialogueOption("lost_sapling_check", "I have lost my willow sapling. Can I buy a replacement?", "I have lost my willow sapling. Can I buy a replacement?",
|
||||
DialogueOption("yes_give_items", "Yes, I want to give you some items."),
|
||||
DialogueOption("trouble_finding_items", "I'm having trouble finding some items."),
|
||||
DialogueOption("lost_sapling_check", "I have lost my willow sapling. Can I buy a replacement?",
|
||||
optionIf = { player, _ ->
|
||||
!getAttribute(player, EnlightenedJourney.ATTRIBUTE_SAPLING_PLANTED, false)
|
||||
}),
|
||||
|
|
@ -427,19 +419,26 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
optionIf = { player, _ ->
|
||||
!getAttribute(player, EnlightenedJourney.ATTRIBUTE_BOWL_DELIVERED, false)
|
||||
}),
|
||||
DialogueOption("nowhere", "Never mind.", "Never mind."),
|
||||
DialogueOption("nowhere", "Never mind."),
|
||||
)
|
||||
|
||||
label("all_items_delivered")
|
||||
npc(FacialExpression.HAPPY, "That's the last of it!")
|
||||
goto(questStageLabel(EnlightenedJourney.STAGE_WILLOW_BASKET))
|
||||
|
||||
label("noted_item")
|
||||
npc(FacialExpression.SAD, "What am I supposed to do with a note? I can't make a balloon from notes!")
|
||||
goto("yes_give_items")
|
||||
|
||||
label("give_dye")
|
||||
exec { player, _ ->
|
||||
val hasNoted = amountInInventory(player, Items.YELLOW_DYE_1766) >= 1 ||
|
||||
amountInInventory(player, Items.RED_DYE_1764) >= 1
|
||||
val hasYellow = amountInInventory(player, Items.YELLOW_DYE_1765) >= 1
|
||||
val hasRed = amountInInventory(player, Items.RED_DYE_1763) >= 1
|
||||
val needsYellow = !getAttribute(player, EnlightenedJourney.ATTRIBUTE_YELLOW_DYE_DELIVERED, false)
|
||||
val needsRed = !getAttribute(player, EnlightenedJourney.ATTRIBUTE_RED_DYE_DELIVERED, false)
|
||||
|
||||
val hasNoted = (needsYellow && amountInInventory(player, Items.YELLOW_DYE_1766) >= 1) ||
|
||||
(needsRed && amountInInventory(player, Items.RED_DYE_1764) >= 1)
|
||||
val hasYellow = needsYellow && amountInInventory(player, Items.YELLOW_DYE_1765) >= 1
|
||||
val hasRed = needsRed && amountInInventory(player, Items.RED_DYE_1763) >= 1
|
||||
when {
|
||||
hasYellow && hasRed -> loadLabel(player, "give_both_dyes")
|
||||
hasYellow -> loadLabel(player, "give_yellow_dye")
|
||||
|
|
@ -454,14 +453,16 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
exec { player, _ ->
|
||||
removeItem(player, Item(Items.YELLOW_DYE_1765, 1))
|
||||
setAttribute(player, EnlightenedJourney.ATTRIBUTE_YELLOW_DYE_DELIVERED, true)
|
||||
checkAllItemsDelivered(player)
|
||||
}
|
||||
npc(FacialExpression.HAPPY, "Red dye. Thank you.")
|
||||
exec { player, _ ->
|
||||
removeItem(player, Item(Items.RED_DYE_1763, 1))
|
||||
setAttribute(player, EnlightenedJourney.ATTRIBUTE_RED_DYE_DELIVERED, true)
|
||||
checkAllItemsDelivered(player)
|
||||
loadLabel(player, "yes_give_items")
|
||||
if (checkAllItemsDelivered(player)) {
|
||||
loadLabel(player, "all_items_delivered")
|
||||
} else {
|
||||
loadLabel(player, "yes_give_items")
|
||||
}
|
||||
}
|
||||
|
||||
label("give_yellow_dye")
|
||||
|
|
@ -469,8 +470,11 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
exec { player, _ ->
|
||||
removeItem(player, Item(Items.YELLOW_DYE_1765, 1))
|
||||
setAttribute(player, EnlightenedJourney.ATTRIBUTE_YELLOW_DYE_DELIVERED, true)
|
||||
checkAllItemsDelivered(player)
|
||||
loadLabel(player, "yes_give_items")
|
||||
if (checkAllItemsDelivered(player)) {
|
||||
loadLabel(player, "all_items_delivered")
|
||||
} else {
|
||||
loadLabel(player, "yes_give_items")
|
||||
}
|
||||
}
|
||||
|
||||
label("give_red_dye")
|
||||
|
|
@ -478,8 +482,11 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
exec { player, _ ->
|
||||
removeItem(player, Item(Items.RED_DYE_1763, 1))
|
||||
setAttribute(player, EnlightenedJourney.ATTRIBUTE_RED_DYE_DELIVERED, true)
|
||||
checkAllItemsDelivered(player)
|
||||
loadLabel(player, "yes_give_items")
|
||||
if (checkAllItemsDelivered(player)) {
|
||||
loadLabel(player, "all_items_delivered")
|
||||
} else {
|
||||
loadLabel(player, "yes_give_items")
|
||||
}
|
||||
}
|
||||
|
||||
label("no_dye")
|
||||
|
|
@ -501,8 +508,11 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
exec { player, _ ->
|
||||
removeItem(player, Item(Items.SANDBAG_9943, 8))
|
||||
setAttribute(player, EnlightenedJourney.ATTRIBUTE_SANDBAGS_DELIVERED, true)
|
||||
checkAllItemsDelivered(player)
|
||||
loadLabel(player, "yes_give_items")
|
||||
if (checkAllItemsDelivered(player)) {
|
||||
loadLabel(player, "all_items_delivered")
|
||||
} else {
|
||||
loadLabel(player, "yes_give_items")
|
||||
}
|
||||
}
|
||||
|
||||
label("not_enough_sandbags")
|
||||
|
|
@ -528,8 +538,11 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
exec { player, _ ->
|
||||
removeItem(player, Item(Items.SILK_950, 10))
|
||||
setAttribute(player, EnlightenedJourney.ATTRIBUTE_SILK_DELIVERED, true)
|
||||
checkAllItemsDelivered(player)
|
||||
loadLabel(player, "yes_give_items")
|
||||
if (checkAllItemsDelivered(player)) {
|
||||
loadLabel(player, "all_items_delivered")
|
||||
} else {
|
||||
loadLabel(player, "yes_give_items")
|
||||
}
|
||||
}
|
||||
|
||||
label("not_enough_silk")
|
||||
|
|
@ -553,8 +566,11 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
exec { player, _ ->
|
||||
removeItem(player, Item(Items.BOWL_1923, 1))
|
||||
setAttribute(player, EnlightenedJourney.ATTRIBUTE_BOWL_DELIVERED, true)
|
||||
checkAllItemsDelivered(player)
|
||||
loadLabel(player, "yes_give_items")
|
||||
if (checkAllItemsDelivered(player)) {
|
||||
loadLabel(player, "all_items_delivered")
|
||||
} else {
|
||||
loadLabel(player, "yes_give_items")
|
||||
}
|
||||
}
|
||||
|
||||
label("no_bowl")
|
||||
|
|
@ -579,8 +595,8 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
label("sapling_replacement_offer")
|
||||
npc("It will cost you 30,000 gold coins to replace it, do you want to pay that?")
|
||||
options(
|
||||
DialogueOption("sapling_replacement_yes", "Yes.", "Yes."),
|
||||
DialogueOption("nowhere", "No way!", "No way!"),
|
||||
DialogueOption("sapling_replacement_yes", "Yes."),
|
||||
DialogueOption("nowhere", "No way!"),
|
||||
)
|
||||
|
||||
label("sapling_replacement_yes")
|
||||
|
|
@ -594,10 +610,10 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
|
||||
label("sapling_replacement_success")
|
||||
npc("Here you go. Now be very careful not to lose it again!")
|
||||
exec { player, _ ->
|
||||
removeItem(player, Item(Items.COINS_995, 30000))
|
||||
addItem(player, Items.AUGUSTES_SAPLING_9932, 1)
|
||||
}
|
||||
exec { player, _ ->
|
||||
removeItem(player, Item(Items.COINS_995, 30000))
|
||||
addItem(player, Items.AUGUSTES_SAPLING_9932, 1)
|
||||
}
|
||||
|
||||
//fallback, no source for what happens when the player has insufficient funds.
|
||||
label("sapling_replacement_failure")
|
||||
|
|
@ -648,12 +664,12 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
label(questStageLabel(EnlightenedJourney.STAGE_WILLOW_BASKET))
|
||||
npc(FacialExpression.HAPPY, "You just need to build the basket and I can finish the balloon! How are you getting on with the willow?")
|
||||
options(
|
||||
DialogueOption("lost_sapling_check", "I have lost my willow sapling. Can I buy a replacement?", "I have lost my willow sapling. Can I buy a replacement?",
|
||||
DialogueOption("lost_sapling_check", "I have lost my willow sapling. Can I buy a replacement?",
|
||||
optionIf = { player, _ ->
|
||||
!getAttribute(player, EnlightenedJourney.ATTRIBUTE_SAPLING_PLANTED, false)
|
||||
}),
|
||||
DialogueOption("build_the_basket", "What do I do again?", "What do I do again?", FacialExpression.HALF_THINKING),
|
||||
DialogueOption("nowhere", "Fine thanks.", "Fine thanks."),
|
||||
DialogueOption("build_the_basket", "What do I do again?", expression = FacialExpression.HALF_THINKING),
|
||||
DialogueOption("nowhere", "Fine thanks."),
|
||||
)
|
||||
|
||||
label("build_the_basket")
|
||||
|
|
@ -662,9 +678,9 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
label(questStageLabel(EnlightenedJourney.STAGE_FLIGHT))
|
||||
npc(FacialExpression.HAPPY, "Well, let's get going!")
|
||||
options(
|
||||
DialogueOption("wait_tell_me", "Wait; tell me what we're doing.", "Wait; tell me what we're doing."),
|
||||
DialogueOption("maiden_voyage", "Okay.", "Okay."),
|
||||
DialogueOption("nowhere", "No, I'm not ready.", "No, I'm not ready.")
|
||||
DialogueOption("wait_tell_me", "Wait; tell me what we're doing."),
|
||||
DialogueOption("maiden_voyage", "Okay."),
|
||||
DialogueOption("nowhere", "No, I'm not ready.")
|
||||
)
|
||||
|
||||
label("wait_tell_me")
|
||||
|
|
@ -689,8 +705,8 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
npc("If it all goes horribly wrong, you can always bail. If we're still over Entrana, we can land quickly and try again. However, once past the island, we will crash.")
|
||||
npc("Are you ready to go?")
|
||||
options(
|
||||
DialogueOption("maiden_voyage", "Okay.", "Okay."),
|
||||
DialogueOption("nowhere", "No, I'm not ready.", "No, I'm not ready.")
|
||||
DialogueOption("maiden_voyage", "Okay."),
|
||||
DialogueOption("nowhere", "No, I'm not ready.")
|
||||
)
|
||||
|
||||
label("maiden_voyage")
|
||||
|
|
@ -753,13 +769,9 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
npc("I will base my operations in Entrana. If you'd like to travel to new places, come see me there.")
|
||||
npc("Do you want to use the balloon? Just so you know, some locations require special logs and high Firemaking skills.")
|
||||
options(
|
||||
DialogueOption("post_quest_yes", "Yes.", "Yes."),
|
||||
DialogueOption("nowhere", "No.", "No."),
|
||||
DialogueOption(
|
||||
"post_quest_origami",
|
||||
"Could you tell me how to make an origami balloon?",
|
||||
"Could you tell me how to make an origami balloon?"
|
||||
)
|
||||
DialogueOption("post_quest_yes", "Yes."),
|
||||
DialogueOption("nowhere", "No."),
|
||||
DialogueOption("post_quest_origami", "Could you tell me how to make an origami balloon?")
|
||||
)
|
||||
|
||||
label("post_quest_yes")
|
||||
|
|
@ -811,11 +823,11 @@ class AugusteDialogueFile : DialogueLabeller() {
|
|||
label("post_quest_options")
|
||||
npc("Do you want to use the balloon? Just so you know, some locations require special logs and high Firemaking skills.")
|
||||
options(
|
||||
DialogueOption("yes_fly_balloon", "Yes.", "Yes."),
|
||||
DialogueOption("nowhere", "No.", "No."),
|
||||
DialogueOption("post_quest_origami", "Could you tell me how to make an origami balloon?", "Could you tell me how to make an origami balloon?"),
|
||||
DialogueOption("replace_bomber_clothes", "Could you replace some items for me?", "Could you replace some items for me?") { player, _ -> hasLostBomberReward(player) },
|
||||
DialogueOption("combine_cap_goggles", "Could you combine my cap and goggles?", "Could you combine my cap and goggles?") { player, _ -> hasCapAndGoggles(player) }
|
||||
DialogueOption("yes_fly_balloon", "Yes."),
|
||||
DialogueOption("nowhere", "No."),
|
||||
DialogueOption("post_quest_origami", "Could you tell me how to make an origami balloon?"),
|
||||
DialogueOption("replace_bomber_clothes", "Could you replace some items for me?") { player, _ -> hasLostBomberReward(player) },
|
||||
DialogueOption("combine_cap_goggles", "Could you combine my cap and goggles?") { player, _ -> hasCapAndGoggles(player) }
|
||||
)
|
||||
|
||||
label("replace_bomber_clothes")
|
||||
|
|
|
|||
|
|
@ -24,25 +24,36 @@ import org.rs09.consts.Items
|
|||
*/
|
||||
|
||||
@Initializable
|
||||
class EnlightenedJourney : Quest(Quests.ENLIGHTENED_JOURNEY, 55, 54, 1, 0, VARBIT_QUEST_PROGRESS, 0, 1, 200) {
|
||||
class EnlightenedJourney : Quest(Quests.ENLIGHTENED_JOURNEY, 55, 54, 1, 0,
|
||||
VARBIT_QUEST_PROGRESS_2866, QUEST_PROGRESS_NOT_STARTED_0, QUEST_PROGRESS_STARTED_1, QUEST_PROGRESS_COMPLETED_200) {
|
||||
|
||||
companion object {
|
||||
val questName = Quests.ENLIGHTENED_JOURNEY
|
||||
|
||||
/** Quest progress varbit used for the quests tab. 0 = not started, 1 = in progress, 200 = completed. */
|
||||
const val VARBIT_QUEST_PROGRESS = 2866
|
||||
/** Quest progress varbit and states used by the quest tab. */
|
||||
const val VARBIT_QUEST_PROGRESS_2866 = 2866
|
||||
const val QUEST_PROGRESS_NOT_STARTED_0 = 0
|
||||
const val QUEST_PROGRESS_STARTED_1 = 1
|
||||
const val QUEST_PROGRESS_COMPLETED_200 = 200
|
||||
|
||||
/** Entrana balloon scenery state varbit. */
|
||||
const val VARBIT_ENTRANA_BALLOON = 2867
|
||||
const val VARBIT_ENTRANA_BALLOON_2867 = 2867
|
||||
const val ENTRANA_BALLOON_COMPLETE_2 = 2
|
||||
|
||||
/** Taverley balloon route unlock state. */
|
||||
const val VARBIT_TAVERLEY_BALLOON = 2868
|
||||
/** Taverley balloon scenery and NPC state varbit. */
|
||||
const val VARBIT_TAVERLEY_BALLOON_2868 = 2868
|
||||
const val TAVERLEY_BALLOON_AUGUSTE_1 = 1
|
||||
const val TAVERLEY_BALLOON_STAN_2 = 2
|
||||
|
||||
/** Standard balloon route states. */
|
||||
const val BALLOON_ROUTE_LOCKED_0 = 0
|
||||
const val BALLOON_ROUTE_UNLOCKED_1 = 1
|
||||
|
||||
/** Completing a ballooning route unlocks the respective destination. */
|
||||
const val VARBIT_CASTLEWARS_BALLOON = 2869
|
||||
const val VARBIT_GRANDTREE_BALLOON = 2870
|
||||
const val VARBIT_CRAFTINGGUILD_BALLOON = 2871
|
||||
const val VARBIT_VARROCK_BALLOON = 2872
|
||||
const val VARBIT_CASTLEWARS_BALLOON_2869 = 2869
|
||||
const val VARBIT_GRANDTREE_BALLOON_2870 = 2870
|
||||
const val VARBIT_CRAFTINGGUILD_BALLOON_2871 = 2871
|
||||
const val VARBIT_VARROCK_BALLOON_2872 = 2872
|
||||
|
||||
/** Attributes used during the quest. */
|
||||
const val ATTRIBUTE_YELLOW_DYE_DELIVERED = "/save:enlightenedjourney_yellow_dye_delivered"
|
||||
|
|
@ -210,19 +221,19 @@ class EnlightenedJourney : Quest(Quests.ENLIGHTENED_JOURNEY, 55, 54, 1, 0, VARBI
|
|||
addItemOrDrop(player, Items.BOMBER_JACKET_9944)
|
||||
addItemOrDrop(player, Items.BOMBER_CAP_9945)
|
||||
|
||||
setVarbit(player, VARBIT_QUEST_PROGRESS, 200, true)
|
||||
setVarbit(player, VARBIT_ENTRANA_BALLOON, 2, true)
|
||||
setVarbit(player, VARBIT_TAVERLEY_BALLOON, 1, true)
|
||||
setVarbit(player, VARBIT_QUEST_PROGRESS_2866, QUEST_PROGRESS_COMPLETED_200, true)
|
||||
setVarbit(player, VARBIT_ENTRANA_BALLOON_2867, ENTRANA_BALLOON_COMPLETE_2, true)
|
||||
setVarbit(player, VARBIT_TAVERLEY_BALLOON_2868, TAVERLEY_BALLOON_AUGUSTE_1, true)
|
||||
}
|
||||
|
||||
override fun reset(player: Player) {
|
||||
setVarbit(player, VARBIT_QUEST_PROGRESS, 0, true)
|
||||
setVarbit(player, VARBIT_ENTRANA_BALLOON, 0, true)
|
||||
setVarbit(player, VARBIT_TAVERLEY_BALLOON, 0, true)
|
||||
setVarbit(player, VARBIT_CASTLEWARS_BALLOON, 0, true)
|
||||
setVarbit(player, VARBIT_GRANDTREE_BALLOON, 0, true)
|
||||
setVarbit(player, VARBIT_CRAFTINGGUILD_BALLOON, 0, true)
|
||||
setVarbit(player, VARBIT_VARROCK_BALLOON, 0, true)
|
||||
setVarbit(player, VARBIT_QUEST_PROGRESS_2866, QUEST_PROGRESS_NOT_STARTED_0, true)
|
||||
setVarbit(player, VARBIT_ENTRANA_BALLOON_2867, BALLOON_ROUTE_LOCKED_0, true)
|
||||
setVarbit(player, VARBIT_TAVERLEY_BALLOON_2868, BALLOON_ROUTE_LOCKED_0, true)
|
||||
setVarbit(player, VARBIT_CASTLEWARS_BALLOON_2869, BALLOON_ROUTE_LOCKED_0, true)
|
||||
setVarbit(player, VARBIT_GRANDTREE_BALLOON_2870, BALLOON_ROUTE_LOCKED_0, true)
|
||||
setVarbit(player, VARBIT_CRAFTINGGUILD_BALLOON_2871, BALLOON_ROUTE_LOCKED_0, true)
|
||||
setVarbit(player, VARBIT_VARROCK_BALLOON_2872, BALLOON_ROUTE_LOCKED_0, true)
|
||||
removeAttributes(
|
||||
player, ATTRIBUTE_YELLOW_DYE_DELIVERED,
|
||||
ATTRIBUTE_RED_DYE_DELIVERED,
|
||||
|
|
@ -239,20 +250,20 @@ class EnlightenedJourney : Quest(Quests.ENLIGHTENED_JOURNEY, 55, 54, 1, 0, VARBI
|
|||
val stage = getQuestStage(player, questName)
|
||||
|
||||
setVarbit(
|
||||
player, VARBIT_QUEST_PROGRESS, when {
|
||||
stage >= STAGE_COMPLETE -> 200
|
||||
stage > 0 -> 1
|
||||
else -> 0
|
||||
player, VARBIT_QUEST_PROGRESS_2866, when {
|
||||
stage >= STAGE_COMPLETE -> QUEST_PROGRESS_COMPLETED_200
|
||||
stage > 0 -> QUEST_PROGRESS_STARTED_1
|
||||
else -> QUEST_PROGRESS_NOT_STARTED_0
|
||||
}, true
|
||||
)
|
||||
|
||||
setVarbit(player, VARBIT_ENTRANA_BALLOON, if (stage >= STAGE_FLIGHT) 2 else 0, true)
|
||||
setVarbit(player, VARBIT_ENTRANA_BALLOON_2867, if (stage >= STAGE_FLIGHT) ENTRANA_BALLOON_COMPLETE_2 else BALLOON_ROUTE_LOCKED_0, true)
|
||||
val taverleyBalloonState = when {
|
||||
stage >= STAGE_COMPLETE && getAttribute(player, ATTRIBUTE_TAVERLEY_AUGUSTE_REPLACED, false) -> 2
|
||||
stage >= STAGE_CLAIM_REWARD -> 1
|
||||
else -> 0
|
||||
stage >= STAGE_COMPLETE && getAttribute(player, ATTRIBUTE_TAVERLEY_AUGUSTE_REPLACED, false) -> TAVERLEY_BALLOON_STAN_2
|
||||
stage >= STAGE_CLAIM_REWARD -> TAVERLEY_BALLOON_AUGUSTE_1
|
||||
else -> BALLOON_ROUTE_LOCKED_0
|
||||
}
|
||||
setVarbit(player, VARBIT_TAVERLEY_BALLOON, taverleyBalloonState, true)
|
||||
setVarbit(player, VARBIT_TAVERLEY_BALLOON_2868, taverleyBalloonState, true)
|
||||
}
|
||||
|
||||
override fun newInstance(`object`: Any?): Quest {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue