mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-23 19:35:10 -06:00
More work
This commit is contained in:
parent
c9db03a824
commit
e84df1e46c
2 changed files with 166 additions and 92 deletions
|
|
@ -1,8 +1,7 @@
|
|||
package content.global.skill.construction
|
||||
|
||||
import content.data.Quests
|
||||
import core.api.getQuestPoints
|
||||
import core.api.isQuestComplete
|
||||
import core.api.*
|
||||
import core.game.node.entity.player.Player
|
||||
import org.rs09.consts.Items
|
||||
|
||||
|
|
|
|||
|
|
@ -50,10 +50,10 @@ class SirReniteeDialogueFile : DialogueLabeller() {
|
|||
|
||||
private fun selectPainting(painting: PaintingType, labelName: String) {
|
||||
label(labelName)
|
||||
exec { player, _ ->
|
||||
setAttribute(player, attributeTempPainting, painting)
|
||||
loadLabel(player, "painting_buy")
|
||||
}
|
||||
exec { player, _ ->
|
||||
setAttribute(player, attributeTempPainting, painting)
|
||||
loadLabel(player, "painting_buy")
|
||||
}
|
||||
}
|
||||
|
||||
override fun addConversation() {
|
||||
|
|
@ -141,7 +141,7 @@ class SirReniteeDialogueFile : DialogueLabeller() {
|
|||
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) {
|
||||
if (amountInInventory(player, Items.COINS_995) < CrestType.MISTHALIN.cost) {
|
||||
loadLabel(player, "no_money")
|
||||
} else {
|
||||
loadLabel(player, "choose_symbol")
|
||||
|
|
@ -231,28 +231,28 @@ class SirReniteeDialogueFile : DialogueLabeller() {
|
|||
val messages = when (crest) {
|
||||
CrestType.ARRAV ->
|
||||
arrayOf("Ah yes, the shield that you helped to retrieve. You have",
|
||||
"certainly earned the right to wear its symbol.")
|
||||
"certainly earned the right to wear its symbol.")
|
||||
CrestType.ASGARNIA ->
|
||||
arrayOf("Ah, splendid, splendid. There is no better symbol",
|
||||
"than that of our fair land!")
|
||||
"than that of our fair land!")
|
||||
CrestType.DORGESHUUN ->
|
||||
arrayOf("Ah yes, our new neighbours under Lumbridge. I hear",
|
||||
"you were the one who made contact with them, jolly good.")
|
||||
"you were the one who made contact with them, jolly good.")
|
||||
CrestType.DRAGON ->
|
||||
arrayOf("I see you are a mighty dragon-slayer! You have",
|
||||
"certainly earned the right to wear a dragon symbol.")
|
||||
"certainly earned the right to wear a dragon symbol.")
|
||||
CrestType.FAIRY ->
|
||||
arrayOf("Hmm, mmm, yes, everyone likes pretty fairies.")
|
||||
CrestType.GUTHIX ->
|
||||
arrayOf("Guthix, god of balance! I'm a Saradominist myself,",
|
||||
"you know, but we all find meaning in our own way, what?")
|
||||
"you know, but we all find meaning in our own way, what?")
|
||||
CrestType.HAM ->
|
||||
arrayOf("Hmm, I'm not sure I like that HAM group, their",
|
||||
"beliefs are a little extreme for me.", "But if that's what you want.")
|
||||
"beliefs are a little extreme for me.", "But if that's what you want.")
|
||||
CrestType.HORSE ->
|
||||
arrayOf("Ah, I see you've brought a toy horse for me to see. An",
|
||||
"interesting beast. Certainly you can use that as your",
|
||||
"crest if you like, although it seems a bit strange to me.")
|
||||
"interesting beast. Certainly you can use that as your",
|
||||
"crest if you like, although it seems a bit strange to me.")
|
||||
CrestType.JOGRE ->
|
||||
arrayOf("A Jungle Ogre, eh? Odd beast, very odd.")
|
||||
CrestType.KANDARIN ->
|
||||
|
|
@ -261,16 +261,16 @@ class SirReniteeDialogueFile : DialogueLabeller() {
|
|||
arrayOf("Ah, the fair land of Lumbridge and Varrock.")
|
||||
CrestType.SARADOMIN ->
|
||||
arrayOf("Ah, the great god Saradomin! May he smile on your house",
|
||||
"as you adorn it with his symbol!")
|
||||
"as you adorn it with his symbol!")
|
||||
CrestType.SKULL ->
|
||||
arrayOf("Of, of course you can have a skull symbol, ${if (player.isMale) "sir" else "madam"}!")
|
||||
CrestType.VARROCK ->
|
||||
arrayOf("Ah, Varrock, a fine city!")
|
||||
CrestType.ZAMORAK ->
|
||||
arrayOf("The god of Chaos? It is a terrible thing to worship",
|
||||
"that evil being. But if that is what you wish...")
|
||||
"that evil being. But if that is what you wish...")
|
||||
else ->
|
||||
arrayOf("Error! Report this please!")
|
||||
arrayOf("This shouldn't be happening. Please report this.")
|
||||
}
|
||||
interpreter!!.sendDialogues(npc, ChatAnim.HALF_GUILTY, *messages)
|
||||
}
|
||||
|
|
@ -280,39 +280,33 @@ class SirReniteeDialogueFile : DialogueLabeller() {
|
|||
val crest = getAttribute(player, attributeTempCrest, CrestType.MISTHALIN)
|
||||
val messages = when (crest) {
|
||||
CrestType.ARRAV ->
|
||||
arrayOf("PLACEHOLDER")
|
||||
CrestType.ASGARNIA ->
|
||||
arrayOf("PLACEHOLDER")
|
||||
arrayOf("But that legendary shield is still lost! I don't think",
|
||||
"it would be proper for you to wear its symbol.")
|
||||
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")
|
||||
arrayOf("When the dragon on Crandor Isle remains undefeated? I",
|
||||
"think you should prove yourself a dragon-slayer before",
|
||||
"you can wear a dragon symbol!")
|
||||
CrestType.FAIRY ->
|
||||
arrayOf("PLACEHOLDER")
|
||||
arrayOf("A fairy? Fairies are rumoured to exist in a lost city",
|
||||
"somewhere. I don't think I should let you use them as",
|
||||
"a symbol until you have met them in person.")
|
||||
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.JOGRE ->
|
||||
arrayOf("PLACEHOLDER")
|
||||
CrestType.KANDARIN ->
|
||||
arrayOf("PLACEHOLDER")
|
||||
CrestType.MISTHALIN ->
|
||||
arrayOf("PLACEHOLDER")
|
||||
"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;",
|
||||
"perhaps some other symbol would suit you better.")
|
||||
CrestType.VARROCK ->
|
||||
arrayOf("PLACEHOLDER")
|
||||
else -> arrayOf("[MISSING DIALOGUE - NOT ELIGIBLE]")
|
||||
"perhaps some other symbol would suit you better.")
|
||||
else ->
|
||||
arrayOf("This shouldn't be happening. Please report this.")
|
||||
}
|
||||
interpreter!!.sendDialogues(npc, ChatAnim.HALF_GUILTY, *messages)
|
||||
}
|
||||
|
|
@ -329,9 +323,8 @@ class SirReniteeDialogueFile : DialogueLabeller() {
|
|||
|
||||
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
|
||||
if (CrestType.MONEY.eligible(player) && removeItem(player, Item(Items.COINS_995, CrestType.MONEY.cost))) {
|
||||
player.houseManager.crest = CrestType.MONEY
|
||||
loadLabel(player, "money_ok")
|
||||
} else {
|
||||
loadLabel(player, "no_money")
|
||||
|
|
@ -351,42 +344,48 @@ class SirReniteeDialogueFile : DialogueLabeller() {
|
|||
*/
|
||||
|
||||
label("painting")
|
||||
npc(ChatAnim.HALF_GUILTY, "Would you like a portrait or an, mmm, a landscape? Or a map, maybe?")
|
||||
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),
|
||||
DialogueOption("portrait", "A portrait", "A portrait please.", expression = ChatAnim.HALF_GUILTY),
|
||||
DialogueOption("landscape", "A landscape", "A landscape please.", expression = ChatAnim.HALF_GUILTY),
|
||||
DialogueOption("map", "A map", "A map please.", expression = ChatAnim.HALF_GUILTY),
|
||||
)
|
||||
|
||||
/**
|
||||
* PORTRAITS
|
||||
* PAINTING MENUS
|
||||
*/
|
||||
|
||||
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?")
|
||||
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),
|
||||
DialogueOption("portrait_elena", "Elena of Ardougne", skipPlayer = true),
|
||||
DialogueOption("portrait_alvis", "King Alvis of Keldagrim", skipPlayer = true),
|
||||
DialogueOption("portrait_misc", "The Prince and Princess of Miscellania", skipPlayer = true),
|
||||
)
|
||||
|
||||
/**
|
||||
* LANDSCAPES
|
||||
*/
|
||||
|
||||
label("landscape")
|
||||
npc(ChatAnim.HALF_GUILTY, "Would you like a portrait or an, mmm, a landscape? Or a map, maybe?")
|
||||
|
||||
/**
|
||||
* MAPS
|
||||
*/
|
||||
npc(ChatAnim.HALF_GUILTY, "Mmm, well, I can paint a few places. Where have you", "had your adventures?")
|
||||
options(
|
||||
DialogueOption("landscape_lumbridge", "The River Lum", skipPlayer = true),
|
||||
DialogueOption("landscape_desert", "The Kharid desert", skipPlayer = true),
|
||||
DialogueOption("landscape_morytania", "Morytania", skipPlayer = true),
|
||||
DialogueOption("landscape_karamja", "Karamja", skipPlayer = true),
|
||||
DialogueOption("landscape_isafdar", "Isafdar", skipPlayer = true),
|
||||
)
|
||||
|
||||
label("map")
|
||||
npc(ChatAnim.HALF_GUILTY, "Would you like a portrait or an, mmm, a landscape? Or a map, maybe?")
|
||||
npc(ChatAnim.HALF_GUILTY, "Mmm, yes, ah, I have painted maps of the known world",
|
||||
"on several different sizes of parchment. Which size", "would you like?")
|
||||
options(
|
||||
DialogueOption("map_small", "Small", skipPlayer = true),
|
||||
DialogueOption("map_medium", "Medium", skipPlayer = true),
|
||||
DialogueOption("map_large", "Large", skipPlayer = true),
|
||||
)
|
||||
|
||||
/**
|
||||
* PAINTING CHECKOUT
|
||||
|
|
@ -399,7 +398,7 @@ class SirReniteeDialogueFile : DialogueLabeller() {
|
|||
selectPainting(PaintingType.DESERT, "landscape_desert")
|
||||
selectPainting(PaintingType.ISAFDAR, "landscape_isafdar")
|
||||
selectPainting(PaintingType.KARAMJA, "landscape_karamja")
|
||||
selectPainting(PaintingType.LUMBRIDGE, "portrait_lumbridge")
|
||||
selectPainting(PaintingType.LUMBRIDGE, "landscape_lumbridge")
|
||||
selectPainting(PaintingType.MORYTANIA, "landscape_morytania")
|
||||
selectPainting(PaintingType.MAP_SMALL, "map_small")
|
||||
selectPainting(PaintingType.MAP_MEDIUM, "map_medium")
|
||||
|
|
@ -408,45 +407,114 @@ class SirReniteeDialogueFile : DialogueLabeller() {
|
|||
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")
|
||||
if (painting.eligible(player)) {
|
||||
loadLabel(player, "painting_show_cost")
|
||||
} else {
|
||||
loadLabel(player, "painting_buy_fail")
|
||||
}
|
||||
}
|
||||
|
||||
label("painting_buy_ok")
|
||||
npc(ChatAnim.HALF_GUILTY, "That will be, mmm, ${painting.cost} coins please.")
|
||||
label("painting_show_cost")
|
||||
manual { player, _ ->
|
||||
val painting = getAttribute(player, attributeTempPainting, PaintingType.MAP_SMALL)
|
||||
interpreter!!.sendDialogues(npc, ChatAnim.HALF_GUILTY, "That will be, mmm, ${painting.cost} coins please.")
|
||||
}
|
||||
exec { player, _ ->
|
||||
val painting = getAttribute(player, attributeTempPainting, PaintingType.MAP_SMALL)
|
||||
if (inInventory(player, Items.COINS_995, painting.cost)) {
|
||||
loadLabel(player, "painting_buy_confirm")
|
||||
} else {
|
||||
loadLabel(player, "no_money")
|
||||
}
|
||||
}
|
||||
|
||||
label("painting_buy_confirm")
|
||||
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")
|
||||
manual { player, _ ->
|
||||
val painting = getAttribute(player, attributeTempPainting, PaintingType.MAP_SMALL)
|
||||
val messages = when (painting) {
|
||||
PaintingType.ARTHUR ->
|
||||
arrayOf("Do you have, mmm, a connection with King Arthur? He",
|
||||
"wouldn't like me to just give his picture to anyone.")
|
||||
PaintingType.ELENA ->
|
||||
arrayOf("The last I heard, Elena was, mmm, trapped in West",
|
||||
"Ardougne. I wouldn't feel right selling her portrait",
|
||||
"while she was in danger.")
|
||||
PaintingType.ALVIS ->
|
||||
arrayOf("Have you ever been to Keldagrim? I think I'd need you",
|
||||
"to jog my memory...")
|
||||
PaintingType.MISC ->
|
||||
arrayOf("Do you have some connection with the prince and",
|
||||
"princess? I wouldn't want to give out their picture to",
|
||||
"just anyone?")
|
||||
PaintingType.DESERT ->
|
||||
arrayOf("Mmm, I'm not sure you've had enough adventures in the",
|
||||
"desert to deserve a painting of it.")
|
||||
PaintingType.ISAFDAR ->
|
||||
arrayOf("Mmm, I'm not sure you've had enough adventures in",
|
||||
"Isafdar to deserve a painting of it.")
|
||||
PaintingType.KARAMJA ->
|
||||
arrayOf("Mmm, I'm not sure you've had enough adventures in",
|
||||
"Karamja to deserve a painting of it.")
|
||||
PaintingType.LUMBRIDGE ->
|
||||
arrayOf("Mmm, I'm not sure you've had enough adventures in",
|
||||
"Lumbridge to deserve a painting of it.")
|
||||
PaintingType.MORYTANIA ->
|
||||
arrayOf("Mmm, I'm not sure you've had enough adventures in",
|
||||
"Morytania to deserve a painting of it.")
|
||||
PaintingType.MAP_SMALL, PaintingType.MAP_MEDIUM, PaintingType.MAP_LARGE ->
|
||||
arrayOf("Mmm, I'm not sure you've had enough adventures in the",
|
||||
"world to deserve that map.")
|
||||
}
|
||||
interpreter!!.sendDialogues(npc, ChatAnim.HALF_GUILTY, *messages)
|
||||
}
|
||||
interpreter!!.sendDialogues(npc, ChatAnim.HALF_GUILTY, *messages)
|
||||
}
|
||||
goto("painting_options")
|
||||
manual { player, _ ->
|
||||
val painting = getAttribute(player, attributeTempPainting, PaintingType.MAP_SMALL)
|
||||
val messages = when (painting) {
|
||||
PaintingType.ARTHUR ->
|
||||
arrayOf("To buy the portrait of King Arthur you must have",
|
||||
"completed The Holy Grail.")
|
||||
PaintingType.ELENA ->
|
||||
arrayOf("To buy the portrait of Elena you must have completed",
|
||||
"the Plague City quest.")
|
||||
PaintingType.ALVIS ->
|
||||
arrayOf("To buy the portrait of the Giant Dwarf"/*sic*/+" you must have",
|
||||
"completed The Giant Dwarf.")
|
||||
PaintingType.MISC ->
|
||||
arrayOf("To buy the portrait of the Prince and Princess of",
|
||||
"Miscellania you must have completed The Throne of",
|
||||
"Miscellania.")
|
||||
PaintingType.DESERT ->
|
||||
arrayOf("To buy the painting of the desert you must have",
|
||||
"completed Tourist Trap, The Feud, and The Golem.")
|
||||
PaintingType.ISAFDAR ->
|
||||
arrayOf("To buy the painting of Isafdar you must have completed",
|
||||
"Roving Elves.")
|
||||
PaintingType.KARAMJA ->
|
||||
arrayOf("To buy the painting of Karamja you must have completed",
|
||||
"Pirate's Treasure, Tai Bwo Wannai Trio, and Shilo Village.")
|
||||
PaintingType.LUMBRIDGE ->
|
||||
arrayOf("To buy the painting of the Lum you must have completed",
|
||||
"Cook's Assistant, Rune Mysteries, and The Restless Ghost.")
|
||||
PaintingType.MORYTANIA ->
|
||||
arrayOf("To buy the painting of Morytania you must have completed",
|
||||
"Shades of Mort'ton, The Creature of Fenkenstrain,",
|
||||
"Ghosts Ahoy, and The Haunted Mine.")
|
||||
PaintingType.MAP_SMALL ->
|
||||
arrayOf("To buy a small map you must have 51 Quest Points.")
|
||||
PaintingType.MAP_MEDIUM ->
|
||||
arrayOf("To buy a medium map you must have 101 Quest Points.")
|
||||
PaintingType.MAP_LARGE ->
|
||||
arrayOf("To buy a large map you must have 151 Quest Points.")
|
||||
}
|
||||
interpreter!!.sendDialogue(*messages)
|
||||
}
|
||||
goto("painting_reset")
|
||||
|
||||
label("painting_accept")
|
||||
exec { player, _ ->
|
||||
|
|
@ -459,9 +527,16 @@ class SirReniteeDialogueFile : DialogueLabeller() {
|
|||
goto("painting_options")
|
||||
|
||||
label("painting_refuse")
|
||||
npc(ChatAnim.HALF_GUILTY, "well, mmm, maybe a different painting, mmm?")
|
||||
npc(ChatAnim.HALF_GUILTY, "Well, mmm, maybe a different painting, mmm?")
|
||||
goto("painting_options")
|
||||
|
||||
}
|
||||
label("painting_reset")
|
||||
npc(ChatAnim.HALF_GUILTY, "Would you like a different painting?")
|
||||
options(
|
||||
DialogueOption("portrait", "Yes - a portrait", "A portrait please.", expression = ChatAnim.HALF_GUILTY),
|
||||
DialogueOption("landscape", "Yes - a landscape", "A landscape please.", expression = ChatAnim.HALF_GUILTY),
|
||||
DialogueOption("map", "Yes - a map", "A map please.", expression = ChatAnim.HALF_GUILTY),
|
||||
DialogueOption("nothing", "No, thanks.", expression = ChatAnim.HALF_GUILTY),
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue