Merge branch 'garden-of-tranquility-questlog' into 'master'

Draft: Garden of tranquility quest log

See merge request 2009scape/2009scape!1949
This commit is contained in:
Oven Bread 2025-11-30 14:06:04 +00:00
commit 912d627f83
3 changed files with 222 additions and 0 deletions

View file

@ -5939,6 +5939,10 @@
"npc_id": "2580",
"loc_data": "{2918,3535,0,1,0}-"
},
{
"npc_id": "2581",
"loc_data": "{3228,3477,0,1,0}-"
},
{
"npc_id": "2591",
"loc_data": "{4786,5106,0,1,6}-{2474,5145,0,1,2}-"
@ -12287,6 +12291,10 @@
"npc_id": "8171",
"loc_data": "{3281,3403,0,1,6}-"
},
{
"npc_id": "8175",
"loc_data": "{1904,5595,0,1,0}-"
},
{
"npc_id": "8227",
"loc_data": "{3135,3631,0,1,6}-"

View file

@ -0,0 +1,99 @@
package content.region.misthalin.varrock.quest.gardenoftranquility
import core.api.*
import core.game.node.entity.player.Player
import core.game.node.entity.player.link.quest.Quest
import core.game.node.entity.skill.Skills
import core.plugin.Initializable
import org.rs09.consts.Items
@Initializable
class GardenOfTranquility : Quest("Garden of Tranquility", 66, 65, 2, 553, 961, 0, 1, 60) {
companion object {
const val questName = "Garden of Tranquility"
fun hasRequirements(player: Player): Boolean {
return arrayOf(
hasLevelStat(player, Skills.FARMING, 25),
isQuestComplete(player, "Creature of Fenkenstrain"),
).all { it }
}
}
override fun drawJournal(player: Player, stage: Int) {
super.drawJournal(player, stage)
var line = 12
var stage = getStage(player)
var started = getQuestStage(player, questName) > 0
if(!started){
line(player, "To start this quest I need to speak to !!Queen Ellamaria?? in", line++)
line(player, "the !!eastern garden of Varrock Palace??.", line++)
line(player, "I need to complete the following quests:", line++)
line(player, "!!Creature of Fenkenstrain??", line++, player.questRepository.isComplete("Creature of Fenkenstrain"))
line(player, "Also, to complete this quest I need the following:", line++)
line(player, "!!Level 25 Farming??", line++, player.skills.getLevel(Skills.FARMING) >= 25)
} else {
line(player, "I spoke to Queen Ellamaria of Varrock Palace, and agreed", line++, true)
line(player, "to grow her a garden to surprise her husband, King Roald.", line++, true)
if (stage >= 20) {
line(player, "The Wise Old Man of Draynor Village told me more about the Ring", line++, true)
line(player, "of Charos, and unlocked its hidden powers. When worn, it", line++, true)
line(player, "can be used to influence the weak-minded.", line++, true)
} else if (stage >= 10) {
line(player, "I need to speak to the !!wise old man?? who can be found in", line++, false)
line(player, "!!Draynor Village?? - the Queen believes that he can help me", line++, false)
line(player, "!!to learn about diplomacy.", line++, false)
}
if (stage >= 100) {
// They disappear at the end
} else if (stage >= 10) {
// These are only crossed out when you plant them in the garden.
line(player, "I have so far grown these plants in the palace garden:", line++, false)
line(player, "!!Delphiniums?? (see Elstan near Falador)", line++, false)
line(player, "!!Pink orchids?? (see Lyra near Port Phasmatys)", line++, false)
line(player, "!!Yellow orchids?? (see Lyra near Port Phasmatys)", line++, false)
line(player, "!!Snowdrops?? (see Kragen near Ardougne)", line++, false)
line(player, "!!Burthorpe vine?? (see Bernald near Taverley)", line++, false)
line(player, "!!White rosebush?? (get seeds from the Monastery)", line++, false)
line(player, "!!Pink rosebush?? (get seeds from the Monastery)", line++, false)
line(player, "!!Red rosebush?? (get seeds from the Monastery)", line++, false)
line(player, "!!A White Tree?? (see Dantaera near Catherby)", line++, false)
line(player, "!!A statue of Saradomin?? (from Falador)", line++, false)
line(player, "!!A statue of a Misthalin King?? (from outside Lumbridge", line++, false)
line(player, "Castle)", line++, false)
}
if (stage >= 100) {
line(player, "I grew a garden for King Roald and then brought him to see it.", line++, true)
line(player, "He seemed very pleased with it - well, at least, after", line++, true)
line(player, "Queen Ellamaria had a little 'chat' with him.", line++, true)
line++
line(player,"<col=FF0000>QUEST COMPLETE!</col>", line)
}
}
}
override fun finish(player: Player) {
var ln = 10
super.finish(player)
player.packetDispatch.sendString("You have completed Garden of Tranquility!", 277, 4)
player.packetDispatch.sendItemZoomOnInterface(Items.COMPOST_POTION4_6470,230,277,5)
drawReward(player, "2 Quest Points", ln++)
drawReward(player, "5,000 Farming XP", ln++)
drawReward(player, "An Activated Ring of Charos", ln++)
drawReward(player, "A Supercompost Potion", ln++)
drawReward(player, "Some Seeds", ln++)
rewardXP(player, Skills.FARMING, 5000.0)
addItemOrDrop(player, Items.COMPOST_POTION4_6470, 1)
}
override fun newInstance(`object`: Any?): Quest {
return this
}
}

View file

@ -0,0 +1,115 @@
package content.region.misthalin.varrock.quest.gardenoftranquility
import core.api.*
import core.game.dialogue.*
import core.game.interaction.InteractionListener
import core.game.node.entity.npc.NPC
import org.rs09.consts.Items
import org.rs09.consts.NPCs
class QueenEllamariaDialogue : InteractionListener {
override fun defineListeners() {
on(NPCs.ELLAMARIA_2581, NPC, "talk-to") { player, node ->
DialogueLabeller.captureNPC(player, node as NPC)
openDialogue(player, QueenEllamariaDialogueFile(), node)
return@on true
}
}
class QueenEllamariaDialogueFile : DialogueLabeller() {
override fun addConversation() {
assignToIds(NPCs.ELLAMARIA_2581)
exec { player, npc ->
when(getQuestStage(player, GardenOfTranquility.questName)) {
10 -> loadLabel(player, "GardenOfTranquilityStage10")
else -> {
loadLabel(player, "GardenOfTranquilityStage0")
}
}
}
// https://www.youtube.com/watch?v=YPU8sMK27SM GOLDSMITH
// https://www.youtube.com/watch?v=EadBJMmSkgI COLD WAR
//https://www.youtube.com/watch?v=hdQeoVpIawk I'm not sure I should be putting this statue here -
label("GardenOfTranquilityStage0")
player("What's going on here? I see a lot of farming patches with nothing growing in them.")
npc("No, one has just had them installed. One has had the most marvellous idea to bring renewed happiness to one's own dearest husband.")
player("One? I'm not sure I understand you-")
npc("Oh dear - the common classes, oh how they fill one with intolerable levels of exasperation, I swear to be most true.")
player("Ri-ight ... if you say so, my lady. I'll be off then, if you don't mind-")
npc("Yes, be off with you, before I call the guards.")
player("No problem, sorry to have bothered you.")
exec { player, npc ->
if (GardenOfTranquility.hasRequirements(player)) {
loadLabel(player, "GardenOfTranquilityCanStart")
}
}
label("GardenOfTranquilityCanStart")
npc("Peasant - WAIT!!!")
player("Are you speaking to me?")
npc("Who else would I be speaking to, you funny little man?", "Of course you.")
player("Well for a moment there I thought there was a dog around here somewhere...")
npc("Oh yes, sarcasm - how amusing. No, no, peasant - I have a question to ask of you, and you are required to answer.")
player("Well, seeing as you put it so nicely...")
npc("Do you know of anyone who might have some degree of horticultural experience?")
player("If you are asking me do I know a gardener, then yes I", "do. I happen to be quite handy at farming myself, as it", "happens.")
npc("Oh, marvellous! Peasant, I hereby order you to assist me with a little project I have planned.")
player("You'll have to ask me nicely first.")
npc("Oh, what I have to deal with these days - to think this is", "what being a Queen has become. Very well then: would", "you ... good sir help me with a little project of mine?")
options(
DialogueOption("GardenOfTranquilityYes", "I would be happy to help someone who is so in touch with the people."),
DialogueOption("GardenOfTranquilityNo", "I would rather jump off the docks at Port Sarim.")
)
label("GardenOfTranquilityNo")
// Bitch is savage, someone call the fire department for a 1st degree burn
npc("Well don't allow one to delay you - it is probably the", "most constructive thing you could do with your life, to", "be honest.")
label("GardenOfTranquilityYes")
exec { player, npc ->
if(getQuestStage(player, GardenOfTranquility.questName) == 0) {
setQuestStage(player, GardenOfTranquility.questName, 10)
}
}
player("I would be happy to help someone who is so in touch with the people.")
npc("Ah, more sarcasm - wonderful. Well, it is nice to have a master of the fine art of gardening to assist me; in the absence of any such person, I gladly accept your service.")
player("I'm not sure if that's a compliment or not. Anyway, what would you like me to do, and what do I get out of it?")
npc("To answer your first question, you have noticed the new farming patches that we have had installed around us. We wish to grow many varied and exotic plants in them, to bring happiness back to my husband.")
player("King Roald?")
npc("The very same, and that's 'His Most Royal Majesty' to you. Now we come to the plants that one wishes you to grow in these patches. I would tell you all at once, but I fear that your small mind would not cope.")
player("Thanks, I'm sure. So tell me Queeny, how do I know which plants I am to get for you?")
npc("I have given you a list of the items that I need in each patch. One is sure that you will know how to use the list with each patch to find out what needs to go in each one. There is one more thing, though.")
line("(player receives the list called... List.)")
player("One listens with bated breath...")
npc("Obtaining the seeds may prove difficult if you go about it by hacking and slashing everything that moves. No, to gather these items you will need to employ a finer tactic; the art of persuasion.")
npc("You must go at once and converse with the wise old man who is said to dwell in Draynor Village; he may guide you in mastering this delicate and sophisticated ability.")
label("GardenOfTranquilityStage10")
options(
DialogueOption("GardenOfTranquilityHowMoveStatues", "How am I supposed to move statues all the way here?", expression=ChatAnim.THINKING),
DialogueOption("GardenOfTranquilityWhatToGet", "What I am supposed to be getting again?", expression=ChatAnim.THINKING),
DialogueOption("GardenOfTranquilityNeedWatering", "Will these patches need much in the way of watering?", expression=ChatAnim.THINKING) { player, npc ->
return@DialogueOption true
}
)
label("GardenOfTranquilityHowMoveStatues")
npc("You use the dormant object that lies between your ears, thats how. A statue may be far too heavy to carry but simplicity to push.") // simplicity is sic
player(ChatAnim.THINKING, "Push?")
exec { player, npc ->
if (!inInventory(player, Items.CONDUCTOR_4201)) {
addItemOrDrop(player, Items.CONDUCTOR_MOULD_4200)
} else {
}
}
npc("Yes peasant, push. Here - take this trolley. You can use it to push the statues here.")
// https://www.youtube.com/watch?v=fAKJiPsRuFg this has king roald stuff too very good.
label("GardenOfTranquilityStage60")
npc("So are you going to get Rollie then?")
player("No, I haven't spoken to Roll ... King Roald ... yet.")
npc("Well hurry along peasant. This garden will be such a", "wonderful surprise!")
}
}
}