Started painting flow

This commit is contained in:
Bishop 2026-06-20 23:35:23 -05:00
parent ece0365f56
commit c9db03a824
3 changed files with 303 additions and 99 deletions

View file

@ -7,29 +7,38 @@ import core.game.node.entity.skill.Skills
import org.rs09.consts.Items
/**
* Enumerates the various crests the player can have for the Construction skill, as well as their requirements.
* ORDINAL BOUND
* Enumerates the various crests the player can purchase for the Construction skill, as well as their requirements.
* @author Bishop
*/
enum class CrestType(val crestName: String, val cost: Int = 5000, private val requirement: (Player) -> Boolean = { true }) {
ARRAV("the Shield of Arrav symbol", requirement = { isQuestComplete(it, Quests.SHIELD_OF_ARRAV) }),
ARRAV("the Shield of Arrav symbol",
requirement = { isQuestComplete(it, Quests.SHIELD_OF_ARRAV) }),
ASGARNIA("the symbol of Asgarnia"),
DORGESHUUN("the Dorgeshuun brooch", requirement = { isQuestComplete(it, Quests.THE_LOST_TRIBE) }),
DRAGON("a dragon", requirement = { isQuestComplete(it, Quests.DRAGON_SLAYER) }),
FAIRY("a fairy", requirement = { isQuestComplete(it, Quests.LOST_CITY) }),
GUTHIX("the symbol of Guthix", requirement = { hasLevelStat(it, Skills.PRAYER, 70) }),
DORGESHUUN("the Dorgeshuun brooch",
requirement = { isQuestComplete(it, Quests.THE_LOST_TRIBE) }),
DRAGON("a dragon",
requirement = { isQuestComplete(it, Quests.DRAGON_SLAYER) }),
FAIRY("a fairy",
requirement = { isQuestComplete(it, Quests.LOST_CITY) }),
GUTHIX("the symbol of Guthix",
requirement = { hasLevelStat(it, Skills.PRAYER, 70) }),
HAM("the symbol of the HAM cult."),
HORSE("a horse", requirement = { anyInInventory(it, Items.TOY_HORSEY_2524, Items.TOY_HORSEY_2520, Items.TOY_HORSEY_2526, Items.TOY_HORSEY_2522) }),
HORSE("a horse",
requirement = { anyInInventory(it,Items.TOY_HORSEY_2524, Items.TOY_HORSEY_2520, Items.TOY_HORSEY_2526, Items.TOY_HORSEY_2522) }),
JOGRE("Jiggig"),
KANDARIN("the symbol of Kandarin"),
MISTHALIN("the symbol of Misthalin"),
MONEY("a bag of money", cost = 500000),
SARADOMIN("the symbol of Saradomin", requirement = { hasLevelStat(it, Skills.PRAYER, 70) }),
SKULL("a skull", requirement = { it.skullManager.isSkulled }),
MONEY("a bag of money",
cost = 500000),
SARADOMIN("the symbol of Saradomin",
requirement = { hasLevelStat(it, Skills.PRAYER, 70) }),
SKULL("a skull",
requirement = { it.skullManager.isSkulled }),
VARROCK("the symbol of Varrock"),
ZAMORAK("the symbol of Zamorak", requirement = { hasLevelStat(it, Skills.PRAYER, 70) });
ZAMORAK("the symbol of Zamorak",
requirement = { hasLevelStat(it, Skills.PRAYER, 70) });
fun eligible(player: Player): Boolean = requirement(player)
}

View file

@ -0,0 +1,51 @@
package content.global.skill.construction
import content.data.Quests
import core.api.getQuestPoints
import core.api.isQuestComplete
import core.game.node.entity.player.Player
import org.rs09.consts.Items
/**
* Enumerates the various paintings the player can purchase for the Construction skill, as well as their requirements.
* @author Bishop
*/
enum class PaintingType(val paintingId: Int, val cost: Int = 1000, private val requirement: (Player) -> Boolean = { true }) {
ARTHUR(Items.ARTHUR_PORTRAIT_7995,
requirement = { isQuestComplete(it, Quests.HOLY_GRAIL) }),
ELENA(Items.ELENA_PORTRAIT_7996,
requirement = { isQuestComplete(it, Quests.PLAGUE_CITY) }),
ALVIS(Items.KELDAGRIM_PORTRAIT_7997,
requirement = { isQuestComplete(it, Quests.THE_GIANT_DWARF) }),
MISC(Items.MISC_PORTRAIT_7998,
requirement = { isQuestComplete(it, Quests.THRONE_OF_MISCELLANIA) }),
DESERT(Items.DESERT_PAINTING_7999,
cost = 2000,
requirement = { isQuestComplete(it, Quests.THE_FEUD) && isQuestComplete(it, Quests.THE_GOLEM) &&
isQuestComplete(it, Quests.THE_TOURIST_TRAP)}),
ISAFDAR(Items.ISAFDAR_PAINTING_8000,
cost = 2000,
requirement = { isQuestComplete(it, Quests.ROVING_ELVES) }),
KARAMJA(Items.KARAMJA_PAINTING_8001,
cost = 2000,
requirement = { isQuestComplete(it, Quests.PIRATES_TREASURE) && isQuestComplete(it, Quests.SHILO_VILLAGE) &&
isQuestComplete(it, Quests.TAI_BWO_WANNAI_TRIO) }),
LUMBRIDGE(Items.LUMBRIDGE_PAINTING_8002,
cost = 2000,
requirement = { isQuestComplete(it, Quests.COOKS_ASSISTANT) && isQuestComplete(it, Quests.RUNE_MYSTERIES) &&
isQuestComplete(it, Quests.THE_RESTLESS_GHOST) }),
MORYTANIA(Items.MORYTANIA_PAINTING_8003,
cost = 2000,
requirement = { isQuestComplete(it, Quests.CREATURE_OF_FENKENSTRAIN) && isQuestComplete(it, Quests.GHOSTS_AHOY) &&
isQuestComplete(it, Quests.HAUNTED_MINE) && isQuestComplete(it, Quests.SHADES_OF_MORTTON) }),
MAP_SMALL(Items.SMALL_MAP_8004,
requirement = { getQuestPoints(it) > 50 }),
MAP_MEDIUM(Items.MEDIUM_MAP_8005,
requirement = { getQuestPoints(it) > 100 }),
MAP_LARGE(Items.LARGE_MAP_8006,
requirement = { getQuestPoints(it) > 150 });
fun eligible(player: Player): Boolean = requirement(player)
}

View file

@ -1,6 +1,7 @@
package content.region.asgarnia.falador.dialogue
import content.global.skill.construction.CrestType
import content.global.skill.construction.PaintingType
import core.ServerConstants
import core.Util
import core.api.*
@ -36,16 +37,25 @@ class SirReniteeDialogueFile : DialogueLabeller() {
private companion object {
const val attributeCrest = "/save:sir-renitee-assigned-crest"
const val attributeTempCrest = "sir-renitee-temp-crest"
const val attributeTempPainting = "sir-renitee-temp-painting"
}
private fun selectCrest(crestType: CrestType, labelName: String) {
label(labelName)
exec { player, _ ->
setAttribute(player, attributeTempCrest, crestType)
loadLabel(player, "crest-buy")
loadLabel(player, "crest_buy")
}
}
private fun selectPainting(painting: PaintingType, labelName: String) {
label(labelName)
exec { player, _ ->
setAttribute(player, attributeTempPainting, painting)
loadLabel(player, "painting_buy")
}
}
override fun addConversation() {
/**
@ -71,153 +81,153 @@ class SirReniteeDialogueFile : DialogueLabeller() {
npc(ChatAnim.HALF_GUILTY, "I'm also something of an, mmm, a painter. If you've",
"met any important persons or visited any nice places I", "could paint them for you.")
options(
DialogueOption("family-crest", "Can you see if I have a family crest?", expression = ChatAnim.HALF_GUILTY),
DialogueOption("family_crest", "Can you see if I have a family crest?", expression = ChatAnim.HALF_GUILTY),
DialogueOption("painting", "Can I buy a painting?", expression = ChatAnim.HALF_GUILTY),
)
label("family-crest")
label("family_crest")
npc(ChatAnim.HALF_GUILTY, "What is your name?")
player(ChatAnim.HALF_GUILTY, "${player!!.username}.")
npc(ChatAnim.HALF_GUILTY, "Mmm, ${player!!.username}, let me see...")
exec { player, _ ->
if (hasLevelStat(player, Skills.CONSTRUCTION, 16)) {
loadLabel(player, "has-construction-level")
loadLabel(player, "has_construction_level")
} else {
loadLabel(player, "no-construction-level")
loadLabel(player, "no_construction_level")
}
}
label("no-construction-level")
label("no_construction_level")
npc(ChatAnim.HALF_GUILTY, "First thing's first, young ${if (player!!.isMale) "man" else "woman"}! There is not much point",
"in having a family crest if you cannot display it.")
npc(ChatAnim.HALF_GUILTY, "You should train construction until you can build a wall",
"decoration in your dining room.")
label("has-construction-level")
label("has_construction_level")
exec { player, _ ->
if (getAttribute(player, attributeCrest, false)) {
loadLabel(player, "show-existing-crest")
loadLabel(player, "show_existing_crest")
} else {
val crests = arrayOf(CrestType.VARROCK, CrestType.ASGARNIA, CrestType.KANDARIN, CrestType.MISTHALIN)
player.houseManager.crest = crests[RandomFunction.random(4)]
setAttribute(player, attributeCrest, true)
loadLabel(player, "show-new-crest")
loadLabel(player, "show_new_crest")
}
if (!player.achievementDiaryManager.getDiary(DiaryType.FALADOR).isComplete(0, 4)) {
player.achievementDiaryManager.getDiary(DiaryType.FALADOR).updateTask(player, 0, 4, true)
}
}
label("show-existing-crest")
label("show_existing_crest")
npc(ChatAnim.HALF_GUILTY, "According to my records, your crest is",
"${player!!.houseManager.crest.crestName}.")
goto("crest-options")
goto("crest_options")
label("show-new-crest")
label("show_new_crest")
npc(ChatAnim.HALF_GUILTY, "Well, I don't think you have any noble blood,",
"but I see that your ancestors came from ${Util.enumToString(player!!.houseManager.crest.name)},",
"so ${if (player!!.houseManager.crest == CrestType.VARROCK) "you can use that city's" else "that can be your"} crest.")
goto("crest-options")
goto("crest_options")
label("crest-options")
label("crest_options")
options(
DialogueOption("change-crest", "I don't like that crest. Can I have a different one?", expression = ChatAnim.HALF_GUILTY),
DialogueOption("change_crest", "I don't like that crest. Can I have a different one?", expression = ChatAnim.HALF_GUILTY),
DialogueOption("thanks", "Thanks!", expression = ChatAnim.HALF_GUILTY),
)
label("thanks")
npc(ChatAnim.HALF_GUILTY, "You're welcome, my ${if (player!!.isMale) "boy" else "girl"}.")
label("change-crest")
label("change_crest")
npc(ChatAnim.HALF_GUILTY, "Mmm, very well. Changing your crest will cost", "5,000 coins.")
exec { player, _ ->
if (amountInInventory(player, Items.COINS_995) < 5000) {
loadLabel(player, "no-money")
loadLabel(player, "no_money")
} else {
loadLabel(player, "choose-symbol")
loadLabel(player, "choose_symbol")
}
}
label("no-money")
label("no_money")
player(ChatAnim.HALF_GUILTY, "I'll have to go and get some money then.")
label("choose-symbol")
label("choose_symbol")
npc(ChatAnim.HALF_GUILTY, "There are sixteen different symbols;", "which one would you like?")
goto("crest-page1")
goto("crest_page1")
label("crest-page1")
label("crest_page1")
options(
DialogueOption("crest-arrav", "Shield of Arrav", skipPlayer = true),
DialogueOption("crest-asgarnia", "Asgarnia", skipPlayer = true),
DialogueOption("crest-dorgeshuun", "Dorgeshuun Symbol", skipPlayer = true),
DialogueOption("crest-dragon", "Dragon", skipPlayer = true),
DialogueOption("crest-page2", "More...", skipPlayer = true),
DialogueOption("crest_arrav", "Shield of Arrav", skipPlayer = true),
DialogueOption("crest_asgarnia", "Asgarnia", skipPlayer = true),
DialogueOption("crest_dorgeshuun", "Dorgeshuun Symbol", skipPlayer = true),
DialogueOption("crest_dragon", "Dragon", skipPlayer = true),
DialogueOption("crest_page2", "More...", skipPlayer = true),
)
label("crest-page2")
label("crest_page2")
options(
DialogueOption("crest-fairy", "Fairy", skipPlayer = true),
DialogueOption("crest-guthix", "Guthix", skipPlayer = true),
DialogueOption("crest-ham", "HAM", skipPlayer = true),
DialogueOption("crest-horse", "Horse", skipPlayer = true),
DialogueOption("crest-page3", "More...", skipPlayer = true),
DialogueOption("crest_fairy", "Fairy", skipPlayer = true),
DialogueOption("crest_guthix", "Guthix", skipPlayer = true),
DialogueOption("crest_ham", "HAM", skipPlayer = true),
DialogueOption("crest_horse", "Horse", skipPlayer = true),
DialogueOption("crest_page3", "More...", skipPlayer = true),
)
label("crest-page3")
label("crest_page3")
options(
DialogueOption("crest-jogre", "Jogre", skipPlayer = true),
DialogueOption("crest-kandarin", "Kandarin", skipPlayer = true),
DialogueOption("crest-misthalin", "Misthalin", skipPlayer = true),
DialogueOption("crest-money", "Money", skipPlayer = true),
DialogueOption("crest-page4", "More...", skipPlayer = true),
DialogueOption("crest_jogre", "Jogre", skipPlayer = true),
DialogueOption("crest_kandarin", "Kandarin", skipPlayer = true),
DialogueOption("crest_misthalin", "Misthalin", skipPlayer = true),
DialogueOption("crest_money", "Money", skipPlayer = true),
DialogueOption("crest_page4", "More...", skipPlayer = true),
)
label("crest-page4")
label("crest_page4")
options(
DialogueOption("crest-saradomin", "Saradomin", skipPlayer = true),
DialogueOption("crest-skull", "Skull", skipPlayer = true),
DialogueOption("crest-varrock", "Varrock", skipPlayer = true),
DialogueOption("crest-zamorak", "Zamorak", skipPlayer = true),
DialogueOption("crest-page1", "More...", skipPlayer = true),
DialogueOption("crest_saradomin", "Saradomin", skipPlayer = true),
DialogueOption("crest_skull", "Skull", skipPlayer = true),
DialogueOption("crest_varrock", "Varrock", skipPlayer = true),
DialogueOption("crest_zamorak", "Zamorak", skipPlayer = true),
DialogueOption("crest_page1", "More...", skipPlayer = true),
)
/**
* CREST HANDLERS
* CREST CHECKOUT
*/
selectCrest(CrestType.ARRAV, "crest-arrav")
selectCrest(CrestType.ASGARNIA, "crest-asgarnia")
selectCrest(CrestType.DORGESHUUN, "crest-dorgeshuun")
selectCrest(CrestType.DRAGON, "crest-dragon")
selectCrest(CrestType.FAIRY, "crest-fairy")
selectCrest(CrestType.GUTHIX, "crest-guthix")
selectCrest(CrestType.HAM, "crest-ham")
selectCrest(CrestType.HORSE, "crest-horse")
selectCrest(CrestType.JOGRE, "crest-jogre")
selectCrest(CrestType.KANDARIN, "crest-kandarin")
selectCrest(CrestType.MISTHALIN, "crest-misthalin")
selectCrest(CrestType.SARADOMIN, "crest-saradomin")
selectCrest(CrestType.SKULL, "crest-skull")
selectCrest(CrestType.VARROCK, "crest-varrock")
selectCrest(CrestType.ZAMORAK, "crest-zamorak")
selectCrest(CrestType.ARRAV, "crest_arrav")
selectCrest(CrestType.ASGARNIA, "crest_asgarnia")
selectCrest(CrestType.DORGESHUUN, "crest_dorgeshuun")
selectCrest(CrestType.DRAGON, "crest_dragon")
selectCrest(CrestType.FAIRY, "crest_fairy")
selectCrest(CrestType.GUTHIX, "crest_guthix")
selectCrest(CrestType.HAM, "crest_ham")
selectCrest(CrestType.HORSE, "crest_horse")
selectCrest(CrestType.JOGRE, "crest_jogre")
selectCrest(CrestType.KANDARIN, "crest_kandarin")
selectCrest(CrestType.MISTHALIN, "crest_misthalin")
selectCrest(CrestType.SARADOMIN, "crest_saradomin")
selectCrest(CrestType.SKULL, "crest_skull")
selectCrest(CrestType.VARROCK, "crest_varrock")
selectCrest(CrestType.ZAMORAK, "crest_zamorak")
label("crest-buy")
label("crest_buy")
exec { player, _ ->
val crest = getAttribute(player, attributeTempCrest, CrestType.ARRAV)
val crest = getAttribute(player, attributeTempCrest, CrestType.MISTHALIN)
if (crest.eligible(player) && removeItem(player, Item(Items.COINS_995, crest.cost))) {
player.houseManager.crest = crest
if (crest == CrestType.SARADOMIN && !player.achievementDiaryManager.getDiary(DiaryType.FALADOR).isComplete(2, 1)) {
player.achievementDiaryManager.getDiary(DiaryType.FALADOR).updateTask(player, 2, 1, true)
}
loadLabel(player, "crest-buy-ok")
loadLabel(player, "crest_buy_ok")
} else {
loadLabel(player, "crest-buy-fail")
loadLabel(player, "crest_buy_fail")
}
}
label("crest-buy-ok")
label("crest_buy_ok")
manual { player, _ ->
val crest = getAttribute(player, attributeTempCrest, CrestType.ARRAV)
val crest = getAttribute(player, attributeTempCrest, CrestType.MISTHALIN)
val messages = when (crest) {
CrestType.ARRAV ->
arrayOf("Ah yes, the shield that you helped to retrieve. You have",
@ -265,59 +275,193 @@ class SirReniteeDialogueFile : DialogueLabeller() {
interpreter!!.sendDialogues(npc, ChatAnim.HALF_GUILTY, *messages)
}
label("crest-buy-fail")
label("crest_buy_fail")
manual { player, _ ->
val c = getAttribute(player, attributeTempCrest, CrestType.ARRAV)
val messages = when (c) {
CrestType.DORGESHUUN -> arrayOf("Hmm, have you ever even met the Dorgeshuun? I don't",
"think you should wear their symbol until you have", "made contact with that lost tribe.")
CrestType.GUTHIX, CrestType.SARADOMIN, CrestType.ZAMORAK -> arrayOf("You do not seem to be very devoted to any god.",
"I will not let you have a divine symbol", "unless you have level 70 prayer.")
CrestType.HORSE -> arrayOf("A horse? I know people talk about them, but I'm not at all sure",
val crest = getAttribute(player, attributeTempCrest, CrestType.MISTHALIN)
val messages = when (crest) {
CrestType.ARRAV ->
arrayOf("PLACEHOLDER")
CrestType.ASGARNIA ->
arrayOf("PLACEHOLDER")
CrestType.DORGESHUUN ->
arrayOf("Hmm, have you ever even met the Dorgeshuun? I don't",
"think you should wear their symbol until you have",
"made contact with that lost tribe.")
CrestType.DRAGON ->
arrayOf("PLACEHOLDER")
CrestType.FAIRY ->
arrayOf("PLACEHOLDER")
CrestType.GUTHIX, CrestType.SARADOMIN, CrestType.ZAMORAK ->
arrayOf("You do not seem to be very devoted to any god.",
"I will not let you have a divine symbol",
"unless you have level 70 prayer.")
CrestType.HAM ->
arrayOf("PLACEHOLDER")
CrestType.HORSE ->
arrayOf("A horse? I know people talk about them, but I'm not at all sure",
"they ever existed. I don't think I could let you use as",
"your symbol unless you can fetch me some kind of model of one.")
CrestType.SKULL -> arrayOf("A symbol of death? You do not seem like a killer to me;",
CrestType.JOGRE ->
arrayOf("PLACEHOLDER")
CrestType.KANDARIN ->
arrayOf("PLACEHOLDER")
CrestType.MISTHALIN ->
arrayOf("PLACEHOLDER")
CrestType.SKULL ->
arrayOf("A symbol of death? You do not seem like a killer to me;",
"perhaps some other symbol would suit you better.")
CrestType.VARROCK ->
arrayOf("PLACEHOLDER")
else -> arrayOf("[MISSING DIALOGUE - NOT ELIGIBLE]")
}
interpreter!!.sendDialogues(npc, ChatAnim.HALF_GUILTY, *messages)
}
goto("crest-page1")
goto("crest_page1")
// Money crest has a unique flow since Sir Renitee needs to check the player's cash stack a second time
label("crest-money")
label("crest_money")
npc(ChatAnim.HALF_GUILTY, "You wish to represent yourself by a moneybag?",
"I think to make that meaningful I should increase", "the price to 500,000 coins. Do you agree?")
options(
DialogueOption("money-agree", "All right.", expression = ChatAnim.HALF_GUILTY),
DialogueOption("money-refuse", "No way!", expression = ChatAnim.HALF_GUILTY),
DialogueOption("money_accept", "All right.", expression = ChatAnim.HALF_GUILTY),
DialogueOption("money_refuse", "No way!", expression = ChatAnim.HALF_GUILTY),
)
label("money-agree")
label("money_accept")
exec { player, _ ->
val crest = CrestType.MONEY
if (crest.eligible(player) && removeItem(player, Item(Items.COINS_995, crest.cost))) {
player.houseManager.crest = crest
loadLabel(player, "money-ok")
loadLabel(player, "money_ok")
} else {
loadLabel(player, "no-money")
loadLabel(player, "no_money")
}
}
label("money-ok")
label("money_ok")
npc(ChatAnim.HALF_GUILTY, "Thank you very much! You may now use a money-bag", "as your symbol.")
label("money-refuse")
label("money_refuse")
npc(ChatAnim.HALF_GUILTY, "Well we can't have just any pauper using a money-bag",
"as a symbol, can we? You'll have to choose a", "different symbol.")
goto("crest-page1")
goto("crest_page1")
/**
* PAINTING HANDLERS
* PAINTING DIALOGUE
*/
label("painting")
npc(ChatAnim.HALF_GUILTY, "Would you like a portrait or an, mmm, a landscape? Or a map, maybe?")
goto("painting_options")
label("painting_options")
options(
DialogueOption("portrait", "A portrait please.", expression = ChatAnim.HALF_GUILTY),
DialogueOption("landscape", "A landscape please.", expression = ChatAnim.HALF_GUILTY),
DialogueOption("map", "A map please.", expression = ChatAnim.HALF_GUILTY),
)
/**
* PORTRAITS
*/
label("portrait")
npc(ChatAnim.HALF_GUILTY, "Mmm, well, there are a few portraits I can paint. I can only let you have one if you've got some connection with that person though. Who would you like?")
options(
DialogueOption("portrait_arthur", "King Arthur", skipPlayer = true),
DialogueOption("portrait_elena", "Elena of Ardougne", expression = ChatAnim.HALF_GUILTY),
DialogueOption("portrait_alvis", "King Alvis of Keldagrim", expression = ChatAnim.HALF_GUILTY),
DialogueOption("portrait_misc", "The Prince and Princess of Miscellania", expression = ChatAnim.HALF_GUILTY),
)
/**
* LANDSCAPES
*/
label("landscape")
npc(ChatAnim.HALF_GUILTY, "Would you like a portrait or an, mmm, a landscape? Or a map, maybe?")
/**
* MAPS
*/
label("map")
npc(ChatAnim.HALF_GUILTY, "Would you like a portrait or an, mmm, a landscape? Or a map, maybe?")
/**
* PAINTING CHECKOUT
*/
selectPainting(PaintingType.ARTHUR, "portrait_arthur")
selectPainting(PaintingType.ELENA, "portrait_elena")
selectPainting(PaintingType.ALVIS, "portrait_alvis")
selectPainting(PaintingType.MISC, "portrait_misc")
selectPainting(PaintingType.DESERT, "landscape_desert")
selectPainting(PaintingType.ISAFDAR, "landscape_isafdar")
selectPainting(PaintingType.KARAMJA, "landscape_karamja")
selectPainting(PaintingType.LUMBRIDGE, "portrait_lumbridge")
selectPainting(PaintingType.MORYTANIA, "landscape_morytania")
selectPainting(PaintingType.MAP_SMALL, "map_small")
selectPainting(PaintingType.MAP_MEDIUM, "map_medium")
selectPainting(PaintingType.MAP_LARGE, "map_large")
label("painting_buy")
exec { player, _ ->
val painting = getAttribute(player, attributeTempPainting, PaintingType.MAP_SMALL)
when {
(painting.eligible(player) && inInventory(player, Items.COINS_995, painting.cost)) ->
loadLabel(player, "painting_buy_ok")
(painting.eligible(player)) ->
loadLabel(player, "painting_buy_poor")
else ->
loadLabel(player, "painting_buy_fail")
}
label("painting_buy_ok")
npc(ChatAnim.HALF_GUILTY, "That will be, mmm, ${painting.cost} coins please.")
options(
DialogueOption("painting_accept", "All right.", expression = ChatAnim.HALF_GUILTY),
DialogueOption("painting_refuse", "No thanks.", expression = ChatAnim.HALF_GUILTY),
)
label("painting_buy_poor")
npc(ChatAnim.HALF_GUILTY, "PLACEHOLDER")
label("painting_buy_fail")
manual { player, _ ->
val painting = getAttribute(player, attributeTempPainting, PaintingType.MAP_SMALL)
val messages = when (painting) {
PaintingType.ARTHUR -> arrayOf("PLACEHOLDER")
PaintingType.ELENA -> arrayOf("PLACEHOLDER")
PaintingType.ALVIS -> arrayOf("PLACEHOLDER")
PaintingType.MISC -> arrayOf("PLACEHOLDER")
PaintingType.DESERT -> arrayOf("PLACEHOLDER")
PaintingType.ISAFDAR -> arrayOf("PLACEHOLDER")
PaintingType.KARAMJA -> arrayOf("PLACEHOLDER")
PaintingType.LUMBRIDGE -> arrayOf("PLACEHOLDER")
PaintingType.MORYTANIA -> arrayOf("PLACEHOLDER")
PaintingType.MAP_SMALL -> arrayOf("PLACEHOLDER")
PaintingType.MAP_MEDIUM -> arrayOf("PLACEHOLDER")
PaintingType.MAP_LARGE -> arrayOf("PLACEHOLDER")
}
interpreter!!.sendDialogues(npc, ChatAnim.HALF_GUILTY, *messages)
}
goto("painting_options")
label("painting_accept")
exec { player, _ ->
val painting = getAttribute(player, attributeTempPainting, PaintingType.MAP_SMALL)
if (removeItem(player, Item(Items.COINS_995, painting.cost))) {
addItemOrDrop(player, painting.paintingId)
}
}
npc(ChatAnim.HALF_GUILTY, "There you go. Would you like another painting?")
goto("painting_options")
label("painting_refuse")
npc(ChatAnim.HALF_GUILTY, "well, mmm, maybe a different painting, mmm?")
goto("painting_options")
}
}
}