Made it less snazzy

This commit is contained in:
Bishop 2026-06-20 22:12:01 -05:00
parent b5254004df
commit ece0365f56

View file

@ -34,58 +34,15 @@ class SirReniteeDialogue : InteractionListener {
class SirReniteeDialogueFile : DialogueLabeller() {
private companion object {
// Attributes
const val attributeCrest = "/save:sir-renitee-assigned-crest"
const val attributeTempCrest = "sir-renitee-temp-crest"
// Generic labels
const val labelNothing = "nothing"
const val labelIntro = "intro"
// Crest labels
const val labelFamilyCrest = "family-crest"
const val labelNoConstructionLevel = "no-construction-level"
const val labelHasConstructionLevel = "has-construction-level"
const val labelShowExistingCrest = "show-existing-crest"
const val labelShowNewCrest = "show-new-crest"
const val labelCrestOptions = "crest-options"
const val labelThanks = "thanks"
const val labelChangeCrest = "change-crest"
const val labelNoMoney = "no-money"
const val labelChooseSymbol = "choose-symbol"
const val labelCrestPage1 = "crest-page1"
const val labelCrestPage2 = "crest-page2"
const val labelCrestPage3 = "crest-page3"
const val labelCrestPage4 = "crest-page4"
const val labelCrestArrav = "crest-arrav"
const val labelCrestAsgarnia = "crest-asgarnia"
const val labelCrestDorgeshuun = "crest-dorgeshuun"
const val labelCrestDragon = "crest-dragon"
const val labelCrestFairy = "crest-fairy"
const val labelCrestGuthix = "crest-guthix"
const val labelCrestHam = "crest-ham"
const val labelCrestHorse = "crest-horse"
const val labelCrestJogre = "crest-jogre"
const val labelCrestKandarin = "crest-kandarin"
const val labelCrestMisthalin = "crest-misthalin"
const val labelCrestMoney = "crest-money"
const val labelCrestSaradomin = "crest-saradomin"
const val labelCrestSkull = "crest-skull"
const val labelCrestVarrock = "crest-varrock"
const val labelCrestZamorak = "crest-zamorak"
const val labelCrestBuy = "crest-buy"
const val labelCrestBuyOk = "crest-buy-ok"
const val labelCrestBuyFail = "crest-buy-fail"
const val labelMoneyAgree = "money-agree"
const val labelMoneyOk = "money-ok"
const val labelMoneyRefuse = "money-refuse"
// Painting labels
const val labelPainting = "painting"
}
private fun selectCrest(crestType: CrestType, labelName: String) {
label(labelName)
exec { player, _ ->
setAttribute(player, attributeTempCrest, crestType)
loadLabel(player, labelCrestBuy)
loadLabel(player, "crest-buy")
}
}
@ -97,154 +54,154 @@ class SirReniteeDialogueFile : DialogueLabeller() {
npc(ChatAnim.HALF_GUILTY, "Hmm? What's that, young ${if (player!!.isMale) "man" else "woman"}? What can I do for", "you?")
options(
DialogueOption(labelIntro, "I don't know, what can you do for me?", expression = ChatAnim.HALF_GUILTY),
DialogueOption(labelNothing, "Nothing, thanks", spokenText = "Nothing, thanks.", expression = ChatAnim.HALF_GUILTY),
DialogueOption("intro", "I don't know, what can you do for me?", expression = ChatAnim.HALF_GUILTY),
DialogueOption("nothing", "Nothing, thanks", spokenText = "Nothing, thanks.", expression = ChatAnim.HALF_GUILTY),
)
label(labelNothing)
label("nothing")
npc(ChatAnim.HALF_GUILTY, "Mmm, well, see you some other time maybe.")
/**
* CREST DIALOGUE
*/
label(labelIntro)
label("intro")
npc(ChatAnim.HALF_GUILTY, "Hmm, well, mmm, do you have a family crest? I keep",
"track of every ${ServerConstants.SERVER_NAME} family, you know, so I might", "be able to find yours.")
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(labelFamilyCrest, "Can you see if I have a family crest?", expression = ChatAnim.HALF_GUILTY),
DialogueOption(labelPainting, "Can I buy a painting?", 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(labelFamilyCrest)
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, labelHasConstructionLevel)
loadLabel(player, "has-construction-level")
} else {
loadLabel(player, labelNoConstructionLevel)
loadLabel(player, "no-construction-level")
}
}
label(labelNoConstructionLevel)
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(labelHasConstructionLevel)
label("has-construction-level")
exec { player, _ ->
if (getAttribute(player, attributeCrest, false)) {
loadLabel(player, labelShowExistingCrest)
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, labelShowNewCrest)
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(labelShowExistingCrest)
label("show-existing-crest")
npc(ChatAnim.HALF_GUILTY, "According to my records, your crest is",
"${player!!.houseManager.crest.crestName}.")
goto(labelCrestOptions)
goto("crest-options")
label(labelShowNewCrest)
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(labelCrestOptions)
goto("crest-options")
label(labelCrestOptions)
label("crest-options")
options(
DialogueOption(labelChangeCrest, "I don't like that crest. Can I have a different one?", expression = ChatAnim.HALF_GUILTY),
DialogueOption(labelThanks, "Thanks!", 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(labelThanks)
label("thanks")
npc(ChatAnim.HALF_GUILTY, "You're welcome, my ${if (player!!.isMale) "boy" else "girl"}.")
label(labelChangeCrest)
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, labelNoMoney)
loadLabel(player, "no-money")
} else {
loadLabel(player, labelChooseSymbol)
loadLabel(player, "choose-symbol")
}
}
label(labelNoMoney)
label("no-money")
player(ChatAnim.HALF_GUILTY, "I'll have to go and get some money then.")
label(labelChooseSymbol)
label("choose-symbol")
npc(ChatAnim.HALF_GUILTY, "There are sixteen different symbols;", "which one would you like?")
goto(labelCrestPage1)
goto("crest-page1")
label(labelCrestPage1)
label("crest-page1")
options(
DialogueOption(labelCrestArrav, "Shield of Arrav", skipPlayer = true),
DialogueOption(labelCrestAsgarnia, "Asgarnia", skipPlayer = true),
DialogueOption(labelCrestDorgeshuun, "Dorgeshuun Symbol", skipPlayer = true),
DialogueOption(labelCrestDragon, "Dragon", skipPlayer = true),
DialogueOption(labelCrestPage2, "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(labelCrestPage2)
label("crest-page2")
options(
DialogueOption(labelCrestFairy, "Fairy", skipPlayer = true),
DialogueOption(labelCrestGuthix, "Guthix", skipPlayer = true),
DialogueOption(labelCrestHam, "HAM", skipPlayer = true),
DialogueOption(labelCrestHorse, "Horse", skipPlayer = true),
DialogueOption(labelCrestPage3, "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(labelCrestPage3)
label("crest-page3")
options(
DialogueOption(labelCrestJogre, "Jogre", skipPlayer = true),
DialogueOption(labelCrestKandarin, "Kandarin", skipPlayer = true),
DialogueOption(labelCrestMisthalin, "Misthalin", skipPlayer = true),
DialogueOption(labelCrestMoney, "Money", skipPlayer = true),
DialogueOption(labelCrestPage4, "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(labelCrestPage4)
label("crest-page4")
options(
DialogueOption(labelCrestSaradomin, "Saradomin", skipPlayer = true),
DialogueOption(labelCrestSkull, "Skull", skipPlayer = true),
DialogueOption(labelCrestVarrock, "Varrock", skipPlayer = true),
DialogueOption(labelCrestZamorak, "Zamorak", skipPlayer = true),
DialogueOption(labelCrestPage1, "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
*/
selectCrest(CrestType.ARRAV, labelCrestArrav)
selectCrest(CrestType.ASGARNIA, labelCrestAsgarnia)
selectCrest(CrestType.DORGESHUUN, labelCrestDorgeshuun)
selectCrest(CrestType.DRAGON, labelCrestDragon)
selectCrest(CrestType.FAIRY, labelCrestFairy)
selectCrest(CrestType.GUTHIX, labelCrestGuthix)
selectCrest(CrestType.HAM, labelCrestHam)
selectCrest(CrestType.HORSE, labelCrestHorse)
selectCrest(CrestType.JOGRE, labelCrestJogre)
selectCrest(CrestType.KANDARIN, labelCrestKandarin)
selectCrest(CrestType.MISTHALIN, labelCrestMisthalin)
selectCrest(CrestType.SARADOMIN, labelCrestSaradomin)
selectCrest(CrestType.SKULL, labelCrestSkull)
selectCrest(CrestType.VARROCK, labelCrestVarrock)
selectCrest(CrestType.ZAMORAK, labelCrestZamorak)
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(labelCrestBuy)
label("crest-buy")
exec { player, _ ->
val crest = getAttribute(player, attributeTempCrest, CrestType.ARRAV)
if (crest.eligible(player) && removeItem(player, Item(Items.COINS_995, crest.cost))) {
@ -252,13 +209,13 @@ class SirReniteeDialogueFile : DialogueLabeller() {
if (crest == CrestType.SARADOMIN && !player.achievementDiaryManager.getDiary(DiaryType.FALADOR).isComplete(2, 1)) {
player.achievementDiaryManager.getDiary(DiaryType.FALADOR).updateTask(player, 2, 1, true)
}
loadLabel(player, labelCrestBuyOk)
loadLabel(player, "crest-buy-ok")
} else {
loadLabel(player, labelCrestBuyFail)
loadLabel(player, "crest-buy-fail")
}
}
label(labelCrestBuyOk)
label("crest-buy-ok")
manual { player, _ ->
val crest = getAttribute(player, attributeTempCrest, CrestType.ARRAV)
val messages = when (crest) {
@ -308,7 +265,7 @@ class SirReniteeDialogueFile : DialogueLabeller() {
interpreter!!.sendDialogues(npc, ChatAnim.HALF_GUILTY, *messages)
}
label(labelCrestBuyFail)
label("crest-buy-fail")
manual { player, _ ->
val c = getAttribute(player, attributeTempCrest, CrestType.ARRAV)
val messages = when (c) {
@ -325,41 +282,41 @@ class SirReniteeDialogueFile : DialogueLabeller() {
}
interpreter!!.sendDialogues(npc, ChatAnim.HALF_GUILTY, *messages)
}
goto(labelCrestPage1)
goto("crest-page1")
// Money crest has a unique flow since Sir Renitee needs to check the player's cash stack a second time
label(labelCrestMoney)
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(labelMoneyAgree, "All right.", expression = ChatAnim.HALF_GUILTY),
DialogueOption(labelMoneyRefuse, "No way!", expression = ChatAnim.HALF_GUILTY),
DialogueOption("money-agree", "All right.", expression = ChatAnim.HALF_GUILTY),
DialogueOption("money-refuse", "No way!", expression = ChatAnim.HALF_GUILTY),
)
label(labelMoneyAgree)
label("money-agree")
exec { player, _ ->
val crest = CrestType.MONEY
if (crest.eligible(player) && removeItem(player, Item(Items.COINS_995, crest.cost))) {
player.houseManager.crest = crest
loadLabel(player, labelMoneyOk)
loadLabel(player, "money-ok")
} else {
loadLabel(player, labelNoMoney)
loadLabel(player, "no-money")
}
}
label(labelMoneyOk)
label("money-ok")
npc(ChatAnim.HALF_GUILTY, "Thank you very much! You may now use a money-bag", "as your symbol.")
label(labelMoneyRefuse)
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(labelCrestPage1)
goto("crest-page1")
/**
* PAINTING HANDLERS
*/
label(labelPainting)
label("painting")
npc(ChatAnim.HALF_GUILTY, "Would you like a portrait or an, mmm, a landscape? Or a map, maybe?")
}