mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-11 17:10:21 -07:00
Made it possible to claim Fremennik diary rewards
This commit is contained in:
parent
f5711fcf8f
commit
f6cd646205
1 changed files with 18 additions and 4 deletions
|
|
@ -6,23 +6,31 @@ import org.rs09.consts.Items
|
||||||
import core.game.dialogue.DialogueFile
|
import core.game.dialogue.DialogueFile
|
||||||
import core.tools.END_DIALOGUE
|
import core.tools.END_DIALOGUE
|
||||||
import core.tools.START_DIALOGUE
|
import core.tools.START_DIALOGUE
|
||||||
|
import core.game.node.entity.player.link.diary.AchievementDiary
|
||||||
|
import core.game.node.entity.player.link.diary.DiaryType
|
||||||
|
|
||||||
const val COUNCIL_WORKER = 1287
|
const val COUNCIL_WORKER = 1287
|
||||||
|
|
||||||
class CouncilWorkerDiaryDialogue() : DialogueFile() {
|
class CouncilWorkerDiaryDialogue() : DialogueFile() {
|
||||||
|
|
||||||
override fun handle(componentID: Int, buttonID: Int) {
|
override fun handle(componentID: Int, buttonID: Int) {
|
||||||
|
//todo all this dialogue is inauthentic and sucks, this is just a patch to fix the absolutely garbage and incorrect way of granting the diary rewards that doesn't even give the lamp. -Ceik June 2023
|
||||||
when (stage) {
|
when (stage) {
|
||||||
START_DIALOGUE -> {
|
START_DIALOGUE -> {
|
||||||
player(core.game.dialogue.FacialExpression.FRIENDLY, "About my achievement diary...");stage++
|
player(core.game.dialogue.FacialExpression.FRIENDLY, "About my achievement diary...");stage++
|
||||||
}
|
}
|
||||||
1 -> {
|
1 -> {
|
||||||
npc(COUNCIL_WORKER, "You have completed the Fremennik Easy Diary!");stage++
|
if (!AchievementDiary.hasClaimedLevelRewards(player, DiaryType.FREMENNIK, 0)) {
|
||||||
|
AchievementDiary.flagRewarded(player, DiaryType.FREMENNIK, 0)
|
||||||
|
npc(COUNCIL_WORKER, "You have completed the Fremennik Easy Diary!")
|
||||||
|
stage++
|
||||||
|
} else if (AchievementDiary.canReplaceReward(player, DiaryType.FREMENNIK, 0)) {
|
||||||
|
player(FacialExpression.FRIENDLY, "I need a new pair of boots.")
|
||||||
|
stage = 10
|
||||||
|
}
|
||||||
//player.achievementDiaryManager.getDiary(DiaryType.FREMENNIK).setLevelRewarded(0)
|
//player.achievementDiaryManager.getDiary(DiaryType.FREMENNIK).setLevelRewarded(0)
|
||||||
}
|
}
|
||||||
2 -> {
|
2 -> {
|
||||||
player?.let { addItem(it, Items.FREMENNIK_SEA_BOOTS_1_14571) }
|
|
||||||
player?.let {
|
player?.let {
|
||||||
sendItemDialogue(
|
sendItemDialogue(
|
||||||
it,
|
it,
|
||||||
|
|
@ -37,6 +45,12 @@ class CouncilWorkerDiaryDialogue() : DialogueFile() {
|
||||||
"You can now use Peer the Seer to deposit your items!"
|
"You can now use Peer the Seer to deposit your items!"
|
||||||
).also { stage = END_DIALOGUE }
|
).also { stage = END_DIALOGUE }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10 -> {
|
||||||
|
npc(COUNCIL_WORKER, "Sure!")
|
||||||
|
AchievementDiary.grantReplacement(player, DiaryType.FREMENNIK, 0);
|
||||||
|
stage = 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue