Implemented some books

Abyssal book
Astronomy book
Gianne's cook book
Instruction manual
Binding book
Shaman's tome book
Nulodion's notes
This commit is contained in:
szumaster
2023-06-02 10:51:43 +00:00
committed by Ryan
parent bf91e47ddc
commit 047a2b818a
7 changed files with 1201 additions and 0 deletions
@@ -0,0 +1,131 @@
package content.region.kandarin.dialogue
import content.global.handlers.iface.BookInterface
import content.global.handlers.iface.BookLine
import content.global.handlers.iface.Page
import content.global.handlers.iface.PageSet
import core.api.setAttribute
import core.game.interaction.IntType
import core.game.interaction.InteractionListener
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.Items
@Initializable
class AstronomyBook : InteractionListener {
companion object {
private val TITLE = "The tales of Scorpius"
private val CONTENTS = arrayOf(
PageSet(
Page(
BookLine("A History of Astronomy", 55),
BookLine("in 2009Scape.", 56),
BookLine("", 57),
BookLine("At the start of the 4th age,", 58),
BookLine("a learned man by the", 59),
BookLine("name of Scorpius, known well", 60),
BookLine("for his powers of vision and", 61),
BookLine("magic, sought communion with", 62),
BookLine("the gods of the world.", 63),
BookLine("So many unanswered questions", 64),
BookLine("had he that devoted his entire", 65),
),
Page(
BookLine("life to this cause.", 66),
BookLine("After many years of study,", 67),
BookLine("seeking knowledge from the", 68),
BookLine("wise of that time, he developed", 69),
BookLine("a machine infused with", 70),
BookLine("magical power, infused with", 71),
BookLine("the ability to pierce", 72),
BookLine("into the heavens - a huge eye", 73),
BookLine("that gave the user", 74),
BookLine("incredible site, like never", 75),
BookLine("seen before.", 76),
)
),
PageSet(
Page(
BookLine("As time passed, Scorpius", 55),
BookLine("grew adept at using his", 56),
BookLine("specialized skills, and followed", 57),
BookLine("the movements of stars", 58),
BookLine("in 2009Scape, which are", 59),
BookLine("mapped and named, and still", 60),
BookLine("used to this day.", 61),
BookLine("", 62),
BookLine("Before long, Scorpius", 63),
BookLine("used his knowledge", 64),
BookLine("for predicting the future,", 65),
),
Page(
BookLine("and, in turn, he called upon", 66),
BookLine("the dark knowledge of", 67),
BookLine("Zamorakian worshipers", 68),
BookLine("to further his cause. Living", 69),
BookLine("underground, the followers", 70),
BookLine("of the dark god remained", 71),
BookLine("until the civilization of", 72),
BookLine("Ardougne grew in strength", 73),
BookLine("and control.", 74),
)
),
PageSet(
Page(
BookLine("The kings of that time", 55),
BookLine("worked to banish the", 56),
BookLine("Zamorakian followers in", 57),
BookLine("the area, hiding all", 58),
BookLine("reference to Scorpius's", 59),
BookLine("invention, due to", 60),
BookLine("its 'evil nature'.", 61),
BookLine("", 62),
BookLine("Years later, when the", 63),
BookLine("minds of the kings lent", 64),
BookLine("more towards the research", 65),
),
Page(
BookLine("of the unknown, the plans", 66),
BookLine("of Scorpius were uncovered", 67),
BookLine("and the heavenly eye", 68),
BookLine("constructed again. Since then,", 69),
BookLine("many have studied the ways of", 70),
BookLine("the astronomer, Scorpius", 71),
BookLine("and in his memory a grave", 72),
BookLine("was constructed near the", 73),
BookLine("Observatory. Some claim his", 74),
BookLine("ghost still wanders nearby,", 75),
BookLine("in torment as he seeks", 76),
)
),
PageSet(
Page(
BookLine("the secrets of the heavens", 55),
BookLine("that can never be solved.", 56),
BookLine("Tales tell that he will", 57),
BookLine("grant those adept in the", 58),
BookLine("arts of the astronomer a", 59),
BookLine("blessing of unusual power.", 60),
BookLine("", 61),
BookLine("Here ends the tale of", 62),
BookLine("how astronomy entered", 63),
BookLine("the known world.", 64),
)
),
)
}
private fun display(player: Player, pageNum: Int, buttonID: Int): Boolean {
BookInterface.pageSetup(player, BookInterface.FANCY_BOOK_3_49, TITLE, CONTENTS)
return true
}
override fun defineListeners() {
on(Items.ASTRONOMY_BOOK_600, IntType.ITEM, "read") { player, _ ->
setAttribute(player, "bookInterfaceCallback", ::display)
setAttribute(player, "bookInterfaceCurrentPage", 0)
display(player, 0, 0)
return@on true
}
}
}
@@ -0,0 +1,151 @@
package content.region.kandarin.dialogue
import content.global.handlers.iface.BookInterface
import content.global.handlers.iface.BookLine
import content.global.handlers.iface.Page
import content.global.handlers.iface.PageSet
import core.api.setAttribute
import core.game.interaction.IntType
import core.game.interaction.InteractionListener
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.Items
@Initializable
class BindingBook : InteractionListener {
companion object {
private val TITLE = "Book of Binding"
private val CONTENTS = arrayOf(
PageSet(
Page(
BookLine(" Book of Binding:", 60),
BookLine(" A treatise on Demons", 61),
),
Page(
BookLine("", 67),
BookLine(" -- Indexo --", 68),
BookLine(" Arcana: I", 71),
BookLine(" Instructo: II", 72),
BookLine(" Defeati: III", 73),
BookLine(" Enchanto: IIII", 74),
)
),
PageSet(
Page(
BookLine("Arcana I: Use holy water to", 55),
BookLine("determine possession. Slight", 56),
BookLine("appearance changes may be", 57),
BookLine("perceived when doused.", 58),
BookLine("", 59),
BookLine("Legendary Silverlight will help", 60),
BookLine("to defeat any demon by", 61),
BookLine("weakening it.", 62),
),
Page(
BookLine("Arcana II: Be wary of any", 66),
BookLine("demon, it may have special", 67),
BookLine("forms of attack.", 68),
BookLine("", 69),
BookLine("Use an Octagram of fire", 70),
BookLine("to confine unearthly", 71),
BookLine("creatures of the underworld", 72),
BookLine("- the perfect geometry", 73),
BookLine("confuses them.", 74),
BookLine("", 75),
BookLine("Eximus", 76),
)
),
PageSet(
Page(
BookLine("Instructo: Creation of holy", 55),
BookLine("water must be undertaken", 56),
BookLine("with determination and urgency.", 57),
BookLine("", 58),
BookLine("Take to yourself empty vials", 59),
BookLine("free of all liquids.", 60),
BookLine("", 61),
BookLine("Read warily the enchantment", 62),
BookLine("contained here within in order", 63),
BookLine("to magick the vial", 64),
),
Page(
BookLine("for the holding of holy or", 66),
BookLine("sacred water.", 67),
BookLine("", 68),
BookLine("Take utmost care as you", 69),
BookLine("enchant them. With great care", 70),
BookLine("and precision place the sacred", 71),
BookLine("water into the magicked vial", 73),
BookLine("and stopper it.", 74),
BookLine("", 75),
BookLine("Eximus", 76),
)
),
PageSet(
Page(
BookLine("Defeati... Ye dreaded", 55),
BookLine("demon will be of unholy", 56),
BookLine("power and abilities.", 57),
BookLine("", 58),
BookLine("Present thyself before", 59),
BookLine("the possessed with good", 60),
BookLine("intent and ready manner.", 61),
BookLine("", 62),
BookLine("With least obstruction", 63),
BookLine("and utmost solemnity hold", 64),
BookLine("open the pages of this", 65),
),
Page(
BookLine("great tome in order that", 66),
BookLine("the goodlight falls upon", 67),
BookLine("the victim completely.", 68),
BookLine("Be thee prepared in every", 69),
BookLine("capacity, for the demon's", 70),
BookLine("tricks and wiles will outwit", 71),
BookLine("the unready man. Attack with", 72),
BookLine("vigour and zest if thee hopes", 73),
BookLine("to see another day.", 74),
BookLine("", 75),
BookLine("Eximus", 76),
)
),
PageSet(
Page(
BookLine("Enchanto...", 55),
BookLine("", 56),
BookLine("Possessus valius emptious,", 57),
BookLine("projectus spellicus avoir valius", 58),
BookLine("magicus.", 59),
BookLine("", 60),
BookLine("Castus enchant avoir createur", 61),
BookLine("valius magicus holious avour", 62),
BookLine("defeati Demonicus Absolutus.", 63),
BookLine("", 64),
BookLine("Demonicus Absolutus.", 65),
),
Page(
BookLine("Extralias projectus Magicus", 66),
BookLine("Holarius Attackanie demonicus", 67),
BookLine("Absolutus distancie airus", 68),
BookLine("throwus armiues.", 69),
BookLine("", 70),
BookLine("Eximus", 71),
)
),
)
}
private fun display(player: Player, pageNum: Int, buttonID: Int): Boolean {
BookInterface.pageSetup(player, BookInterface.FANCY_BOOK_3_49, TITLE, CONTENTS)
return true
}
override fun defineListeners() {
on(Items.BINDING_BOOK_730, IntType.ITEM, "read") { player, _ ->
setAttribute(player, "bookInterfaceCallback", ::display)
setAttribute(player, "bookInterfaceCurrentPage", 0)
display(player, 0, 0)
return@on true
}
}
}
@@ -0,0 +1,340 @@
package content.region.kandarin.dialogue
import content.global.handlers.iface.BookInterface
import content.global.handlers.iface.BookLine
import content.global.handlers.iface.Page
import content.global.handlers.iface.PageSet
import core.api.setAttribute
import core.game.interaction.IntType
import core.game.interaction.InteractionListener
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.Items
@Initializable
class GiannesCookBook : InteractionListener {
companion object {
private val TITLE = "Gianne's cook book"
private val CONTENTS = arrayOf(
PageSet(
Page(
BookLine("Chocolate Bomb", 55),
BookLine("", 56),
BookLine("Knead a ball of Gianne", 57),
BookLine("dough into a gnomebowl mould.", 58),
BookLine("Bake this briefly. Decadently", 59),
BookLine("add four bars of chocolate", 60),
BookLine("to the bowl and top with", 61),
BookLine("one sprig of equa leaves.", 62),
BookLine("Bake the bowl in the oven", 63),
BookLine("to melt the chocolate.", 64),
BookLine("Then mix in two big dollops", 65),
),
Page(
BookLine("of cream and finally sprinkle", 66),
BookLine("chocolate dust all over.", 67),
BookLine("Chocolate is a relatively", 68),
BookLine("recent cooking ingredient", 69),
BookLine("for gnomes, having been", 70),
BookLine("imported from human lands.", 71),
)
),
PageSet(
Page(
BookLine("Tangled Toad's Legs", 55),
BookLine("", 56),
BookLine("Shape a portion of fresh Gianne", 57),
BookLine("dough into a gnomebowl mould.", 58),
BookLine("Bake this until it is", 59),
BookLine("slightly springy.", 60),
BookLine("Add to the bowl...", 61),
BookLine("", 62),
BookLine("4 pairs of toad's legs", 63),
BookLine("2 portions of cheese", 64),
BookLine("2 sprigs of equa leaves", 65),
),
Page(
BookLine("2 dashes of gnome spice", 66),
BookLine("1 bunch of dwellberries.", 67),
BookLine("", 68),
BookLine("Bake the dish in the oven", 69),
BookLine("once more prior to serving.", 70),
BookLine("Tangled Toads Legs was", 71),
BookLine("a special dish created", 72),
BookLine("by gnome chef Deelie to", 73),
BookLine("celebrate the first ", 74),
BookLine("Healthorg the Great Day.", 75),
)
),
PageSet(
Page(
BookLine("Worm Hole", 55),
BookLine("", 56),
BookLine("Starting with a gnomebowl", 57),
BookLine("mould, shape a portion of", 58),
BookLine("fresh Gianne dough into a", 59),
BookLine("rough bowl. Bake this", 60),
BookLine("until it is firm to the", 61),
BookLine("touch. Add to the bowl", 62),
BookLine("four king worms, two onions", 63),
BookLine("and a dash of gnome spices.", 64),
BookLine("Bake the bowl in the", 65),
),
Page(
BookLine("oven once more.", 66),
BookLine("To finish the dish simply", 67),
BookLine("add a topping of equa leaves.", 68),
BookLine("Worms are specially flavoured", 69),
BookLine("by gnomes as they", 70),
BookLine("purportedly add virility.", 71),
)
),
PageSet(
Page(
BookLine("Veg Ball", 55),
BookLine("", 56),
BookLine("As with all gnomebowl dishes,", 57),
BookLine("throw a ball of fresh Gianne", 58),
BookLine("dough into a mould. Bake this", 59),
BookLine("as usual. Bake this briefly.", 60),
BookLine("Add to the bowl two onions,", 61),
BookLine("two potatoes and a dash", 62),
BookLine("of gnome spices. Bake the bowl", 63),
BookLine("in the oven once more.", 64),
BookLine("To finish simply top with equa", 65),
),
Page(
BookLine("leaves. Vegetable dishes are", 66),
BookLine("seen as luxurious food, since", 67),
BookLine("for most of gnome history", 68),
BookLine("growing vegetables was harder", 69),
BookLine("than finding toads and worms.", 70),
)
),
PageSet(
Page(
BookLine("Worm Crunchies", 55),
BookLine("", 56),
BookLine("Using a crunchy tray,", 57),
BookLine("form a portion of Gianne", 58),
BookLine("dough into small evenly", 59),
BookLine("sized balls. Heat these briefly", 60),
BookLine("in an oven. Mix into the", 61),
BookLine("dough balls two king worms,", 62),
BookLine("one sprig of equa leaves", 63),
BookLine("and a shake of gnome spices.", 64),
BookLine("Bake the crunchies for a", 65),
),
Page(
BookLine("short time in the oven.", 66),
BookLine("Sprinkle generously with", 67),
BookLine("gnome spices to finish.", 68),
BookLine("Crunchies were invented", 69),
BookLine("accidentally by Pukkamay,", 70),
BookLine("who was Dellie's assistant", 71),
BookLine("before his sacking. He started", 72),
BookLine("a successful crunch making", 73),
BookLine("business before dying in a", 74),
BookLine("bizarre Terrorbird accident.", 75),
)
),
PageSet(
Page(
BookLine("Choc Chip Crunchies", 55),
BookLine("", 56),
BookLine("Fill up a crunchy tray with", 57),
BookLine("balls of Gianne dough. Heat", 58),
BookLine("these briefly in a warm oven.", 59),
BookLine("Break up two bars of chocolate", 60),
BookLine("and mix these with the balls", 61),
BookLine("of dough. Next add a little", 62),
BookLine("gnome spice to each ball.", 63),
BookLine("Bake the crunchies for a", 64),
BookLine("short time in the oven.", 65),
),
Page(
BookLine("Top the crunchies with a", 66),
BookLine("sprinkling of chocolate", 67),
BookLine("dust to finish.", 68),
BookLine("(A large chocolate stain", 69),
BookLine("covers the rest of the page.)", 70),
)
),
PageSet(
Page(
BookLine("Spicy Crunchies", 55),
BookLine("", 56),
BookLine("Using a crunchy tray,", 57),
BookLine("form a portion of Gianne", 58),
BookLine("dough into small evenly", 59),
BookLine("sized balls. Heat these briefly", 60),
BookLine("in a warm oven.", 61),
BookLine("Add a generous shake", 62),
BookLine("of spice and two sprigs of", 63),
BookLine("equa leaves to the dough balls.", 64),
BookLine("Bake the crunchies for a", 65),
),
Page(
BookLine("short time in the oven.", 66),
BookLine("Sprinkle a load more gnome", 67),
BookLine("spice over the cookies to finish.", 68),
BookLine("", 69),
BookLine("The special mix of herbs", 70),
BookLine("and spices in gnome spice", 71),
BookLine("is a closely guarded secret.", 72),
BookLine("It is rumoured to contain", 73),
BookLine("(the rest is scribbled out)", 74),
)
),
PageSet(
Page(
BookLine("Toad Crunchies", 55),
BookLine("", 56),
BookLine("Fill a crunchy tray with", 57),
BookLine("Gianne dough as normal.", 58),
BookLine("Heat these briefly in a", 59),
BookLine("warm oven. Mix into", 60),
BookLine("the dough balls two pairs", 61),
BookLine("of toad's legs and a", 62),
BookLine("shake of gnome spices.", 63),
BookLine("Bake the crunchies for a short", 64),
BookLine("time in the oven.", 65),
),
Page(
BookLine("Finish the crunchies with", 66),
BookLine("a sprinkling of equa leaves.", 67),
BookLine("", 68),
BookLine("When Pukkamay first made", 69),
BookLine("toad crunchies, everyone", 70),
BookLine("thought he was mad.", 71),
BookLine("'Chewy toads, in crunchies?", 72),
BookLine("It'll never work' they said", 73),
BookLine("- how wrong they were...", 74),
)
),
PageSet(
Page(
BookLine("Worm Batta", 55),
BookLine("", 56),
BookLine("First take some fresh", 57),
BookLine("Gianne dough and place it", 58),
BookLine("in a batta tin. Bake the", 59),
BookLine("dough until it is lightly", 60),
BookLine("browned. Take one king worm,", 61),
BookLine("some gnome spice and", 62),
BookLine("a little cheese. Add these", 63),
BookLine("to the batta before briefly", 64),
BookLine("baking it in the oven once more.", 65),
),
Page(
BookLine("Finish the batta with a", 66),
BookLine("topping of equa leaves.", 67),
BookLine("Battas are usually cooked by", 68),
BookLine("gnome mother during the", 69),
BookLine("cold winter months.", 70),
)
),
PageSet(
Page(
BookLine("Toad's Legs Batta", 55),
BookLine("", 56),
BookLine("Mould some Gianne dough", 57),
BookLine("into a batta tin.", 58),
BookLine("Bake the tin until it", 59),
BookLine("is almost cooked. Next add", 60),
BookLine("some prime toad's legs,", 61),
BookLine("a sprig of equa leaves", 62),
BookLine("and some spice along with", 63),
BookLine("some cheese to the batta.", 64),
BookLine("Bake the batta in the oven", 65),
),
Page(
BookLine("once more and serve hot.", 66),
BookLine("Toads legs battas are", 67),
BookLine("sometimes called Toad in", 68),
BookLine("the Hole. Apparently there", 69),
BookLine("is a similar human dish", 70),
BookLine("that uses sausages. How odd.", 71),
)
),
PageSet(
Page(
BookLine("Cheese & Tomato Batta", 55),
BookLine("", 56),
BookLine("Place some Gianne dough in a", 57),
BookLine("batta tin. Bake it as normal.", 58),
BookLine("Top the plain batta with equal", 59),
BookLine("quantities of cheese and tomato.", 60),
BookLine("Place the batta in the oven", 61),
BookLine("once more until all the cheese", 62),
BookLine("has melted. Finish the dish with", 63),
BookLine("a sprinkling of equa leaves.", 64),
BookLine("The combination of cheese", 65),
),
Page(
BookLine("and tomato was discovered", 66),
BookLine("by the explorer Wingstone", 67),
BookLine("while was visiting the human", 68),
BookLine("lands. Apparently it's used", 69),
BookLine("a lot in a strange flat", 70),
BookLine("human dish called a pizza.", 71),
)
),
PageSet(
Page(
BookLine("Fruit Batta", 55),
BookLine("", 56),
BookLine("Prepare Gianne dough in", 57),
BookLine("a batta tin as normal. Bake", 58),
BookLine("the dough for a short while.", 59),
BookLine("Top the batta with chunks of", 60),
BookLine("pineapple, orange and lime.", 61),
BookLine("Lay four sprigs of", 62),
BookLine("equa leaves on top of the", 63),
BookLine("batta before baking it in", 64),
BookLine("the oven once more. Finish", 65),
),
Page(
BookLine("the batta with a sprinkling", 66),
BookLine("of gnome spices. Battas are", 67),
BookLine("normally savoury dish,", 68),
BookLine("and the fruit batta is definitely", 69),
BookLine("an acquired taste.", 70),
)
),
PageSet(
Page(
BookLine("Vegetable Batta", 55),
BookLine("", 56),
BookLine("Place some Gianne dough in a", 57),
BookLine("batta tin and bake as normal.", 58),
BookLine("Add to the plain batta two", 59),
BookLine("tomatoes, one onion, one", 60),
BookLine("cabbage and some dwellberries.", 61),
BookLine("Top the batta with cheese and", 62),
BookLine("briefly place it in the oven", 63),
BookLine("once more. Finish the dish with", 64),
BookLine("with a sprinkling of equa leaves.", 65),
),
Page(
BookLine("There's no better batta", 66),
BookLine("than a vegetable batta.", 67),
)
),
)
}
private fun display(player: Player, pageNum: Int, buttonID: Int): Boolean {
BookInterface.pageSetup(player, BookInterface.FANCY_BOOK_3_49, TITLE, CONTENTS)
return true
}
override fun defineListeners() {
on(Items.GIANNES_COOK_BOOK_2167, IntType.ITEM, "read") { player, _ ->
setAttribute(player, "bookInterfaceCallback", ::display)
setAttribute(player, "bookInterfaceCurrentPage", 0)
display(player, 0, 0)
return@on true
}
}
}
@@ -0,0 +1,57 @@
package content.region.kandarin.dialogue
import content.global.handlers.iface.BookInterface
import content.global.handlers.iface.BookLine
import content.global.handlers.iface.Page
import content.global.handlers.iface.PageSet
import core.api.setAttribute
import core.game.interaction.IntType
import core.game.interaction.InteractionListener
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.Items
@Initializable
class ShamansTomeBook : InteractionListener {
companion object {
private val TITLE = "Shaman's Tome"
private val CONTENTS = arrayOf(
PageSet(
Page(
BookLine("You read the ancient", 55),
BookLine("shaman's tome.", 56),
BookLine("It is written in a strange sort", 57),
BookLine("of language but you manage", 58),
BookLine("a rough translation.", 59),
BookLine("", 60),
BookLine("...scattered are my hopes that", 61),
BookLine("I will ever be released from", 62),
BookLine("this flaming Octagram, it is", 63),
BookLine("the only thing which will", 64),
BookLine("contain this beast within.", 65),
),
Page(
BookLine("Although its grip over me is", 66),
BookLine("weakened with magic, it is", 67),
BookLine("hopeless to know if a", 68),
BookLine("saviour would guess this.", 69),
BookLine("I am doomed...", 70),
)
),
)
}
private fun display(player: Player, pageNum: Int, buttonID: Int): Boolean {
BookInterface.pageSetup(player, BookInterface.FANCY_BOOK_3_49, TITLE, CONTENTS)
return true
}
override fun defineListeners() {
on(Items.SHAMANS_TOME_729, IntType.ITEM, "read") { player, _ ->
setAttribute(player, "bookInterfaceCallback", ::display)
setAttribute(player, "bookInterfaceCurrentPage", 0)
display(player, 0, 0)
return@on true
}
}
}
@@ -0,0 +1,44 @@
package content.region.kandarin.quest.dwarfcannon
import content.global.handlers.iface.BookInterface
import content.global.handlers.iface.BookLine
import content.global.handlers.iface.Page
import content.global.handlers.iface.PageSet
import core.api.setAttribute
import core.game.interaction.IntType
import core.game.interaction.InteractionListener
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.Items
@Initializable
class NulodionsNotes : InteractionListener {
companion object {
private val TITLE = "Nulodion's notes"
private val CONTENTS = arrayOf(
PageSet(
Page(
BookLine("Ammo for the Dwarf Multi", 55),
BookLine("Cannon must be made from", 56),
BookLine("steel bars. The bars must be", 57),
BookLine("heated in a furnace and used", 58),
BookLine("with the ammo mould.", 59),
)
),
)
}
private fun display(player: Player, pageNum: Int, buttonID: Int): Boolean {
BookInterface.pageSetup(player, BookInterface.FANCY_BOOK_3_49, TITLE, CONTENTS)
return true
}
override fun defineListeners() {
on(Items.NULODIONS_NOTES_3, IntType.ITEM, "read") { player, _ ->
setAttribute(player, "bookInterfaceCallback", ::display)
setAttribute(player, "bookInterfaceCurrentPage", 0)
display(player, 0, 0)
return@on true
}
}
}
@@ -0,0 +1,97 @@
package content.region.kandarin.quest.dwarfcannon.dmc
import content.global.handlers.iface.BookInterface
import content.global.handlers.iface.BookLine
import content.global.handlers.iface.Page
import content.global.handlers.iface.PageSet
import core.api.setAttribute
import core.game.interaction.IntType
import core.game.interaction.InteractionListener
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.Items
@Initializable
class DMCManual : InteractionListener {
companion object {
private val TITLE = "Dwarf multicannon manual"
private val CONTENTS = arrayOf(
PageSet(
Page(
BookLine("<col=FF0000>Constructing the cannon</col>", 55),
BookLine("", 56),
BookLine("To construct the cannon, firstly", 57),
BookLine("set down the base of the cannon", 58),
BookLine("firmly onto the ground, next add", 59),
BookLine("the Dwarf stand to the cannon", 60),
BookLine("base then add the Barrels. Lastly", 61),
BookLine("add the Furnace, which powers", 62),
BookLine("the cannon. You should now have", 63),
BookLine("a fully set up Multi Cannon to", 64),
BookLine("splat nasty creatures!", 65),
),
Page(
BookLine("<col=FF0000>Making ammo</col>", 66),
BookLine("", 67),
BookLine("The ammo for the cannon", 68),
BookLine("is made from steel bars.", 69),
BookLine("Firstly you must heat up a", 70),
BookLine("steel bar in a furnace.", 71),
BookLine("Now pour the molten steel", 72),
BookLine("into a cannon ammo mould.", 73),
BookLine("You should now have a ready", 74),
BookLine("to fire Multi cannon ball.", 75),
)
),
PageSet(
Page(
BookLine("<col=FF0000>Firing the Cannon</col>", 55),
BookLine("", 56),
BookLine("The cannon will only fire", 57),
BookLine("when monsters are available", 58),
BookLine("to target. If you are carrying", 59),
BookLine("enough ammo the cannon will", 60),
BookLine("fire up to 30 rounds before it", 61),
BookLine("runs out and stops. The", 62),
BookLine("cannon will automatically target", 63),
BookLine("non friendly creatures.", 64),
),
Page(
BookLine("<col=FF0000>Dwarf Cannon Warranty</col>", 66),
BookLine("", 67),
BookLine("If your cannon is stolen or", 68),
BookLine("has been lost, after or during", 69),
BookLine("being being set up, the Dwarf", 70),
BookLine("engineer will replace the parts,", 71),
BookLine("however cannon parts that", 72),
BookLine("were given away or dropped", 73),
BookLine("will not be replaced for free.", 74),
BookLine("It is only possible to operate", 75),
BookLine("one cannon at a time.", 76),
)
),
PageSet(
Page(
BookLine("By order", 55),
BookLine("of the members of the noble", 56),
BookLine("Dwarven Black Guard.", 57),
)
),
)
}
private fun display(player: Player, pageNum: Int, buttonID: Int): Boolean {
BookInterface.pageSetup(player, BookInterface.FANCY_BOOK_3_49, TITLE, CONTENTS)
return true
}
override fun defineListeners() {
on(Items.INSTRUCTION_MANUAL_5, IntType.ITEM, "read") { player, _ ->
setAttribute(player, "bookInterfaceCallback", ::display)
setAttribute(player, "bookInterfaceCurrentPage", 0)
display(player, 0, 0)
return@on true
}
}
}
@@ -0,0 +1,381 @@
package content.region.misthalin.varrock.dialogue.surok
import content.global.handlers.iface.BookInterface
import content.global.handlers.iface.BookLine
import content.global.handlers.iface.Page
import content.global.handlers.iface.PageSet
import core.api.setAttribute
import core.game.interaction.IntType
import core.game.interaction.InteractionListener
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.Items
@Initializable
class AbyssalBook : InteractionListener {
companion object {
private val TITLE = "Abyssal book"
private val CONTENTS = arrayOf(
PageSet(
Page(
BookLine("A Compendium of Research", 55),
BookLine("Into Chaotic Space.", 56),
BookLine("Author Unknown", 57),
BookLine("", 58),
BookLine("The strange dimension that", 59),
BookLine("we have name 'Abyssal Space'", 60),
BookLine("is something of an enigma.", 61),
BookLine("It was first discovered during", 62),
BookLine("a routine teleportation", 63),
BookLine("experiment that seemingly", 64),
BookLine("went wrong. We are still", 65),
),
Page(
BookLine("not sure as to what caused", 66),
BookLine("this teleportation failure,", 67),
BookLine("but the discovery of a", 68),
BookLine("previously unknown dimension", 69),
BookLine("led to a flurry of", 70),
BookLine("research from the", 71),
BookLine("Zamorakian Magical Institute", 72),
BookLine("(henceforth known within", 73),
BookLine("(this document as the Z.M.I.).", 74),
)
),
PageSet(
Page(
BookLine("Under direct orders to examine", 55),
BookLine("this dimension, I feel I can", 56),
BookLine("accurately state the", 57),
BookLine("following conclusions.", 58),
BookLine("", 59),
BookLine("<col=FF0000>Conclusion One</col>", 60),
BookLine("", 61),
BookLine("Abyssal Space is not", 62),
BookLine("a dimension in the way", 63),
BookLine("that we understand the term", 64),
BookLine("from examples such as", 65),
),
Page(
BookLine("Zanaris or Feneskrae.", 66),
BookLine("", 67),
BookLine("Rather, it is the name", 68),
BookLine("we have given the dimension", 69),
BookLine("that exists between other", 70),
BookLine("more developed dimensions", 71),
)
),
PageSet(
Page(
BookLine("- the 'glue' that keeps", 55),
BookLine("each dimension together yet", 56),
BookLine("separate, if you will.", 57),
BookLine("", 58),
BookLine("The Abyssal space's existence", 59),
BookLine("at the 'fringe' of reality,", 60),
BookLine("means that it does not", 61),
BookLine("confirm to the same guidelines", 62),
BookLine("of space and time as Gielinor", 63),
BookLine("does; you may enter it and", 64),
BookLine("then leave it from an", 65),
),
Page(
BookLine("identical spot, yet", 66),
BookLine("", 67),
BookLine("reappear many hundreds of", 68),
BookLine("miles at your target", 69),
BookLine("destination", 70),
BookLine("(the 'teleportation'", 71),
BookLine("phenomenon that we use daily).", 72),
)
),
PageSet(
Page(
BookLine("From this basic concept,", 55),
BookLine("I have extrapolated that", 56),
BookLine("all teleport magics in", 57),
BookLine("fact use Abyssal Space", 58),
BookLine("to make the passing of great", 59),
BookLine("distances occur in", 60),
BookLine("a very short space", 61),
BookLine("of time, from our perception.", 62),
BookLine("", 63),
BookLine("What is actually happening,", 64),
BookLine("is that the spellcaster is", 65),
),
Page(
BookLine("entering abyssal space,", 66),
BookLine("and then immediately", 67),
BookLine("leaving again,", 68),
BookLine("with certain values as to speed", 69),
BookLine("and direction being taken care", 70),
BookLine("of in our spellingcasting to", 71),
BookLine("allow some degree of precision", 72),
BookLine("in these teleports.", 73),
)
),
PageSet(
Page(
BookLine("More worryingly,", 55),
BookLine("it seems apparent that", 56),
BookLine("the barriers between", 57),
BookLine("our dimensional space", 58),
BookLine("and abyssal space have", 59),
BookLine("become somewhat weakened", 60),
BookLine("through excessive use", 61),
BookLine("There have been isolated", 62),
BookLine("reports within the Z.M.I.", 63),
BookLine("that creatures not native", 64),
BookLine("to our dimension have entered", 65),
),
Page(
BookLine("Gielinor through", 66),
BookLine("abyssal space,", 67),
BookLine("as well as the teleportation", 68),
BookLine("malfunction that first", 69),
BookLine("resulted in our discovery", 70),
BookLine("of this dimension.", 71),
)
),
PageSet(
Page(
BookLine("I strongly recommend that", 55),
BookLine("further research is taken", 56),
BookLine("- if the barriers between", 57),
BookLine("these dimensions are", 58),
BookLine("sufficiently weakened,", 59),
BookLine("there ma exist the", 60),
BookLine("possibility of an alternative", 61),
BookLine("method to proceed", 62),
BookLine("with Operation:", 63),
BookLine("Transient without altering", 64),
BookLine("the other deities to our plans.", 65),
),
Page(
BookLine("<col=FF0000>Conclusion Two</col>", 66),
BookLine("", 67),
BookLine("When we have accepted", 68),
BookLine("that Abyssal Space is", 69),
BookLine("somewhat of a tesseract", 70),
BookLine("or hypercube with a direct", 71),
BookLine("relation to our dimension,", 72),
BookLine("then the benefits of", 73),
BookLine("exploiting this resource", 74),
BookLine("become more obvious.", 75),
)
),
PageSet(
Page(
BookLine("I ran some experiments", 55),
BookLine("with Sample XJ13", 56),
BookLine("(also known as 'rune essence')", 57),
BookLine("and managed to place six", 58),
BookLine("parts in a space that would", 59),
BookLine("seemingly only hold one.", 60),
BookLine("Continued", 61),
BookLine("experimentation with these", 62),
BookLine("stolen samples showed that", 63),
BookLine("moving items between our", 64),
BookLine("dimension and abyssal space", 65),
),
Page(
BookLine("degraded the use of these", 66),
BookLine("pouches, but a simple", 67),
BookLine("transfiguration spell", 68),
BookLine("when cast within the abyss", 69),
BookLine("upon these pouches restored", 70),
BookLine("their usage back to", 71),
BookLine("the original results.", 72),
)
),
PageSet(
Page(
BookLine("Should we ever locate the", 55),
BookLine("source of these 'essence'", 56),
BookLine("that the Wizard Tower", 57),
BookLine("seem to have an endless", 58),
BookLine("supply of, I would strongly", 59),
BookLine("recommend the harvesting of", 60),
BookLine("these creatures for their", 61),
BookLine("organs so as to maximize", 62),
BookLine("the efficiency of our", 63),
BookLine("rune manufacturing process.", 64),
),
Page(
BookLine("Some degree of caution will", 66),
BookLine("be necessary, as the creatures", 67),
BookLine("the creatures of the abyss", 68),
BookLine("are seemingly very aggressive.", 69),
),
),
PageSet(
Page(
BookLine("<col=FF0000>Conclusion Three</col>", 55),
BookLine("", 56),
BookLine("Our first discovery of", 57),
BookLine("Abyssal Space was somewhat", 58),
BookLine("of a fluke - and a not easily", 59),
BookLine("repeatable fluke at that.", 60),
BookLine("It proved exceedingly", 61),
BookLine("difficult to find the", 62),
BookLine("correct mystical resonance", 63),
BookLine("for this dimension, due to", 64),
BookLine("my original belief that", 65),
),
Page(
BookLine("Abyssal space is not a fully", 66),
BookLine("fledged dimension of its own,", 67),
BookLine("so we have had to resort", 68),
BookLine("to unusual measures to", 69),
BookLine("gain permanent access", 70),
BookLine("to this realm.", 71),
),
),
PageSet(
Page(
BookLine("We took a large number of", 55),
BookLine("initiates, and gave them", 56),
BookLine("each supplies to cast", 57),
BookLine("a portal spell. We then", 58),
BookLine("had them repeatedly teleport", 59),
BookLine("to various locations,", 60),
BookLine("seeking to replicate the", 61),
BookLine("original error that", 62),
BookLine("caused the first entry", 63),
BookLine("into Abyssal Space.", 64),
BookLine("Once one of our initiates", 65),
),
Page(
BookLine("had managed to 'fail' his", 66),
BookLine("teleport and appear in", 67),
BookLine("Abyssal Space. he was", 68),
BookLine("then charged with remaining", 69),
BookLine("there and holding a portal", 70),
BookLine("spell open, so that more", 71),
BookLine("senior members of the Z.M.I.", 72),
),
),
PageSet(
Page(
BookLine("could gain entry via his portal.", 55),
BookLine("This initiate is still there,", 56),
BookLine("and due to the intense", 57),
BookLine("concentration required", 58),
BookLine("to keep he portal open,", 59),
BookLine("it is my recommendation", 60),
BookLine("that we leave him there", 61),
BookLine("holding the bridge open for us.", 62),
BookLine("As an initiate, he is", 63),
BookLine("always expendable should", 64),
BookLine("something go wrong, and", 65),
),
Page(
BookLine("the slow passage of", 66),
BookLine("time within Abyssal Space", 67),
BookLine("means we don't need to", 68),
BookLine("worry about feeding", 69),
BookLine("him or anything.", 70),
BookLine("At the time of writing,", 71),
BookLine("this portal is still active,", 72),
BookLine("and will allow us to teleport", 73),
BookLine("people at will into Abyssal Space.", 74),
BookLine("The only downside to this", 75),
BookLine("method of teleportation", 76),
),
),
PageSet(
Page(
BookLine("is that we are using", 55),
BookLine("magic provided to us", 56),
BookLine("by our Lord Zamorak himself,", 57),
BookLine("so anybody who uses this", 58),
BookLine("teleport will inevitably be", 59),
BookLine("marked by him - or become", 60),
BookLine("'skulled' as the common", 61),
BookLine("folk put it.", 62),
BookLine("An interesting side-effect", 63),
BookLine("of this portal, is that", 64),
BookLine("various teleports within Abyssal", 65),
),
Page(
BookLine("Space were opened up by", 66),
BookLine("it's casting. These teleports", 67),
BookLine("seem to lead to mysterious", 68),
BookLine("temples dedicated to various", 69),
BookLine("magical elements, which I", 70),
BookLine("believe are directly related", 71),
BookLine("to the rumours we have", 72),
),
),
PageSet(
Page(
BookLine("intercepted of the rediscovery", 55),
BookLine("of Runecrafting by the", 56),
BookLine("Wizards Tower. Sadly, we", 57),
BookLine("must conclude from these", 58),
BookLine("temples that the rumours are", 59),
BookLine("indeed true, and that the", 60),
BookLine("destruction of the Wizards", 61),
BookLine("Tower had been in vain,", 62),
BookLine("as was the sacrifice of", 63),
BookLine("those who died to try", 64),
BookLine("and prevent the meddling", 65),
),
Page(
BookLine("Saradominists from gaining", 66),
BookLine("access to the creation of", 67),
BookLine("magical runes.", 68),
BookLine("I have detailed my findings", 69),
BookLine("relating to RuneCrafting", 70),
BookLine("in a separate document, and", 71),
BookLine("passed it on to my superiors,", 72),
BookLine("along with me recommendations", 73),
BookLine("on how best to thwart their", 74),
BookLine("research further.", 75),
)
),
PageSet(
Page(
BookLine("Until a final decision is taken,", 55),
BookLine("I suggest we make the best", 56),
BookLine("of a bad situation,", 57),
BookLine("and increase our own rune", 58),
BookLine("production to full", 59),
BookLine("manufacturing capabilities.", 60),
BookLine("", 61),
BookLine("I have already ordered buyers", 62),
BookLine("to purchase as much", 63),
BookLine("Sample XJ13", 64),
BookLine("as can be bought, and to", 65),
),
Page(
BookLine("hire some mercenaries to", 66),
BookLine("sabotage the research efforts", 67),
BookLine("of the Wizards Tower, or", 68),
BookLine("failing that to provide us", 69),
BookLine("some insight into supplies", 70),
BookLine("where their study of these", 71),
BookLine("essence are coming from.", 72),
BookLine("", 73),
BookLine("Until my next report, I", 74),
BookLine("remain as ever a loyal servant.", 75),
BookLine("Strength Through Chaos!", 76),
)
),
)
}
private fun display(player: Player, pageNum: Int, buttonID: Int): Boolean {
BookInterface.pageSetup(player, BookInterface.FANCY_BOOK_3_49, TITLE, CONTENTS)
return true
}
override fun defineListeners() {
on(Items.ABYSSAL_BOOK_5520, IntType.ITEM, "read") { player, _ ->
setAttribute(player, "bookInterfaceCallback", ::display)
setAttribute(player, "bookInterfaceCurrentPage", 0)
display(player, 0, 0)
return@on true
}
}
}