diff --git a/Server/src/main/content/data/consumables/effects/AddTimerEffect.kt b/Server/src/main/content/data/consumables/effects/AddTimerEffect.kt index 48b11b475..fc0e5426c 100644 --- a/Server/src/main/content/data/consumables/effects/AddTimerEffect.kt +++ b/Server/src/main/content/data/consumables/effects/AddTimerEffect.kt @@ -1,7 +1,7 @@ package content.data.consumables.effects -import core.api.* -import core.game.system.timer.impl.PoisonImmunity +import core.api.registerTimer +import core.api.spawnTimer import core.game.consumable.ConsumableEffect import core.game.node.entity.player.Player diff --git a/Server/src/main/content/global/activity/penguinhns/PenguinHNSEvent.kt b/Server/src/main/content/global/activity/penguinhns/PenguinHNSEvent.kt index cac22bcd8..39bc2419b 100644 --- a/Server/src/main/content/global/activity/penguinhns/PenguinHNSEvent.kt +++ b/Server/src/main/content/global/activity/penguinhns/PenguinHNSEvent.kt @@ -1,15 +1,11 @@ package content.global.activity.penguinhns -import org.json.simple.JSONObject import core.ServerStore import core.api.StartupListener import core.api.log -import core.game.worldevents.PluginSet -import core.game.worldevents.WorldEvent -import core.game.world.GameWorld import core.plugin.ClassScanner import core.tools.Log -import core.tools.SystemLogger +import org.json.simple.JSONObject class PenguinHNSEvent : StartupListener { val manager = PenguinManager() diff --git a/Server/src/main/content/global/activity/shootingstar/ShootingStarMiningPulse.kt b/Server/src/main/content/global/activity/shootingstar/ShootingStarMiningPulse.kt index 17122f979..74360b3d2 100644 --- a/Server/src/main/content/global/activity/shootingstar/ShootingStarMiningPulse.kt +++ b/Server/src/main/content/global/activity/shootingstar/ShootingStarMiningPulse.kt @@ -89,7 +89,7 @@ class ShootingStarMiningPulse(player: Player?, node: Scenery?, val star: Shootin if(bonusXp > 0) { val delta = Math.min(bonusXp, xp) player.incrementAttribute("/save:shooting-star:bonus-xp", (-delta).toInt()) - xp += delta; + xp += delta if(player.getAttribute("shooting-star:bonus-xp", 0) <= 0) { player.sendMessage("You have obtained all of your bonus xp from the star.") } diff --git a/Server/src/main/content/global/ame/events/drilldemon/DrillDemonUtils.kt b/Server/src/main/content/global/ame/events/drilldemon/DrillDemonUtils.kt index f0fb6ebf1..cce73abaf 100644 --- a/Server/src/main/content/global/ame/events/drilldemon/DrillDemonUtils.kt +++ b/Server/src/main/content/global/ame/events/drilldemon/DrillDemonUtils.kt @@ -53,7 +53,7 @@ object DrillDemonUtils { setVarbit(player, tempOffsetList[i], tempList[i]) } - player.dialogueInterpreter.sendDialogues(NPCs.SERGEANT_DAMIEN_2790, core.game.dialogue.FacialExpression.OLD_NORMAL,when(task){ + player.dialogueInterpreter.sendDialogues(NPCs.SERGEANT_DAMIEN_2790, FacialExpression.OLD_NORMAL,when(task){ DD_SIGN_JOG -> "Get over there and jog in place!" DD_SIGN_JUMP -> "I need 40 jumping jacks stat!" DD_SIGN_PUSHUP -> "Get over there and give me 20 pushups!" diff --git a/Server/src/main/content/global/ame/events/drilldemon/SeargentDamienDefaultPlugin.kt b/Server/src/main/content/global/ame/events/drilldemon/SeargentDamienDefaultPlugin.kt index 67971e71b..121f78a88 100644 --- a/Server/src/main/content/global/ame/events/drilldemon/SeargentDamienDefaultPlugin.kt +++ b/Server/src/main/content/global/ame/events/drilldemon/SeargentDamienDefaultPlugin.kt @@ -3,12 +3,12 @@ package content.global.ame.events.drilldemon import core.game.dialogue.DialoguePlugin import core.game.node.entity.player.Player import core.plugin.Initializable -import org.rs09.consts.NPCs import core.tools.END_DIALOGUE +import org.rs09.consts.NPCs @Initializable -class SeargentDamienDefaultPlugin(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class SeargentDamienDefaultPlugin(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return SeargentDamienDefaultPlugin(player) } diff --git a/Server/src/main/content/global/ame/events/evilbob/EvilBobListeners.kt b/Server/src/main/content/global/ame/events/evilbob/EvilBobListeners.kt index 150be8a96..cefd4e729 100644 --- a/Server/src/main/content/global/ame/events/evilbob/EvilBobListeners.kt +++ b/Server/src/main/content/global/ame/events/evilbob/EvilBobListeners.kt @@ -31,7 +31,7 @@ class EvilBobListeners : InteractionListener, MapArea { if (getAttribute(player!!, EvilBobUtils.attentiveNewSpot, false) || getAttribute(player!!, EvilBobUtils.eventComplete, false)) { sendDialogue(player, "You don't know if this is a good place to go fishing. Perhaps you should ask someone, like one of the human servants.") } else if (!inInventory(player, Items.SMALL_FISHING_NET_303)) { - sendNPCDialogue(player, NPCs.SERVANT_2481, "You'll need a fishing net. There are plenty scattered around the beach.", FacialExpression.SAD); + sendNPCDialogue(player, NPCs.SERVANT_2481, "You'll need a fishing net. There are plenty scattered around the beach.", FacialExpression.SAD) } else if (freeSlots(player) == 0) { sendDialogue(player, "You don't have enough space in your inventory.") } else if (getAttribute(player, EvilBobUtils.fishCaught, false)) { diff --git a/Server/src/main/content/global/ame/events/genie/GenieDialogue.kt b/Server/src/main/content/global/ame/events/genie/GenieDialogue.kt index b650e8e22..919f2e0b0 100644 --- a/Server/src/main/content/global/ame/events/genie/GenieDialogue.kt +++ b/Server/src/main/content/global/ame/events/genie/GenieDialogue.kt @@ -9,7 +9,7 @@ import core.tools.END_DIALOGUE class GenieDialogue : DialogueFile() { override fun handle(componentID: Int, buttonID: Int) { val assigned = player!!.getAttribute("genie:item",0) - npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Ah, so you are there, ${player!!.name.capitalize()}. I'm so glad you summoned me. Please take this lamp and make your wish.") + npcl(FacialExpression.NEUTRAL, "Ah, so you are there, ${player!!.name.capitalize()}. I'm so glad you summoned me. Please take this lamp and make your wish.") addItemOrDrop(player!!, assigned) AntiMacro.terminateEventNpc(player!!) stage = END_DIALOGUE diff --git a/Server/src/main/content/global/ame/events/supriseexam/MordautDialogue.kt b/Server/src/main/content/global/ame/events/supriseexam/MordautDialogue.kt index 652055335..ca0e61c3f 100644 --- a/Server/src/main/content/global/ame/events/supriseexam/MordautDialogue.kt +++ b/Server/src/main/content/global/ame/events/supriseexam/MordautDialogue.kt @@ -60,6 +60,6 @@ class MordautDialogue(val examComplete: Boolean, val questionCorrect: Boolean = } override fun npc(vararg messages: String?): Component? { - return super.npc(core.game.dialogue.FacialExpression.OLD_NORMAL,*messages) + return super.npc(FacialExpression.OLD_NORMAL,*messages) } } \ No newline at end of file diff --git a/Server/src/main/content/global/bots/Adventurer.kt b/Server/src/main/content/global/bots/Adventurer.kt index 543046192..a6c69e8e1 100644 --- a/Server/src/main/content/global/bots/Adventurer.kt +++ b/Server/src/main/content/global/bots/Adventurer.kt @@ -582,7 +582,7 @@ class Adventurer(val style: CombatStyle): Script() { // At the Crumbling Wall in Falador ZoneBorders(2937,3356,2936,3353) to { it: Adventurer -> // Interact with the Crumbling Wall - val wall = it.scriptAPI.getNearestNode("Crumbling wall", true); + val wall = it.scriptAPI.getNearestNode("Crumbling wall", true) if (wall == null) { it.refresh() it.ticks = 0 diff --git a/Server/src/main/content/global/bots/CannonballSmelter.kt b/Server/src/main/content/global/bots/CannonballSmelter.kt index fd611a26f..ca6406937 100644 --- a/Server/src/main/content/global/bots/CannonballSmelter.kt +++ b/Server/src/main/content/global/bots/CannonballSmelter.kt @@ -155,7 +155,7 @@ class CannonballSmelter : Script() { val furnace = scriptAPI.getNearestNode(11666, true) scriptAPI.interact(bot, furnace, "smelt") // TODO: should bots use real interfaces? - bot.pulseManager.run(SmeltingPulse(bot, null, Bar.STEEL, 9)); + bot.pulseManager.run(SmeltingPulse(bot, null, Bar.STEEL, 9)) } else { state = State.SMELTING_CBALLS } @@ -273,6 +273,6 @@ class CannonballSmelter : Script() { skills.put(Skills.HITPOINTS,99) skills.put(Skills.DEFENCE,99) skills.put(Skills.SMITHING,35) - quests.add("Dwarf Cannon"); + quests.add("Dwarf Cannon") } } diff --git a/Server/src/main/content/global/bots/GenericSlayerBot.kt b/Server/src/main/content/global/bots/GenericSlayerBot.kt index 15c342785..5b4a7e31e 100644 --- a/Server/src/main/content/global/bots/GenericSlayerBot.kt +++ b/Server/src/main/content/global/bots/GenericSlayerBot.kt @@ -144,7 +144,7 @@ class GenericSlayerBot : Script() { bot.inventory.clear() for(item in inventory) bot.inventory.add(item) - scriptAPI.withdraw(org.rs09.consts.Items.LOBSTER_379,10) + scriptAPI.withdraw(Items.LOBSTER_379,10) bot.fullRestore() if(assignment.amount <= 0){ diff --git a/Server/src/main/content/global/handlers/iface/BookInterface.kt b/Server/src/main/content/global/handlers/iface/BookInterface.kt index 0146e2bdb..070b83ebd 100644 --- a/Server/src/main/content/global/handlers/iface/BookInterface.kt +++ b/Server/src/main/content/global/handlers/iface/BookInterface.kt @@ -31,8 +31,8 @@ import core.game.node.entity.player.Player class BookInterface : InterfaceListener { companion object { - const val CALLBACK_ATTRIBUTE = "bookInterfaceCallback"; - const val CURRENT_PAGE_ATTRIBUTE = "bookInterfaceCurrentPage"; + const val CALLBACK_ATTRIBUTE = "bookInterfaceCallback" + const val CURRENT_PAGE_ATTRIBUTE = "bookInterfaceCurrentPage" /* These should be in org.rs09.consts.Components but currently are not. */ const val FANCY_BOOK_26 = 26 // This is a 15-Lines per page book. @@ -45,13 +45,13 @@ class BookInterface : InterfaceListener { val FANCY_BOOK_3_49_LINE_IDS = arrayOf(6, 77, 78, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76) /* Button IDs. [Left button, Right button, (opt)index button, ...(opt)click lines 1 to X] */ - val FANCY_BOOK_26_BUTTON_IDS = arrayOf(61, 63); + val FANCY_BOOK_26_BUTTON_IDS = arrayOf(61, 63) val FANCY_BOOK_2_27_BUTTON_IDS = arrayOf(1, 3, 159, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158) - val FANCY_BOOK_3_49_BUTTON_IDS = arrayOf(51, 53); + val FANCY_BOOK_3_49_BUTTON_IDS = arrayOf(51, 53) /* Image IDs. [...lines 1 to X] */ - val FANCY_BOOK_2_27_IMAGE_ENABLE_DRAW_IDS = arrayOf(9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97); - val FANCY_BOOK_2_27_IMAGE_DRAW_IDS = arrayOf(10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98); + val FANCY_BOOK_2_27_IMAGE_ENABLE_DRAW_IDS = arrayOf(9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97) + val FANCY_BOOK_2_27_IMAGE_DRAW_IDS = arrayOf(10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98) /** Opens the book interface. Call this only once in the defineListeners() at the start of opening a book. */ fun openBook(player: Player, bookComponent: Int, displayCallback: (player: Player, pageNum: Int, buttonId: Int) -> Boolean) { @@ -72,29 +72,29 @@ class BookInterface : InterfaceListener { fun pageSetup(player: Player, bookComponent: Int, title: String, contents: Array, hasPagination: Boolean = true) { val currentPage = getAttribute(player, CURRENT_PAGE_ATTRIBUTE, 0) if (bookComponent == FANCY_BOOK_26) { - clearBookLines(player, FANCY_BOOK_26, FANCY_BOOK_26_LINE_IDS); - clearButtons(player, FANCY_BOOK_26, FANCY_BOOK_26_BUTTON_IDS); - setTitle(player, FANCY_BOOK_26, FANCY_BOOK_26_LINE_IDS, title); + clearBookLines(player, FANCY_BOOK_26, FANCY_BOOK_26_LINE_IDS) + clearButtons(player, FANCY_BOOK_26, FANCY_BOOK_26_BUTTON_IDS) + setTitle(player, FANCY_BOOK_26, FANCY_BOOK_26_LINE_IDS, title) if (hasPagination) { setPagination(player, FANCY_BOOK_26, FANCY_BOOK_26_LINE_IDS, FANCY_BOOK_26_BUTTON_IDS, currentPage, contents.size, contents[currentPage].pages.size == 1) } - setPageContent(player, FANCY_BOOK_26, FANCY_BOOK_26_LINE_IDS, FANCY_BOOK_26_BUTTON_IDS, currentPage, contents); + setPageContent(player, FANCY_BOOK_26, FANCY_BOOK_26_LINE_IDS, FANCY_BOOK_26_BUTTON_IDS, currentPage, contents) } else if (bookComponent == FANCY_BOOK_2_27) { - clearBookLines(player, FANCY_BOOK_2_27, FANCY_BOOK_2_27_LINE_IDS); - clearButtons(player, FANCY_BOOK_2_27, FANCY_BOOK_2_27_BUTTON_IDS); - setTitle(player, FANCY_BOOK_2_27, FANCY_BOOK_2_27_LINE_IDS, title); + clearBookLines(player, FANCY_BOOK_2_27, FANCY_BOOK_2_27_LINE_IDS) + clearButtons(player, FANCY_BOOK_2_27, FANCY_BOOK_2_27_BUTTON_IDS) + setTitle(player, FANCY_BOOK_2_27, FANCY_BOOK_2_27_LINE_IDS, title) if (hasPagination) { setPagination(player, FANCY_BOOK_2_27, FANCY_BOOK_2_27_LINE_IDS, FANCY_BOOK_2_27_BUTTON_IDS, currentPage, contents.size, contents[currentPage].pages.size == 1) } - setPageContent(player, FANCY_BOOK_2_27, FANCY_BOOK_2_27_LINE_IDS, FANCY_BOOK_2_27_BUTTON_IDS, currentPage, contents); + setPageContent(player, FANCY_BOOK_2_27, FANCY_BOOK_2_27_LINE_IDS, FANCY_BOOK_2_27_BUTTON_IDS, currentPage, contents) } else if (bookComponent == FANCY_BOOK_3_49) { - clearBookLines(player, FANCY_BOOK_3_49, FANCY_BOOK_3_49_LINE_IDS); - clearButtons(player, FANCY_BOOK_3_49, FANCY_BOOK_3_49_BUTTON_IDS); - setTitle(player, FANCY_BOOK_3_49, FANCY_BOOK_3_49_LINE_IDS, title); + clearBookLines(player, FANCY_BOOK_3_49, FANCY_BOOK_3_49_LINE_IDS) + clearButtons(player, FANCY_BOOK_3_49, FANCY_BOOK_3_49_BUTTON_IDS) + setTitle(player, FANCY_BOOK_3_49, FANCY_BOOK_3_49_LINE_IDS, title) if (hasPagination) { setPagination(player, FANCY_BOOK_3_49, FANCY_BOOK_3_49_LINE_IDS, FANCY_BOOK_3_49_BUTTON_IDS, currentPage, contents.size, contents[currentPage].pages.size == 1) } - setPageContent(player, FANCY_BOOK_3_49, FANCY_BOOK_3_49_LINE_IDS, FANCY_BOOK_3_49_BUTTON_IDS, currentPage, contents); + setPageContent(player, FANCY_BOOK_3_49, FANCY_BOOK_3_49_LINE_IDS, FANCY_BOOK_3_49_BUTTON_IDS, currentPage, contents) } } @@ -166,7 +166,7 @@ class BookInterface : InterfaceListener { /** Function to check if player read to the last page. For quest triggers. */ fun isLastPage(pageNum: Int, totalPages: Int): Boolean { - return pageNum == totalPages - 1; + return pageNum == totalPages - 1 } /** PRIVATE: Increments the current page and invokes the callback function. */ diff --git a/Server/src/main/content/global/handlers/iface/HairDresserInterface.kt b/Server/src/main/content/global/handlers/iface/HairDresserInterface.kt index 1d7eca270..b1750ae63 100644 --- a/Server/src/main/content/global/handlers/iface/HairDresserInterface.kt +++ b/Server/src/main/content/global/handlers/iface/HairDresserInterface.kt @@ -144,7 +144,7 @@ class HairDresserInterface : ComponentPlugin(){ } sendPlayerOnInterface(player, usedInterface, player_model_child) sendPlayerOnInterface(player, usedInterface, player_head_child) - sendAnimationOnInterface(player, core.game.dialogue.FacialExpression.HAPPY.animationId, usedInterface, player_head_child) + sendAnimationOnInterface(player, FacialExpression.HAPPY.animationId, usedInterface, player_head_child) player.toggleWardrobe(true) component?.setCloseEvent{pl,_ -> diff --git a/Server/src/main/content/global/handlers/iface/MakeOverInterface.kt b/Server/src/main/content/global/handlers/iface/MakeOverInterface.kt index 9c911007d..58aaea101 100644 --- a/Server/src/main/content/global/handlers/iface/MakeOverInterface.kt +++ b/Server/src/main/content/global/handlers/iface/MakeOverInterface.kt @@ -33,8 +33,8 @@ class MakeOverInterface : ComponentPlugin(){ player.packetDispatch.sendNpcOnInterface(1,component.id, MALE_CHILD_ID) player.packetDispatch.sendNpcOnInterface(5,component.id, FEMALE_CHILD_ID) //Send chathead animations to interface - player.packetDispatch.sendAnimationInterface(core.game.dialogue.FacialExpression.SILENT.animationId,component.id, MALE_CHILD_ID) - player.packetDispatch.sendAnimationInterface(core.game.dialogue.FacialExpression.SILENT.animationId,component.id, FEMALE_CHILD_ID) + player.packetDispatch.sendAnimationInterface(FacialExpression.SILENT.animationId,component.id, MALE_CHILD_ID) + player.packetDispatch.sendAnimationInterface(FacialExpression.SILENT.animationId,component.id, FEMALE_CHILD_ID) //Check for makeover voucher and then change interface text if it's there if(player.inventory.containsAtLeastOneItem(Items.MAKEOVER_VOUCHER_5606)){ diff --git a/Server/src/main/content/global/handlers/iface/RulesAndInfo.kt b/Server/src/main/content/global/handlers/iface/RulesAndInfo.kt index f52b725e6..420c70d71 100644 --- a/Server/src/main/content/global/handlers/iface/RulesAndInfo.kt +++ b/Server/src/main/content/global/handlers/iface/RulesAndInfo.kt @@ -34,7 +34,7 @@ object RulesAndInfo { val pin = getAttribute(player, "rules:pin", RandomFunction.random(1000,9999)) setAttribute(player, "/save:rules:pin", pin) - var ln = setBaseRulesAndInfo(player); + var ln = setBaseRulesAndInfo(player) setInterfaceText(player, "If you agree to the above, type ::confirmrules $pin", 384, ln++) setInterfaceText(player, "", 384, ln) diff --git a/Server/src/main/content/global/handlers/iface/ScrollInterface.kt b/Server/src/main/content/global/handlers/iface/ScrollInterface.kt index 46405f374..5e9bfc26d 100644 --- a/Server/src/main/content/global/handlers/iface/ScrollInterface.kt +++ b/Server/src/main/content/global/handlers/iface/ScrollInterface.kt @@ -24,7 +24,7 @@ class ScrollInterface { closeInterface(player) // Important: Close previous interfaces. if (scrollComponent == Components.MESSAGESCROLL_220) { openInterface(player, Components.MESSAGESCROLL_220) - setPageContent(player, Components.MESSAGESCROLL_220, MESSAGESCROLL_220_LINE_IDS, contents); + setPageContent(player, Components.MESSAGESCROLL_220, MESSAGESCROLL_220_LINE_IDS, contents) } } diff --git a/Server/src/main/content/global/handlers/iface/bank/BankInterface.kt b/Server/src/main/content/global/handlers/iface/bank/BankInterface.kt index bb55b6d2e..49d613f43 100644 --- a/Server/src/main/content/global/handlers/iface/bank/BankInterface.kt +++ b/Server/src/main/content/global/handlers/iface/bank/BankInterface.kt @@ -54,11 +54,11 @@ class BankInterface : InterfaceListener { private const val OP_SET_TAB = 155 private const val OP_COLLAPSE_TAB = 196 - private const val THRESHOLD_TO_DISPLAY_EXACT_QUANTITY_ON_EXAMINE = 100000; + private const val THRESHOLD_TO_DISPLAY_EXACT_QUANTITY_ON_EXAMINE = 100000 } private fun onBankInterfaceOpen(player: Player, component: Component): Boolean { - player.bank.sendBankSpace(); + player.bank.sendBankSpace() val settings = IfaceSettingsBuilder() .enableAllOptions() diff --git a/Server/src/main/content/global/handlers/item/EnchantJewelleryTabListener.kt b/Server/src/main/content/global/handlers/item/EnchantJewelleryTabListener.kt index 7bfaa1d59..66a04a9a0 100644 --- a/Server/src/main/content/global/handlers/item/EnchantJewelleryTabListener.kt +++ b/Server/src/main/content/global/handlers/item/EnchantJewelleryTabListener.kt @@ -73,7 +73,7 @@ class EnchantJewelleryTabListener : InteractionListener { addItem(player, product) playAudio(player, Audio(979), false) animate(player, 4069, true) - break; + break } } } diff --git a/Server/src/main/content/global/handlers/item/SpadeDigListener.kt b/Server/src/main/content/global/handlers/item/SpadeDigListener.kt index a19cbb1e7..4d9bad6f0 100644 --- a/Server/src/main/content/global/handlers/item/SpadeDigListener.kt +++ b/Server/src/main/content/global/handlers/item/SpadeDigListener.kt @@ -7,7 +7,7 @@ object SpadeDigListener { val listeners = HashMap Unit>() fun registerListener(location: Location, method: (Player) -> Unit){ - listeners.putIfAbsent(location,method); + listeners.putIfAbsent(location,method) } @JvmStatic diff --git a/Server/src/main/content/global/handlers/item/equipment/special/SalamanderSwingHandler.kt b/Server/src/main/content/global/handlers/item/equipment/special/SalamanderSwingHandler.kt index 0da74b2a9..9af01e7f9 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/SalamanderSwingHandler.kt +++ b/Server/src/main/content/global/handlers/item/equipment/special/SalamanderSwingHandler.kt @@ -52,7 +52,7 @@ class SalamanderSwingHandler(private var style: CombatStyle) : CombatSwingHandle if (entity is Player) { state.weapon = Weapon(entity.equipment[3]) } - if (state!!.weapon == null || !SalamanderSwingHandler.hasAmmo(entity, state)) { + if (state!!.weapon == null || !hasAmmo(entity, state)) { entity!!.properties.combatPulse.stop() return -1 } @@ -67,7 +67,7 @@ class SalamanderSwingHandler(private var style: CombatStyle) : CombatSwingHandle return -1 } if(state.estimatedHit > victim.skills.lifepoints) state.estimatedHit = victim.skills.lifepoints - SalamanderSwingHandler.useAmmo(entity, state) + useAmmo(entity, state) return 1 } diff --git a/Server/src/main/content/global/handlers/item/withnpc/CatOnArdougneCivilian.kt b/Server/src/main/content/global/handlers/item/withnpc/CatOnArdougneCivilian.kt index f89b011c7..eee377bf4 100644 --- a/Server/src/main/content/global/handlers/item/withnpc/CatOnArdougneCivilian.kt +++ b/Server/src/main/content/global/handlers/item/withnpc/CatOnArdougneCivilian.kt @@ -50,7 +50,7 @@ class CatOnArdougneCivilian: InteractionListener { player.familiarManager.removeDetails(used.id) removeItem(player,used,Container.INVENTORY) addItem(player,Items.DEATH_RUNE_560,100) - return@onUseWith true; + return@onUseWith true } } } \ No newline at end of file diff --git a/Server/src/main/content/global/skill/agility/BarbarianOutpostCourse.kt b/Server/src/main/content/global/skill/agility/BarbarianOutpostCourse.kt index a5a05d8eb..0e4a36fea 100644 --- a/Server/src/main/content/global/skill/agility/BarbarianOutpostCourse.kt +++ b/Server/src/main/content/global/skill/agility/BarbarianOutpostCourse.kt @@ -31,7 +31,7 @@ class BarbarianOutpostCourse */ @JvmOverloads constructor(player: Player? = null) : AgilityCourse(player, 6, 46.2) { override fun createInstance(player: Player): AgilityCourse { - return content.global.skill.agility.BarbarianOutpostCourse(player) + return BarbarianOutpostCourse(player) } override fun handle(player: Player, node: Node, option: String): Boolean { @@ -88,7 +88,7 @@ class BarbarianOutpostCourse sendMessage(player, "You cannot do that from here.") return } - if (content.global.skill.agility.BarbarianOutpostCourse.Companion.ropeDelay > GameWorld.ticks) { + if (ropeDelay > GameWorld.ticks) { sendMessage(player, "The rope is being used.") return } @@ -96,7 +96,7 @@ class BarbarianOutpostCourse AgilityHandler.fail(player, 0, Location.create(2549, 9951, 0), null, getHitAmount(player), "You slip and fall to the pit below.") return } - content.global.skill.agility.BarbarianOutpostCourse.Companion.ropeDelay = GameWorld.ticks + 2 + ropeDelay = GameWorld.ticks + 2 player.packetDispatch.sendSceneryAnimation(`object`, Animation.create(497), true) AgilityHandler.forceWalk(player, 0, player.location, Location.create(2551, 3549, 0), Animation.create(751), 50, 22.0, "You skillfully swing across.", 1) } @@ -176,7 +176,7 @@ class BarbarianOutpostCourse NPCDefinition.forId(385).handlers["option:pick-up"] = this NPCDefinition.forId(386).handlers["option:pick-up"] = this NPCDefinition.forId(387).handlers["option:pick-up"] = this - ClassScanner.definePlugin(content.global.skill.agility.BarbarianOutpostCourse.BarbarianGuardDialogue()) + ClassScanner.definePlugin(BarbarianGuardDialogue()) } override fun getDestination(node: Node, n: Node): Location? { @@ -209,7 +209,7 @@ class BarbarianOutpostCourse constructor(player: Player?) : super(player) {} override fun newInstance(player: Player): core.game.dialogue.DialoguePlugin { - return content.global.skill.agility.BarbarianOutpostCourse.BarbarianGuardDialogue(player) + return BarbarianGuardDialogue(player) } override fun open(vararg args: Any): Boolean { diff --git a/Server/src/main/content/global/skill/agility/GnomeStrongholdCourse.kt b/Server/src/main/content/global/skill/agility/GnomeStrongholdCourse.kt index 5c160b86b..d34a40d61 100644 --- a/Server/src/main/content/global/skill/agility/GnomeStrongholdCourse.kt +++ b/Server/src/main/content/global/skill/agility/GnomeStrongholdCourse.kt @@ -30,25 +30,25 @@ class GnomeStrongholdCourse val `object` = node as Scenery when (`object`.id) { 2295 -> { - content.global.skill.agility.GnomeStrongholdCourse.Companion.TRAINERS[0]!!.sendChat("Okay get over that log, quick quick!") + TRAINERS[0]!!.sendChat("Okay get over that log, quick quick!") sendMessage(player, "You walk carefully across the slippery log...") AgilityHandler.walk(player, 0, Location.create(2474, 3436, 0), Location.create(2474, 3429, 0), Animation.create(155), 7.5, "...You make it safely to the other side.") return true } 2285 -> { - content.global.skill.agility.GnomeStrongholdCourse.Companion.TRAINERS[1]!!.sendChat("Move it, move it, move it!") + TRAINERS[1]!!.sendChat("Move it, move it, move it!") sendMessage(player, "You climb the netting...") AgilityHandler.climb(player, 1, Animation.create(828), `object`.location.transform(0, -1, 1), 7.5, null) return true } 35970 -> { - content.global.skill.agility.GnomeStrongholdCourse.Companion.TRAINERS[2]!!.sendChat("That's it - straight up.") + TRAINERS[2]!!.sendChat("That's it - straight up.") sendMessage(player, "You climb the tree..") AgilityHandler.climb(player, 2, Animation.create(828), Location.create(2473, 3420, 2), 5.0, "...To the platform above.") return true } 2312 -> { - content.global.skill.agility.GnomeStrongholdCourse.Companion.TRAINERS[3]!!.sendChat("Come on scaredy cat, get across that rope!") + TRAINERS[3]!!.sendChat("Come on scaredy cat, get across that rope!") sendMessage(player, "You carefully cross the tightrope.") AgilityHandler.walk(player, 3, Location.create(2477, 3420, 2), Location.create(2483, 3420, 2), Animation.create(155), 7.5, null) return true @@ -63,7 +63,7 @@ class GnomeStrongholdCourse return true } 2286 -> { - content.global.skill.agility.GnomeStrongholdCourse.Companion.TRAINERS[4]!!.sendChat("My Granny can move faster than you.") + TRAINERS[4]!!.sendChat("My Granny can move faster than you.") player.faceLocation(player.location.transform(0, 2, 0)) sendMessage(player, "You climb the netting...") AgilityHandler.climb(player, 5, Animation.create(828), player.location.transform(0, 2, 0), 7.5, null) @@ -76,11 +76,11 @@ class GnomeStrongholdCourse sendMessage(player, "You can't do that from here.") return true } - if (content.global.skill.agility.GnomeStrongholdCourse.Companion.USED_PIPES[index] > GameWorld.ticks) { + if (USED_PIPES[index] > GameWorld.ticks) { sendMessage(player, "The pipe is being used.") return true } - content.global.skill.agility.GnomeStrongholdCourse.Companion.USED_PIPES[index] = GameWorld.ticks + 10 + USED_PIPES[index] = GameWorld.ticks + 10 player.lock() //Animations and force walking @@ -117,12 +117,12 @@ class GnomeStrongholdCourse } override fun configure() { - content.global.skill.agility.GnomeStrongholdCourse.Companion.TRAINERS[0] = NPC.create(162, Location.create(2473, 3438, 0)) - content.global.skill.agility.GnomeStrongholdCourse.Companion.TRAINERS[1] = NPC.create(162, Location.create(2478, 3426, 0)) - content.global.skill.agility.GnomeStrongholdCourse.Companion.TRAINERS[2] = NPC.create(162, Location.create(2474, 3422, 1)) - content.global.skill.agility.GnomeStrongholdCourse.Companion.TRAINERS[3] = NPC.create(162, Location.create(2472, 3419, 2)) - content.global.skill.agility.GnomeStrongholdCourse.Companion.TRAINERS[4] = NPC.create(162, Location.create(2489, 3425, 0)) - for (npc in content.global.skill.agility.GnomeStrongholdCourse.Companion.TRAINERS) { + TRAINERS[0] = NPC.create(162, Location.create(2473, 3438, 0)) + TRAINERS[1] = NPC.create(162, Location.create(2478, 3426, 0)) + TRAINERS[2] = NPC.create(162, Location.create(2474, 3422, 1)) + TRAINERS[3] = NPC.create(162, Location.create(2472, 3419, 2)) + TRAINERS[4] = NPC.create(162, Location.create(2489, 3425, 0)) + for (npc in TRAINERS) { npc!!.init() npc.walkRadius = 3 } @@ -139,7 +139,7 @@ class GnomeStrongholdCourse } override fun createInstance(player: Player): AgilityCourse { - return content.global.skill.agility.GnomeStrongholdCourse(player) + return GnomeStrongholdCourse(player) } companion object { diff --git a/Server/src/main/content/global/skill/agility/WildernessCourse.kt b/Server/src/main/content/global/skill/agility/WildernessCourse.kt index bd052c523..d9bc44b36 100644 --- a/Server/src/main/content/global/skill/agility/WildernessCourse.kt +++ b/Server/src/main/content/global/skill/agility/WildernessCourse.kt @@ -153,7 +153,7 @@ class WildernessCourse sendMessage(player, "You cannot do that from here.") return } - if (content.global.skill.agility.WildernessCourse.Companion.ropeDelay > GameWorld.ticks) { + if (ropeDelay > GameWorld.ticks) { sendMessage(player, "The rope is being used.") return } @@ -161,7 +161,7 @@ class WildernessCourse AgilityHandler.fail(player, 0, Location.create(3005, 10357, 0), null, getHitAmount(player), "You slip and fall to the pit below.") return } - content.global.skill.agility.WildernessCourse.Companion.ropeDelay = GameWorld.ticks + 2 + ropeDelay = GameWorld.ticks + 2 player.packetDispatch.sendSceneryAnimation(`object`, Animation.create(497), true) AgilityHandler.forceWalk(player, 1, player.location, Location.create(3005, 3958, 0), Animation.create(751), 50, 20.0, "You skillfully swing across.", 1) } @@ -254,7 +254,7 @@ class WildernessCourse } override fun createInstance(player: Player): AgilityCourse { - return content.global.skill.agility.WildernessCourse(player) + return WildernessCourse(player) } companion object { diff --git a/Server/src/main/content/global/skill/agility/shortcuts/BasaltRockShortcut.kt b/Server/src/main/content/global/skill/agility/shortcuts/BasaltRockShortcut.kt index e0c1adba1..2bc194611 100644 --- a/Server/src/main/content/global/skill/agility/shortcuts/BasaltRockShortcut.kt +++ b/Server/src/main/content/global/skill/agility/shortcuts/BasaltRockShortcut.kt @@ -42,16 +42,16 @@ class BasaltRockShortcut : AgilityShortcut { * 2522, 3600 R1, 3601, 3602 R2 */ override fun newInstance(arg: Any?): Plugin { - configure(content.global.skill.agility.shortcuts.BasaltRockShortcut(intArrayOf(4550), 1, 0.0, "jump-to")) //Beach South* - configure(content.global.skill.agility.shortcuts.BasaltRockShortcut(intArrayOf(4551), 1, 0.0, "jump-across")) //Beach South Rock 1* - configure(content.global.skill.agility.shortcuts.BasaltRockShortcut(intArrayOf(4552), 1, 0.0, "jump-across")) //South Rock 2 - configure(content.global.skill.agility.shortcuts.BasaltRockShortcut(intArrayOf(4553), 1, 0.0, "jump-across")) //South Rock 2 (other side) - configure(content.global.skill.agility.shortcuts.BasaltRockShortcut(intArrayOf(4554), 1, 0.0, "jump-across")) //Middle Rock 3 - configure(content.global.skill.agility.shortcuts.BasaltRockShortcut(intArrayOf(4555), 1, 0.0, "jump-across")) //Middle Rock 3 (other side) - configure(content.global.skill.agility.shortcuts.BasaltRockShortcut(intArrayOf(4556), 1, 0.0, "jump-across")) //North Rock 4 - configure(content.global.skill.agility.shortcuts.BasaltRockShortcut(intArrayOf(4557), 1, 0.0, "jump-across")) //North Rock 4 (other side) - configure(content.global.skill.agility.shortcuts.BasaltRockShortcut(intArrayOf(4558), 1, 0.0, "jump-across")) //Rocky Shore North Rock 5* - configure(content.global.skill.agility.shortcuts.BasaltRockShortcut(intArrayOf(4559), 1, 0.0, "jump-to")) //Rocky Shore North* + configure(BasaltRockShortcut(intArrayOf(4550), 1, 0.0, "jump-to")) //Beach South* + configure(BasaltRockShortcut(intArrayOf(4551), 1, 0.0, "jump-across")) //Beach South Rock 1* + configure(BasaltRockShortcut(intArrayOf(4552), 1, 0.0, "jump-across")) //South Rock 2 + configure(BasaltRockShortcut(intArrayOf(4553), 1, 0.0, "jump-across")) //South Rock 2 (other side) + configure(BasaltRockShortcut(intArrayOf(4554), 1, 0.0, "jump-across")) //Middle Rock 3 + configure(BasaltRockShortcut(intArrayOf(4555), 1, 0.0, "jump-across")) //Middle Rock 3 (other side) + configure(BasaltRockShortcut(intArrayOf(4556), 1, 0.0, "jump-across")) //North Rock 4 + configure(BasaltRockShortcut(intArrayOf(4557), 1, 0.0, "jump-across")) //North Rock 4 (other side) + configure(BasaltRockShortcut(intArrayOf(4558), 1, 0.0, "jump-across")) //Rocky Shore North Rock 5* + configure(BasaltRockShortcut(intArrayOf(4559), 1, 0.0, "jump-to")) //Rocky Shore North* return this } diff --git a/Server/src/main/content/global/skill/construction/Hotspot.kt b/Server/src/main/content/global/skill/construction/Hotspot.kt index 33c1758ed..dd245e782 100644 --- a/Server/src/main/content/global/skill/construction/Hotspot.kt +++ b/Server/src/main/content/global/skill/construction/Hotspot.kt @@ -1,7 +1,5 @@ package content.global.skill.construction -import content.global.skill.construction.BuildHotspot - /** * Represents a hotspot. * @author Emperor diff --git a/Server/src/main/content/global/skill/construction/decoration/ConstructionDoorPlugin.kt b/Server/src/main/content/global/skill/construction/decoration/ConstructionDoorPlugin.kt index 764bc11ae..1ae0cc376 100644 --- a/Server/src/main/content/global/skill/construction/decoration/ConstructionDoorPlugin.kt +++ b/Server/src/main/content/global/skill/construction/decoration/ConstructionDoorPlugin.kt @@ -39,11 +39,11 @@ class ConstructionDoorPlugin : OptionHandler() { override fun handle(player: Player, node: Node, option: String): Boolean { val `object` = node as Scenery - val second = core.game.global.action.DoorActionHandler.getSecondDoor(`object`, player) + val second = DoorActionHandler.getSecondDoor(`object`, player) when (option) { "pick-lock", "force" -> return false //TODO } - core.game.global.action.DoorActionHandler.open(`object`, second, getReplaceId(`object`), getReplaceId(second), true, 500, false) + DoorActionHandler.open(`object`, second, getReplaceId(`object`), getReplaceId(second), true, 500, false) return true } diff --git a/Server/src/main/content/global/skill/construction/decoration/bedroom/WardrobeHandler.kt b/Server/src/main/content/global/skill/construction/decoration/bedroom/WardrobeHandler.kt index a4d73852b..5cc89e118 100644 --- a/Server/src/main/content/global/skill/construction/decoration/bedroom/WardrobeHandler.kt +++ b/Server/src/main/content/global/skill/construction/decoration/bedroom/WardrobeHandler.kt @@ -25,7 +25,7 @@ class WardrobeHandler : OptionHandler() { } else { player.interfaceManager.open(Component(594)) } - return true; + return true } } \ No newline at end of file diff --git a/Server/src/main/content/global/skill/construction/decoration/portalchamber/PortalChamberDialogue.kt b/Server/src/main/content/global/skill/construction/decoration/portalchamber/PortalChamberDialogue.kt index 90673ed20..eeaf6e455 100644 --- a/Server/src/main/content/global/skill/construction/decoration/portalchamber/PortalChamberDialogue.kt +++ b/Server/src/main/content/global/skill/construction/decoration/portalchamber/PortalChamberDialogue.kt @@ -10,7 +10,7 @@ import core.plugin.Initializable * @author Ceikry */ @Initializable -class PortalChamberDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class PortalChamberDialogue(player: Player? = null) : DialoguePlugin(player) { var portal = "none" override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ @@ -41,7 +41,7 @@ class PortalChamberDialogue(player: Player? = null) : core.game.dialogue.Dialogu return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return PortalChamberDialogue(player) } diff --git a/Server/src/main/content/global/skill/construction/decoration/questhall/MountedGlory.kt b/Server/src/main/content/global/skill/construction/decoration/questhall/MountedGlory.kt index fb5ad0e1d..2a2adec95 100644 --- a/Server/src/main/content/global/skill/construction/decoration/questhall/MountedGlory.kt +++ b/Server/src/main/content/global/skill/construction/decoration/questhall/MountedGlory.kt @@ -2,7 +2,7 @@ package content.global.skill.construction.decoration.questhall import core.api.teleport import core.game.node.entity.player.Player -import core.game.node.entity.player.link.audio.Audio; +import core.game.node.entity.player.link.audio.Audio import core.game.system.task.Pulse import core.game.world.map.Location import core.game.world.update.flag.context.Animation @@ -53,7 +53,7 @@ class MountedGlory : InteractionListener { 1 -> { player.lock(5) player.visualize(Animation(714), Graphics(308, 100, 50)) - player.getAudioManager().send(Audio(200), true); + player.getAudioManager().send(Audio(200), true) } 4 -> player.animator.reset().also { teleport(player, TELEPORTS[int]) } } diff --git a/Server/src/main/content/global/skill/construction/decoration/study/LecternPlugin.kt b/Server/src/main/content/global/skill/construction/decoration/study/LecternPlugin.kt index bf367fda2..7ef2f43a5 100644 --- a/Server/src/main/content/global/skill/construction/decoration/study/LecternPlugin.kt +++ b/Server/src/main/content/global/skill/construction/decoration/study/LecternPlugin.kt @@ -92,7 +92,7 @@ class LecternPlugin : OptionHandler() { for (item in requiredItems) { val staff = MagicStaff.forId(item.id) if (staff != null && player.equipment.containsAtLeastOneItem(staff.staves)) { - continue; + continue } if (!player.inventory.containsItem(item)) { //TODO staffs @@ -171,7 +171,7 @@ class LecternPlugin : OptionHandler() { if (ttb != null && ttb.canMake(player)) { player.interfaceManager.close() var requiredItemsCountingStaves = ttb.requiredItems.filter({ item -> - val staff = MagicStaff.forId(item.id); + val staff = MagicStaff.forId(item.id) !(staff != null && player.equipment.containsAtLeastOneItem(staff.staves)) }).toTypedArray() player.pulseManager.run(object : Pulse(1) { diff --git a/Server/src/main/content/global/skill/construction/decoration/workshop/ArmourStand.kt b/Server/src/main/content/global/skill/construction/decoration/workshop/ArmourStand.kt index 665e6d490..da387a20c 100644 --- a/Server/src/main/content/global/skill/construction/decoration/workshop/ArmourStand.kt +++ b/Server/src/main/content/global/skill/construction/decoration/workshop/ArmourStand.kt @@ -57,8 +57,8 @@ class ArmourStand : UseWithHandler(494, 468, 496, 470, 498, 472, 500, 502, 474, return true } @Initializable - class RepairDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + class RepairDialogue(player: Player? = null) : DialoguePlugin(player){ + override fun newInstance(player: Player?): DialoguePlugin { return RepairDialogue(player) } var item: Item? = null diff --git a/Server/src/main/content/global/skill/farming/CompostBins.kt b/Server/src/main/content/global/skill/farming/CompostBins.kt index 15e4443b4..3780625f4 100644 --- a/Server/src/main/content/global/skill/farming/CompostBins.kt +++ b/Server/src/main/content/global/skill/farming/CompostBins.kt @@ -1,11 +1,10 @@ package content.global.skill.farming -import core.api.* +import content.global.skill.farming.timers.Compost +import core.api.getOrStartTimer import core.cache.def.impl.SceneryDefinition -import core.cache.def.impl.VarbitDefinition -import core.game.node.scenery.Scenery import core.game.node.entity.player.Player -import content.global.skill.farming.timers.* +import core.game.node.scenery.Scenery enum class CompostBins(val varbit: Int) { FALADOR_COMPOST(740), diff --git a/Server/src/main/content/global/skill/farming/CropHarvester.kt b/Server/src/main/content/global/skill/farming/CropHarvester.kt index ae266f966..d69f50bf0 100644 --- a/Server/src/main/content/global/skill/farming/CropHarvester.kt +++ b/Server/src/main/content/global/skill/farming/CropHarvester.kt @@ -6,7 +6,7 @@ import core.game.interaction.OptionHandler import core.game.node.Node import content.global.skill.summoning.familiar.GiantEntNPC import core.game.node.entity.player.Player -import core.game.node.entity.player.link.audio.Audio; +import core.game.node.entity.player.link.audio.Audio import core.game.node.entity.skill.Skills import core.game.node.item.Item import core.game.system.task.Pulse diff --git a/Server/src/main/content/global/skill/farming/DigUpPatchDialogue.kt b/Server/src/main/content/global/skill/farming/DigUpPatchDialogue.kt index e3bf56d79..c320336b1 100644 --- a/Server/src/main/content/global/skill/farming/DigUpPatchDialogue.kt +++ b/Server/src/main/content/global/skill/farming/DigUpPatchDialogue.kt @@ -10,10 +10,10 @@ import core.game.world.update.flag.context.Animation import core.plugin.Initializable @Initializable -class DigUpPatchDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class DigUpPatchDialogue(player: Player? = null) : DialoguePlugin(player) { var patch: Patch? = null - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return DigUpPatchDialogue(player) } diff --git a/Server/src/main/content/global/skill/farming/Patch.kt b/Server/src/main/content/global/skill/farming/Patch.kt index 1bbc82e4f..6b03a2017 100644 --- a/Server/src/main/content/global/skill/farming/Patch.kt +++ b/Server/src/main/content/global/skill/farming/Patch.kt @@ -299,7 +299,7 @@ class Patch(val player: Player, val patch: FarmingPatch, var plantable: Plantabl if(patch.type == PatchType.TREE) { // Willow branches if(harvestAmt < 6) { - harvestAmt++; + harvestAmt++ } } diff --git a/Server/src/main/content/global/skill/farming/timers/CropGrowth.kt b/Server/src/main/content/global/skill/farming/timers/CropGrowth.kt index 9d5dfc90a..a64559511 100644 --- a/Server/src/main/content/global/skill/farming/timers/CropGrowth.kt +++ b/Server/src/main/content/global/skill/farming/timers/CropGrowth.kt @@ -21,7 +21,7 @@ class CropGrowth : PersistTimer (500, "farming:crops", isSoft = true) { //Sync the 5 minute run cycles with :05 on realtime clocks - authentic override fun getInitialRunDelay() : Int { - val now = LocalTime.now(); + val now = LocalTime.now() val minsUntil5MinSync = 5 - (now.getMinute() % 5) val ticks = secondsToTicks (minsUntil5MinSync * 60) player.debug("[CropGrowth] Scheduled first growth cycle for $ticks ticks from now.") diff --git a/Server/src/main/content/global/skill/gather/GatheringSkillOptionListeners.kt b/Server/src/main/content/global/skill/gather/GatheringSkillOptionListeners.kt index d40ed5d0f..cc7112fb3 100644 --- a/Server/src/main/content/global/skill/gather/GatheringSkillOptionListeners.kt +++ b/Server/src/main/content/global/skill/gather/GatheringSkillOptionListeners.kt @@ -2,8 +2,6 @@ package content.global.skill.gather import content.global.skill.fishing.FishingSpot import content.global.skill.gather.fishing.FishingPulse -import content.global.skill.gather.mining.MiningSkillPulse -import core.game.interaction.IntType import core.game.interaction.InteractionListener import core.game.node.Node import core.game.node.entity.npc.NPC diff --git a/Server/src/main/content/global/skill/gather/mining/MiningListener.kt b/Server/src/main/content/global/skill/gather/mining/MiningListener.kt index 73c252911..252356e46 100644 --- a/Server/src/main/content/global/skill/gather/mining/MiningListener.kt +++ b/Server/src/main/content/global/skill/gather/mining/MiningListener.kt @@ -76,7 +76,7 @@ class MiningListener : InteractionListener { if(reward == Items.CLAY_434){ val bracelet = getItemFromEquipment(player, EquipmentSlot.HANDS) if(bracelet != null && bracelet.id == Items.BRACELET_OF_CLAY_11074){ - var charges = player.getAttribute("jewellery-charges:bracelet-of-clay", 28); + var charges = player.getAttribute("jewellery-charges:bracelet-of-clay", 28) charges-- reward = Items.SOFT_CLAY_1761 sendMessage(player, "Your bracelet of clay softens the clay for you.") diff --git a/Server/src/main/content/global/skill/gather/mining/MiningSkillPulse.kt b/Server/src/main/content/global/skill/gather/mining/MiningSkillPulse.kt index 7784f5646..aa7ef70e6 100644 --- a/Server/src/main/content/global/skill/gather/mining/MiningSkillPulse.kt +++ b/Server/src/main/content/global/skill/gather/mining/MiningSkillPulse.kt @@ -141,7 +141,7 @@ class MiningSkillPulse(private val player: Player, private val node: Node) : Pul if(reward == Items.CLAY_434){ val bracelet = getItemFromEquipment(player, EquipmentSlot.HANDS) if(bracelet != null && bracelet.id == Items.BRACELET_OF_CLAY_11074){ - var charges = player.getAttribute("jewellery-charges:bracelet-of-clay", 28); + var charges = player.getAttribute("jewellery-charges:bracelet-of-clay", 28) charges-- reward = Items.SOFT_CLAY_1761 sendMessage(player, "Your bracelet of clay softens the clay for you.") diff --git a/Server/src/main/content/global/skill/hunter/implings/ImplingBehavior.kt b/Server/src/main/content/global/skill/hunter/implings/ImplingBehavior.kt index 30beec1d7..0848390b2 100644 --- a/Server/src/main/content/global/skill/hunter/implings/ImplingBehavior.kt +++ b/Server/src/main/content/global/skill/hunter/implings/ImplingBehavior.kt @@ -7,7 +7,7 @@ import core.game.world.map.path.ClipMaskSupplier import core.game.node.entity.npc.* import core.game.node.entity.Entity import core.game.node.entity.player.Player -import core.game.node.entity.player.link.SpellBookManager; +import core.game.node.entity.player.link.SpellBookManager import core.game.node.item.Item import core.game.node.entity.combat.CombatStyle import content.global.skill.magic.spellconsts.Modern @@ -34,19 +34,19 @@ class ImplingBehavior : NPCBehavior (*Impling.getIds()) { } override fun canBeAttackedBy(self: NPC, attacker: Entity, style: CombatStyle, shouldSendMessage: Boolean) : Boolean { - if (attacker !is Player) return false; + if (attacker !is Player) return false if (style != CombatStyle.MAGIC) { if (shouldSendMessage) sendMessage (attacker, "You can't do that.") - return false; + return false } val spellBook = attacker.spellBookManager.spellBook if (spellBook != SpellBookManager.SpellBook.MODERN.interfaceId) { if (shouldSendMessage) sendMessage (attacker, "The impling is too fast for that.") - return false; + return false } val spellId = attacker.properties.spell.spellId diff --git a/Server/src/main/content/global/skill/hunter/implings/ImplingData.kt b/Server/src/main/content/global/skill/hunter/implings/ImplingData.kt index a0777d980..affe2032c 100644 --- a/Server/src/main/content/global/skill/hunter/implings/ImplingData.kt +++ b/Server/src/main/content/global/skill/hunter/implings/ImplingData.kt @@ -172,7 +172,7 @@ enum class ImplingSpawnLocations (val type: ImplingSpawnTypes, vararg val locati object ImplingClipper : ClipMaskSupplier { override fun getClippingFlag (z: Int, x: Int, y: Int) : Int { - var flag = RegionManager.getClippingFlag(z, x, y); + var flag = RegionManager.getClippingFlag(z, x, y) return flag and (RegionFlags.SOLID_TILE.inv()) and (RegionFlags.TILE_OBJECT.inv()) //Allow walking on water and flying over small objects, but keep all other tile flags the same. } } diff --git a/Server/src/main/content/global/skill/hunter/pitfall/HunterPitfall.kt b/Server/src/main/content/global/skill/hunter/pitfall/HunterPitfall.kt index c54cbd693..b744ab910 100644 --- a/Server/src/main/content/global/skill/hunter/pitfall/HunterPitfall.kt +++ b/Server/src/main/content/global/skill/hunter/pitfall/HunterPitfall.kt @@ -1,9 +1,9 @@ -import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeUnit import core.api.* import core.game.node.entity.Entity import core.game.node.entity.combat.CombatStyle -import core.game.node.entity.impl.Animator.Priority; +import core.game.node.entity.impl.Animator.Priority import core.game.node.entity.impl.ForceMovement import core.game.node.entity.npc.AbstractNPC import core.game.node.entity.player.Player @@ -167,7 +167,7 @@ class PitfallListeners : InteractionListener { return@setDest dst } on(PIT, IntType.SCENERY, "trap") { player, node -> - val pit = node as Scenery; + val pit = node as Scenery // TODO: check hunter level, remove logs if(player.skills.getLevel(Skills.HUNTER) < 31) { player.sendMessage("You need a hunter level of 31 to set a pitfall trap.") @@ -204,12 +204,12 @@ class PitfallListeners : InteractionListener { return@on true } on(SPIKED_PIT, IntType.SCENERY, "jump") { player, node -> - val pit = node as Scenery; + val pit = node as Scenery val src = player.getLocation() val dir = pitJumpSpots(pit.getLocation())!![src] if(dir != null) { val dst = src.transform(dir, 3) - ForceMovement.run(player, src, dst, ForceMovement.WALK_ANIMATION, Animation(1603), dir, 16); + ForceMovement.run(player, src, dst, ForceMovement.WALK_ANIMATION, Animation(1603), dir, 16) playAudio(player, getAudio(Sounds.HUNTING_JUMP_2635)) val pitfall_npc: Entity? = player.getAttribute("pitfall_npc", null) if(pitfall_npc != null && pitfall_npc.getLocation().getDistance(src) < 3.0) { @@ -247,7 +247,7 @@ class PitfallListeners : InteractionListener { return@on true } on(SPIKED_PIT, IntType.SCENERY, "dismantle") { player, node -> - val pit = node as Scenery; + val pit = node as Scenery playAudio(player, getAudio(Sounds.HUNTING_TAKEBRANCHES_2649)) player.removeAttribute("pitfall:timestamp:${pit.location.x}:${pit.location.y}") player.incrementAttribute("pitfall:count", -1) @@ -289,11 +289,11 @@ class PitfallListeners : InteractionListener { fun lootCorpse(player: Player, pit: Scenery, xp: Double, goodFur: Int, badFur: Int) { if(player.inventory.freeSlots() < 2) { - player.sendMessage("You don't have enough inventory space. You need 2 more free slots."); + player.sendMessage("You don't have enough inventory space. You need 2 more free slots.") return } setPitState(player, pit.location, 0) - player.getSkills().addExperience(Skills.HUNTER, xp, true); + player.getSkills().addExperience(Skills.HUNTER, xp, true) player.inventory.add(Item(Items.BIG_BONES_532)) playAudio(player, getAudio(Sounds.HUNTING_TAKEBRANCHES_2649)) // TODO: what's the actual probability of tatty vs perfect fur? diff --git a/Server/src/main/content/global/skill/magic/modern/ModernListeners.kt b/Server/src/main/content/global/skill/magic/modern/ModernListeners.kt index cd5bced35..1c1750e9c 100644 --- a/Server/src/main/content/global/skill/magic/modern/ModernListeners.kt +++ b/Server/src/main/content/global/skill/magic/modern/ModernListeners.kt @@ -87,7 +87,7 @@ class ModernListeners : SpellListener("modern"){ onCast(Modern.CAMELOT_TELEPORT, NONE){ player, _-> requires(player,45, arrayOf(Item(Items.AIR_RUNE_556,5),Item(Items.LAW_RUNE_563))) - player.achievementDiaryManager.finishTask(player, DiaryType.SEERS_VILLAGE, 1, 5); + player.achievementDiaryManager.finishTask(player, DiaryType.SEERS_VILLAGE, 1, 5) sendTeleport(player,55.5, Location.create(2758, 3478, 0)) } diff --git a/Server/src/main/content/global/skill/magic/modern/SpellCharge.kt b/Server/src/main/content/global/skill/magic/modern/SpellCharge.kt index 2f6dee31d..65e6a4b31 100644 --- a/Server/src/main/content/global/skill/magic/modern/SpellCharge.kt +++ b/Server/src/main/content/global/skill/magic/modern/SpellCharge.kt @@ -1,10 +1,11 @@ package content.global.skill.magic.modern -import core.api.* -import org.json.simple.* -import core.game.system.timer.* +import core.api.getAudio +import core.api.playAudio +import core.api.sendMessage import core.game.node.entity.Entity import core.game.node.entity.player.Player +import core.game.system.timer.PersistTimer class SpellCharge : PersistTimer (700, "magic:spellcharge") { override fun run (entity: Entity) : Boolean { diff --git a/Server/src/main/content/global/skill/skillcapeperks/SkillcapePerks.kt b/Server/src/main/content/global/skill/skillcapeperks/SkillcapePerks.kt index 38cb62792..6e3cbe0f6 100644 --- a/Server/src/main/content/global/skill/skillcapeperks/SkillcapePerks.kt +++ b/Server/src/main/content/global/skill/skillcapeperks/SkillcapePerks.kt @@ -220,7 +220,7 @@ enum class SkillcapePerks(val attribute: String, val effect: ((Player) -> Unit)? override fun open(vararg args: Any?): Boolean { options("Air","Mind","Water","Earth","More...") - stage = 0; + stage = 0 return true } diff --git a/Server/src/main/content/global/skill/slayer/SkeletalWyvernBehavior.kt b/Server/src/main/content/global/skill/slayer/SkeletalWyvernBehavior.kt index 4636cd51b..437e2e6ad 100644 --- a/Server/src/main/content/global/skill/slayer/SkeletalWyvernBehavior.kt +++ b/Server/src/main/content/global/skill/slayer/SkeletalWyvernBehavior.kt @@ -1,10 +1,6 @@ package content.global.skill.slayer import content.global.handlers.item.equipment.special.DragonfireSwingHandler -import core.api.EquipmentSlot -import core.api.getItemFromEquipment -import core.game.node.entity.Entity -import core.game.node.entity.combat.BattleState import core.game.node.entity.combat.CombatStyle import core.game.node.entity.combat.CombatSwingHandler import core.game.node.entity.combat.MultiSwingHandler @@ -12,10 +8,8 @@ import core.game.node.entity.combat.equipment.SwitchAttack import core.game.node.entity.npc.NPC import core.game.node.entity.npc.NPCBehavior import core.game.node.entity.player.Player -import core.game.node.entity.player.link.prayer.PrayerType import core.game.world.update.flag.context.Animation import core.game.world.update.flag.context.Graphics -import core.tools.RandomFunction import org.rs09.consts.Items class SkeletalWyvernBehavior : NPCBehavior(*Tasks.SKELETAL_WYVERN.ids) { diff --git a/Server/src/main/content/global/skill/summoning/SummoningTabListener.kt b/Server/src/main/content/global/skill/summoning/SummoningTabListener.kt index be1afbd99..4321eac7b 100644 --- a/Server/src/main/content/global/skill/summoning/SummoningTabListener.kt +++ b/Server/src/main/content/global/skill/summoning/SummoningTabListener.kt @@ -19,34 +19,34 @@ class SummoningTabListener : InterfaceListener { player.getPacketDispatch().sendMessage("Your familiar is not a beast of burden.") return@on true } - val beast = player.getFamiliarManager().getFamiliar() as BurdenBeast; + val beast = player.getFamiliarManager().getFamiliar() as BurdenBeast if (beast.getContainer().isEmpty()) { player.getPacketDispatch().sendMessage("Your familiar is not carrying any items.") return@on true } - beast.withdrawAll(); + beast.withdrawAll() return@on true } - player.getPacketDispatch().sendMessage("You don't have a follower."); + player.getPacketDispatch().sendMessage("You don't have a follower.") } 53 -> { if (player.getFamiliarManager().hasFamiliar()) { if(opcode == 155) { // Dismiss familiar - player.getDialogueInterpreter().open("dismiss_dial"); + player.getDialogueInterpreter().open("dismiss_dial") } else if(opcode == 196) { // Dismiss now - player.getFamiliarManager().dismiss(false); + player.getFamiliarManager().dismiss(false) } } else { - player.getPacketDispatch().sendMessage("You don't have a follower."); + player.getPacketDispatch().sendMessage("You don't have a follower.") } } else -> { if (player.getFamiliarManager().hasFamiliar()) { - player.getFamiliarManager().getFamiliar().executeSpecialMove(FamiliarSpecial(player)); + player.getFamiliarManager().getFamiliar().executeSpecialMove(FamiliarSpecial(player)) } else { - player.getPacketDispatch().sendMessage("You don't have a follower."); + player.getPacketDispatch().sendMessage("You don't have a follower.") } } } diff --git a/Server/src/main/content/global/travel/canoe/CanoeUtils.kt b/Server/src/main/content/global/travel/canoe/CanoeUtils.kt index 7552d3f8b..594fc272e 100644 --- a/Server/src/main/content/global/travel/canoe/CanoeUtils.kt +++ b/Server/src/main/content/global/travel/canoe/CanoeUtils.kt @@ -51,21 +51,21 @@ object CanoeUtils { 2 -> FROM_BARBARIAN.getOrDefault(destId,0) 3 -> FROM_EDGE.getOrDefault(destId,0) 4 -> FROM_WILDERNESS.getOrDefault(destId,0) - else -> 0; + else -> 0 } } fun getShapeAnimation(axe: SkillingTool): Animation{ return when(axe){ - SkillingTool.BRONZE_AXE -> Animation(6744); - SkillingTool.IRON_AXE -> Animation(6743); - SkillingTool.STEEL_AXE -> Animation(6742); - SkillingTool.BLACK_AXE -> Animation(6741); - SkillingTool.MITHRIL_AXE -> Animation(6740); - SkillingTool.ADAMANT_AXE -> Animation(6739); - SkillingTool.RUNE_AXE -> Animation(6738); - SkillingTool.DRAGON_AXE -> Animation(6745); - else -> axe.animation; + SkillingTool.BRONZE_AXE -> Animation(6744) + SkillingTool.IRON_AXE -> Animation(6743) + SkillingTool.STEEL_AXE -> Animation(6742) + SkillingTool.BLACK_AXE -> Animation(6741) + SkillingTool.MITHRIL_AXE -> Animation(6740) + SkillingTool.ADAMANT_AXE -> Animation(6739) + SkillingTool.RUNE_AXE -> Animation(6738) + SkillingTool.DRAGON_AXE -> Animation(6745) + else -> axe.animation } } diff --git a/Server/src/main/content/minigame/allfiredup/AFUBeacon.kt b/Server/src/main/content/minigame/allfiredup/AFUBeacon.kt index b830a5ea1..c97013a0f 100644 --- a/Server/src/main/content/minigame/allfiredup/AFUBeacon.kt +++ b/Server/src/main/content/minigame/allfiredup/AFUBeacon.kt @@ -27,11 +27,11 @@ enum class AFUBeacon(val title: String, val fmLevel: Int, val varbit: Int, val l PLATEAU("",92,5159,Location.create(2964, 3931, 0),147.9); companion object { - fun forLocation(location: Location): content.minigame.allfiredup.AFUBeacon { + fun forLocation(location: Location): AFUBeacon { for (beacon in values()) { if (beacon.location.equals(location)) return beacon } - return content.minigame.allfiredup.AFUBeacon.RIVER_SALVE.also { log(this::class.java, Log.WARN, "Unhandled Beacon Location ${location.toString()}") } + return AFUBeacon.RIVER_SALVE.also { log(this::class.java, Log.WARN, "Unhandled Beacon Location ${location.toString()}") } } fun resetAllBeacons(player: Player){ @@ -61,7 +61,7 @@ enum class AFUBeacon(val title: String, val fmLevel: Int, val varbit: Int, val l setVarbit(player, varbit, 1, true) } - fun getState(player: Player): content.minigame.allfiredup.BeaconState { + fun getState(player: Player): BeaconState { return BeaconState.values()[getVarbit(player, varbit)] } } diff --git a/Server/src/main/content/minigame/allfiredup/AFUBeaconHandler.kt b/Server/src/main/content/minigame/allfiredup/AFUBeaconHandler.kt index 4d889deb9..08d059bcf 100644 --- a/Server/src/main/content/minigame/allfiredup/AFUBeaconHandler.kt +++ b/Server/src/main/content/minigame/allfiredup/AFUBeaconHandler.kt @@ -23,26 +23,26 @@ class AFUBeaconListeners : InteractionListener { override fun defineListeners() { on(IntType.SCENERY,"add-logs","light"){ player, node -> - val beacon = content.minigame.allfiredup.AFUBeacon.forLocation(node.location) + val beacon = AFUBeacon.forLocation(node.location) val questComplete = player.questRepository.isComplete("All Fired Up") val questStage = player.questRepository.getStage("All Fired Up") - if ((beacon != content.minigame.allfiredup.AFUBeacon.RIVER_SALVE && beacon != content.minigame.allfiredup.AFUBeacon.RAG_AND_BONE && !questComplete) - || (beacon == content.minigame.allfiredup.AFUBeacon.RIVER_SALVE && questStage < 20 && !questComplete) - || (beacon == content.minigame.allfiredup.AFUBeacon.RAG_AND_BONE && questStage < 50 && !questComplete)) { + if ((beacon != AFUBeacon.RIVER_SALVE && beacon != AFUBeacon.RAG_AND_BONE && !questComplete) + || (beacon == AFUBeacon.RIVER_SALVE && questStage < 20 && !questComplete) + || (beacon == AFUBeacon.RAG_AND_BONE && questStage < 50 && !questComplete)) { player.dialogueInterpreter.sendDialogues(player, core.game.dialogue.FacialExpression.THINKING, "I probably shouldn't mess with this.") return@on true } player.debug(beacon.getState(player).name) when (beacon.getState(player)) { - content.minigame.allfiredup.BeaconState.EMPTY -> fillBeacon(player, beacon, questComplete) + BeaconState.EMPTY -> fillBeacon(player, beacon, questComplete) - content.minigame.allfiredup.BeaconState.DYING -> restoreBeacon(player, beacon, questComplete) + BeaconState.DYING -> restoreBeacon(player, beacon, questComplete) - content.minigame.allfiredup.BeaconState.FILLED -> lightBeacon(player, beacon, questComplete) + BeaconState.FILLED -> lightBeacon(player, beacon, questComplete) - content.minigame.allfiredup.BeaconState.LIT, content.minigame.allfiredup.BeaconState.WARNING -> { + BeaconState.LIT, BeaconState.WARNING -> { player.debug("INVALID BEACON STATE") } } @@ -50,24 +50,24 @@ class AFUBeaconListeners : InteractionListener { } } - fun fillBeacon(player: Player, beacon: content.minigame.allfiredup.AFUBeacon, questComplete: Boolean){ + fun fillBeacon(player: Player, beacon: AFUBeacon, questComplete: Boolean){ when(beacon){ - content.minigame.allfiredup.AFUBeacon.MONASTERY -> { + AFUBeacon.MONASTERY -> { if(player.skills.getLevel(Skills.PRAYER) < 31){ player.dialogueInterpreter.sendDialogues(NPC(beacon.keeper).getShownNPC(player), core.game.dialogue.FacialExpression.ANGRY,"You must join the monastery to light this beacon!") return } } - content.minigame.allfiredup.AFUBeacon.GWD -> { + AFUBeacon.GWD -> { if(!AFURepairClimbHandler.isRepaired(player, beacon)){ player.dialogueInterpreter.sendDialogue("You must repair the windbreak before you","can light this beacon.") return } } - content.minigame.allfiredup.AFUBeacon.GOBLIN_VILLAGE -> { + AFUBeacon.GOBLIN_VILLAGE -> { if(!player.questRepository.isComplete("Lost Tribe")){ player.dialogueInterpreter.sendDialogues(NPC(beacon.keeper).getShownNPC(player), core.game.dialogue.FacialExpression.THINKING,"We no trust you outsider. You no light our beacon.","(Complete Lost Tribe to use this beacon.)") return @@ -117,7 +117,7 @@ class AFUBeaconListeners : InteractionListener { } } - fun lightBeacon(player: Player, beacon: content.minigame.allfiredup.AFUBeacon, questComplete: Boolean){ + fun lightBeacon(player: Player, beacon: AFUBeacon, questComplete: Boolean){ var session: AFUSession? = null if(questComplete){ session = player.getAttribute("afu-session",null) @@ -164,7 +164,7 @@ class AFUBeaconListeners : InteractionListener { } } - fun restoreBeacon(player: Player, beacon: content.minigame.allfiredup.AFUBeacon, questComplete: Boolean){ + fun restoreBeacon(player: Player, beacon: AFUBeacon, questComplete: Boolean){ var session: AFUSession? = null if(questComplete){ session = player.getAttribute("afu-session",null) diff --git a/Server/src/main/content/minigame/allfiredup/AFURepairClimbHandler.kt b/Server/src/main/content/minigame/allfiredup/AFURepairClimbHandler.kt index 705352cba..ac6017994 100644 --- a/Server/src/main/content/minigame/allfiredup/AFURepairClimbHandler.kt +++ b/Server/src/main/content/minigame/allfiredup/AFURepairClimbHandler.kt @@ -129,11 +129,11 @@ class AFURepairClimbHandler : InteractionListener { } companion object { - fun isRepaired(player: Player, beacon: content.minigame.allfiredup.AFUBeacon): Boolean{ - if(beacon == content.minigame.allfiredup.AFUBeacon.DEATH_PLATEAU) return RepairClimbObject.DEATH_PLATEAU.isRepaired(player) - if(beacon == content.minigame.allfiredup.AFUBeacon.BURTHORPE) return RepairClimbObject.BURTHORPE.isRepaired(player) - if(beacon == content.minigame.allfiredup.AFUBeacon.GWD) return RepairClimbObject.GWD.isRepaired(player) - if(beacon == content.minigame.allfiredup.AFUBeacon.TEMPLE) return RepairClimbObject.TEMPLE.isRepaired(player) + fun isRepaired(player: Player, beacon: AFUBeacon): Boolean{ + if(beacon == AFUBeacon.DEATH_PLATEAU) return RepairClimbObject.DEATH_PLATEAU.isRepaired(player) + if(beacon == AFUBeacon.BURTHORPE) return RepairClimbObject.BURTHORPE.isRepaired(player) + if(beacon == AFUBeacon.GWD) return RepairClimbObject.GWD.isRepaired(player) + if(beacon == AFUBeacon.TEMPLE) return RepairClimbObject.TEMPLE.isRepaired(player) else return true } } diff --git a/Server/src/main/content/minigame/allfiredup/AFUSession.kt b/Server/src/main/content/minigame/allfiredup/AFUSession.kt index ef4f837df..1168a0f0f 100644 --- a/Server/src/main/content/minigame/allfiredup/AFUSession.kt +++ b/Server/src/main/content/minigame/allfiredup/AFUSession.kt @@ -13,7 +13,7 @@ import core.tools.colorize * @author Ceikry */ class AFUSession(val player: Player? = null) : LogoutListener { - private val beaconTimers = Array(14){i -> BeaconTimer(0, content.minigame.allfiredup.AFUBeacon.values()[i]) } + private val beaconTimers = Array(14){i -> BeaconTimer(0, AFUBeacon.values()[i]) } private val logInventories = Array(14){Item(0,0)} private val beaconWatched = Array(14){false} private var isActive = false @@ -61,7 +61,7 @@ class AFUSession(val player: Player? = null) : LogoutListener { beaconTimers[beaconIndex].ticks = ticks } - fun refreshTimer(beacon: content.minigame.allfiredup.AFUBeacon, logID: Int){ + fun refreshTimer(beacon: AFUBeacon, logID: Int){ val ticks = getTicks(logID) * 5 beaconTimers.forEach { if(it.beacon.ordinal == beacon.ordinal) it.ticks += ticks @@ -111,11 +111,11 @@ class AFUSession(val player: Player? = null) : LogoutListener { } override fun logout(player: Player) { - content.minigame.allfiredup.AFUBeacon.resetAllBeacons(player) + AFUBeacon.resetAllBeacons(player) val session: AFUSession? = player.getAttribute("afu-session",null) session?.end() player.removeAttribute("afu-session") } - internal class BeaconTimer(var ticks: Int, val beacon: content.minigame.allfiredup.AFUBeacon) + internal class BeaconTimer(var ticks: Int, val beacon: AFUBeacon) } \ No newline at end of file diff --git a/Server/src/main/content/minigame/allfiredup/BeaconTenderDialogue.kt b/Server/src/main/content/minigame/allfiredup/BeaconTenderDialogue.kt index c02ebd0e4..f2b25db41 100644 --- a/Server/src/main/content/minigame/allfiredup/BeaconTenderDialogue.kt +++ b/Server/src/main/content/minigame/allfiredup/BeaconTenderDialogue.kt @@ -14,22 +14,22 @@ private val VALID_LOGS = arrayOf(Items.LOGS_1511, Items.OAK_LOGS_1521, Items.WIL @Initializable //TODO: Add requirements for beacon keepers to watch beacons, most of the requirements were not possible to implement at the time of writing this. -class BeaconTenderDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class BeaconTenderDialogue(player: Player? = null) : DialoguePlugin(player) { var index = 0 - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return BeaconTenderDialogue(player) } override fun open(vararg args: Any?): Boolean { npc = (args[0] as NPC).getShownNPC(player) index = getIndexOf((args[0] as NPC).originalId) - if(index == content.minigame.allfiredup.AFUBeacon.GWD.ordinal && player.skills.getLevel(Skills.SUMMONING) < 81){ + if(index == AFUBeacon.GWD.ordinal && player.skills.getLevel(Skills.SUMMONING) < 81){ npc("Awwf uurrrhur","(You need 81 Summoning to communicate with Nanuq.)") stage = 1000 return true } - if(index == content.minigame.allfiredup.AFUBeacon.MONASTERY.ordinal && player.skills.getLevel(Skills.PRAYER) < 53){ + if(index == AFUBeacon.MONASTERY.ordinal && player.skills.getLevel(Skills.PRAYER) < 53){ npc("I will aid you when your devotion is","strong enough.","(You need 53 Prayer for him to assist you.)") stage = 1000 return true @@ -39,12 +39,12 @@ class BeaconTenderDialogue(player: Player? = null) : core.game.dialogue.Dialogue } override fun handle(interfaceId: Int, buttonId: Int): Boolean { - val beacon = content.minigame.allfiredup.AFUBeacon.values()[index] + val beacon = AFUBeacon.values()[index] val logs = getLogs(player,5) val session: AFUSession? = player.getAttribute("afu-session",null) when(stage){ 0 -> player("Hello!").also { stage++ } - 1 -> if(beacon.getState(player) == content.minigame.allfiredup.BeaconState.LIT && session?.isWatched(index) == false){ + 1 -> if(beacon.getState(player) == BeaconState.LIT && session?.isWatched(index) == false){ options("Can you watch this beacon for me?","Nevermind.").also { stage = 10 } } else { npc("Carry on, adventurer.").also { stage = 1000 } diff --git a/Server/src/main/content/minigame/barbassault/CaptainCainDialogue.kt b/Server/src/main/content/minigame/barbassault/CaptainCainDialogue.kt index f1d91e854..c0e50104d 100644 --- a/Server/src/main/content/minigame/barbassault/CaptainCainDialogue.kt +++ b/Server/src/main/content/minigame/barbassault/CaptainCainDialogue.kt @@ -14,14 +14,14 @@ import java.time.temporal.ChronoUnit import java.util.* @Initializable -class CaptainCainDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class CaptainCainDialogue(player: Player? = null) : DialoguePlugin(player) { val sdf = SimpleDateFormat("ddMMyyyy") - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return CaptainCainDialogue(player) } override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Hello, there, adventurer. Say, you wouldn't happen to be interested in purchasing a Fighter Torso would you?") + npcl(FacialExpression.FRIENDLY, "Hello, there, adventurer. Say, you wouldn't happen to be interested in purchasing a Fighter Torso would you?") stage = 0 return true } @@ -31,26 +31,26 @@ class CaptainCainDialogue(player: Player? = null) : core.game.dialogue.DialogueP val now = Date().toInstant() val days = ChronoUnit.DAYS.between(start,now) when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"I'm having to offer this service because it's been $days days since Ryan promised to give us barbarian assault.").also { stage++ } + 0 -> npcl(FacialExpression.ANNOYED,"I'm having to offer this service because it's been $days days since Ryan promised to give us barbarian assault.").also { stage++ } 1 -> options("Yes, please.","No, thanks.").also { stage++ } 2 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, please.").also { stage = 10 } - 2 -> playerl(core.game.dialogue.FacialExpression.HALF_THINKING, "No, thanks.").also { stage = END_DIALOGUE } + 1 -> playerl(FacialExpression.FRIENDLY, "Yes, please.").also { stage = 10 } + 2 -> playerl(FacialExpression.HALF_THINKING, "No, thanks.").also { stage = END_DIALOGUE } } - 10 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Alright, then, that'll be 7,500,000 gold please.").also { stage++ } + 10 -> npcl(FacialExpression.FRIENDLY, "Alright, then, that'll be 7,500,000 gold please.").also { stage++ } 11 -> options("Here you go!","Nevermind.").also { stage++ } 12 -> when(buttonId){ 1 -> if(inInventory(player, 995, 7500000)) - playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Here you go!").also { stage = 20 } + playerl(FacialExpression.FRIENDLY, "Here you go!").also { stage = 20 } else - playerl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Actually, I don't have that much.").also { stage = END_DIALOGUE } + playerl(FacialExpression.HALF_GUILTY, "Actually, I don't have that much.").also { stage = END_DIALOGUE } - 2 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "On second thought, nevermind.").also { stage = END_DIALOGUE } + 2 -> playerl(FacialExpression.FRIENDLY, "On second thought, nevermind.").also { stage = END_DIALOGUE } } 20 -> { - npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Thank you much, kind sir. And here's your torso.") + npcl(FacialExpression.FRIENDLY, "Thank you much, kind sir. And here's your torso.") if(removeItem(player, Item(995,7500000), Container.INVENTORY)) { addItem(player, Items.FIGHTER_TORSO_10551, 1) } diff --git a/Server/src/main/content/minigame/barrows/RewardChest.kt b/Server/src/main/content/minigame/barrows/RewardChest.kt index 1a79be82c..95c194db6 100644 --- a/Server/src/main/content/minigame/barrows/RewardChest.kt +++ b/Server/src/main/content/minigame/barrows/RewardChest.kt @@ -93,7 +93,7 @@ object RewardChest { player.interfaceManager.open(Component(Components.TRAIL_REWARD_364)) BossKillCounter.addtoBarrowsCount(player) for(item in rewards){ - announceIfRare(player, item); + announceIfRare(player, item) if(!player.inventory.add(item)){ GroundItemManager.create(item,player) } diff --git a/Server/src/main/content/minigame/blastfurnace/BlastFurnace.kt b/Server/src/main/content/minigame/blastfurnace/BlastFurnace.kt index 76985e767..ec93900a4 100644 --- a/Server/src/main/content/minigame/blastfurnace/BlastFurnace.kt +++ b/Server/src/main/content/minigame/blastfurnace/BlastFurnace.kt @@ -185,7 +185,7 @@ object BlastFurnace { if(bar.product.id == Items.GOLD_BAR_2357 && player.equipment[EquipmentContainer.SLOT_HANDS] != null && player.equipment[EquipmentContainer.SLOT_HANDS].id == GOLDSMITH_GAUNTLETS_776) { - experience *= 2.5; + experience *= 2.5 } rewardXP(player, Skills.SMITHING, experience) totalAmount = barsAmount + oreAmount diff --git a/Server/src/main/content/minigame/bountyhunter/MaximillianSackvilleDialogue.kt b/Server/src/main/content/minigame/bountyhunter/MaximillianSackvilleDialogue.kt index 73d3c1369..a5b047041 100644 --- a/Server/src/main/content/minigame/bountyhunter/MaximillianSackvilleDialogue.kt +++ b/Server/src/main/content/minigame/bountyhunter/MaximillianSackvilleDialogue.kt @@ -19,13 +19,13 @@ import core.tools.START_DIALOGUE * @author vddCore */ @Initializable -class MaximillianSackvilleDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class MaximillianSackvilleDialogue(player: Player? = null) : DialoguePlugin(player) { override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { START_DIALOGUE -> when { hasIronmanRestriction(player, IronmanMode.ULTIMATE) -> { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "My apologies, dear ${if (player.isMale) "sir" else "madam"}, " + "our services are not available for Ultimate ${if (player.isMale) "Ironmen" else "Ironwomen"}." ).also { stage = END_DIALOGUE } @@ -33,7 +33,7 @@ class MaximillianSackvilleDialogue(player: Player? = null) : core.game.dialogue. else -> { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Good day, how may I help you?" ).also { if (hasAwaitingGrandExchangeCollections(player)) { @@ -46,44 +46,44 @@ class MaximillianSackvilleDialogue(player: Player? = null) : core.game.dialogue. } 1 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Before we go any further, I should inform you that you " + "have items ready for collection from the Grand Exchange." ).also { stage++ } 2 -> playerl( - core.game.dialogue.FacialExpression.ASKING, + FacialExpression.ASKING, "Who are you?" ).also { stage++ } 3 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "How inconsiderate of me, dear ${if (player.isMale) "sir" else "madam"}. " + "My name is Maximillian Sackville and I conduct operations here on behalf " + "of The Bank of Gielinor." ).also { stage++ } 4 -> showTopics( - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I'd like to access my bank account.", 10), + Topic(FacialExpression.NEUTRAL, "I'd like to access my bank account.", 10), IfTopic( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "I'd like to switch to my ${getBankAccountName(player, true)} bank account.", 11, hasActivatedSecondaryBankAccount(player) ), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I'd like to check my PIN settings.", 12), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I'd like to collect items.", 13), - Topic(core.game.dialogue.FacialExpression.ASKING, "Aren't you afraid of working in the Wilderness?", 5) + Topic(FacialExpression.NEUTRAL, "I'd like to check my PIN settings.", 12), + Topic(FacialExpression.NEUTRAL, "I'd like to collect items.", 13), + Topic(FacialExpression.ASKING, "Aren't you afraid of working in the Wilderness?", 5) ) 5 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "While the Wilderness is quite a dangerous place, The Bank of Gielinor offers " + "us - roving bankers - extraordinary benefits for our hard work in hazardous environments." ).also { stage++ } 6 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "This allows us to provide our services to customers regardless of their current " + "whereabouts. Our desire to serve is stronger than our fear of the Wilderness." ).also { stage = END_DIALOGUE } @@ -97,7 +97,7 @@ class MaximillianSackvilleDialogue(player: Player? = null) : core.game.dialogue. toggleBankAccount(player) npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Naturally. You can now access your ${getBankAccountName(player)} bank account." ).also { stage = END_DIALOGUE } } diff --git a/Server/src/main/content/minigame/castlewars/CastleWarsOverlay.kt b/Server/src/main/content/minigame/castlewars/CastleWarsOverlay.kt index f60597b0c..76a4a8a35 100644 --- a/Server/src/main/content/minigame/castlewars/CastleWarsOverlay.kt +++ b/Server/src/main/content/minigame/castlewars/CastleWarsOverlay.kt @@ -14,9 +14,9 @@ object CastleWarsOverlay { @JvmStatic fun sendGameUpdate(player: Player) { // Todo - Figure out underground mine/etc - setVarbit(player, 143, 0); // Flag status - safe = 0, taken = 1, dropped = 2 - setVarbit(player, 145, 5); // Saradomin's score - setVarbit(player, 153, 0); // Flag status - safe = 0, taken = 1, dropped = 2 - setVarbit(player, 155, 7); // Zamorak's score + setVarbit(player, 143, 0) // Flag status - safe = 0, taken = 1, dropped = 2 + setVarbit(player, 145, 5) // Saradomin's score + setVarbit(player, 153, 0) // Flag status - safe = 0, taken = 1, dropped = 2 + setVarbit(player, 155, 7) // Zamorak's score } } diff --git a/Server/src/main/content/minigame/duel/AfrahDialogue.kt b/Server/src/main/content/minigame/duel/AfrahDialogue.kt index 610809294..d480392f7 100644 --- a/Server/src/main/content/minigame/duel/AfrahDialogue.kt +++ b/Server/src/main/content/minigame/duel/AfrahDialogue.kt @@ -11,12 +11,12 @@ import core.plugin.Initializable */ @Initializable -class AfrahDialogue : core.game.dialogue.DialoguePlugin { +class AfrahDialogue : DialoguePlugin { private val conversations = arrayOf (0, 4, 10, 11, 15, 17, 20, 22, 23, 24, 29, 32) override fun open(vararg args: Any): Boolean { - player(core.game.dialogue.FacialExpression.ASKING, "Hi!") + player(FacialExpression.ASKING, "Hi!") stage = conversations.random() npc = args[0] as NPC return true @@ -32,135 +32,135 @@ class AfrahDialogue : core.game.dialogue.DialoguePlugin { override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { 0 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Ooh. This is exciting!") + npc(FacialExpression.ASKING, "Ooh. This is exciting!") stage++ } 1 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Yup!") + player(FacialExpression.ASKING, "Yup!") stage = 99 } 2 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "I wouldn't want to be the poor guy that has to", "clean up after the duels.") + npc(FacialExpression.ASKING, "I wouldn't want to be the poor guy that has to", "clean up after the duels.") stage++ } 3 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Me neither.") + player(FacialExpression.ASKING, "Me neither.") stage = 99 } 4 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "My son just won his first duel!") + npc(FacialExpression.ASKING, "My son just won his first duel!") stage++ } 5 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Congratulations!") + player(FacialExpression.ASKING, "Congratulations!") stage++ } 6 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "He ripped his opponent in half!") + npc(FacialExpression.ASKING, "He ripped his opponent in half!") stage++ } 7 -> { - player(core.game.dialogue.FacialExpression.ASKING, "That's gotta hurt!") + player(FacialExpression.ASKING, "That's gotta hurt!") stage++ } 8 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "He's only 10 as well!") + npc(FacialExpression.ASKING, "He's only 10 as well!") stage++ } 9 -> { - player(core.game.dialogue.FacialExpression.ASKING, "You gotta start 'em young!") + player(FacialExpression.ASKING, "You gotta start 'em young!") stage = 99 } 10 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Hmph.") + npc(FacialExpression.ASKING, "Hmph.") stage = 99 } 11 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "My favourite fighter is Mubariz!") + npc(FacialExpression.ASKING, "My favourite fighter is Mubariz!") stage++ } 12 -> { - player(core.game.dialogue.FacialExpression.ASKING, "The guy at the information kiosk?") + player(FacialExpression.ASKING, "The guy at the information kiosk?") stage++ } 13 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Yeah! He rocks!") + npc(FacialExpression.ASKING, "Yeah! He rocks!") stage++ } 14 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Takes all sorts, I guess.") + player(FacialExpression.ASKING, "Takes all sorts, I guess.") stage = 99 } 15 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Hi! I'm here to watch the duels!") + npc(FacialExpression.ASKING, "Hi! I'm here to watch the duels!") stage++ } 16 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Me too!") + player(FacialExpression.ASKING, "Me too!") stage = 99 } 17 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Did you know they think this place dates","back to the second age?!") + npc(FacialExpression.ASKING, "Did you know they think this place dates","back to the second age?!") stage++ } 18 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Really?") + player(FacialExpression.ASKING, "Really?") stage++ } 19 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Yeah. The guy at the information kiosk was telling me.") + npc(FacialExpression.ASKING, "Yeah. The guy at the information kiosk was telling me.") stage = 99 } 20 -> { - npc(core.game.dialogue.FacialExpression.ANGRY, "Can't you see I'm watching the duels?") + npc(FacialExpression.ANGRY, "Can't you see I'm watching the duels?") stage++ } 21 -> { - player(core.game.dialogue.FacialExpression.SAD, "I'm sorry!") + player(FacialExpression.SAD, "I'm sorry!") stage = 99 } 22 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Well. This beats doing the shopping!") + npc(FacialExpression.ASKING, "Well. This beats doing the shopping!") stage = 99 } 23 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Hi!") + npc(FacialExpression.ASKING, "Hi!") stage = 99 } 24 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Knock knock!") + npc(FacialExpression.ASKING, "Knock knock!") stage++ } 25 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Who's there?") + player(FacialExpression.ASKING, "Who's there?") stage++ } 26 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Boo!") + npc(FacialExpression.ASKING, "Boo!") stage++ } 27 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Boo who?") + player(FacialExpression.ASKING, "Boo who?") stage++ } 28 -> { - npc(core.game.dialogue.FacialExpression.LAUGH, "Don't cry, it's just me!") + npc(FacialExpression.LAUGH, "Don't cry, it's just me!") stage = 99 } 29 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Why did the skeleton burp?") + npc(FacialExpression.ASKING, "Why did the skeleton burp?") stage++ } 30 -> { - player(core.game.dialogue.FacialExpression.ASKING, "I don't know?") + player(FacialExpression.ASKING, "I don't know?") stage++ } 31 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "'Cause it didn't have the guts to fart!") + npc(FacialExpression.ASKING, "'Cause it didn't have the guts to fart!") stage = 99 } 32 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Waaaaassssssuuuuupp?!.") + npc(FacialExpression.ASKING, "Waaaaassssssuuuuupp?!.") stage = 99 } 99 -> end() @@ -168,7 +168,7 @@ class AfrahDialogue : core.game.dialogue.DialoguePlugin { return true } - override fun newInstance(player: Player): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player): DialoguePlugin { return AfrahDialogue(player) } } \ No newline at end of file diff --git a/Server/src/main/content/minigame/fog/FogInteractionHandler.kt b/Server/src/main/content/minigame/fog/FogInteractionHandler.kt index 9eea115d1..8f7b2e870 100644 --- a/Server/src/main/content/minigame/fog/FogInteractionHandler.kt +++ b/Server/src/main/content/minigame/fog/FogInteractionHandler.kt @@ -26,8 +26,8 @@ class FogInteractionHandler : PluginInteraction(30204, 30203){ override fun pulse(): Boolean { player.faceLocation(obj.location) when(obj.id) { - 30204 -> core.game.global.action.ClimbActionHandler.climbLadder(player, obj, "climb-down") - 30203 -> core.game.global.action.ClimbActionHandler.climbLadder(player,obj,"climb-up") + 30204 -> ClimbActionHandler.climbLadder(player, obj, "climb-down") + 30203 -> ClimbActionHandler.climbLadder(player,obj,"climb-up") } return true } diff --git a/Server/src/main/content/minigame/gnomecooking/crunchies/GnomeCrunchyInterface.kt b/Server/src/main/content/minigame/gnomecooking/crunchies/GnomeCrunchyInterface.kt index 99f8e445e..4785ef3d3 100644 --- a/Server/src/main/content/minigame/gnomecooking/crunchies/GnomeCrunchyInterface.kt +++ b/Server/src/main/content/minigame/gnomecooking/crunchies/GnomeCrunchyInterface.kt @@ -50,7 +50,7 @@ class GnomeCrunchyInterface : ComponentPlugin() { for(item in crunchy.requiredItems){ if(!player.inventory.containsItem(item)){ hasAll = false - break; + break } } diff --git a/Server/src/main/content/minigame/mta/EnchantSpell.kt b/Server/src/main/content/minigame/mta/EnchantSpell.kt index 37a61430b..d6df04fe8 100644 --- a/Server/src/main/content/minigame/mta/EnchantSpell.kt +++ b/Server/src/main/content/minigame/mta/EnchantSpell.kt @@ -86,7 +86,7 @@ class EnchantSpell : MagicSpell { } } if (pizazz != 0) { - content.minigame.mta.impl.EnchantingZone.ZONE.incrementPoints(entity, content.minigame.mta.MTAType.ENCHANTERS.ordinal, pizazz) + content.minigame.mta.impl.EnchantingZone.ZONE.incrementPoints(entity, MTAType.ENCHANTERS.ordinal, pizazz) } } return true diff --git a/Server/src/main/content/minigame/mta/MTAListeners.kt b/Server/src/main/content/minigame/mta/MTAListeners.kt index 5c823d98c..538f9d5bc 100644 --- a/Server/src/main/content/minigame/mta/MTAListeners.kt +++ b/Server/src/main/content/minigame/mta/MTAListeners.kt @@ -18,7 +18,7 @@ class MTAListeners : InteractionListener { return@on true } setDest(IntType.NPC, intArrayOf(NPCs.MAZE_GUARDIAN_3102), "talk-to") { player, node -> - return@setDest node.location.transform(Direction.getDirection(player.location, node.location), -1); + return@setDest node.location.transform(Direction.getDirection(player.location, node.location), -1) } } } diff --git a/Server/src/main/content/minigame/pestcontrol/PestControlHelper.kt b/Server/src/main/content/minigame/pestcontrol/PestControlHelper.kt index b9bb69c1c..82c17b0a4 100644 --- a/Server/src/main/content/minigame/pestcontrol/PestControlHelper.kt +++ b/Server/src/main/content/minigame/pestcontrol/PestControlHelper.kt @@ -61,12 +61,12 @@ object PestControlHelper { return false } - fun getMyPestControlSession1(p: PestControlTestBot): content.minigame.pestcontrol.PestControlSession? { - return p.getExtension(content.minigame.pestcontrol.PestControlSession::class.java) + fun getMyPestControlSession1(p: PestControlTestBot): PestControlSession? { + return p.getExtension(PestControlSession::class.java) } - fun getMyPestControlSession2(p: PestControlTestBot2): content.minigame.pestcontrol.PestControlSession? { - return p.getExtension(content.minigame.pestcontrol.PestControlSession::class.java) + fun getMyPestControlSession2(p: PestControlTestBot2): PestControlSession? { + return p.getExtension(PestControlSession::class.java) } } \ No newline at end of file diff --git a/Server/src/main/content/minigame/pestcontrol/bots/CombatState.kt b/Server/src/main/content/minigame/pestcontrol/bots/CombatState.kt index 171da04ce..eda19e11f 100644 --- a/Server/src/main/content/minigame/pestcontrol/bots/CombatState.kt +++ b/Server/src/main/content/minigame/pestcontrol/bots/CombatState.kt @@ -32,7 +32,7 @@ class CombatState(val bot: PestControlTestBot) { removeList.add(port) } else { portal = port - break; + break } } sesh.aportals.removeAll(removeList) diff --git a/Server/src/main/content/minigame/pestcontrol/bots/CombatStateIntermediate.kt b/Server/src/main/content/minigame/pestcontrol/bots/CombatStateIntermediate.kt index fe52e5040..303a3d9a9 100644 --- a/Server/src/main/content/minigame/pestcontrol/bots/CombatStateIntermediate.kt +++ b/Server/src/main/content/minigame/pestcontrol/bots/CombatStateIntermediate.kt @@ -31,7 +31,7 @@ class CombatStateIntermediate(val bot: PestControlTestBot2) { removeList.add(port) } else { portal = port - break; + break } } sesh.aportals.removeAll(removeList) diff --git a/Server/src/main/content/minigame/pestcontrol/bots/PestControlIntermediateBot.kt b/Server/src/main/content/minigame/pestcontrol/bots/PestControlIntermediateBot.kt index 40333b842..c369030d8 100644 --- a/Server/src/main/content/minigame/pestcontrol/bots/PestControlIntermediateBot.kt +++ b/Server/src/main/content/minigame/pestcontrol/bots/PestControlIntermediateBot.kt @@ -34,7 +34,7 @@ class PestControlTestBot2(l: Location) : PvMBots(legitimizeLocation(l)) { init { val random100 = Random().nextInt(100) if (random100 < 30) { - setAttribute("pc_role","defend_squire"); + setAttribute("pc_role","defend_squire") } else { setAttribute("pc_role","attack_portals") @@ -160,8 +160,8 @@ class PestControlTestBot2(l: Location) : PvMBots(legitimizeLocation(l)) { this.walkToPosSmart(myBoat.outsideBoatBorder.randomLoc) movetimer += RandomFunction.normalPlusWeightRandDist(400, 200) } - movetimer = RandomFunction.normalPlusWeightRandDist(100, 50); - return; + movetimer = RandomFunction.normalPlusWeightRandDist(100, 50) + return } val test = getClosestNodeWithEntry(15, myBoat.ladderId) test ?: randomWalk(1,1) diff --git a/Server/src/main/content/minigame/pestcontrol/bots/PestControlNoviceBot.kt b/Server/src/main/content/minigame/pestcontrol/bots/PestControlNoviceBot.kt index 9c867d71f..6d07a15df 100644 --- a/Server/src/main/content/minigame/pestcontrol/bots/PestControlNoviceBot.kt +++ b/Server/src/main/content/minigame/pestcontrol/bots/PestControlNoviceBot.kt @@ -34,7 +34,7 @@ class PestControlTestBot(l: Location) : PvMBots(legitimizeLocation(l)){ init { val random100 = Random().nextInt(100) if (random100 < 30) { - setAttribute("pc_role","defend_squire"); + setAttribute("pc_role","defend_squire") } else { setAttribute("pc_role","attack_portals") @@ -156,8 +156,8 @@ class PestControlTestBot(l: Location) : PvMBots(legitimizeLocation(l)){ this.walkToPosSmart(myBoat.outsideBoatBorder.randomLoc) movetimer += RandomFunction.normalPlusWeightRandDist(400, 200) } - movetimer = RandomFunction.normalPlusWeightRandDist(100, 50); - return; + movetimer = RandomFunction.normalPlusWeightRandDist(100, 50) + return } val test = getClosestNodeWithEntry(15, myBoat.ladderId) test ?: randomWalk(1,1) diff --git a/Server/src/main/content/minigame/pyramidplunder/GuardianMummyDialogue.kt b/Server/src/main/content/minigame/pyramidplunder/GuardianMummyDialogue.kt index afc509f39..b342116b1 100644 --- a/Server/src/main/content/minigame/pyramidplunder/GuardianMummyDialogue.kt +++ b/Server/src/main/content/minigame/pyramidplunder/GuardianMummyDialogue.kt @@ -9,52 +9,52 @@ import org.rs09.consts.NPCs import core.tools.END_DIALOGUE @Initializable -class GuardianMummyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class GuardianMummyDialogue(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "*sigh* Not another one.") + npcl(FacialExpression.OLD_NOT_INTERESTED, "*sigh* Not another one.") return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.HALF_ASKING, "Another what?").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "Another 'archaeologist'. I'm not going to let you plunder my master's tomb you know.").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "That's a shame. Have you got anything else I could do while I'm here?").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "If it will keep you out of mischief I suppose I could set something up for you... I have a few rooms full of some things you humans might consider valuable, do you want to give it a go?").also { stage++ } + 0 -> playerl(FacialExpression.HALF_ASKING, "Another what?").also { stage++ } + 1 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "Another 'archaeologist'. I'm not going to let you plunder my master's tomb you know.").also { stage++ } + 2 -> playerl(FacialExpression.NEUTRAL, "That's a shame. Have you got anything else I could do while I'm here?").also { stage++ } + 3 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "If it will keep you out of mischief I suppose I could set something up for you... I have a few rooms full of some things you humans might consider valuable, do you want to give it a go?").also { stage++ } 4 -> player.dialogueInterpreter.sendOptions("Play Pyramid Plunder?", "That sounds like fun; what do I do?", "Not right now.", "I know what I'm doing, so let's get on with it.").also { stage++ } 5 -> when(buttonId) { - 1 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "That sounds like fun; what do I do?").also { stage = 10 } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Not right now.").also { stage = END_DIALOGUE } - 3 -> playerl(core.game.dialogue.FacialExpression.ANNOYED, "I know what I'm doing, so let's get on with it.").also { stage = 100 } + 1 -> playerl(FacialExpression.FRIENDLY, "That sounds like fun; what do I do?").also { stage = 10 } + 2 -> playerl(FacialExpression.NEUTRAL, "Not right now.").also { stage = END_DIALOGUE } + 3 -> playerl(FacialExpression.ANNOYED, "I know what I'm doing, so let's get on with it.").also { stage = 100 } } - 10 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "You have five minutes to explore the treasure rooms and collect as many artefacts as you can. The artefacts are in the urns, chests and sarcophagi found in each room.").also { stage++ } - 11 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "There are eight treasure rooms, each subsequent room requires higher thieving skills to both enter the room and thieve from the urns and other containers.").also { stage++ } - 12 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "The rewards also become more lucrative the further into the tomb you go. You will also have to deactivate a trap in order to enter the main part of each room.").also { stage++ } - 13 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "When you want to move onto the next room you need to find the correct door first.").also { stage++ } - 14 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "There are four possible exits... you must open the door before finding out whether it is the exit or not. Opening the doors require picking their locks. Having a lockpick will make this easier.").also { stage++ } + 10 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "You have five minutes to explore the treasure rooms and collect as many artefacts as you can. The artefacts are in the urns, chests and sarcophagi found in each room.").also { stage++ } + 11 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "There are eight treasure rooms, each subsequent room requires higher thieving skills to both enter the room and thieve from the urns and other containers.").also { stage++ } + 12 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "The rewards also become more lucrative the further into the tomb you go. You will also have to deactivate a trap in order to enter the main part of each room.").also { stage++ } + 13 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "When you want to move onto the next room you need to find the correct door first.").also { stage++ } + 14 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "There are four possible exits... you must open the door before finding out whether it is the exit or not. Opening the doors require picking their locks. Having a lockpick will make this easier.").also { stage++ } 15 -> player.dialogueInterpreter.sendOptions("Do you have any more questions?", "How do I leave the game?", "How do I get the artefacts?", "What do I do with the artefacts I collect?", "I'm ready to give it a go now.").also { stage++ } 16 -> when(buttonId) { - 1 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "How do I leave the game?").also { stage = 20 } - 2 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "How do I get the artefacts?").also { stage = 30 } - 3 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "What do I do with the artefacts?").also { stage = 40 } - 4 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "I'm ready to give it a go now.").also { stage = 100 } + 1 -> playerl(FacialExpression.FRIENDLY, "How do I leave the game?").also { stage = 20 } + 2 -> playerl(FacialExpression.FRIENDLY, "How do I get the artefacts?").also { stage = 30 } + 3 -> playerl(FacialExpression.FRIENDLY, "What do I do with the artefacts?").also { stage = 40 } + 4 -> playerl(FacialExpression.FRIENDLY, "I'm ready to give it a go now.").also { stage = 100 } } - 20 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "If at any point you decide you need to leave just use a glowing door. The game will end and you will be taken out of the pyramid").also { stage = 15 } + 20 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "If at any point you decide you need to leave just use a glowing door. The game will end and you will be taken out of the pyramid").also { stage = 15 } - 30 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "The artefacts are in the urns, chests and sarcophagi. Urns contain snakes that guard them. The sarcophagi take some strength to open. They take a while to open.").also { stage++ } - 31 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "Of course, Mummies have been known to take a nap in the sarcophagi, so beware. The golden chests generally contain better artefacts, but are also trapped with scarabs!").also { stage = 15 } + 30 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "The artefacts are in the urns, chests and sarcophagi. Urns contain snakes that guard them. The sarcophagi take some strength to open. They take a while to open.").also { stage++ } + 31 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "Of course, Mummies have been known to take a nap in the sarcophagi, so beware. The golden chests generally contain better artefacts, but are also trapped with scarabs!").also { stage = 15 } - 40 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "There are a number of different artefacts, of three main types. The least valuable are the pottery statuettes and scarabs, and the ivory combs.").also { stage++ } - 41 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "Next are the stone scarabs, statuettes and seals, and finally the gold versions of those artefacts. They are not old, but are well made.").also { stage++ } - 42 -> playerl(core.game.dialogue.FacialExpression.HALF_ASKING, "What do I do with artefacts once I've collected them?").also { stage++ } - 43 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "That Simon Simpleton, I mean Templeton, will probably give you some money for them. He couldn't spot a real artefact if it came up to him and bit him in the face.").also { stage++ } - 44 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "He usually slinks about near the pyramid north-east of Sophanem. I expect he's trying to get some poor fools to steal things from that pyramid as well.").also { stage = 15 } + 40 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "There are a number of different artefacts, of three main types. The least valuable are the pottery statuettes and scarabs, and the ivory combs.").also { stage++ } + 41 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "Next are the stone scarabs, statuettes and seals, and finally the gold versions of those artefacts. They are not old, but are well made.").also { stage++ } + 42 -> playerl(FacialExpression.HALF_ASKING, "What do I do with artefacts once I've collected them?").also { stage++ } + 43 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "That Simon Simpleton, I mean Templeton, will probably give you some money for them. He couldn't spot a real artefact if it came up to him and bit him in the face.").also { stage++ } + 44 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "He usually slinks about near the pyramid north-east of Sophanem. I expect he's trying to get some poor fools to steal things from that pyramid as well.").also { stage = 15 } - 100 -> npcl(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "Alright, fine.").also { stage++ } + 100 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "Alright, fine.").also { stage++ } 101 -> { end() PyramidPlunderMinigame.join(player) @@ -68,7 +68,7 @@ class GuardianMummyDialogue(player: Player? = null) : core.game.dialogue.Dialogu return intArrayOf(NPCs.GUARDIAN_MUMMY_4476) } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return GuardianMummyDialogue(player) } } \ No newline at end of file diff --git a/Server/src/main/content/minigame/pyramidplunder/PlunderUtils.kt b/Server/src/main/content/minigame/pyramidplunder/PlunderUtils.kt index 28fbb6400..896a08792 100644 --- a/Server/src/main/content/minigame/pyramidplunder/PlunderUtils.kt +++ b/Server/src/main/content/minigame/pyramidplunder/PlunderUtils.kt @@ -172,7 +172,7 @@ object PlunderUtils { fun getDoor(player: Player) : Int { if (getRoom(player) == null) - return -1; + return -1 val room = getRoom(player)!!.room return PlunderData.doors[room - 1] } diff --git a/Server/src/main/content/minigame/pyramidplunder/PyramidPlunderMinigame.kt b/Server/src/main/content/minigame/pyramidplunder/PyramidPlunderMinigame.kt index 8798259a1..057e5a94e 100644 --- a/Server/src/main/content/minigame/pyramidplunder/PyramidPlunderMinigame.kt +++ b/Server/src/main/content/minigame/pyramidplunder/PyramidPlunderMinigame.kt @@ -210,7 +210,7 @@ class PyramidPlunderMinigame : InteractionListener, TickListener, LogoutListener rewardXP(player, Skills.STRENGTH, PlunderUtils.getSarcophagusXp(player)) if(RandomFunction.roll(25)) { - val mummy = content.minigame.pyramidplunder.PyramidPlunderMummyNPC(player.location, player) + val mummy = PyramidPlunderMummyNPC(player.location, player) mummy.isRespawn = false mummy.init() mummy.attack(player) @@ -235,7 +235,7 @@ class PyramidPlunderMinigame : InteractionListener, TickListener, LogoutListener runTask(player){ if(RandomFunction.roll(25)) { - val swarm = content.minigame.pyramidplunder.PyramidPlunderSwarmNPC(player.location, player) + val swarm = PyramidPlunderSwarmNPC(player.location, player) swarm.isRespawn = false swarm.init() swarm.attack(player) diff --git a/Server/src/main/content/minigame/sorceress/GardenObjectsPlugin.kt b/Server/src/main/content/minigame/sorceress/GardenObjectsPlugin.kt index 89c33650a..4739bf5c2 100644 --- a/Server/src/main/content/minigame/sorceress/GardenObjectsPlugin.kt +++ b/Server/src/main/content/minigame/sorceress/GardenObjectsPlugin.kt @@ -452,7 +452,7 @@ class GardenObjectsPlugin : InteractionListener { @Throws(Throwable::class) override fun newInstance(arg: Any?): Plugin { - UseWithHandler.addHandler(233, UseWithHandler.ITEM_TYPE, this) + addHandler(233, ITEM_TYPE, this) return this } diff --git a/Server/src/main/content/minigame/vinesweeper/Vinesweeper.kt b/Server/src/main/content/minigame/vinesweeper/Vinesweeper.kt index 0c3cb10ce..2362a83ec 100644 --- a/Server/src/main/content/minigame/vinesweeper/Vinesweeper.kt +++ b/Server/src/main/content/minigame/vinesweeper/Vinesweeper.kt @@ -215,7 +215,7 @@ class Vinesweeper : InteractionListener, InterfaceListener, MapArea { // TODO: more precise formula val points_per_xp = if (level < 40) { 2.0*(40.0 - level.toDouble())/10.0 } else { 1.0 } val points = player.getAttribute("vinesweeper:points", 0) - val xp = points / points_per_xp; + val xp = points / points_per_xp player.skills.addExperience(Skills.FARMING, xp) player.setAttribute("/save:vinesweeper:points", 0) sendUpdatedPoints(player) @@ -360,7 +360,7 @@ class Vinesweeper : InteractionListener, InterfaceListener, MapArea { val VINESWEEPER_BORDERS = ZoneBorders(1600,4672,1663,4735) fun sendUpdatedPoints(player: Player) { - val points = player.getAttribute("vinesweeper:points", 0); + val points = player.getAttribute("vinesweeper:points", 0) setVarbit(player, 4449, points) } @@ -431,7 +431,7 @@ class Vinesweeper : InteractionListener, InterfaceListener, MapArea { val oldPoints = player.getAttribute("vinesweeper:points", 0) player.setAttribute("/save:vinesweeper:points", Math.max(oldPoints-10, 0)) sendUpdatedPoints(player) - player.sendMessage("Oh dear! It looks like you dug up a potato seed by mistake."); + player.sendMessage("Oh dear! It looks like you dug up a potato seed by mistake.") scheduleNPCs(player, loc, false, false) val scenery = getScenery(loc) if(scenery != null) { @@ -534,7 +534,8 @@ class Vinesweeper : InteractionListener, InterfaceListener, MapArea { @Initializable class VinesweeperNPC : AbstractNPC { - var seedDestinations: ArrayList = ArrayList(); + var seedDestinations: ArrayList = ArrayList() + constructor() : super(RABBITS[0], null, true) {} private constructor(id: Int, location: Location) : super(id, location) {} override fun construct(id: Int, location: Location, vararg objects: Any?): AbstractNPC { diff --git a/Server/src/main/content/region/asgarnia/burthorpe/dialogue/AchiettiesDialogue.kt b/Server/src/main/content/region/asgarnia/burthorpe/dialogue/AchiettiesDialogue.kt index 39dd956b9..50dedafc4 100644 --- a/Server/src/main/content/region/asgarnia/burthorpe/dialogue/AchiettiesDialogue.kt +++ b/Server/src/main/content/region/asgarnia/burthorpe/dialogue/AchiettiesDialogue.kt @@ -11,11 +11,11 @@ import core.plugin.Initializable */ @Initializable -class AchiettiesDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class AchiettiesDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Greetings. Welcome to the Heroes' Guild.") + npc(FacialExpression.FRIENDLY,"Greetings. Welcome to the Heroes' Guild.") stage = 99 return true } @@ -27,7 +27,7 @@ class AchiettiesDialogue(player: Player? = null) : core.game.dialogue.DialoguePl return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return AchiettiesDialogue(player) } diff --git a/Server/src/main/content/region/asgarnia/burthorpe/dialogue/BurthorpeSoldierDialogue.kt b/Server/src/main/content/region/asgarnia/burthorpe/dialogue/BurthorpeSoldierDialogue.kt index fde4e6afe..e73aa0ee2 100644 --- a/Server/src/main/content/region/asgarnia/burthorpe/dialogue/BurthorpeSoldierDialogue.kt +++ b/Server/src/main/content/region/asgarnia/burthorpe/dialogue/BurthorpeSoldierDialogue.kt @@ -46,9 +46,9 @@ class BurthorpeSoldierDialogue(player: Player? = null) : DialoguePlugin(player) "Braccae tuae aperiuntur.", "Vescere bracis meis.", "Corripe cervisiam!", - ); + ) - val randomStages = arrayOf(10, 20, 30, 40, 50); + val randomStages = arrayOf(10, 20, 30, 40, 50) } override fun handle(interfaceId: Int, buttonId: Int): Boolean { diff --git a/Server/src/main/content/region/asgarnia/burthorpe/dialogue/EmeraldBenedictDialogue.kt b/Server/src/main/content/region/asgarnia/burthorpe/dialogue/EmeraldBenedictDialogue.kt index 1008ad638..9a200f9e5 100644 --- a/Server/src/main/content/region/asgarnia/burthorpe/dialogue/EmeraldBenedictDialogue.kt +++ b/Server/src/main/content/region/asgarnia/burthorpe/dialogue/EmeraldBenedictDialogue.kt @@ -18,17 +18,17 @@ import core.tools.START_DIALOGUE * @author vddCore */ @Initializable -class EmeraldBenedictDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class EmeraldBenedictDialogue(player: Player? = null) : DialoguePlugin(player) { override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { START_DIALOGUE -> if(hasIronmanRestriction(player, IronmanMode.ULTIMATE)) { npcl( - core.game.dialogue.FacialExpression.ANNOYED, + FacialExpression.ANNOYED, "Get lost, tin can." ).also { stage = END_DIALOGUE } } else { npcl( - core.game.dialogue.FacialExpression.SUSPICIOUS, + FacialExpression.SUSPICIOUS, "Got anything you don't want to lose?" ).also { if (hasAwaitingGrandExchangeCollections(player)) { @@ -40,22 +40,22 @@ class EmeraldBenedictDialogue(player: Player? = null) : core.game.dialogue.Dialo } 1 -> npcl( - core.game.dialogue.FacialExpression.SUSPICIOUS, + FacialExpression.SUSPICIOUS, "By the way, a little bird told me you got some stuff waiting for you " + "on the Grand Exchange." ).also { stage++ } 2 -> showTopics( - Topic(core.game.dialogue.FacialExpression.ASKING, "Yes, actually. Can you help?", 3), + Topic(FacialExpression.ASKING, "Yes, actually. Can you help?", 3), IfTopic( - core.game.dialogue.FacialExpression.ASKING, + FacialExpression.ASKING, "Yes, but can you switch my bank accounts?", 4, hasActivatedSecondaryBankAccount(player) ), - Topic(core.game.dialogue.FacialExpression.ASKING, "Yes, but can you show me my PIN settings?", 5), - Topic(core.game.dialogue.FacialExpression.ASKING, "Yes, but can you show me my collection box?", 6), - Topic(core.game.dialogue.FacialExpression.ANNOYED, "Yes, thanks. And I'll keep hold of it too.", END_DIALOGUE) + Topic(FacialExpression.ASKING, "Yes, but can you show me my PIN settings?", 5), + Topic(FacialExpression.ASKING, "Yes, but can you show me my collection box?", 6), + Topic(FacialExpression.ANNOYED, "Yes, thanks. And I'll keep hold of it too.", END_DIALOGUE) ) 3 -> { @@ -66,7 +66,7 @@ class EmeraldBenedictDialogue(player: Player? = null) : core.game.dialogue.Dialo 4 -> { toggleBankAccount(player) npcl( - core.game.dialogue.FacialExpression.SUSPICIOUS, + FacialExpression.SUSPICIOUS, "Sure thing. Feel free to rummage through whatever's in your ${getBankAccountName(player)} now." ).also { stage = END_DIALOGUE } } diff --git a/Server/src/main/content/region/asgarnia/burthorpe/dialogue/JadeDialogue.kt b/Server/src/main/content/region/asgarnia/burthorpe/dialogue/JadeDialogue.kt index 188d96933..85ebda973 100644 --- a/Server/src/main/content/region/asgarnia/burthorpe/dialogue/JadeDialogue.kt +++ b/Server/src/main/content/region/asgarnia/burthorpe/dialogue/JadeDialogue.kt @@ -18,19 +18,19 @@ import core.tools.START_DIALOGUE * @author vddCore */ @Initializable -class JadeDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class JadeDialogue(player: Player? = null) : DialoguePlugin(player) { override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { START_DIALOGUE -> if (hasIronmanRestriction(player, IronmanMode.ULTIMATE)) { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Greetings, warrior. I wish I could help you, but " + "our services are not available for Ultimate ${if (player.isMale) "Ironmen" else "Ironwomen"}." ).also { stage = END_DIALOGUE } } else { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Greetings warrior, how may I help you?" ).also { if (hasAwaitingGrandExchangeCollections(player)) { @@ -42,36 +42,36 @@ class JadeDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p } 1 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Before we go any further, I should inform you that you " + "have items ready for collection from the Grand Exchange." ).also { stage++ } 2 -> showTopics( - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I'd like to access my bank account, please.", 10), + Topic(FacialExpression.NEUTRAL, "I'd like to access my bank account, please.", 10), IfTopic( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "I'd like to switch to my ${getBankAccountName(player, true)} bank account.", 13, hasActivatedSecondaryBankAccount(player) ), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I'd like to check my PIN settings.", 11), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I'd like to see my collection box.", 12), - Topic(core.game.dialogue.FacialExpression.ASKING, "How long have you worked here?", 3) + Topic(FacialExpression.NEUTRAL, "I'd like to check my PIN settings.", 11), + Topic(FacialExpression.NEUTRAL, "I'd like to see my collection box.", 12), + Topic(FacialExpression.ASKING, "How long have you worked here?", 3) ) 3 -> npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Oh, ever since the Guild opened. I like it here." ).also { stage++ } 4 -> playerl( - core.game.dialogue.FacialExpression.ASKING, + FacialExpression.ASKING, "Why's that?" ).also { stage++ } 5 -> npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Well... What with all these warriors around, there's not much chance of my bank being robbed, is there?" ).also { stage = 2 } @@ -93,7 +93,7 @@ class JadeDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p 13 -> { toggleBankAccount(player) npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Of course! Your ${getBankAccountName(player)} account is now active!" ).also { stage = END_DIALOGUE } } diff --git a/Server/src/main/content/region/asgarnia/burthorpe/quest/deathplateau/HaroldDialogueFile.kt b/Server/src/main/content/region/asgarnia/burthorpe/quest/deathplateau/HaroldDialogueFile.kt index e96eb48f6..810b427b1 100644 --- a/Server/src/main/content/region/asgarnia/burthorpe/quest/deathplateau/HaroldDialogueFile.kt +++ b/Server/src/main/content/region/asgarnia/burthorpe/quest/deathplateau/HaroldDialogueFile.kt @@ -34,7 +34,7 @@ class HaroldDialogueFile : DialogueFile() { // This jumpStage is needed to resume the conversation after the dice interface. // The dice interface closes the dialogue file. if(getAttribute(player!!, ATTRIBUTE_JUMPSTAGE, 0) != 0) { - stage = getAttribute(player!!, ATTRIBUTE_JUMPSTAGE, 0); + stage = getAttribute(player!!, ATTRIBUTE_JUMPSTAGE, 0) setAttribute(player!!, ATTRIBUTE_JUMPSTAGE, 0) } println(getAttribute(player!!, ATTRIBUTE_HAROLD_MONEY, -1)) @@ -198,7 +198,7 @@ class HaroldDialogueFile : DialogueFile() { sendMessage(player!!, "Harold has given you some of your winnings!") val haroldAmount = getAttribute(player!!, ATTRIBUTE_HAROLD_MONEY, 200) setAttribute(player!!, ATTRIBUTE_HAROLD_MONEY,0) - addItemOrDrop(player!!, Items.COINS_995, haroldAmount); + addItemOrDrop(player!!, Items.COINS_995, haroldAmount) stage++ } 37 -> npcl(FacialExpression.FRIENDLY, "I'll write you out an IOU for the rest.").also { stage++ } @@ -286,7 +286,7 @@ class HaroldDialogueFile : DialogueFile() { sendMessage(player!!, "Harold has given you some of your winnings!") val haroldAmount = getAttribute(player!!, ATTRIBUTE_HAROLD_MONEY, 200) setAttribute(player!!, ATTRIBUTE_HAROLD_MONEY,0) - addItemOrDrop(player!!, Items.COINS_995, haroldAmount); + addItemOrDrop(player!!, Items.COINS_995, haroldAmount) stage++ } 34 -> npcl(FacialExpression.DRUNK, "I owe you the resht!").also { stage++ } @@ -304,7 +304,7 @@ class HaroldDialogueFile : DialogueFile() { if (inInventory(player!!, Items.IOU_3103)){ stage = 5 } else { - stage++; + stage++ } } 1 -> playerl(FacialExpression.FRIENDLY, "I've lost the IOU you gave me.").also { stage++ } @@ -355,7 +355,7 @@ class HaroldDialogueFile : DialogueFile() { if (inInventory(player!!, Items.COMBINATION_3102) || inInventory(player!!, Items.IOU_3103)){ stage = 5 } else { - stage++; + stage++ } } 1 -> playerl(FacialExpression.FRIENDLY, "I've lost the IOU you gave me.").also { stage++ } diff --git a/Server/src/main/content/region/asgarnia/dialogue/MasterCrafterDialogue.kt b/Server/src/main/content/region/asgarnia/dialogue/MasterCrafterDialogue.kt index 3014632fc..d603a573d 100644 --- a/Server/src/main/content/region/asgarnia/dialogue/MasterCrafterDialogue.kt +++ b/Server/src/main/content/region/asgarnia/dialogue/MasterCrafterDialogue.kt @@ -17,40 +17,40 @@ import core.tools.END_DIALOGUE */ @Initializable -class MasterCrafterDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class MasterCrafterDialogue(player: Player? = null) : DialoguePlugin(player) { var CAPE = Items.CRAFTING_CAPE_9780 var COIN = Items.COINS_995 - override fun newInstance(player: Player) : core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player) : DialoguePlugin { return MasterCrafterDialogue(player) } override fun handle(interfaceId: Int, buttonId: Int) : Boolean { when(stage) { 0 -> if(hasLevelStat(player, Skills.CRAFTING, 99)) { - player(core.game.dialogue.FacialExpression.ASKING, "Hey, could I buy a Skillcape of Crafting?").also{ stage = 10 } + player(FacialExpression.ASKING, "Hey, could I buy a Skillcape of Crafting?").also{ stage = 10 } } else { - player(core.game.dialogue.FacialExpression.ASKING,"Hey, what is that cape you're wearing? I don't recognize it.").also { stage++ } + player(FacialExpression.ASKING,"Hey, what is that cape you're wearing? I don't recognize it.").also { stage++ } } - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "This? This is a Skillcape of Crafting. It is a symbol of my ability " + + 1 -> npcl(FacialExpression.FRIENDLY, "This? This is a Skillcape of Crafting. It is a symbol of my ability " + "and standing here in the Crafting Guild. If you should ever achieve level 99 Crafting come and talk to me " + "and we'll see if we can sort you out with one.").also{ stage = END_DIALOGUE } - 10 -> npcl(core.game.dialogue.FacialExpression.HAPPY, "Certainly! Right after you pay me 99000 coins.").also{ stage++ } + 10 -> npcl(FacialExpression.HAPPY, "Certainly! Right after you pay me 99000 coins.").also{ stage++ } 11 -> options("Okay, here you go.", "No thanks.").also{ stage++ } 12 -> when(buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Okay, here you go.").also{ stage++ } - 2 -> player(core.game.dialogue.FacialExpression.HALF_THINKING, "No, thanks.").also{ stage = END_DIALOGUE } + 1 -> player(FacialExpression.FRIENDLY, "Okay, here you go.").also{ stage++ } + 2 -> player(FacialExpression.HALF_THINKING, "No, thanks.").also{ stage = END_DIALOGUE } } 13 -> if(inInventory(player, COIN, 99000)) { removeItem(player, Item(COIN, 99000), Container.INVENTORY) addItem(player, CAPE, 1) - npcl(core.game.dialogue.FacialExpression.HAPPY, "There you go! Enjoy.").also{ stage = END_DIALOGUE } + npcl(FacialExpression.HAPPY, "There you go! Enjoy.").also{ stage = END_DIALOGUE } } else { - npcl(core.game.dialogue.FacialExpression.NEUTRAL, "You don't have enough coins for a cape.").also{ stage = END_DIALOGUE } + npcl(FacialExpression.NEUTRAL, "You don't have enough coins for a cape.").also{ stage = END_DIALOGUE } } - 20 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Where's your brown apron? You can't come in here unless you're wearing one.").also{ stage++ } - 21 -> player(core.game.dialogue.FacialExpression.HALF_GUILTY, "Err... I haven't got one.").also{ stage = END_DIALOGUE } + 20 -> npcl(FacialExpression.NEUTRAL, "Where's your brown apron? You can't come in here unless you're wearing one.").also{ stage++ } + 21 -> player(FacialExpression.HALF_GUILTY, "Err... I haven't got one.").also{ stage = END_DIALOGUE } } return true } diff --git a/Server/src/main/content/region/asgarnia/dialogue/TannerDialogue.kt b/Server/src/main/content/region/asgarnia/dialogue/TannerDialogue.kt index d48680f3f..5782e6af9 100644 --- a/Server/src/main/content/region/asgarnia/dialogue/TannerDialogue.kt +++ b/Server/src/main/content/region/asgarnia/dialogue/TannerDialogue.kt @@ -13,15 +13,15 @@ import core.tools.END_DIALOGUE */ @Initializable -class TannerDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class TannerDialogue(player: Player? = null) : DialoguePlugin(player) { - override fun newInstance(player: Player) : core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player) : DialoguePlugin { return TannerDialogue(player) } override fun open(vararg args: Any?) : Boolean { npc = args[0] as NPC - npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Greetings friend. I am a manufacturer of leather.") + npcl(FacialExpression.NEUTRAL, "Greetings friend. I am a manufacturer of leather.") stage = 0 return true } @@ -30,19 +30,19 @@ class TannerDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin when(stage) { 0 -> options("Can I buy some leather then?", "Leather is rather weak stuff.").also{ stage++ } 1 -> when(buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.ASKING,"Can I buy some leather then?").also{ stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.SUSPICIOUS, "Leather is rather weak stuff.").also { stage = 20 } + 1 -> player(FacialExpression.ASKING,"Can I buy some leather then?").also{ stage = 10 } + 2 -> player(FacialExpression.SUSPICIOUS, "Leather is rather weak stuff.").also { stage = 20 } } - 10 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Certainly!").also { stage = END_DIALOGUE }.also{ npc.openShop(player) } + 10 -> npcl(FacialExpression.FRIENDLY, "Certainly!").also { stage = END_DIALOGUE }.also{ npc.openShop(player) } - 20 -> npcl(core.game.dialogue.FacialExpression.NOD_YES, "Normal leather may be quite weak, but it's very cheap - I " + + 20 -> npcl(FacialExpression.NOD_YES, "Normal leather may be quite weak, but it's very cheap - I " + "make it from cowhides for only 1 gp per hide - and it's so easy to craft that anyone can work with it.").also{ stage++ } - 21 -> npcl(core.game.dialogue.FacialExpression.HALF_THINKING, "Alternatively you could try hard leather. It's not so easy " + + 21 -> npcl(FacialExpression.HALF_THINKING, "Alternatively you could try hard leather. It's not so easy " + "to craft, but I only charge 3 gp per cowhide to prepare it, and it makes much sturdier armour.").also{ stage++ } - 22 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I can also tan snake hides and dragonhides, suitable for crafting" + + 22 -> npcl(FacialExpression.FRIENDLY, "I can also tan snake hides and dragonhides, suitable for crafting" + "into the highest quality armour for rangers.").also{ stage++ } - 23 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "Thanks, I'll bear it in mind.").also { stage = END_DIALOGUE } + 23 -> player(FacialExpression.NEUTRAL, "Thanks, I'll bear it in mind.").also { stage = END_DIALOGUE } } return true } diff --git a/Server/src/main/content/region/asgarnia/dialogue/TheDoorDialogues.kt b/Server/src/main/content/region/asgarnia/dialogue/TheDoorDialogues.kt index a540c4aac..11559fb3a 100644 --- a/Server/src/main/content/region/asgarnia/dialogue/TheDoorDialogues.kt +++ b/Server/src/main/content/region/asgarnia/dialogue/TheDoorDialogues.kt @@ -15,14 +15,14 @@ class TheDoorDialogues(val it: Int) : DialogueFile() { npc = NPC(NPCs.MASTER_CRAFTER_805) when(it) { 0 -> when(stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Welcome to the Guild of Master craftsmen.").also{ stage = END_DIALOGUE } + 0 -> npcl(FacialExpression.FRIENDLY, "Welcome to the Guild of Master craftsmen.").also{ stage = END_DIALOGUE } } 1 -> when(stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.ASKING, "Where's your brown apron? You can't come in here unless you're wearing one.").also{ stage++ } - 1 -> player(core.game.dialogue.FacialExpression.SAD, "Err... I haven't got one.").also { stage = END_DIALOGUE } + 0 -> npcl(FacialExpression.ASKING, "Where's your brown apron? You can't come in here unless you're wearing one.").also{ stage++ } + 1 -> player(FacialExpression.SAD, "Err... I haven't got one.").also { stage = END_DIALOGUE } } 2 -> when(stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Sorry, only experienced crafters are allowed in here. You must be level 40 or above to enter.").also{ stage = END_DIALOGUE } + 0 -> npcl(FacialExpression.NEUTRAL, "Sorry, only experienced crafters are allowed in here. You must be level 40 or above to enter.").also{ stage = END_DIALOGUE } } } diff --git a/Server/src/main/content/region/asgarnia/dialogue/ZandarHorfyreDialogue.kt b/Server/src/main/content/region/asgarnia/dialogue/ZandarHorfyreDialogue.kt index d52161633..c2050df95 100644 --- a/Server/src/main/content/region/asgarnia/dialogue/ZandarHorfyreDialogue.kt +++ b/Server/src/main/content/region/asgarnia/dialogue/ZandarHorfyreDialogue.kt @@ -14,34 +14,34 @@ import core.tools.END_DIALOGUE * @author bushtail */ @Initializable -class ZandarHorfyreDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class ZandarHorfyreDialogue(player: Player? = null) : DialoguePlugin(player) { - override fun newInstance(player: Player) : core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player) : DialoguePlugin { return ZandarHorfyreDialogue(player) } override fun open(vararg args: Any?) : Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.HALF_THINKING,"Who are you?") + player(FacialExpression.HALF_THINKING,"Who are you?") stage = -1 return true } override fun handle(interfaceId: Int, buttonId: Int) : Boolean { when (stage) { - -1 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"My name is Zandar Horfyre, and you ${ player.name } are trespassing in my tower, not to mention attacking my students! I thank you to leave immediately!").also{ stage++ } + -1 -> npcl(FacialExpression.NEUTRAL,"My name is Zandar Horfyre, and you ${ player.name } are trespassing in my tower, not to mention attacking my students! I thank you to leave immediately!").also{ stage++ } 0 -> options("Ok, I was going anyway.", "No, I think I'll stay for a bit.").also{ stage++ } 1 -> when(buttonId) { 1 -> player("Ok, I was going anyway.").also{ stage = 10 } 2 -> player("No, I think I'll stay for a bit.").also{ stage = 20 } } - 10 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"Good! And don't forget to close the door behind you!").also{ stage++ } + 10 -> npcl(FacialExpression.NEUTRAL,"Good! And don't forget to close the door behind you!").also{ stage++ } 11 -> stage = END_DIALOGUE - 20 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Actually, that wasn't an invitation. I've tried being polite, now we'll do it the hard way!").also{ teleport(player, Location.create(3217, 3177, 0), TeleportManager.TeleportType.INSTANT) }.also{ stage++ } - 21 -> player(core.game.dialogue.FacialExpression.ANGRY, "Zamorak curse that mage!").also{ stage++ } - 22 -> player(core.game.dialogue.FacialExpression.LAUGH, "Actually, I guess he already has!").also{ stage++ } + 20 -> npcl(FacialExpression.ANNOYED,"Actually, that wasn't an invitation. I've tried being polite, now we'll do it the hard way!").also{ teleport(player, Location.create(3217, 3177, 0), TeleportManager.TeleportType.INSTANT) }.also{ stage++ } + 21 -> player(FacialExpression.ANGRY, "Zamorak curse that mage!").also{ stage++ } + 22 -> player(FacialExpression.LAUGH, "Actually, I guess he already has!").also{ stage++ } 23 -> end() } return true diff --git a/Server/src/main/content/region/asgarnia/dwarfmine/dialogue/DrogoDialogue.kt b/Server/src/main/content/region/asgarnia/dwarfmine/dialogue/DrogoDialogue.kt index b51c91575..e5c2343c3 100644 --- a/Server/src/main/content/region/asgarnia/dwarfmine/dialogue/DrogoDialogue.kt +++ b/Server/src/main/content/region/asgarnia/dwarfmine/dialogue/DrogoDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class DrogoDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class DrogoDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"'Ello. Welcome to my Mining shop, friend.").also { stage = 0 } + npc(FacialExpression.OLD_DEFAULT,"'Ello. Welcome to my Mining shop, friend.").also { stage = 0 } return true } @@ -24,21 +24,21 @@ class DrogoDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( when(stage){ 0 -> options("Do you want to trade?", "Hello, shorty.", "Why don't you ever restock ores and bars?").also { stage++ } 1 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Do you want to trade?").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Hello, shorty.").also { stage = 20 } - 3 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Why don't you ever restock ores and bars?").also { stage = 30 } + 1 -> player(FacialExpression.FRIENDLY, "Do you want to trade?").also { stage = 10 } + 2 -> player(FacialExpression.FRIENDLY, "Hello, shorty.").also { stage = 20 } + 3 -> player(FacialExpression.FRIENDLY, "Why don't you ever restock ores and bars?").also { stage = 30 } } 10 -> end().also { npc.openShop(player) } - 20 -> npc(core.game.dialogue.FacialExpression.OLD_ANGRY1,"I may be short, but at least I've got manners.").also { stage = 99 } - 30 -> npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"The only ores and bars I sell are those sold to me.").also { stage = 99 } + 20 -> npc(FacialExpression.OLD_ANGRY1,"I may be short, but at least I've got manners.").also { stage = 99 } + 30 -> npc(FacialExpression.OLD_DEFAULT,"The only ores and bars I sell are those sold to me.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return DrogoDialogue(player) } diff --git a/Server/src/main/content/region/asgarnia/dwarfmine/dialogue/DwarvenMineGuardDialogue.kt b/Server/src/main/content/region/asgarnia/dwarfmine/dialogue/DwarvenMineGuardDialogue.kt index e5822b72c..e5d7c85a3 100644 --- a/Server/src/main/content/region/asgarnia/dwarfmine/dialogue/DwarvenMineGuardDialogue.kt +++ b/Server/src/main/content/region/asgarnia/dwarfmine/dialogue/DwarvenMineGuardDialogue.kt @@ -12,29 +12,29 @@ import org.rs09.consts.NPCs */ @Initializable -class DwarvenMineGuardDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class DwarvenMineGuardDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.OLD_ANGRY1, "Don't distract me while I'm on duty! This mine has to be protected!").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "What's going to attack a mine?").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.OLD_ANGRY1, "Goblins! They wander everywhere, attacking anyone they think is small enough to be an easy victim. We need more cannons to fight them off properly.").also { stage++ } - 3 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Well, I've done my bit to help with that.").also { stage++ } - 4 -> npcl(core.game.dialogue.FacialExpression.OLD_ANGRY1, "Yes, I heard. Now please let me get on with my guard duties.").also { stage++ } - 5 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Alright, I'll leave you alone now.").also { stage = 99 } + 0 -> npcl(FacialExpression.OLD_ANGRY1, "Don't distract me while I'm on duty! This mine has to be protected!").also { stage++ } + 1 -> player(FacialExpression.FRIENDLY, "What's going to attack a mine?").also { stage++ } + 2 -> npcl(FacialExpression.OLD_ANGRY1, "Goblins! They wander everywhere, attacking anyone they think is small enough to be an easy victim. We need more cannons to fight them off properly.").also { stage++ } + 3 -> player(FacialExpression.FRIENDLY, "Well, I've done my bit to help with that.").also { stage++ } + 4 -> npcl(FacialExpression.OLD_ANGRY1, "Yes, I heard. Now please let me get on with my guard duties.").also { stage++ } + 5 -> player(FacialExpression.FRIENDLY, "Alright, I'll leave you alone now.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return DwarvenMineGuardDialogue(player) } diff --git a/Server/src/main/content/region/asgarnia/dwarfmine/dialogue/NurmofDialogue.kt b/Server/src/main/content/region/asgarnia/dwarfmine/dialogue/NurmofDialogue.kt index 9d2de3346..366bbfaee 100644 --- a/Server/src/main/content/region/asgarnia/dwarfmine/dialogue/NurmofDialogue.kt +++ b/Server/src/main/content/region/asgarnia/dwarfmine/dialogue/NurmofDialogue.kt @@ -14,11 +14,11 @@ import org.rs09.consts.NPCs */ @Initializable -class NurmofDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class NurmofDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL,"Greetings and welcome to my pickaxe shop. Do you want to buy my premium quality pickaxes?").also { stage = 0 } + npcl(FacialExpression.OLD_NORMAL,"Greetings and welcome to my pickaxe shop. Do you want to buy my premium quality pickaxes?").also { stage = 0 } return true } @@ -28,19 +28,19 @@ class NurmofDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin 1 -> when (buttonId) { 1 -> end().also { npc.openShop(player) } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "No thank you.").also { stage = 99 } - 3 -> player(core.game.dialogue.FacialExpression.HALF_ASKING, "Are your pickaxes better than other pickaxes, then?").also { stage = 10 } + 2 -> player(FacialExpression.FRIENDLY, "No thank you.").also { stage = 99 } + 3 -> player(FacialExpression.HALF_ASKING, "Are your pickaxes better than other pickaxes, then?").also { stage = 10 } } - 10 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL,"Of course they are! My pickaxes are made of higher grade metal than your ordinary bronze pickaxes, allowing you to mine ore just that little bit faster.").also { + 10 -> npcl(FacialExpression.OLD_NORMAL,"Of course they are! My pickaxes are made of higher grade metal than your ordinary bronze pickaxes, allowing you to mine ore just that little bit faster.").also { if(!getAttribute(player, "pre-dq:said-hi", true)) { stage++ } else { stage = 99 } } - 11 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "By the way, Doric says hello!").also { stage++ } - 12 -> npcl(core.game.dialogue.FacialExpression.OLD_HAPPY, "Oh! Thank you for telling me, adventurer!").also { stage = 99 } + 11 -> playerl(FacialExpression.FRIENDLY, "By the way, Doric says hello!").also { stage++ } + 12 -> npcl(FacialExpression.OLD_HAPPY, "Oh! Thank you for telling me, adventurer!").also { stage = 99 } 99 -> { setAttribute(player, "pre-dq:said-hi", true) end() @@ -49,7 +49,7 @@ class NurmofDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return NurmofDialogue(player) } diff --git a/Server/src/main/content/region/asgarnia/falador/dialogue/AmbassadorSpanfippleDialogue.kt b/Server/src/main/content/region/asgarnia/falador/dialogue/AmbassadorSpanfippleDialogue.kt index 93a574e0c..3d94098c1 100644 --- a/Server/src/main/content/region/asgarnia/falador/dialogue/AmbassadorSpanfippleDialogue.kt +++ b/Server/src/main/content/region/asgarnia/falador/dialogue/AmbassadorSpanfippleDialogue.kt @@ -13,38 +13,38 @@ import org.rs09.consts.NPCs */ @Initializable -class AmbassadorSpanfippleDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class AmbassadorSpanfippleDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"It's all very white round here, isn't it?").also { stage = 0 } + npc(FacialExpression.OLD_DEFAULT,"It's all very white round here, isn't it?").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> { - player(core.game.dialogue.FacialExpression.THINKING, "Well, it is the White Knights' Castle.").also { stage++ } + player(FacialExpression.THINKING, "Well, it is the White Knights' Castle.").also { stage++ } } 1 -> { - npcl(core.game.dialogue.FacialExpression.OLD_DEFAULT, "I think it would all look better in pink. At least then I wouldn't be squinting all the time.").also { stage++ } + npcl(FacialExpression.OLD_DEFAULT, "I think it would all look better in pink. At least then I wouldn't be squinting all the time.").also { stage++ } } 2 -> { - playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, but then they'd have to become the Pink Knights. I think they'd have problems recruiting then.").also { stage++ } + playerl(FacialExpression.FRIENDLY, "Yes, but then they'd have to become the Pink Knights. I think they'd have problems recruiting then.").also { stage++ } } 3 -> { - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT, "You're probably right. Maybe brown, then.").also { stage++ } + npc(FacialExpression.OLD_DEFAULT, "You're probably right. Maybe brown, then.").also { stage++ } } 4 -> { - player(core.game.dialogue.FacialExpression.HALF_THINKING, "I think that may be worse...").also { stage++ } + player(FacialExpression.HALF_THINKING, "I think that may be worse...").also { stage++ } } 5 -> { - npc(core.game.dialogue.FacialExpression.OLD_ANGRY1, "Bah, humans have no sense of style...").also { stage = 99 } + npc(FacialExpression.OLD_ANGRY1, "Bah, humans have no sense of style...").also { stage = 99 } } 99 -> end() @@ -52,7 +52,7 @@ class AmbassadorSpanfippleDialogue(player: Player? = null) : core.game.dialogue. return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return AmbassadorSpanfippleDialogue(player) } diff --git a/Server/src/main/content/region/asgarnia/falador/dialogue/ApprenticeWorkmanDialogue.kt b/Server/src/main/content/region/asgarnia/falador/dialogue/ApprenticeWorkmanDialogue.kt index 356bf0600..21d101017 100644 --- a/Server/src/main/content/region/asgarnia/falador/dialogue/ApprenticeWorkmanDialogue.kt +++ b/Server/src/main/content/region/asgarnia/falador/dialogue/ApprenticeWorkmanDialogue.kt @@ -12,29 +12,29 @@ import org.rs09.consts.NPCs */ @Initializable -class ApprenticeWorkmanDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ApprenticeWorkmanDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hiya.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hiya.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "Sorry, I haven't got time to chat.", + npc(FacialExpression.FRIENDLY, "Sorry, I haven't got time to chat.", "We've only just finished a collossal order of furniture", "for the Varrock area, and already there's more work", "coming in.").also { stage++ } } 1 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Varrock?").also { stage++ } + player(FacialExpression.ASKING, "Varrock?").also { stage++ } } 2 -> { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "Yeah, the Council's had it redecorated.").also { stage++ } + npc(FacialExpression.FRIENDLY, "Yeah, the Council's had it redecorated.").also { stage++ } } 3 -> { @@ -42,11 +42,11 @@ class ApprenticeWorkmanDialogue(player: Player? = null) : core.game.dialogue.Dia } 4 -> { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "You'd better let me get on with my work.").also { stage++ } + npc(FacialExpression.FRIENDLY, "You'd better let me get on with my work.").also { stage++ } } 5 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Ok, bye.").also { stage = 99 } + player(FacialExpression.FRIENDLY, "Ok, bye.").also { stage = 99 } } 99 -> end() @@ -54,7 +54,7 @@ class ApprenticeWorkmanDialogue(player: Player? = null) : core.game.dialogue.Dia return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ApprenticeWorkmanDialogue(player) } diff --git a/Server/src/main/content/region/asgarnia/falador/dialogue/DrunkenManDialogue.kt b/Server/src/main/content/region/asgarnia/falador/dialogue/DrunkenManDialogue.kt index 7f0528177..8d3372d3a 100644 --- a/Server/src/main/content/region/asgarnia/falador/dialogue/DrunkenManDialogue.kt +++ b/Server/src/main/content/region/asgarnia/falador/dialogue/DrunkenManDialogue.kt @@ -12,43 +12,43 @@ import org.rs09.consts.NPCs */ @Initializable -class DrunkenManDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class DrunkenManDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> { - npc(core.game.dialogue.FacialExpression.DRUNK, "... whassup?").also { stage++ } + npc(FacialExpression.DRUNK, "... whassup?").also { stage++ } } 1 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Are you alright?").also { stage++ } + player(FacialExpression.ASKING, "Are you alright?").also { stage++ } } 2 -> { - npc(core.game.dialogue.FacialExpression.DRUNK, "... see... two of you... why there two of you?").also { stage++ } + npc(FacialExpression.DRUNK, "... see... two of you... why there two of you?").also { stage++ } } 3 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "There's only one of me, friend.").also { stage++ } + player(FacialExpression.FRIENDLY, "There's only one of me, friend.").also { stage++ } } 4 -> { - npc(core.game.dialogue.FacialExpression.DRUNK, "... no, two of you... you can't count...", + npc(FacialExpression.DRUNK, "... no, two of you... you can't count...", "... maybe you drunk too much...").also { stage++ } } 5 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Whatever you say, friend.").also { stage++ } + player(FacialExpression.FRIENDLY, "Whatever you say, friend.").also { stage++ } } 6 -> { - npc(core.game.dialogue.FacialExpression.DRUNK, "... giant hairy cabbages...").also { stage = 99 } + npc(FacialExpression.DRUNK, "... giant hairy cabbages...").also { stage = 99 } } 99 -> end() @@ -56,7 +56,7 @@ class DrunkenManDialogue(player: Player? = null) : core.game.dialogue.DialoguePl return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return DrunkenManDialogue(player) } diff --git a/Server/src/main/content/region/asgarnia/falador/dialogue/RisingSunInnBartenderDialogue.kt b/Server/src/main/content/region/asgarnia/falador/dialogue/RisingSunInnBartenderDialogue.kt index 3bd7a9787..199a545a0 100644 --- a/Server/src/main/content/region/asgarnia/falador/dialogue/RisingSunInnBartenderDialogue.kt +++ b/Server/src/main/content/region/asgarnia/falador/dialogue/RisingSunInnBartenderDialogue.kt @@ -20,15 +20,15 @@ import core.tools.START_DIALOGUE * @author vddCore */ @Initializable -class RisingSunInnBartenderDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player): core.game.dialogue.DialoguePlugin +class RisingSunInnBartenderDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player): DialoguePlugin = RisingSunInnBartenderDialogue(player) override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC npcl( - core.game.dialogue.FacialExpression.HAPPY, + FacialExpression.HAPPY, "Hi! What can I get you?" ) @@ -39,25 +39,25 @@ class RisingSunInnBartenderDialogue(player: Player? = null) : core.game.dialogue when (stage) { START_DIALOGUE -> if (hasAnyBeerGlasses()) { showTopics( - Topic(core.game.dialogue.FacialExpression.ASKING, "What ales are you serving?", 10), - Topic(core.game.dialogue.FacialExpression.HAPPY, "I've got some beer glasses...", 20) + Topic(FacialExpression.ASKING, "What ales are you serving?", 10), + Topic(FacialExpression.HAPPY, "I've got some beer glasses...", 20) ) } else { - playerl(core.game.dialogue.FacialExpression.ASKING, "What ales are you serving?") + playerl(FacialExpression.ASKING, "What ales are you serving?") .also { stage = 10 } } 10 -> npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Well, we've got Asgarnian Ale, Wizard's Mind Bomb and Dwarven Stout. " + "Each for only 3 coins." ).also { stage++ } 11 -> showTopics( - Topic(core.game.dialogue.FacialExpression.HAPPY, "One Asgarnian Ale, please.", 12), - Topic(core.game.dialogue.FacialExpression.HAPPY, "I'll try the Mind Bomb.", 13), - Topic(core.game.dialogue.FacialExpression.ASKING, "Can I have a Dwarven Stout?", 14), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I don't feel like any of those.", END_DIALOGUE) + Topic(FacialExpression.HAPPY, "One Asgarnian Ale, please.", 12), + Topic(FacialExpression.HAPPY, "I'll try the Mind Bomb.", 13), + Topic(FacialExpression.ASKING, "Can I have a Dwarven Stout?", 14), + Topic(FacialExpression.NEUTRAL, "I don't feel like any of those.", END_DIALOGUE) ) 12 -> if (ensureHasMoney()) { @@ -74,27 +74,27 @@ class RisingSunInnBartenderDialogue(player: Player? = null) : core.game.dialogue 20 -> { npcl( - core.game.dialogue.FacialExpression.HALF_GUILTY, + FacialExpression.HALF_GUILTY, "Oh, we will buy those from you if you're interested. We offer 2 coins for each glass." ).also { stage ++ } } 21 -> showTopics( - Topic(core.game.dialogue.FacialExpression.HAPPY, "Yes, please!", 22), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "No thanks, I like my empty beer glasses.", END_DIALOGUE) + Topic(FacialExpression.HAPPY, "Yes, please!", 22), + Topic(FacialExpression.NEUTRAL, "No thanks, I like my empty beer glasses.", END_DIALOGUE) ) 22 -> { trySellAllBeerGlasses() npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "There you go!" ).also { stage = END_DIALOGUE } } 30 -> { - playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Thanks, ${npc.name}.") + playerl(FacialExpression.FRIENDLY, "Thanks, ${npc.name}.") .also { stage = END_DIALOGUE } } } @@ -109,7 +109,7 @@ class RisingSunInnBartenderDialogue(player: Player? = null) : core.game.dialogue private fun ensureHasMoney(): Boolean { if (!inInventory(player, Items.COINS_995, 3)) { - npcl(core.game.dialogue.FacialExpression.ANGRY, "No freeloaders!") + npcl(FacialExpression.ANGRY, "No freeloaders!") .also { sendMessage(player, "You don't have enough money to buy that.") stage = END_DIALOGUE diff --git a/Server/src/main/content/region/asgarnia/falador/dialogue/WorkmanDialogue.kt b/Server/src/main/content/region/asgarnia/falador/dialogue/WorkmanDialogue.kt index 26cbd5feb..38195bfcf 100644 --- a/Server/src/main/content/region/asgarnia/falador/dialogue/WorkmanDialogue.kt +++ b/Server/src/main/content/region/asgarnia/falador/dialogue/WorkmanDialogue.kt @@ -12,26 +12,26 @@ import org.rs09.consts.NPCs.WORKMAN_3236 */ @Initializable -class WorkmanDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class WorkmanDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hiya.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hiya.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "What do you want? I've got work to do!").also { stage++ } + npc(FacialExpression.ASKING, "What do you want? I've got work to do!").also { stage++ } } 1 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Can you teach me anything?").also { stage++ } + player(FacialExpression.ASKING, "Can you teach me anything?").also { stage++ } } 2 -> { - npcl(core.game.dialogue.FacialExpression.ANNOYED, "No - I've got one lousy apprentice already, and that's quite enough hassle! Go away!").also { stage = 99 } + npcl(FacialExpression.ANNOYED, "No - I've got one lousy apprentice already, and that's quite enough hassle! Go away!").also { stage = 99 } } 99 -> end() @@ -39,7 +39,7 @@ class WorkmanDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return WorkmanDialogue(player) } diff --git a/Server/src/main/content/region/asgarnia/taverley/dialogue/VelrakDialogue.kt b/Server/src/main/content/region/asgarnia/taverley/dialogue/VelrakDialogue.kt index fc56ccb5a..b53370950 100644 --- a/Server/src/main/content/region/asgarnia/taverley/dialogue/VelrakDialogue.kt +++ b/Server/src/main/content/region/asgarnia/taverley/dialogue/VelrakDialogue.kt @@ -11,16 +11,16 @@ import org.rs09.consts.NPCs import core.tools.END_DIALOGUE @Initializable -class VelrakDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class VelrakDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return VelrakDialogue(player) } override fun open(vararg args: Any?): Boolean { if(inInventory(player, Items.DUSTY_KEY_1590)){ - playerl(core.game.dialogue.FacialExpression.HALF_THINKING, "Are you still here?").also { stage = 100 } + playerl(FacialExpression.HALF_THINKING, "Are you still here?").also { stage = 100 } } else { - npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Thank you for rescuing me! It isn't very comfy in this cell.") + npcl(FacialExpression.FRIENDLY, "Thank you for rescuing me! It isn't very comfy in this cell.") removeItem(player, Items.JAIL_KEY_1591, Container.INVENTORY) } return true @@ -30,26 +30,26 @@ class VelrakDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin when(stage){ 0 -> options("So... do you know anywhere good to explore?","Do I get a reward for freeing you?").also { stage++ } 1 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.HALF_THINKING, "So... do you know anywhere good to explore?").also { stage = 10 } - 2 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Do I get a reward for freeing you?").also { stage = 20 } + 1 -> playerl(FacialExpression.HALF_THINKING, "So... do you know anywhere good to explore?").also { stage = 10 } + 2 -> playerl(FacialExpression.FRIENDLY, "Do I get a reward for freeing you?").also { stage = 20 } } - 10 -> npcl(core.game.dialogue.FacialExpression.HALF_THINKING, "Well, this dungeon was quite good to explore...until I got captured, anyway. I was given a key to an inner part of this dungeon by a mysterious stranger!").also { stage++ } - 11 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "It's rather tough for me to get that far into the dungeon however. I just keep getting captured! Would you like to give it a go?").also { stage++ } + 10 -> npcl(FacialExpression.HALF_THINKING, "Well, this dungeon was quite good to explore...until I got captured, anyway. I was given a key to an inner part of this dungeon by a mysterious stranger!").also { stage++ } + 11 -> npcl(FacialExpression.NEUTRAL, "It's rather tough for me to get that far into the dungeon however. I just keep getting captured! Would you like to give it a go?").also { stage++ } 12 -> options("Yes, please!", "No, it's too dangerous for me too.").also { stage++ } 13 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, please!").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "No, it's too dangerous for me too.").also { stage = 15 } + 1 -> playerl(FacialExpression.FRIENDLY, "Yes, please!").also { stage++ } + 2 -> playerl(FacialExpression.NEUTRAL, "No, it's too dangerous for me too.").also { stage = 15 } } 14 -> sendItemDialogue(player, Items.DUSTY_KEY_1590, "Velrak reaches somewhere mysterious and passes you a key.").also { addItem(player, Items.DUSTY_KEY_1590, 1); stage = END_DIALOGUE } - 15 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I don't blame you!").also { stage = END_DIALOGUE } + 15 -> npcl(FacialExpression.FRIENDLY, "I don't blame you!").also { stage = END_DIALOGUE } - 20 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Well, not really. The Black Knights took all of my stuff before throwing me in here to rot!").also { stage = 0 } + 20 -> npcl(FacialExpression.HALF_GUILTY, "Well, not really. The Black Knights took all of my stuff before throwing me in here to rot!").also { stage = 0 } - 100 -> npcl(core.game.dialogue.FacialExpression.HALF_THINKING, "Yes... I'm still plucking up the courage to run out past those Black Knights.").also { stage++ } - 101 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Oh, go on. You can do it!").also { stage = END_DIALOGUE } + 100 -> npcl(FacialExpression.HALF_THINKING, "Yes... I'm still plucking up the courage to run out past those Black Knights.").also { stage++ } + 101 -> playerl(FacialExpression.FRIENDLY, "Oh, go on. You can do it!").also { stage = END_DIALOGUE } } return true diff --git a/Server/src/main/content/region/asgarnia/taverley/quest/witchshouse/WitchesDiaryBook.kt b/Server/src/main/content/region/asgarnia/taverley/quest/witchshouse/WitchesDiaryBook.kt index 457f44a5f..8417d0cca 100644 --- a/Server/src/main/content/region/asgarnia/taverley/quest/witchshouse/WitchesDiaryBook.kt +++ b/Server/src/main/content/region/asgarnia/taverley/quest/witchshouse/WitchesDiaryBook.kt @@ -122,7 +122,7 @@ class WitchesDiaryBook : InteractionListener { private fun display(player:Player, pageNum: Int, buttonID: Int) : Boolean { BookInterface.pageSetup(player, BookInterface.FANCY_BOOK_3_49, TITLE, CONTENTS) if (BookInterface.isLastPage(pageNum, CONTENTS.size)) { - setAttribute(player, "/save:readWitchsBook", true); + setAttribute(player, "/save:readWitchsBook", true) } return true } diff --git a/Server/src/main/content/region/asgarnia/trollheim/dialogue/KnightsNotes.kt b/Server/src/main/content/region/asgarnia/trollheim/dialogue/KnightsNotes.kt index 582ad7c38..7d267cb7b 100644 --- a/Server/src/main/content/region/asgarnia/trollheim/dialogue/KnightsNotes.kt +++ b/Server/src/main/content/region/asgarnia/trollheim/dialogue/KnightsNotes.kt @@ -25,7 +25,7 @@ class KnightsNotes : InteractionListener { ScrollLine("know how I am going to get this message to you, why is that",11), ScrollLine("talking skull never around when he's needed? Your comrade,",12), ScrollLine("Sir Gerry.",13), - ); + ) } override fun defineListeners() { @@ -36,7 +36,7 @@ class KnightsNotes : InteractionListener { player!!.packetDispatch.sendInterfaceConfig(228, 9, false) // childId 7 is left 8 is right addDialogueAction(player) { player, button -> if (button == 2) { - sendMessage(player, "You break the wax seal and open the scroll."); + sendMessage(player, "You break the wax seal and open the scroll.") if (removeItem(player, Items.KNIGHTS_NOTES_11734)) { addItem(player, Items.KNIGHTS_NOTES_11735) ScrollInterface.scrollSetup(player, Components.MESSAGESCROLL_220, CONTENTS) diff --git a/Server/src/main/content/region/desert/alkharid/dialogue/GemTraderDialogue.kt b/Server/src/main/content/region/desert/alkharid/dialogue/GemTraderDialogue.kt index 583113bb5..65e45420c 100644 --- a/Server/src/main/content/region/desert/alkharid/dialogue/GemTraderDialogue.kt +++ b/Server/src/main/content/region/desert/alkharid/dialogue/GemTraderDialogue.kt @@ -1,7 +1,7 @@ package content.region.desert.alkharid.dialogue -import core.game.dialogue.DialoguePlugin; -import core.game.dialogue.FacialExpression; +import core.game.dialogue.DialoguePlugin +import core.game.dialogue.FacialExpression import core.game.node.entity.npc.NPC import core.game.node.entity.player.Player import core.plugin.Initializable @@ -46,7 +46,7 @@ class GemTraderDialogue (player: Player? = null): DialoguePlugin(player){ } 10 -> when(buttonId){ - 1 -> npc.openShop(player).also { stage = 1000 }; + 1 -> npc.openShop(player).also { stage = 1000 } 2 -> player("No, thank you.").also{stage = 1000} 3 -> npc("Fitzharmon, eh? Hmmm... If I'm not mistaken, ", "that's the family name of a member ", @@ -54,7 +54,7 @@ class GemTraderDialogue (player: Player? = null): DialoguePlugin(player){ } 20 -> when(buttonId){ - 1 -> npc.openShop(player).also { stage = 1000 }; + 1 -> npc.openShop(player).also { stage = 1000 } 2 -> player("No, thank you.").also{stage = 1000} } @@ -73,8 +73,8 @@ class GemTraderDialogue (player: Player? = null): DialoguePlugin(player){ "high standards of 'gold perfection', then...").also{stage++} 103 -> npc("Well, maybe we'll all get lucky ", "and the scorpions will deal with him.").also{ - stage = 1000; - player.questRepository.getQuest("Family Crest").setStage(player, 13) + stage = 1000 + player.questRepository.getQuest("Family Crest").setStage(player, 13) } 1000 -> end() diff --git a/Server/src/main/content/region/desert/alkharid/dialogue/JaraahDialogue.kt b/Server/src/main/content/region/desert/alkharid/dialogue/JaraahDialogue.kt index fd165eabb..d114990c4 100644 --- a/Server/src/main/content/region/desert/alkharid/dialogue/JaraahDialogue.kt +++ b/Server/src/main/content/region/desert/alkharid/dialogue/JaraahDialogue.kt @@ -2,8 +2,8 @@ package content.region.desert.alkharid.dialogue import core.api.animate import core.api.getStatLevel -import core.game.dialogue.DialoguePlugin; -import core.game.dialogue.FacialExpression; +import core.game.dialogue.DialoguePlugin +import core.game.dialogue.FacialExpression import core.game.dialogue.Topic import core.game.node.entity.npc.NPC import core.game.node.entity.player.Player diff --git a/Server/src/main/content/region/desert/alkharid/handlers/AlKharidStairsPlugin.kt b/Server/src/main/content/region/desert/alkharid/handlers/AlKharidStairsPlugin.kt index 782de0b4c..cec65c1a5 100644 --- a/Server/src/main/content/region/desert/alkharid/handlers/AlKharidStairsPlugin.kt +++ b/Server/src/main/content/region/desert/alkharid/handlers/AlKharidStairsPlugin.kt @@ -1,4 +1,4 @@ -package content.region.desert.alkharid.handlers; +package content.region.desert.alkharid.handlers import core.api.* import core.cache.def.impl.SceneryDefinition @@ -30,7 +30,7 @@ class AlKharidStairsPlugin : OptionHandler() { if(node.location == zekeDoorOpened.location || node.location == craftingDoorOpened.location){ sendMessage(player,"This door appears to be stuck open.") } else{ - core.game.global.action.DoorActionHandler.handleDoor(player,node.asScenery()) + DoorActionHandler.handleDoor(player,node.asScenery()) } return true } diff --git a/Server/src/main/content/region/desert/nardah/dialogue/Nkuku.kt b/Server/src/main/content/region/desert/nardah/dialogue/Nkuku.kt index 8046f44af..11ceafab5 100644 --- a/Server/src/main/content/region/desert/nardah/dialogue/Nkuku.kt +++ b/Server/src/main/content/region/desert/nardah/dialogue/Nkuku.kt @@ -12,18 +12,18 @@ import org.rs09.consts.NPCs */ @Initializable -class Nkuku(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class Nkuku(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Good day to you.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Good day to you.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "May Saradomin be with you.").also { stage = 99 } + npc(FacialExpression.FRIENDLY, "May Saradomin be with you.").also { stage = 99 } } 99 -> end() @@ -31,7 +31,7 @@ class Nkuku(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return Nkuku(player) } diff --git a/Server/src/main/content/region/desert/pollniv/dialogue/AliTheHagDialogue.kt b/Server/src/main/content/region/desert/pollniv/dialogue/AliTheHagDialogue.kt index 84265e1eb..24bafe58e 100644 --- a/Server/src/main/content/region/desert/pollniv/dialogue/AliTheHagDialogue.kt +++ b/Server/src/main/content/region/desert/pollniv/dialogue/AliTheHagDialogue.kt @@ -11,35 +11,35 @@ import core.plugin.Initializable */ @Initializable -class AliTheHagDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class AliTheHagDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Good day, old hag.") + player(FacialExpression.FRIENDLY,"Good day, old hag.") stage = 0 return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.LAUGH,"Old hag indeed! I have a name you know!").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.THINKING,"Let me guess it wouldn't be Ali would it?").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.ANNOYED,"Well how else would you abbreviate Alice then?", "And no, you can't call me Al!").also { stage++ } + 0 -> npc(FacialExpression.LAUGH,"Old hag indeed! I have a name you know!").also { stage++ } + 1 -> player(FacialExpression.THINKING,"Let me guess it wouldn't be Ali would it?").also { stage++ } + 2 -> npc(FacialExpression.ANNOYED,"Well how else would you abbreviate Alice then?", "And no, you can't call me Al!").also { stage++ } 3 -> npc( - core.game.dialogue.FacialExpression.ASKING,"Now what do you want from the Old hag of Pollnivneach?", + FacialExpression.ASKING,"Now what do you want from the Old hag of Pollnivneach?", "To hex someone? Power, beauty, eternal youth", "or something else drab like that?").also { stage++ } - 4 -> player(core.game.dialogue.FacialExpression.HALF_GUILTY,"Actually none of those, I'm new in town and", "I just wanted to get to know the locals.").also { stage++ } + 4 -> player(FacialExpression.HALF_GUILTY,"Actually none of those, I'm new in town and", "I just wanted to get to know the locals.").also { stage++ } 5 -> npc( - core.game.dialogue.FacialExpression.ANNOYED,"I'm busy brewing potions, so if you ", + FacialExpression.ANNOYED,"I'm busy brewing potions, so if you ", "disturb me again without reason,","I will turn you into a frog!").also { stage++ } - 6 -> player(core.game.dialogue.FacialExpression.SCARED,"Oh I'm sorry I won't let it happen again.").also { stage = 99 } + 6 -> player(FacialExpression.SCARED,"Oh I'm sorry I won't let it happen again.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return AliTheHagDialogue(player) } diff --git a/Server/src/main/content/region/desert/pollniv/dialogue/AliTheMayorDialogue.kt b/Server/src/main/content/region/desert/pollniv/dialogue/AliTheMayorDialogue.kt index b7fe15400..b1108b757 100644 --- a/Server/src/main/content/region/desert/pollniv/dialogue/AliTheMayorDialogue.kt +++ b/Server/src/main/content/region/desert/pollniv/dialogue/AliTheMayorDialogue.kt @@ -11,12 +11,12 @@ import core.plugin.Initializable */ @Initializable -class AliTheMayorDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class AliTheMayorDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC npc( - core.game.dialogue.FacialExpression.FRIENDLY,"Welcome adventurer to the town of Pollnivneach,", + FacialExpression.FRIENDLY,"Welcome adventurer to the town of Pollnivneach,", "the gateway to Menaphos and Al-Kharid. My name is Ali", "and I'm the mayor of this town.", "I hope you enjoy your stay here.") @@ -27,21 +27,21 @@ class AliTheMayorDialogue(player: Player? = null) : core.game.dialogue.DialogueP override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> player( - core.game.dialogue.FacialExpression.FRIENDLY, "Thank you.", + FacialExpression.FRIENDLY, "Thank you.", "That is the warmest welcome I've had anywhere", "for a while at least. People generally treat", "travelling adventurers with suspicion.").also { stage++ } 1 -> npc( - core.game.dialogue.FacialExpression.FRIENDLY,"All are welcome here, such is the way", + FacialExpression.FRIENDLY,"All are welcome here, such is the way", "of things in border regions.", "Now more than ever I suppose.").also { stage++ } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"What do you mean by that?").also { stage++ } - 3 -> npc(core.game.dialogue.FacialExpression.FRIENDLY,"There's trouble in town, and a lot of ", "villagers have left as a result.").also { stage++ } - 4 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"I'm looking for someone called Ali.").also { stage++ } - 5 -> npc(core.game.dialogue.FacialExpression.FRIENDLY,"I doubt that's easy in Pollnivneach.").also { stage++ } - 6 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"Well can you help me?").also { stage++ } + 2 -> player(FacialExpression.FRIENDLY,"What do you mean by that?").also { stage++ } + 3 -> npc(FacialExpression.FRIENDLY,"There's trouble in town, and a lot of ", "villagers have left as a result.").also { stage++ } + 4 -> player(FacialExpression.FRIENDLY,"I'm looking for someone called Ali.").also { stage++ } + 5 -> npc(FacialExpression.FRIENDLY,"I doubt that's easy in Pollnivneach.").also { stage++ } + 6 -> player(FacialExpression.FRIENDLY,"Well can you help me?").also { stage++ } 7 -> npc( - core.game.dialogue.FacialExpression.FRIENDLY,"I'm more than a little busy at the moment, ", + FacialExpression.FRIENDLY,"I'm more than a little busy at the moment, ", "I'm sure there are plenty of people ", "in town who could help you.").also { stage = 99 } 99 -> end() @@ -49,7 +49,7 @@ class AliTheMayorDialogue(player: Player? = null) : core.game.dialogue.DialogueP return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return AliTheMayorDialogue(player) } diff --git a/Server/src/main/content/region/desert/pollniv/dialogue/AliTheOperator.kt b/Server/src/main/content/region/desert/pollniv/dialogue/AliTheOperator.kt index 3377b74cf..d2c6ff057 100644 --- a/Server/src/main/content/region/desert/pollniv/dialogue/AliTheOperator.kt +++ b/Server/src/main/content/region/desert/pollniv/dialogue/AliTheOperator.kt @@ -11,47 +11,47 @@ import core.plugin.Initializable */ @Initializable -class AliTheOperator(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class AliTheOperator(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello, good sir.") + player(FacialExpression.FRIENDLY,"Hello, good sir.") stage = 0 return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.ANNOYED,"What do you want?").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.HALF_ASKING,"I'm just new in town and have a few questions.").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.ASKING,"What do you want to know?").also { stage++ } + 0 -> npc(FacialExpression.ANNOYED,"What do you want?").also { stage++ } + 1 -> player(FacialExpression.HALF_ASKING,"I'm just new in town and have a few questions.").also { stage++ } + 2 -> npc(FacialExpression.ASKING,"What do you want to know?").also { stage++ } 3 -> options ("Tell me about yourself.", "Tell me about the other people in the town.", "I'm looking for Ali.").also { stage++ } 4 -> when(buttonId){ 1 -> npc( - core.game.dialogue.FacialExpression.ANNOYED, "That information is available on a need to know basis", + FacialExpression.ANNOYED, "That information is available on a need to know basis", "and right now, you don't need to know.").also { stage = 10 } 2 -> npc( - core.game.dialogue.FacialExpression.SUSPICIOUS,"Sheep, ready for the slau... ", + FacialExpression.SUSPICIOUS,"Sheep, ready for the slau... ", "hang on I shouldn't be saying..., ", "listen I don't want to talk about them.").also { stage = 10 } 3 -> npc( - core.game.dialogue.FacialExpression.ANNOYED,"You will have to be a lot more specific if ", + FacialExpression.ANNOYED,"You will have to be a lot more specific if ", "you want help finding him. ", "Everyone here is called Ali.").also { stage = 30 } } - 10 -> npc(core.game.dialogue.FacialExpression.HALF_ASKING,"Can I help you with anything else?").also { stage++ } + 10 -> npc(FacialExpression.HALF_ASKING,"Can I help you with anything else?").also { stage++ } 11 -> options ("Yes I'd like to ask you about something else.", "No thanks.").also { stage++ } 12 -> when(buttonId) { - 1 -> npc(core.game.dialogue.FacialExpression.ASKING,"What do you want to know?").also { stage = 3 } + 1 -> npc(FacialExpression.ASKING,"What do you want to know?").also { stage = 3 } 2 -> end() } 30 -> player( - core.game.dialogue.FacialExpression.HALF_ASKING,"I've discovered that. Well he has an uncle called", + FacialExpression.HALF_ASKING,"I've discovered that. Well he has an uncle called", "Ali Morrisane, a market vendor in Al Kharid and","that's all I really know about him.").also { stage++ } 31 -> npc( - core.game.dialogue.FacialExpression.ANNOYED,"Say no more. I too am looking for him. ", + FacialExpression.ANNOYED,"Say no more. I too am looking for him. ", "The little tyke robbed me too. If we work together,", "perhaps we can catch him and teach him ","a lesson.").also { stage = 10 } 99 -> end() @@ -59,7 +59,7 @@ class AliTheOperator(player: Player? = null) : core.game.dialogue.DialoguePlugin return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return AliTheOperator(player) } diff --git a/Server/src/main/content/region/desert/quest/deserttreasure/ArchaeologistDialogue.kt b/Server/src/main/content/region/desert/quest/deserttreasure/ArchaeologistDialogue.kt index 4ad567996..79a033158 100644 --- a/Server/src/main/content/region/desert/quest/deserttreasure/ArchaeologistDialogue.kt +++ b/Server/src/main/content/region/desert/quest/deserttreasure/ArchaeologistDialogue.kt @@ -14,7 +14,7 @@ import org.rs09.consts.NPCs */ @Initializable -class ArchaeologistDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ArchaeologistDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC @@ -29,9 +29,9 @@ class ArchaeologistDialogue(player: Player? = null) : core.game.dialogue.Dialogu player.skills.getStaticLevel(Skills.FIREMAKING) >= 50 && player.skills.getStaticLevel(Skills.MAGIC) >= 50 && player.skills.getStaticLevel(Skills.THIEVING) >= 53 ) { - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } } else { - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there.").also { stage = 999 } + player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 999 } } } else { @@ -46,36 +46,36 @@ class ArchaeologistDialogue(player: Player? = null) : core.game.dialogue.Dialogu 999 -> sendDialogue("He seems to be lost in his own thoughts...").also { stage = 99 } - 0 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Howdy stranger. What brings you out to these parts?").also { stage++ } + 0 -> npc(FacialExpression.FRIENDLY, "Howdy stranger. What brings you out to these parts?").also { stage++ } 1 -> options("What are you doing here?", "Do you have any quests?", "Who are you?", "Nothing really.").also { stage++ } 2 -> when (buttonId) { //1 -> todo - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Do you have any quests?", "Call it a hunch, but you look like the type of man who", "might...").also { stage = 20 } + 2 -> player(FacialExpression.FRIENDLY, "Do you have any quests?", "Call it a hunch, but you look like the type of man who", "might...").also { stage = 20 } //3 -> todo //4 -> todo } - 20 -> npc(core.game.dialogue.FacialExpression.HALF_THINKING, "Well, it's funny you should say that.", + 20 -> npc(FacialExpression.HALF_THINKING, "Well, it's funny you should say that.", "I'm not sure if I would really call it a quest as such,", "but I found this ancient stone tablet in one of my", "excavations, and it would really help me out if you").also { stage++ } - 21 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "could go and take it back to the digsite for me and get", + 21 -> npc(FacialExpression.FRIENDLY, "could go and take it back to the digsite for me and get", "it examined.").also { stage++ } - 22 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "It's very old, and I don't recognise and of the", + 22 -> npc(FacialExpression.NEUTRAL, "It's very old, and I don't recognise and of the", "inscriptions on it.").also { stage++ } 23 -> options("Yes, I'll help you.", "No thanks, I don't want to help.").also { stage++ } 24 -> when(buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Sure, I was heading that way anyways.", + 1 -> player(FacialExpression.FRIENDLY, "Sure, I was heading that way anyways.", "Any particular person at the digsite you want me to", "talk to?").also { stage = 30 } // 2 -> todo } - 30 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "His name's Terry Balando. Give it to nobody but him.", + 30 -> npc(FacialExpression.NEUTRAL, "His name's Terry Balando. Give it to nobody but him.", "I'm sorry, I can't entrust you with the actual tablet I", "found, but it is far too valuable to give away, but I took", "these etchings - they should be enough for him to make").also { stage++ } - 31 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "a preliminary translation on.", + 31 -> npc(FacialExpression.NEUTRAL, "a preliminary translation on.", "Come back and let me know what he says, I would hate", "to waste my time excavating anything that isn't worth", "my time as a world famous archaeologist!").also { @@ -92,7 +92,7 @@ class ArchaeologistDialogue(player: Player? = null) : core.game.dialogue.Dialogu return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ArchaeologistDialogue(player) } diff --git a/Server/src/main/content/region/desert/quest/thegolem/TheGolemQuest.kt b/Server/src/main/content/region/desert/quest/thegolem/TheGolemQuest.kt index 85be1c4ad..8d1835f4d 100644 --- a/Server/src/main/content/region/desert/quest/thegolem/TheGolemQuest.kt +++ b/Server/src/main/content/region/desert/quest/thegolem/TheGolemQuest.kt @@ -194,7 +194,7 @@ class TheGolemListeners : InteractionListener { fun initializeStatuettes(player: Player) { if(!player.getAttribute("the-golem:statuette-rotation:initialized", false)) { for(i in 0 until 4) { - player.setAttribute("/save:the-golem:statuette-rotation:${i}", RandomFunction.random(2)); + player.setAttribute("/save:the-golem:statuette-rotation:${i}", RandomFunction.random(2)) } player.setAttribute("/save:the-golem:statuette-rotation:initialized", true) } @@ -331,7 +331,7 @@ class TheGolemListeners : InteractionListener { fun penOnPapyrus(player: Player): Boolean { if(!player.getAttribute("the-golem:varmen-notes-read", false)) { - player.sendMessage("You don't know what to write."); + player.sendMessage("You don't know what to write.") return true } if(player.inventory.remove(Item(Items.PAPYRUS_970, 1))) { @@ -343,7 +343,7 @@ class TheGolemListeners : InteractionListener { fun implementOnGolem(player: Player): Boolean { if(!player.getAttribute("the-golem:varmen-notes-read", false)) { - player.sendMessage("You don't know what that would do."); + player.sendMessage("You don't know what that would do.") return true } if(player.questRepository.getStage("The Golem") == 7) { diff --git a/Server/src/main/content/region/desert/sophanem/dialogue/EmbalmerDialogue.kt b/Server/src/main/content/region/desert/sophanem/dialogue/EmbalmerDialogue.kt index 60e13e00f..99ee9e3db 100644 --- a/Server/src/main/content/region/desert/sophanem/dialogue/EmbalmerDialogue.kt +++ b/Server/src/main/content/region/desert/sophanem/dialogue/EmbalmerDialogue.kt @@ -12,26 +12,26 @@ import org.rs09.consts.NPCs */ @Initializable -class EmbalmerDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class EmbalmerDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.SUSPICIOUS,"What are you doing?").also { stage = 0 } + npc(FacialExpression.SUSPICIOUS,"What are you doing?").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "I have this acne potion which I thought might help ease your itching.").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.ANNOYED, "If I thought that these spots could be cured by some potion, I would have mixed up one myself before now.").also { stage++ } - 2 -> player(core.game.dialogue.FacialExpression.SAD, "Sorry, I was just trying to help.").also { stage = 99 } + 0 -> playerl(FacialExpression.FRIENDLY, "I have this acne potion which I thought might help ease your itching.").also { stage++ } + 1 -> npcl(FacialExpression.ANNOYED, "If I thought that these spots could be cured by some potion, I would have mixed up one myself before now.").also { stage++ } + 2 -> player(FacialExpression.SAD, "Sorry, I was just trying to help.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return EmbalmerDialogue(player) } diff --git a/Server/src/main/content/region/desert/sophanem/dialogue/TarikDialogue.kt b/Server/src/main/content/region/desert/sophanem/dialogue/TarikDialogue.kt index e12795c91..ac6aaa061 100644 --- a/Server/src/main/content/region/desert/sophanem/dialogue/TarikDialogue.kt +++ b/Server/src/main/content/region/desert/sophanem/dialogue/TarikDialogue.kt @@ -10,7 +10,7 @@ import org.rs09.consts.NPCs import core.tools.END_DIALOGUE @Initializable -class TarikDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class TarikDialogue(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { npcl(FacialExpression.WORRIED, "Ouch!") return true @@ -77,7 +77,7 @@ class TarikDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( return intArrayOf(NPCs.TARIK_4478) } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return TarikDialogue(player) } } \ No newline at end of file diff --git a/Server/src/main/content/region/fremennik/jatizso/dialogue/CitizenDialogue.kt b/Server/src/main/content/region/fremennik/jatizso/dialogue/CitizenDialogue.kt index 41ad1963c..a964ae552 100644 --- a/Server/src/main/content/region/fremennik/jatizso/dialogue/CitizenDialogue.kt +++ b/Server/src/main/content/region/fremennik/jatizso/dialogue/CitizenDialogue.kt @@ -8,9 +8,9 @@ import org.rs09.consts.NPCs import core.tools.END_DIALOGUE @Initializable -class CitizenDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class CitizenDialogue(player: Player? = null) : DialoguePlugin(player) { val stages = intArrayOf(0, 100, 200, 300) - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return CitizenDialogue(player) } @@ -22,30 +22,30 @@ class CitizenDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "It's a bit grey round here, isn't it?").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "It gets you down after a while, you know. There are 273 shades of grey, you know, and we have them all.").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "That's grey-t.").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.SAD, "That attempt at humour merely made me more depressed. Leave me alone.").also { stage = END_DIALOGUE } + 0 -> playerl(FacialExpression.NEUTRAL, "It's a bit grey round here, isn't it?").also { stage++ } + 1 -> npcl(FacialExpression.NEUTRAL, "It gets you down after a while, you know. There are 273 shades of grey, you know, and we have them all.").also { stage++ } + 2 -> playerl(FacialExpression.NEUTRAL, "That's grey-t.").also { stage++ } + 3 -> npcl(FacialExpression.SAD, "That attempt at humour merely made me more depressed. Leave me alone.").also { stage = END_DIALOGUE } - 100 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Cheer up! It's not the end of the world.").also { stage++ } - 101 -> npcl(core.game.dialogue.FacialExpression.SAD, "I'd prefer that, if it meant I didn't have to talk to people as inanely happy as you.").also { stage++ } - 102 -> playerl(core.game.dialogue.FacialExpression.AMAZED, "Whoa! I think you need to get out more.").also { stage = END_DIALOGUE } + 100 -> playerl(FacialExpression.NEUTRAL, "Cheer up! It's not the end of the world.").also { stage++ } + 101 -> npcl(FacialExpression.SAD, "I'd prefer that, if it meant I didn't have to talk to people as inanely happy as you.").also { stage++ } + 102 -> playerl(FacialExpression.AMAZED, "Whoa! I think you need to get out more.").also { stage = END_DIALOGUE } - 200 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "How's the King treating you then?").also { stage++ } - 201 -> npcl(core.game.dialogue.FacialExpression.SAD, "Like serfs.").also { stage++ } - 202 -> playerl(core.game.dialogue.FacialExpression.HALF_THINKING, "Serf?").also { stage++ } - 203 -> npcl(core.game.dialogue.FacialExpression.SAD, "Yes, you know - peons, plebs, the downtrodden. He treats us like his own personal possessions.").also { stage++ } - 204 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "You should leave this place.").also { stage++ } - 205 -> npcl(core.game.dialogue.FacialExpression.SAD, "I keep trying to save up enough to leave, but the King keeps taxing us! We have no money left." ).also { stage++ } - 206 -> playerl(core.game.dialogue.FacialExpression.SAD, "Oh dear." ).also { stage = END_DIALOGUE } + 200 -> playerl(FacialExpression.NEUTRAL, "How's the King treating you then?").also { stage++ } + 201 -> npcl(FacialExpression.SAD, "Like serfs.").also { stage++ } + 202 -> playerl(FacialExpression.HALF_THINKING, "Serf?").also { stage++ } + 203 -> npcl(FacialExpression.SAD, "Yes, you know - peons, plebs, the downtrodden. He treats us like his own personal possessions.").also { stage++ } + 204 -> playerl(FacialExpression.NEUTRAL, "You should leave this place.").also { stage++ } + 205 -> npcl(FacialExpression.SAD, "I keep trying to save up enough to leave, but the King keeps taxing us! We have no money left." ).also { stage++ } + 206 -> playerl(FacialExpression.SAD, "Oh dear." ).also { stage = END_DIALOGUE } - 300 -> playerl(core.game.dialogue.FacialExpression.HALF_THINKING, "How are you today?").also { stage++ } - 301 -> npcl(core.game.dialogue.FacialExpression.SAD, "**sigh**").also { stage++ } - 302 -> playerl(core.game.dialogue.FacialExpression.ASKING, "That good? Everyone around here seems a little depressed. ").also { stage++ } - 303 -> npcl(core.game.dialogue.FacialExpression.SAD, "**sigh**").also { stage++ } - 304 -> playerl(core.game.dialogue.FacialExpression.HALF_THINKING, "And not particularly talkative.").also { stage++ } - 305 -> npcl(core.game.dialogue.FacialExpression.SAD, "**sigh**").also { stage++ } - 306 -> playerl(core.game.dialogue.FacialExpression.HALF_THINKING,"I'll leave you to your sighing. It looks like you have plenty to do." ).also { stage = END_DIALOGUE } + 300 -> playerl(FacialExpression.HALF_THINKING, "How are you today?").also { stage++ } + 301 -> npcl(FacialExpression.SAD, "**sigh**").also { stage++ } + 302 -> playerl(FacialExpression.ASKING, "That good? Everyone around here seems a little depressed. ").also { stage++ } + 303 -> npcl(FacialExpression.SAD, "**sigh**").also { stage++ } + 304 -> playerl(FacialExpression.HALF_THINKING, "And not particularly talkative.").also { stage++ } + 305 -> npcl(FacialExpression.SAD, "**sigh**").also { stage++ } + 306 -> playerl(FacialExpression.HALF_THINKING,"I'll leave you to your sighing. It looks like you have plenty to do." ).also { stage = END_DIALOGUE } } return true diff --git a/Server/src/main/content/region/fremennik/jatizso/dialogue/EricDialogue.kt b/Server/src/main/content/region/fremennik/jatizso/dialogue/EricDialogue.kt index 2d736c299..de6d0b84f 100644 --- a/Server/src/main/content/region/fremennik/jatizso/dialogue/EricDialogue.kt +++ b/Server/src/main/content/region/fremennik/jatizso/dialogue/EricDialogue.kt @@ -4,22 +4,22 @@ import core.game.dialogue.DialoguePlugin import core.game.dialogue.FacialExpression import core.game.node.entity.player.Player import core.plugin.Initializable -import org.rs09.consts.NPCs import core.tools.END_DIALOGUE +import org.rs09.consts.NPCs @Initializable -class EricDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class EricDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return EricDialogue(player) } override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Spare us a few coppers mister") + npcl(FacialExpression.HALF_GUILTY, "Spare us a few coppers mister") return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { - playerl(core.game.dialogue.FacialExpression.ANGRY, "NO!") + playerl(FacialExpression.ANGRY, "NO!") stage = END_DIALOGUE return true } diff --git a/Server/src/main/content/region/fremennik/jatizso/dialogue/GruvaPatrullDialogue.kt b/Server/src/main/content/region/fremennik/jatizso/dialogue/GruvaPatrullDialogue.kt index 1a5da89d1..cdaec8ac9 100644 --- a/Server/src/main/content/region/fremennik/jatizso/dialogue/GruvaPatrullDialogue.kt +++ b/Server/src/main/content/region/fremennik/jatizso/dialogue/GruvaPatrullDialogue.kt @@ -8,21 +8,21 @@ import org.rs09.consts.NPCs import core.tools.END_DIALOGUE @Initializable -class GruvaPatrullDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class GruvaPatrullDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return GruvaPatrullDialogue(player) } override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Ho! Outerlander.") + npcl(FacialExpression.FRIENDLY,"Ho! Outerlander.") return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.HALF_ASKING, "What's down the scary-looking staircase?").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "These are the stairs down to the mining caves. There are rich veins of many types down there, and miners too. Though be careful; some of the trolls occasionally sneak into the far end of the cave.").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Thanks. I'll look out for them.").also { stage = END_DIALOGUE } + 0 -> playerl(FacialExpression.HALF_ASKING, "What's down the scary-looking staircase?").also { stage++ } + 1 -> npcl(FacialExpression.NEUTRAL, "These are the stairs down to the mining caves. There are rich veins of many types down there, and miners too. Though be careful; some of the trolls occasionally sneak into the far end of the cave.").also { stage++ } + 2 -> playerl(FacialExpression.NEUTRAL, "Thanks. I'll look out for them.").also { stage = END_DIALOGUE } } return true } diff --git a/Server/src/main/content/region/fremennik/jatizso/dialogue/LeftieRightieDialogue.kt b/Server/src/main/content/region/fremennik/jatizso/dialogue/LeftieRightieDialogue.kt index eb35d7f98..b2c3b14ee 100644 --- a/Server/src/main/content/region/fremennik/jatizso/dialogue/LeftieRightieDialogue.kt +++ b/Server/src/main/content/region/fremennik/jatizso/dialogue/LeftieRightieDialogue.kt @@ -12,21 +12,21 @@ class LeftieRightieDialogue() : DialogueFile() { val leftie = NPC(NPCs.GUARD_5492) override fun handle(componentID: Int, buttonID: Int) { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Are you all right? Leftie?").also { stage++ } + 0 -> npcl(FacialExpression.NEUTRAL, "Are you all right? Leftie?").also { stage++ } 1 -> npc2("No, I'm on the left.").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Only from your perspective. Someone entering the gate should call you Rightie, right Leftie?").also { stage++ } + 2 -> npcl(FacialExpression.NEUTRAL, "Only from your perspective. Someone entering the gate should call you Rightie, right Leftie?").also { stage++ } 3 -> npc2("Right, Rightie. So you'd be Leftie not Rightie, right?").also { stage++ } - 4 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "That's right Leftie, that's right.").also { stage++ } + 4 -> npcl(FacialExpression.NEUTRAL, "That's right Leftie, that's right.").also { stage++ } 5 -> npc2("Rightie-oh Rightie, or should I call you Leftie?").also { stage++ } - 6 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "No, Rightie's fine Leftie.").also { stage++ } - 7 -> playerl(core.game.dialogue.FacialExpression.ANGRY, "Aaagh! Enough! If either of you mention left or right in my presence I'll have to scream! Can I come through the gate?" ).also { stage++ } + 6 -> npcl(FacialExpression.NEUTRAL, "No, Rightie's fine Leftie.").also { stage++ } + 7 -> playerl(FacialExpression.ANGRY, "Aaagh! Enough! If either of you mention left or right in my presence I'll have to scream! Can I come through the gate?" ).also { stage++ } 8 -> npc2("Don't let us stop you.").also { stage++ } - 9 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Yes, head right on in, sir.").also { stage++ } - 10 -> playerl(core.game.dialogue.FacialExpression.ANGRY, "You said it! You said it! ARRRRRRRRGH!").also { stage = END_DIALOGUE } + 9 -> npcl(FacialExpression.NEUTRAL, "Yes, head right on in, sir.").also { stage++ } + 10 -> playerl(FacialExpression.ANGRY, "You said it! You said it! ARRRRRRRRGH!").also { stage = END_DIALOGUE } } } fun npc2(messages: String){ - sendNormalDialogue(leftie, core.game.dialogue.FacialExpression.NEUTRAL, *splitLines(messages)) + sendNormalDialogue(leftie, FacialExpression.NEUTRAL, *splitLines(messages)) } } \ No newline at end of file diff --git a/Server/src/main/content/region/fremennik/jatizso/dialogue/MinerDialogue.kt b/Server/src/main/content/region/fremennik/jatizso/dialogue/MinerDialogue.kt index db3a4d65a..8a9212353 100644 --- a/Server/src/main/content/region/fremennik/jatizso/dialogue/MinerDialogue.kt +++ b/Server/src/main/content/region/fremennik/jatizso/dialogue/MinerDialogue.kt @@ -8,9 +8,9 @@ import org.rs09.consts.NPCs import core.tools.END_DIALOGUE @Initializable -class MinerDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class MinerDialogue(player: Player? = null) : DialoguePlugin(player) { val stages = intArrayOf(0, 100, 200, 300, 400, 500) - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return MinerDialogue(player) } @@ -22,35 +22,35 @@ class MinerDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.SAD, "I've been here for two days straight. When I close my eyes, I see rocks.").also { stage++ } - 1 -> playerl(core.game.dialogue.FacialExpression.HALF_ASKING, "Why would anyone stay here for so long?").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "I fear the outside. I fear the big light.").also { stage++ } - 3 -> playerl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Oh dear. Being underground for so long may have driven you mad.").also { stage = END_DIALOGUE } + 0 -> npcl(FacialExpression.SAD, "I've been here for two days straight. When I close my eyes, I see rocks.").also { stage++ } + 1 -> playerl(FacialExpression.HALF_ASKING, "Why would anyone stay here for so long?").also { stage++ } + 2 -> npcl(FacialExpression.NEUTRAL, "I fear the outside. I fear the big light.").also { stage++ } + 3 -> playerl(FacialExpression.HALF_GUILTY, "Oh dear. Being underground for so long may have driven you mad.").also { stage = END_DIALOGUE } - 100 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "My back is killing me!").also { stage++ } - 101 -> playerl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Could be worse, it could be the trolls killing you." ).also { stage++ } - 102 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "How very droll.").also { stage++ } - 103 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "No, troll.").also { stage++ } - 104 -> npcl(core.game.dialogue.FacialExpression.SAD, "Bah! I resist your attempts at jollity.").also { stage = END_DIALOGUE } + 100 -> npcl(FacialExpression.NEUTRAL, "My back is killing me!").also { stage++ } + 101 -> playerl(FacialExpression.HALF_GUILTY, "Could be worse, it could be the trolls killing you." ).also { stage++ } + 102 -> npcl(FacialExpression.NEUTRAL, "How very droll.").also { stage++ } + 103 -> playerl(FacialExpression.NEUTRAL, "No, troll.").also { stage++ } + 104 -> npcl(FacialExpression.SAD, "Bah! I resist your attempts at jollity.").also { stage = END_DIALOGUE } - 200 -> npcl(core.game.dialogue.FacialExpression.SCARED, "Gah! Trolls everywhere. There's no escape!").also { stage++ } - 201 -> playerl(core.game.dialogue.FacialExpression.HALF_THINKING, "You could just leave the mine.").also { stage++ } - 202 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Oh, I'd never thought of that.").also { stage = END_DIALOGUE } + 200 -> npcl(FacialExpression.SCARED, "Gah! Trolls everywhere. There's no escape!").also { stage++ } + 201 -> playerl(FacialExpression.HALF_THINKING, "You could just leave the mine.").also { stage++ } + 202 -> npcl(FacialExpression.NEUTRAL, "Oh, I'd never thought of that.").also { stage = END_DIALOGUE } - 300 -> playerl(core.game.dialogue.FacialExpression.HALF_ASKING, "How's your prospecting going?").also { stage++ } - 301 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "Mine's been going pretty well.").also { stage++ } - 302 -> playerl(core.game.dialogue.FacialExpression.HALF_THINKING, "...").also { stage++ } - 303 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "Mine? Mine...you get it?").also { stage++ } - 304 -> playerl(core.game.dialogue.FacialExpression.HALF_THINKING, "Oh, I got it. That doesn't make it funny though.").also { stage++ } - 305 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Suit yourself.").also { stage = END_DIALOGUE } + 300 -> playerl(FacialExpression.HALF_ASKING, "How's your prospecting going?").also { stage++ } + 301 -> npcl(FacialExpression.LAUGH, "Mine's been going pretty well.").also { stage++ } + 302 -> playerl(FacialExpression.HALF_THINKING, "...").also { stage++ } + 303 -> npcl(FacialExpression.LAUGH, "Mine? Mine...you get it?").also { stage++ } + 304 -> playerl(FacialExpression.HALF_THINKING, "Oh, I got it. That doesn't make it funny though.").also { stage++ } + 305 -> npcl(FacialExpression.NEUTRAL, "Suit yourself.").also { stage = END_DIALOGUE } - 400 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "High hoe, High hoe!").also { stage++ } - 401 -> playerl(core.game.dialogue.FacialExpression.ASKING, "Why are you singing about farming implements at altitude?").also { stage++ } - 402 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "I don't know, I've never thought about it. Ask my Dad, he taught me the song.").also { stage = END_DIALOGUE } + 400 -> npcl(FacialExpression.NEUTRAL, "High hoe, High hoe!").also { stage++ } + 401 -> playerl(FacialExpression.ASKING, "Why are you singing about farming implements at altitude?").also { stage++ } + 402 -> npcl(FacialExpression.NEUTRAL, "I don't know, I've never thought about it. Ask my Dad, he taught me the song.").also { stage = END_DIALOGUE } - 500 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "This place rocks!").also { stage++ } - 501 -> playerl(core.game.dialogue.FacialExpression.HALF_THINKING, "No it doesn't, it stays perfectly still.").also { stage++ } - 502 -> npcl(core.game.dialogue.FacialExpression.HALF_THINKING, "Bah! Be quiet, pedant." ).also { stage = END_DIALOGUE } + 500 -> npcl(FacialExpression.NEUTRAL, "This place rocks!").also { stage++ } + 501 -> playerl(FacialExpression.HALF_THINKING, "No it doesn't, it stays perfectly still.").also { stage++ } + 502 -> npcl(FacialExpression.HALF_THINKING, "Bah! Be quiet, pedant." ).also { stage = END_DIALOGUE } } return true } diff --git a/Server/src/main/content/region/fremennik/lunarisle/dialogue/BabaYagaDialogue.kt b/Server/src/main/content/region/fremennik/lunarisle/dialogue/BabaYagaDialogue.kt index e64b9f872..b597ce416 100644 --- a/Server/src/main/content/region/fremennik/lunarisle/dialogue/BabaYagaDialogue.kt +++ b/Server/src/main/content/region/fremennik/lunarisle/dialogue/BabaYagaDialogue.kt @@ -13,31 +13,31 @@ import org.rs09.consts.NPCs */ @Initializable -class BabaYagaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class BabaYagaDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.ASKING, "Ah, a stranger to our island. How can I help?").also { stage ++ } + 0 -> npc(FacialExpression.ASKING, "Ah, a stranger to our island. How can I help?").also { stage ++ } 1 -> options("Have you got anything to trade?", "It's a very interesting house you have here.", "I'm good thanks, bye.").also { stage ++ } 2 -> when(buttonId) { 1 -> end().also { npc.openShop(player) } - 2 -> playerl(core.game.dialogue.FacialExpression.ASKING, "It's a very interesting house you have here. Does he have a name?").also { stage = 10 } + 2 -> playerl(FacialExpression.ASKING, "It's a very interesting house you have here. Does he have a name?").also { stage = 10 } 3 -> end() } - 10 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Why of course. It's Berty.").also { stage++ } - 11 -> player(core.game.dialogue.FacialExpression.THINKING, "Berty? Berty the Chicken leg house?").also { stage++ } - 12 -> npc(core.game.dialogue.FacialExpression.LAUGH, "Yes.").also { stage++ } - 13 -> player(core.game.dialogue.FacialExpression.ASKING, "May I ask why?").also { stage++ } - 14 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "It just has that certain ring to it, don't you think? Beeerteeee!").also { stage++ } - 15 -> player(core.game.dialogue.FacialExpression.HALF_WORRIED, "You're ins...").also { stage++ } + 10 -> npc(FacialExpression.FRIENDLY, "Why of course. It's Berty.").also { stage++ } + 11 -> player(FacialExpression.THINKING, "Berty? Berty the Chicken leg house?").also { stage++ } + 12 -> npc(FacialExpression.LAUGH, "Yes.").also { stage++ } + 13 -> player(FacialExpression.ASKING, "May I ask why?").also { stage++ } + 14 -> npcl(FacialExpression.LAUGH, "It just has that certain ring to it, don't you think? Beeerteeee!").also { stage++ } + 15 -> player(FacialExpression.HALF_WORRIED, "You're ins...").also { stage++ } 16 -> npc("Insane? Very.").also { stage = 99 } 99 -> end() @@ -45,7 +45,7 @@ class BabaYagaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return BabaYagaDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/lunarisle/dialogue/BouquetMacHyacinthDialogue.kt b/Server/src/main/content/region/fremennik/lunarisle/dialogue/BouquetMacHyacinthDialogue.kt index dde5b6ade..29f063219 100644 --- a/Server/src/main/content/region/fremennik/lunarisle/dialogue/BouquetMacHyacinthDialogue.kt +++ b/Server/src/main/content/region/fremennik/lunarisle/dialogue/BouquetMacHyacinthDialogue.kt @@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit */ @Initializable -class BouquetMacHyacinthDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class BouquetMacHyacinthDialogue(player: Player? = null) : DialoguePlugin(player){ private val Rellekka = Location.create(2663, 3644, 0) private var teled = false @@ -28,9 +28,9 @@ class BouquetMacHyacinthDialogue(player: Player? = null) : core.game.dialogue.Di if (!teled) { if (player.inventory.contains(Items.SEAL_OF_PASSAGE_9083, 1) || player.equipment.contains(Items.SEAL_OF_PASSAGE_9083, 1)) { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hi! What are you up to?").also { stage = 0 } + player(FacialExpression.FRIENDLY, "Hi! What are you up to?").also { stage = 0 } } else { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hi, I...").also { stage = 5 } + player(FacialExpression.FRIENDLY, "Hi, I...").also { stage = 5 } } } return true @@ -38,15 +38,15 @@ class BouquetMacHyacinthDialogue(player: Player? = null) : core.game.dialogue.Di override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.FRIENDLY,"Watering the pretty flowers, you want to help?").also { stage++ } - 1 -> playerl(core.game.dialogue.FacialExpression.HALF_WORRIED, "I don't have time to water flowers, I have people to save!").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Pft, you should take time to enjoy the simple things.").also { stage++ } - 3 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "I'm not a simple person.").also { stage++ } - 4 -> npc(core.game.dialogue.FacialExpression.LAUGH, "So it seems.").also { stage = 99 } + 0 -> npc(FacialExpression.FRIENDLY,"Watering the pretty flowers, you want to help?").also { stage++ } + 1 -> playerl(FacialExpression.HALF_WORRIED, "I don't have time to water flowers, I have people to save!").also { stage++ } + 2 -> npcl(FacialExpression.NEUTRAL, "Pft, you should take time to enjoy the simple things.").also { stage++ } + 3 -> player(FacialExpression.NEUTRAL, "I'm not a simple person.").also { stage++ } + 4 -> npc(FacialExpression.LAUGH, "So it seems.").also { stage = 99 } - 5 -> npc(core.game.dialogue.FacialExpression.ANNOYED, "What are you doing here, Fremennik?!").also { stage++ } - 6 -> player(core.game.dialogue.FacialExpression.WORRIED, "I have a seal of pass...").also { stage++ } - 7 -> npc(core.game.dialogue.FacialExpression.ANNOYED, "No you do not! Begone!").also { stage++ } + 5 -> npc(FacialExpression.ANNOYED, "What are you doing here, Fremennik?!").also { stage++ } + 6 -> player(FacialExpression.WORRIED, "I have a seal of pass...").also { stage++ } + 7 -> npc(FacialExpression.ANNOYED, "No you do not! Begone!").also { stage++ } 8 -> teleport(player, Rellekka, TeleportManager.TeleportType.LUNAR).also { wait1() } 99 -> end() @@ -58,7 +58,7 @@ class BouquetMacHyacinthDialogue(player: Player? = null) : core.game.dialogue.Di Executors.newSingleThreadScheduledExecutor().schedule({ if (player.location.isInRegion(Rellekka.regionId)) { playerl( - core.game.dialogue.FacialExpression.WORRIED, + FacialExpression.WORRIED, "Ooops. Suppose I need a seal of passage when I'm walking around that island." ).also { end() } } else { @@ -67,7 +67,7 @@ class BouquetMacHyacinthDialogue(player: Player? = null) : core.game.dialogue.Di }, 1, TimeUnit.SECONDS) } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return BouquetMacHyacinthDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/lunarisle/dialogue/CabinBoyDialogue.kt b/Server/src/main/content/region/fremennik/lunarisle/dialogue/CabinBoyDialogue.kt index e4ad4cd4d..4ce80aecf 100644 --- a/Server/src/main/content/region/fremennik/lunarisle/dialogue/CabinBoyDialogue.kt +++ b/Server/src/main/content/region/fremennik/lunarisle/dialogue/CabinBoyDialogue.kt @@ -15,15 +15,15 @@ import org.rs09.consts.NPCs */ @Initializable -class CabinBoyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class CabinBoyDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (player.inventory.contains(Items.EMERALD_LENS_9066, 1) || player.bank.contains(Items.EMERALD_LENS_9066, 1)) { - playerl(core.game.dialogue.FacialExpression.FRIENDLY, "So you've plucked up the courage to come and confront that girl!").also { stage = 0 } + playerl(FacialExpression.FRIENDLY, "So you've plucked up the courage to come and confront that girl!").also { stage = 0 } } else { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hi.").also { stage = 20 } + player(FacialExpression.FRIENDLY, "Hi.").also { stage = 20 } } return true @@ -31,38 +31,38 @@ class CabinBoyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.CHILD_FRIENDLY, "That I did, that I did!").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.ASKING, "And?").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY, "She turned out to be really nice! She's joining us to become a pirate!").also { stage++ } - 3 -> playerl(core.game.dialogue.FacialExpression.HALF_WORRIED, "Really? And you're not sceptical about this? You know, after what she did last time?").also { stage++ } - 4 -> npc(core.game.dialogue.FacialExpression.CHILD_SUSPICIOUS, "She---has---no---spell---on---me.").also { stage++ } - 5 -> player(core.game.dialogue.FacialExpression.HALF_THINKING, "Huh? Why are you talking like that?").also { stage++ } - 6 -> npc(core.game.dialogue.FacialExpression.CHILD_THINKING, "Like what?").also { stage++ } - 7 -> playerl(core.game.dialogue.FacialExpression.HALF_ASKING, "Like someone else was talking for you. Are you sure she hasn't put a spell on you again? Did she wave a watch in front of your face? You know, tell you to look deep into her eyes?").also { stage++ } - 8 -> npc(core.game.dialogue.FacialExpression.CHILD_SUSPICIOUS, "She---has---no---spell---on---me.").also { stage++ } - 9 -> playerl(core.game.dialogue.FacialExpression.HALF_THINKING, "I think you've been hypnotised. I wonder what happens if I click my fingers?").also { + 0 -> npc(FacialExpression.CHILD_FRIENDLY, "That I did, that I did!").also { stage++ } + 1 -> player(FacialExpression.ASKING, "And?").also { stage++ } + 2 -> npcl(FacialExpression.CHILD_FRIENDLY, "She turned out to be really nice! She's joining us to become a pirate!").also { stage++ } + 3 -> playerl(FacialExpression.HALF_WORRIED, "Really? And you're not sceptical about this? You know, after what she did last time?").also { stage++ } + 4 -> npc(FacialExpression.CHILD_SUSPICIOUS, "She---has---no---spell---on---me.").also { stage++ } + 5 -> player(FacialExpression.HALF_THINKING, "Huh? Why are you talking like that?").also { stage++ } + 6 -> npc(FacialExpression.CHILD_THINKING, "Like what?").also { stage++ } + 7 -> playerl(FacialExpression.HALF_ASKING, "Like someone else was talking for you. Are you sure she hasn't put a spell on you again? Did she wave a watch in front of your face? You know, tell you to look deep into her eyes?").also { stage++ } + 8 -> npc(FacialExpression.CHILD_SUSPICIOUS, "She---has---no---spell---on---me.").also { stage++ } + 9 -> playerl(FacialExpression.HALF_THINKING, "I think you've been hypnotised. I wonder what happens if I click my fingers?").also { player.sendChat("*click*").also { stage++ } } - 10 -> npc(core.game.dialogue.FacialExpression.CHILD_SAD, "*Cluck* *cluck* *bwaarrk*").also { stage++ } - 11 -> npc(core.game.dialogue.FacialExpression.CHILD_SAD, "").also { stage++ } - 12 -> player(core.game.dialogue.FacialExpression.WORRIED, "Oh dear. Oh well, I'm sure you'll learn one day.").also { stage = 99 } + 10 -> npc(FacialExpression.CHILD_SAD, "*Cluck* *cluck* *bwaarrk*").also { stage++ } + 11 -> npc(FacialExpression.CHILD_SAD, "").also { stage++ } + 12 -> player(FacialExpression.WORRIED, "Oh dear. Oh well, I'm sure you'll learn one day.").also { stage = 99 } - 20 -> npc(core.game.dialogue.FacialExpression.CHILD_FRIENDLY, "I bet you're after another lens!").also { stage++ } - 21 -> player(core.game.dialogue.FacialExpression.HALF_THINKING, "How could you possibly know that?").also { stage++ } - 22 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY, "Hey, I think I'm learning a thing or two from these Moon Clan ladies.").also { stage++ } + 20 -> npc(FacialExpression.CHILD_FRIENDLY, "I bet you're after another lens!").also { stage++ } + 21 -> player(FacialExpression.HALF_THINKING, "How could you possibly know that?").also { stage++ } + 22 -> npcl(FacialExpression.CHILD_FRIENDLY, "Hey, I think I'm learning a thing or two from these Moon Clan ladies.").also { stage++ } 23 -> options("Please", "No thanks").also { stage++ } 24 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.HALF_ASKING, "Oi! I need another lens, boy.").also { stage = 25} - 2 -> player(core.game.dialogue.FacialExpression.SUSPICIOUS, "I think I'll pass. But thanks..").also { stage = 99 } + 1 -> player(FacialExpression.HALF_ASKING, "Oi! I need another lens, boy.").also { stage = 25} + 2 -> player(FacialExpression.SUSPICIOUS, "I think I'll pass. But thanks..").also { stage = 99 } } - 25 -> npc(core.game.dialogue.FacialExpression.CHILD_FRIENDLY, "Huh, oh ok, I suppose I owe you one.").also { addItemOrDrop(player, Items.EMERALD_LENS_9066, 1) }.also { stage = 99 } + 25 -> npc(FacialExpression.CHILD_FRIENDLY, "Huh, oh ok, I suppose I owe you one.").also { addItemOrDrop(player, Items.EMERALD_LENS_9066, 1) }.also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return CabinBoyDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/lunarisle/dialogue/MelenaMoonlanderDialogue.kt b/Server/src/main/content/region/fremennik/lunarisle/dialogue/MelenaMoonlanderDialogue.kt index 743139924..4992dbf2e 100644 --- a/Server/src/main/content/region/fremennik/lunarisle/dialogue/MelenaMoonlanderDialogue.kt +++ b/Server/src/main/content/region/fremennik/lunarisle/dialogue/MelenaMoonlanderDialogue.kt @@ -12,49 +12,49 @@ import org.rs09.consts.NPCs */ @Initializable -class MelenaMoonlanderDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class MelenaMoonlanderDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Hi. Welcome to the general store. How might I help you?").also { stage++ } + 0 -> npcl(FacialExpression.FRIENDLY, "Hi. Welcome to the general store. How might I help you?").also { stage++ } 1 -> options("What can you sell me?", "I have a question...", "I'm good thanks, bye.").also { stage++ } 2 -> when (buttonId) { 1 -> end().also { npc.openShop(player) } - 2 -> player(core.game.dialogue.FacialExpression.HALF_ASKING, "I have a question...").also { stage = 11 } - 3 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "I'm good thanks, bye.").also { stage = 99 } + 2 -> player(FacialExpression.HALF_ASKING, "I have a question...").also { stage = 11 } + 3 -> player(FacialExpression.FRIENDLY, "I'm good thanks, bye.").also { stage = 99 } } - 11 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "About magic of course.").also { stage++ } - 12 -> player(core.game.dialogue.FacialExpression.SUSPICIOUS, "Sorry?").also { stage++ } - 13 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I said about magic of course. You know, in response to your question.").also { stage++ } - 14 -> player(core.game.dialogue.FacialExpression.HALF_THINKING, "But I didn't ask anything yet.").also { stage++ } - 15 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, but you were thinking of asking me how I was floating.").also { stage++ } - 16 -> player(core.game.dialogue.FacialExpression.AMAZED, "That's true! How could you possibly know that?").also { stage++ } - 17 -> npc(core.game.dialogue.FacialExpression.HALF_THINKING, "Don't you realise we can read your mind.").also { stage++ } - 18 -> player(core.game.dialogue.FacialExpression.SUSPICIOUS, "Oh, of course. How do you manage to do that?").also { stage++ } - 19 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "It's quite simple, everyone has a resonance that is responded to by the moon. This resonance changes depending on what we are thinking. You can tune yourself in to listen to this").also { stage++ } - 20 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "resonance with practice - it's a life long quest for the members of the Moon Clan, but its especially easy to read with outsiders like yourself,").also { stage++ } - 21 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "as you are far louder and unguarded.").also { stage++ } - 22 -> player(core.game.dialogue.FacialExpression.SUSPICIOUS, "I see. I best be careful what I think of then.").also { stage++ } - 23 -> player(core.game.dialogue.FacialExpression.WORRIED, "...").also { stage++ } - 24 -> player(core.game.dialogue.FacialExpression.THINKING, "...").also { stage++ } - 25 -> npc(core.game.dialogue.FacialExpression.DISGUSTED_HEAD_SHAKE, "That's disgusting!").also { stage++ } - 26 -> player(core.game.dialogue.FacialExpression.SAD, "Sorry.").also { stage = 99 } + 11 -> npc(FacialExpression.FRIENDLY, "About magic of course.").also { stage++ } + 12 -> player(FacialExpression.SUSPICIOUS, "Sorry?").also { stage++ } + 13 -> npcl(FacialExpression.FRIENDLY, "I said about magic of course. You know, in response to your question.").also { stage++ } + 14 -> player(FacialExpression.HALF_THINKING, "But I didn't ask anything yet.").also { stage++ } + 15 -> npcl(FacialExpression.FRIENDLY, "Yes, but you were thinking of asking me how I was floating.").also { stage++ } + 16 -> player(FacialExpression.AMAZED, "That's true! How could you possibly know that?").also { stage++ } + 17 -> npc(FacialExpression.HALF_THINKING, "Don't you realise we can read your mind.").also { stage++ } + 18 -> player(FacialExpression.SUSPICIOUS, "Oh, of course. How do you manage to do that?").also { stage++ } + 19 -> npcl(FacialExpression.FRIENDLY, "It's quite simple, everyone has a resonance that is responded to by the moon. This resonance changes depending on what we are thinking. You can tune yourself in to listen to this").also { stage++ } + 20 -> npcl(FacialExpression.FRIENDLY, "resonance with practice - it's a life long quest for the members of the Moon Clan, but its especially easy to read with outsiders like yourself,").also { stage++ } + 21 -> npc(FacialExpression.FRIENDLY, "as you are far louder and unguarded.").also { stage++ } + 22 -> player(FacialExpression.SUSPICIOUS, "I see. I best be careful what I think of then.").also { stage++ } + 23 -> player(FacialExpression.WORRIED, "...").also { stage++ } + 24 -> player(FacialExpression.THINKING, "...").also { stage++ } + 25 -> npc(FacialExpression.DISGUSTED_HEAD_SHAKE, "That's disgusting!").also { stage++ } + 26 -> player(FacialExpression.SAD, "Sorry.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return MelenaMoonlanderDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/lunarisle/dialogue/PaulinePolarisDialogue.kt b/Server/src/main/content/region/fremennik/lunarisle/dialogue/PaulinePolarisDialogue.kt index 835f25d01..a0ede3811 100644 --- a/Server/src/main/content/region/fremennik/lunarisle/dialogue/PaulinePolarisDialogue.kt +++ b/Server/src/main/content/region/fremennik/lunarisle/dialogue/PaulinePolarisDialogue.kt @@ -13,32 +13,32 @@ import org.rs09.consts.NPCs */ @Initializable -class PaulinePolarisDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class PaulinePolarisDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.ASKING, "Ah, a stranger to our island. How can I help?").also { stage ++ } - 1 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Well, I've actually come here on a diplomatic mission. I want to try and settle some of the disputes between the Fremenniks and your clan.").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "The Rremenniks? Pah! They are just too ignorant and stubborn to listen to anything we have to say - how can we possibly associate with a race that won't listen?").also { stage++ } - 3 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "I think they are very eager to listen, but they feel like you are keeping secrets from them.").also { stage++ } - 4 -> npc(core.game.dialogue.FacialExpression.HALF_THINKING, "Secrets?").also { stage++ } - 5 -> playerl(core.game.dialogue.FacialExpression.HALF_ASKING, "Yes, as in your magic ways. To be honest, I think it is fear of the unknown.").also { stage++ } - 6 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Well, when the day comes that a Fremennik can prove they have the patience and interest in learning our ways, then we will perhaps share our secrets.").also { stage++ } - 7 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "I'm hoping I might be able to achieve that.").also { stage++ } - 8 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Good luck. It's far from simple.").also { stage = 99 } + 0 -> npc(FacialExpression.ASKING, "Ah, a stranger to our island. How can I help?").also { stage ++ } + 1 -> playerl(FacialExpression.FRIENDLY, "Well, I've actually come here on a diplomatic mission. I want to try and settle some of the disputes between the Fremenniks and your clan.").also { stage++ } + 2 -> npcl(FacialExpression.FRIENDLY, "The Rremenniks? Pah! They are just too ignorant and stubborn to listen to anything we have to say - how can we possibly associate with a race that won't listen?").also { stage++ } + 3 -> playerl(FacialExpression.FRIENDLY, "I think they are very eager to listen, but they feel like you are keeping secrets from them.").also { stage++ } + 4 -> npc(FacialExpression.HALF_THINKING, "Secrets?").also { stage++ } + 5 -> playerl(FacialExpression.HALF_ASKING, "Yes, as in your magic ways. To be honest, I think it is fear of the unknown.").also { stage++ } + 6 -> npcl(FacialExpression.FRIENDLY, "Well, when the day comes that a Fremennik can prove they have the patience and interest in learning our ways, then we will perhaps share our secrets.").also { stage++ } + 7 -> player(FacialExpression.FRIENDLY, "I'm hoping I might be able to achieve that.").also { stage++ } + 8 -> npc(FacialExpression.FRIENDLY, "Good luck. It's far from simple.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return PaulinePolarisDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/lunarisle/dialogue/RimaeSirsalisDialogue.kt b/Server/src/main/content/region/fremennik/lunarisle/dialogue/RimaeSirsalisDialogue.kt index 7c37ba63c..6046a7931 100644 --- a/Server/src/main/content/region/fremennik/lunarisle/dialogue/RimaeSirsalisDialogue.kt +++ b/Server/src/main/content/region/fremennik/lunarisle/dialogue/RimaeSirsalisDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class RimaeSirsalisDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class RimaeSirsalisDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } return true } @@ -26,33 +26,33 @@ class RimaeSirsalisDialogue(player: Player? = null) : core.game.dialogue.Dialogu 1 -> when (buttonId) { 1 -> end().also { npc.openShop(player) } - 2 -> player(core.game.dialogue.FacialExpression.HALF_ASKING, "Do you have any use for suqah teeth or hides?").also { stage = 5 } - 3 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Why thank you. It's been our haven for a great many generations.").also { stage = 10 } - 4 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "I'm good thanks, bye.").also { stage = 99 } + 2 -> player(FacialExpression.HALF_ASKING, "Do you have any use for suqah teeth or hides?").also { stage = 5 } + 3 -> npcl(FacialExpression.FRIENDLY, "Why thank you. It's been our haven for a great many generations.").also { stage = 10 } + 4 -> player(FacialExpression.FRIENDLY, "I'm good thanks, bye.").also { stage = 99 } } - 5 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Most certainly! The hides are great for making clothes and the teeth are particularly useful for broaches, necklaces and the like. But I won't accept them from anyone.").also { stage = 99 } + 5 -> npcl(FacialExpression.FRIENDLY, "Most certainly! The hides are great for making clothes and the teeth are particularly useful for broaches, necklaces and the like. But I won't accept them from anyone.").also { stage = 99 } - 10 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Everything seems to have a magical feel to it.").also { stage++ } - 11 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Of course. We integrate magic into all areas of our lives. It is a part of everyone, so why deny it? It's best to make the most of this innate gift we have all been given.").also { stage++ } - 12 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "What sort of things do you use your magic for?").also { stage++ } - 13 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Take a look around. We use it in our day to day lives, from making a cup of tea to travelling around the island.").also { stage++ } - 14 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "You see our ancestors were the ones that found the first rune essence and put it to use! The various factions were eventually created,").also { stage++ } - 15 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "with people having different ideas on how the essence should be used (or not in some cases!)").also { stage++ } - 16 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "What has kept you so secluded on this island?").also { stage++ } - 17 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "It may be a bit beyond you, but although magic comes from within, we are all strongly linked to the moon and the").also { stage++ } - 18 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "effects it has on us cannot be denied!").also { stage++ } - 19 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "It can't?").also { stage++ } - 20 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Of course not. This very island has a great link to our moon, which helps us understand ourselves - especially our dreams,").also { stage++ } - 21 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "which is the path to understanding magic.").also { stage++ } - 22 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "I think I will just have to take your word on that.").also { stage = 99 } + 10 -> playerl(FacialExpression.FRIENDLY, "Everything seems to have a magical feel to it.").also { stage++ } + 11 -> npcl(FacialExpression.FRIENDLY, "Of course. We integrate magic into all areas of our lives. It is a part of everyone, so why deny it? It's best to make the most of this innate gift we have all been given.").also { stage++ } + 12 -> player(FacialExpression.FRIENDLY, "What sort of things do you use your magic for?").also { stage++ } + 13 -> npcl(FacialExpression.FRIENDLY, "Take a look around. We use it in our day to day lives, from making a cup of tea to travelling around the island.").also { stage++ } + 14 -> npcl(FacialExpression.FRIENDLY, "You see our ancestors were the ones that found the first rune essence and put it to use! The various factions were eventually created,").also { stage++ } + 15 -> npcl(FacialExpression.FRIENDLY, "with people having different ideas on how the essence should be used (or not in some cases!)").also { stage++ } + 16 -> player(FacialExpression.FRIENDLY, "What has kept you so secluded on this island?").also { stage++ } + 17 -> npcl(FacialExpression.FRIENDLY, "It may be a bit beyond you, but although magic comes from within, we are all strongly linked to the moon and the").also { stage++ } + 18 -> npc(FacialExpression.FRIENDLY, "effects it has on us cannot be denied!").also { stage++ } + 19 -> player(FacialExpression.FRIENDLY, "It can't?").also { stage++ } + 20 -> npcl(FacialExpression.FRIENDLY, "Of course not. This very island has a great link to our moon, which helps us understand ourselves - especially our dreams,").also { stage++ } + 21 -> npc(FacialExpression.FRIENDLY, "which is the path to understanding magic.").also { stage++ } + 22 -> playerl(FacialExpression.FRIENDLY, "I think I will just have to take your word on that.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return RimaeSirsalisDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/lunarisle/dialogue/SeleneDialog.kt b/Server/src/main/content/region/fremennik/lunarisle/dialogue/SeleneDialog.kt index df71877b0..8e0f00f75 100644 --- a/Server/src/main/content/region/fremennik/lunarisle/dialogue/SeleneDialog.kt +++ b/Server/src/main/content/region/fremennik/lunarisle/dialogue/SeleneDialog.kt @@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit */ @Initializable -class SeleneDialog(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class SeleneDialog(player: Player? = null) : DialoguePlugin(player){ private val Rellekka = Location.create(2663, 3644, 0) private var teled = false @@ -28,9 +28,9 @@ class SeleneDialog(player: Player? = null) : core.game.dialogue.DialoguePlugin(p if (!teled) { if (player.inventory.contains(Items.SEAL_OF_PASSAGE_9083, 1) || player.equipment.contains(Items.SEAL_OF_PASSAGE_9083, 1)) { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Can you tell me a bit about your people?").also { stage = 0; } + player(FacialExpression.FRIENDLY, "Can you tell me a bit about your people?").also { stage = 0; } } else { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hi, I...").also { stage = 10 } + player(FacialExpression.FRIENDLY, "Hi, I...").also { stage = 10 } } } return true @@ -38,20 +38,20 @@ class SeleneDialog(player: Player? = null) : core.game.dialogue.DialoguePlugin(p override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.FRIENDLY,"Ok. Like what?").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.HALF_ASKING, "How about the values of the Moon clan!").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Let me see... We value knowledge of self because it is this that gives us our strength! It is most important!").also { stage++ } - 3 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Well... I know things about myself. I know I like hot chocolate!").also { stage++ } - 4 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "I was meaning something a little deeper than that. We also like to see someone listen. You know how they say a wise man listens?").also { stage++ } - 5 -> player(core.game.dialogue.FacialExpression.HALF_WORRIED, "....").also { stage++ } - 6 -> npc(core.game.dialogue.FacialExpression.HALF_WORRIED, "Did you hear me?").also { stage++ } - 7 -> player(core.game.dialogue.FacialExpression.HALF_WORRIED, ".... I'm listening.").also { stage++ } - 8 -> npc(core.game.dialogue.FacialExpression.HALF_WORRIED, "Most wise.").also { stage++ } - 9 -> player(core.game.dialogue.FacialExpression.HALF_WORRIED, "Huh?").also { stage = 99 } + 0 -> npc(FacialExpression.FRIENDLY,"Ok. Like what?").also { stage++ } + 1 -> player(FacialExpression.HALF_ASKING, "How about the values of the Moon clan!").also { stage++ } + 2 -> npcl(FacialExpression.NEUTRAL, "Let me see... We value knowledge of self because it is this that gives us our strength! It is most important!").also { stage++ } + 3 -> playerl(FacialExpression.FRIENDLY, "Well... I know things about myself. I know I like hot chocolate!").also { stage++ } + 4 -> npcl(FacialExpression.LAUGH, "I was meaning something a little deeper than that. We also like to see someone listen. You know how they say a wise man listens?").also { stage++ } + 5 -> player(FacialExpression.HALF_WORRIED, "....").also { stage++ } + 6 -> npc(FacialExpression.HALF_WORRIED, "Did you hear me?").also { stage++ } + 7 -> player(FacialExpression.HALF_WORRIED, ".... I'm listening.").also { stage++ } + 8 -> npc(FacialExpression.HALF_WORRIED, "Most wise.").also { stage++ } + 9 -> player(FacialExpression.HALF_WORRIED, "Huh?").also { stage = 99 } - 10 -> npc(core.game.dialogue.FacialExpression.ANNOYED, "What are you doing here, Fremennik?!").also { stage++ } - 11 -> player(core.game.dialogue.FacialExpression.WORRIED, "I have a seal of pass...").also { stage++ } - 12 -> npc(core.game.dialogue.FacialExpression.ANNOYED, "No you do not! Begone!").also { stage++ } + 10 -> npc(FacialExpression.ANNOYED, "What are you doing here, Fremennik?!").also { stage++ } + 11 -> player(FacialExpression.WORRIED, "I have a seal of pass...").also { stage++ } + 12 -> npc(FacialExpression.ANNOYED, "No you do not! Begone!").also { stage++ } 13 -> teleport(player, Rellekka, TeleportManager.TeleportType.LUNAR).also { wait1() } 99 -> end() @@ -62,14 +62,14 @@ class SeleneDialog(player: Player? = null) : core.game.dialogue.DialoguePlugin(p private fun wait1() { Executors.newSingleThreadScheduledExecutor().schedule({ if (player.location.isInRegion(Rellekka.regionId)) { - playerl(core.game.dialogue.FacialExpression.WORRIED, "Ooops. Suppose I need a seal of passage when I'm walking around that island.").also { end() } + playerl(FacialExpression.WORRIED, "Ooops. Suppose I need a seal of passage when I'm walking around that island.").also { end() } } else { wait1() } }, 1, TimeUnit.SECONDS) } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return SeleneDialog(player) } diff --git a/Server/src/main/content/region/fremennik/lunarisle/dialogue/SirsalBankerDialogue.kt b/Server/src/main/content/region/fremennik/lunarisle/dialogue/SirsalBankerDialogue.kt index 7e90bf9e9..ebe225e11 100644 --- a/Server/src/main/content/region/fremennik/lunarisle/dialogue/SirsalBankerDialogue.kt +++ b/Server/src/main/content/region/fremennik/lunarisle/dialogue/SirsalBankerDialogue.kt @@ -18,20 +18,20 @@ import core.tools.START_DIALOGUE * @author vddCore */ @Initializable -class SirsalBankerDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class SirsalBankerDialogue(player: Player? = null) : DialoguePlugin(player) { override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { START_DIALOGUE -> if (hasSealOfPassage(player)) { if (hasIronmanRestriction(player, IronmanMode.ULTIMATE)) { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "My apologies, dear ${if (player.isMale) "sir" else "madam"}, " + "our services are not available for Ultimate ${if (player.isMale) "Ironmen" else "Ironwomen"}" ).also { stage = END_DIALOGUE } } else { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Good day, how may I help you?" ).also { if (hasAwaitingGrandExchangeCollections(player)) { @@ -42,47 +42,47 @@ class SirsalBankerDialogue(player: Player? = null) : core.game.dialogue.Dialogue } } } else { - playerl(core.game.dialogue.FacialExpression.HALF_WORRIED, "Hi, I...") + playerl(FacialExpression.HALF_WORRIED, "Hi, I...") stage = 30 } 1 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Before we go any further, I should inform you that you " + "have items ready for collection from the Grand Exchange." ).also { stage++ } 2 -> showTopics( - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I'd like to access my bank account, please.", 10), + Topic(FacialExpression.NEUTRAL, "I'd like to access my bank account, please.", 10), IfTopic( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "I'd like to switch to my ${getBankAccountName(player, true)} bank account.", 13, hasActivatedSecondaryBankAccount(player) ), IfTopic( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "I'd like to open a secondary bank account.", 20, !hasActivatedSecondaryBankAccount(player) ), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I'd like to check my PIN settings.", 11), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I'd like to collect items.", 12), - Topic(core.game.dialogue.FacialExpression.ASKING, "What is this place?", 3), + Topic(FacialExpression.NEUTRAL, "I'd like to check my PIN settings.", 11), + Topic(FacialExpression.NEUTRAL, "I'd like to collect items.", 12), + Topic(FacialExpression.ASKING, "What is this place?", 3), ) 3 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "This is a branch of the Bank of Gielinor. We have branches in many towns." ).also { stage++ } 4 -> playerl( - core.game.dialogue.FacialExpression.ASKING, + FacialExpression.ASKING, "And what do you do?" ).also { stage++ } 5 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "We will look after your items and money for you. " + "Leave your valuables with us if you want to keep them safe." ).also { stage = END_DIALOGUE } @@ -106,51 +106,51 @@ class SirsalBankerDialogue(player: Player? = null) : core.game.dialogue.Dialogue toggleBankAccount(player) npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Your active bank account has been switched. " + "You can now access your ${getBankAccountName(player)} account." ).also { stage = END_DIALOGUE } } 20 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Certainly. We offer secondary accounts to all our customers." ).also { stage++ } 21 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "The secondary account comes with a standard fee of 5,000,000 coins. The fee is non-refundable " + "and account activation is permanent." ).also { stage++ } 22 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "If your inventory does not contain enough money to cover the costs, we will complement " + "the amount with the money inside your primary bank account." ).also { stage++ } 23 -> npcl( - core.game.dialogue.FacialExpression.ASKING, + FacialExpression.ASKING, "Knowing all this, would you like to proceed with opening your secondary bank account?" ).also { stage++ } 24 -> showTopics( - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "Yes, I am still interested.", 25), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "Actually, I've changed my mind.", 26) + Topic(FacialExpression.NEUTRAL, "Yes, I am still interested.", 25), + Topic(FacialExpression.NEUTRAL, "Actually, I've changed my mind.", 26) ) 25 -> { when (activateSecondaryBankAccount(player)) { SecondaryBankAccountActivationResult.ALREADY_ACTIVE -> { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Your bank account was already activated, there is no need to pay twice." ).also { stage = END_DIALOGUE } } SecondaryBankAccountActivationResult.INTERNAL_FAILURE -> { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "I must apologize, the transaction was not successful. Please check your " + "primary bank account and your inventory - if there's money missing, please " + "screenshot your chat box and contact the game developers." @@ -159,7 +159,7 @@ class SirsalBankerDialogue(player: Player? = null) : core.game.dialogue.Dialogue SecondaryBankAccountActivationResult.NOT_ENOUGH_MONEY -> { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "It appears that you do not have the money necessary to cover the costs " + "associated with opening a secondary bank account. I will be waiting here " + "until you do." @@ -168,7 +168,7 @@ class SirsalBankerDialogue(player: Player? = null) : core.game.dialogue.Dialogue SecondaryBankAccountActivationResult.SUCCESS -> { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Your secondary bank account has been opened and can be accessed through any " + "of the Bank of Gielinor's employees. Thank you for choosing our services." ).also { stage = END_DIALOGUE } @@ -177,23 +177,23 @@ class SirsalBankerDialogue(player: Player? = null) : core.game.dialogue.Dialogue } 26 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Very well. Should you decide a secondary bank account is needed, do not hesitate to " + "contact any of the Bank of Gielinor's stationary employees. We will be happy to help." ).also { stage = END_DIALOGUE } 30 -> npcl( - core.game.dialogue.FacialExpression.ANNOYED, + FacialExpression.ANNOYED, "What are you doing here, Fremennik?!" ).also { stage++ } 31 -> playerl( - core.game.dialogue.FacialExpression.WORRIED, + FacialExpression.WORRIED, "I have a Seal of Pass..." ).also { stage++ } 32 -> npcl( - core.game.dialogue.FacialExpression.ANGRY, + FacialExpression.ANGRY, "No you don't! Begone!" ).also { stage = END_DIALOGUE } diff --git a/Server/src/main/content/region/fremennik/neitiznot/dialogue/FridleifShieldsonDialogue.kt b/Server/src/main/content/region/fremennik/neitiznot/dialogue/FridleifShieldsonDialogue.kt index 06f0edfa2..c94e5c096 100644 --- a/Server/src/main/content/region/fremennik/neitiznot/dialogue/FridleifShieldsonDialogue.kt +++ b/Server/src/main/content/region/fremennik/neitiznot/dialogue/FridleifShieldsonDialogue.kt @@ -4,23 +4,23 @@ import core.game.dialogue.DialoguePlugin import core.game.dialogue.FacialExpression import core.game.node.entity.player.Player import core.plugin.Initializable -import org.rs09.consts.NPCs import core.tools.END_DIALOGUE +import org.rs09.consts.NPCs @Initializable -class FridleifShieldsonDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class FridleifShieldsonDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return FridleifShieldsonDialogue(player) } override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Greetings!") + npcl(FacialExpression.FRIENDLY, "Greetings!") return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Hello!").also { stage = END_DIALOGUE } + 0 -> playerl(FacialExpression.FRIENDLY, "Hello!").also { stage = END_DIALOGUE } } return true } diff --git a/Server/src/main/content/region/fremennik/neitiznot/dialogue/GunnarHoldstromDialogue.kt b/Server/src/main/content/region/fremennik/neitiznot/dialogue/GunnarHoldstromDialogue.kt index c1077a15b..5a2e9f1c2 100644 --- a/Server/src/main/content/region/fremennik/neitiznot/dialogue/GunnarHoldstromDialogue.kt +++ b/Server/src/main/content/region/fremennik/neitiznot/dialogue/GunnarHoldstromDialogue.kt @@ -8,21 +8,21 @@ import org.rs09.consts.NPCs import core.tools.END_DIALOGUE @Initializable -class GunnarHoldstromDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class GunnarHoldstromDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return GunnarHoldstromDialogue(player) } override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.HAPPY, "Ah, isn't it a lovely day?") + npcl(FacialExpression.HAPPY, "Ah, isn't it a lovely day?") return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.ASKING, "It's not bad. What puts you in such a good mood?").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.HAPPY, "Oh, I just love my job. The smell of the sea breeze, the smell of the arctic pine sap, the smell of the yaks. I find it all so bracing.").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.ASKING, "Bracing? Hmmm. I think I might have chosen a different word.").also { stage = END_DIALOGUE } + 0 -> playerl(FacialExpression.ASKING, "It's not bad. What puts you in such a good mood?").also { stage++ } + 1 -> npcl(FacialExpression.HAPPY, "Oh, I just love my job. The smell of the sea breeze, the smell of the arctic pine sap, the smell of the yaks. I find it all so bracing.").also { stage++ } + 2 -> playerl(FacialExpression.ASKING, "Bracing? Hmmm. I think I might have chosen a different word.").also { stage = END_DIALOGUE } } return true } diff --git a/Server/src/main/content/region/fremennik/neitiznot/dialogue/JofridrMordstatterDialogue.kt b/Server/src/main/content/region/fremennik/neitiznot/dialogue/JofridrMordstatterDialogue.kt index 895adbebe..3188fd345 100644 --- a/Server/src/main/content/region/fremennik/neitiznot/dialogue/JofridrMordstatterDialogue.kt +++ b/Server/src/main/content/region/fremennik/neitiznot/dialogue/JofridrMordstatterDialogue.kt @@ -9,14 +9,14 @@ import org.rs09.consts.NPCs import core.tools.END_DIALOGUE @Initializable -class JofridrMordstatterDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class JofridrMordstatterDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return JofridrMordstatterDialogue(player) } override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Hello there. Would you like to see the goods I have for sale?") + npcl(FacialExpression.NEUTRAL, "Hello there. Would you like to see the goods I have for sale?") return true } @@ -24,18 +24,18 @@ class JofridrMordstatterDialogue(player: Player? = null) : core.game.dialogue.Di when (stage) { 0 -> options("Yes please, Jofridr.", "No thank you, Jofridr.", "Why do you have so much wool in your store?").also { stage++ } 1 -> when (buttonId) { - 1 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Yes please, Jofridr.").also { stage = END_DIALOGUE }.also { npc.openShop(player) } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "No thank you, Jofridr.").also { stage = 5 } - 3 -> playerl(core.game.dialogue.FacialExpression.THINKING, "Why do you have so much wool in your store? I haven't seen any sheep anywhere.").also { stage = 11} + 1 -> playerl(FacialExpression.NEUTRAL, "Yes please, Jofridr.").also { stage = END_DIALOGUE }.also { npc.openShop(player) } + 2 -> playerl(FacialExpression.NEUTRAL, "No thank you, Jofridr.").also { stage = 5 } + 3 -> playerl(FacialExpression.THINKING, "Why do you have so much wool in your store? I haven't seen any sheep anywhere.").also { stage = 11} } - 5 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"Fair thee well.").also { stage = END_DIALOGUE } + 5 -> npcl(FacialExpression.NEUTRAL,"Fair thee well.").also { stage = END_DIALOGUE } - 11 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Ah, I have contacts on the mainland. I have a sailor friend who brings me crates of wool on a regular basis.").also { stage++ } - 12 -> playerl(core.game.dialogue.FacialExpression.ASKING,"What do you trade for it?").also { stage++ } - 13 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Rope of course! What else can we sell? Fish would go off before it got so far south.").also { stage++ } - 14 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Where does all this rope go?").also { stage++ } - 15 -> npcl(core.game.dialogue.FacialExpression.THINKING,"Err, I don't remember the name of the place very well. Dreinna? Drennor? Something like that.").also { stage++ } - 16 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL,"That's very interesting. Thanks Jofridr.").also { stage = END_DIALOGUE } + 11 -> npcl(FacialExpression.FRIENDLY,"Ah, I have contacts on the mainland. I have a sailor friend who brings me crates of wool on a regular basis.").also { stage++ } + 12 -> playerl(FacialExpression.ASKING,"What do you trade for it?").also { stage++ } + 13 -> npcl(FacialExpression.FRIENDLY,"Rope of course! What else can we sell? Fish would go off before it got so far south.").also { stage++ } + 14 -> playerl(FacialExpression.ASKING,"Where does all this rope go?").also { stage++ } + 15 -> npcl(FacialExpression.THINKING,"Err, I don't remember the name of the place very well. Dreinna? Drennor? Something like that.").also { stage++ } + 16 -> playerl(FacialExpression.NEUTRAL,"That's very interesting. Thanks Jofridr.").also { stage = END_DIALOGUE } } return true } diff --git a/Server/src/main/content/region/fremennik/neitiznot/dialogue/KjedeligUppsenDialogue.kt b/Server/src/main/content/region/fremennik/neitiznot/dialogue/KjedeligUppsenDialogue.kt index b78ca7b3a..e0e0b6416 100644 --- a/Server/src/main/content/region/fremennik/neitiznot/dialogue/KjedeligUppsenDialogue.kt +++ b/Server/src/main/content/region/fremennik/neitiznot/dialogue/KjedeligUppsenDialogue.kt @@ -4,23 +4,23 @@ import core.game.dialogue.DialoguePlugin import core.game.dialogue.FacialExpression import core.game.node.entity.player.Player import core.plugin.Initializable -import org.rs09.consts.NPCs import core.tools.END_DIALOGUE +import org.rs09.consts.NPCs @Initializable -class KjedeligUppsenDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class KjedeligUppsenDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return KjedeligUppsenDialogue(player) } override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.NEUTRAL, "I'm guarding the king, I cannot speak.") + npcl(FacialExpression.NEUTRAL, "I'm guarding the king, I cannot speak.") return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Sorry.").also { stage = END_DIALOGUE } + 0 -> playerl(FacialExpression.NEUTRAL, "Sorry.").also { stage = END_DIALOGUE } } return true } diff --git a/Server/src/main/content/region/fremennik/neitiznot/dialogue/LisseIsaaksonDialogue.kt b/Server/src/main/content/region/fremennik/neitiznot/dialogue/LisseIsaaksonDialogue.kt index bffff896f..b99892d90 100644 --- a/Server/src/main/content/region/fremennik/neitiznot/dialogue/LisseIsaaksonDialogue.kt +++ b/Server/src/main/content/region/fremennik/neitiznot/dialogue/LisseIsaaksonDialogue.kt @@ -8,25 +8,25 @@ import org.rs09.consts.NPCs import core.tools.END_DIALOGUE @Initializable -class LisseIsaaksonDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class LisseIsaaksonDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return LisseIsaaksonDialogue(player) } override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Hello, visitor!") + npcl(FacialExpression.FRIENDLY, "Hello, visitor!") return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.ASKING, "Hello. What are you up to?").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Ah, I was about to collect some yak's milk to make yak cheese.").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.HALF_WORRIED, "Eughr! Though I am curious. Can I try some?").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.SAD, "Sorry, no. The last outlander who ate my cheese was ill for a month.").also { stage++ } - 4 -> playerl(core.game.dialogue.FacialExpression.ASKING, "So why don't you get ill as well?").also { stage++ } - 5 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Well, we eat yak milk products every day, from when we're born. So I suppose we're used to it. Anyway I should stop yakking - haha - and get on with my work.").also { stage++ } - 6 -> playerl(core.game.dialogue.FacialExpression.HAPPY, "I'm glad to see that puns are common everywhere in Gielinor; even here.").also { stage = END_DIALOGUE } + 0 -> playerl(FacialExpression.ASKING, "Hello. What are you up to?").also { stage++ } + 1 -> npcl(FacialExpression.FRIENDLY, "Ah, I was about to collect some yak's milk to make yak cheese.").also { stage++ } + 2 -> playerl(FacialExpression.HALF_WORRIED, "Eughr! Though I am curious. Can I try some?").also { stage++ } + 3 -> npcl(FacialExpression.SAD, "Sorry, no. The last outlander who ate my cheese was ill for a month.").also { stage++ } + 4 -> playerl(FacialExpression.ASKING, "So why don't you get ill as well?").also { stage++ } + 5 -> npcl(FacialExpression.FRIENDLY, "Well, we eat yak milk products every day, from when we're born. So I suppose we're used to it. Anyway I should stop yakking - haha - and get on with my work.").also { stage++ } + 6 -> playerl(FacialExpression.HAPPY, "I'm glad to see that puns are common everywhere in Gielinor; even here.").also { stage = END_DIALOGUE } } return true } diff --git a/Server/src/main/content/region/fremennik/neitiznot/dialogue/MortenHoldstromDialogue.kt b/Server/src/main/content/region/fremennik/neitiznot/dialogue/MortenHoldstromDialogue.kt index 159be36f5..5d44c591c 100644 --- a/Server/src/main/content/region/fremennik/neitiznot/dialogue/MortenHoldstromDialogue.kt +++ b/Server/src/main/content/region/fremennik/neitiznot/dialogue/MortenHoldstromDialogue.kt @@ -8,25 +8,25 @@ import org.rs09.consts.NPCs import core.tools.END_DIALOGUE @Initializable -class MortenHoldstromDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class MortenHoldstromDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return MortenHoldstromDialogue(player) } override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Good day to you.") + npcl(FacialExpression.NEUTRAL, "Good day to you.") return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.ASKING, "Hello. What are you up to?").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.HAPPY, "Ah, today is a surströmming day! The herring I buried six months ago is ready to be dug up.").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.DISGUSTED, "Eughr! What are you going to do with it?").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.HAPPY, "Eat it, of course! It will be fermented just-right by now.").also { stage++ } - 4 -> playerl(core.game.dialogue.FacialExpression.ASKING, "Fermented? You eat rotten fish?").also { stage++ } - 5 -> npcl(core.game.dialogue.FacialExpression.HAPPY, "Hmmm, tasty. I'm guessing you don't want to come round and try it?").also { stage++ } - 6 -> playerl(core.game.dialogue.FacialExpression.ANNOYED, "You guess correctly.").also { stage = END_DIALOGUE } + 0 -> playerl(FacialExpression.ASKING, "Hello. What are you up to?").also { stage++ } + 1 -> npcl(FacialExpression.HAPPY, "Ah, today is a surströmming day! The herring I buried six months ago is ready to be dug up.").also { stage++ } + 2 -> playerl(FacialExpression.DISGUSTED, "Eughr! What are you going to do with it?").also { stage++ } + 3 -> npcl(FacialExpression.HAPPY, "Eat it, of course! It will be fermented just-right by now.").also { stage++ } + 4 -> playerl(FacialExpression.ASKING, "Fermented? You eat rotten fish?").also { stage++ } + 5 -> npcl(FacialExpression.HAPPY, "Hmmm, tasty. I'm guessing you don't want to come round and try it?").also { stage++ } + 6 -> playerl(FacialExpression.ANNOYED, "You guess correctly.").also { stage = END_DIALOGUE } } return true } diff --git a/Server/src/main/content/region/fremennik/neitiznot/dialogue/SlugHemliggsenDialogue.kt b/Server/src/main/content/region/fremennik/neitiznot/dialogue/SlugHemliggsenDialogue.kt index 6f2e5af3e..5959779a3 100644 --- a/Server/src/main/content/region/fremennik/neitiznot/dialogue/SlugHemliggsenDialogue.kt +++ b/Server/src/main/content/region/fremennik/neitiznot/dialogue/SlugHemliggsenDialogue.kt @@ -4,22 +4,22 @@ import core.game.dialogue.DialoguePlugin import core.game.dialogue.FacialExpression import core.game.node.entity.player.Player import core.plugin.Initializable -import org.rs09.consts.NPCs import core.tools.END_DIALOGUE +import org.rs09.consts.NPCs @Initializable -class SlugHemliggsenDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class SlugHemliggsenDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return SlugHemliggsenDialogue(player) } override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.WORRIED, "Shhh. Go away. I'm not allowed to talk to you.") + npcl(FacialExpression.WORRIED, "Shhh. Go away. I'm not allowed to talk to you.") return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { - playerl(core.game.dialogue.FacialExpression.ANNOYED, "Fine, whatever ...") + playerl(FacialExpression.ANNOYED, "Fine, whatever ...") stage = END_DIALOGUE return true } diff --git a/Server/src/main/content/region/fremennik/neitiznot/dialogue/ThakkradSigmundsonDialogue.kt b/Server/src/main/content/region/fremennik/neitiznot/dialogue/ThakkradSigmundsonDialogue.kt index 082b569cb..6ecb15192 100644 --- a/Server/src/main/content/region/fremennik/neitiznot/dialogue/ThakkradSigmundsonDialogue.kt +++ b/Server/src/main/content/region/fremennik/neitiznot/dialogue/ThakkradSigmundsonDialogue.kt @@ -4,23 +4,23 @@ import core.game.dialogue.DialoguePlugin import core.game.dialogue.FacialExpression import core.game.node.entity.player.Player import core.plugin.Initializable -import org.rs09.consts.NPCs import core.tools.END_DIALOGUE +import org.rs09.consts.NPCs @Initializable -class ThakkradSigmundsonDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class ThakkradSigmundsonDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return ThakkradSigmundsonDialogue(player) } override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Greetings! I can cure your Yak Hides if you'd like!") + npcl(FacialExpression.FRIENDLY, "Greetings! I can cure your Yak Hides if you'd like!") return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Good to know!").also { stage = END_DIALOGUE } + 0 -> playerl(FacialExpression.FRIENDLY, "Good to know!").also { stage = END_DIALOGUE } } return true } diff --git a/Server/src/main/content/region/fremennik/neitiznot/dialogue/TrogenKonungardeDialogue.kt b/Server/src/main/content/region/fremennik/neitiznot/dialogue/TrogenKonungardeDialogue.kt index da55ecc0d..83eec864d 100644 --- a/Server/src/main/content/region/fremennik/neitiznot/dialogue/TrogenKonungardeDialogue.kt +++ b/Server/src/main/content/region/fremennik/neitiznot/dialogue/TrogenKonungardeDialogue.kt @@ -4,23 +4,23 @@ import core.game.dialogue.DialoguePlugin import core.game.dialogue.FacialExpression import core.game.node.entity.player.Player import core.plugin.Initializable -import org.rs09.consts.NPCs import core.tools.END_DIALOGUE +import org.rs09.consts.NPCs @Initializable -class TrogenKonungardeDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class TrogenKonungardeDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return TrogenKonungardeDialogue(player) } override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.NEUTRAL, "I'm guarding the king, I cannot speak.") + npcl(FacialExpression.NEUTRAL, "I'm guarding the king, I cannot speak.") return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Sorry.").also { stage = END_DIALOGUE } + 0 -> playerl(FacialExpression.NEUTRAL, "Sorry.").also { stage = END_DIALOGUE } } return true } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/BjornAndEldgrimDialogues.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/BjornAndEldgrimDialogues.kt index bd0f4d9af..5a99069ae 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/BjornAndEldgrimDialogues.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/BjornAndEldgrimDialogues.kt @@ -14,35 +14,35 @@ import core.tools.END_DIALOGUE */ @Initializable -class BjornAndEldgrimDialogues(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class BjornAndEldgrimDialogues(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (!isQuestComplete(player, "Fremennik Trials")) { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hello there.").also { stage = 0 } + player(FacialExpression.FRIENDLY, "Hello there.").also { stage = 0 } } else if (isQuestComplete(player, "Fremennik Trials")) { - npc(core.game.dialogue.FacialExpression.DRUNK, "Hey! Itsh you again! Whatshyerfashe!").also { stage = 10 } + npc(FacialExpression.DRUNK, "Hey! Itsh you again! Whatshyerfashe!").also { stage = 10 } } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.DRUNK, "Hey! scheck it out! Itsh an outerlandub! Yer shud go shpeak to the chieftain!").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.ASKING, "The who?").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.DRUNK, "That guy over there by that stuff! (hic) Yeh, abshoultely! He's da bosh!").also { stage = END_DIALOGUE } + 0 -> npcl(FacialExpression.DRUNK, "Hey! scheck it out! Itsh an outerlandub! Yer shud go shpeak to the chieftain!").also { stage++ } + 1 -> player(FacialExpression.ASKING, "The who?").also { stage++ } + 2 -> npcl(FacialExpression.DRUNK, "That guy over there by that stuff! (hic) Yeh, abshoultely! He's da bosh!").also { stage = END_DIALOGUE } - 10 -> player(core.game.dialogue.FacialExpression.ASKING, "${player.name}?").also { stage++ } - 11 -> npcl(core.game.dialogue.FacialExpression.DRUNK, "Nah nah nah, not them, the other one, whatshyerfashe!").also { stage++ } - 12 -> player(core.game.dialogue.FacialExpression.ASKING, "${player.getAttribute("fremennikname","fremmyname")}?").also { stage++ } - 13 -> npc(core.game.dialogue.FacialExpression.DRUNK, "Thatsh what I said diddle I?").also { stage++ } - 14 -> player(core.game.dialogue.FacialExpression.ASKING, "Um.... okay. I'll leave you to your drinking.").also { stage++ } - 15 -> npc(core.game.dialogue.FacialExpression.DRUNK, "Thanksh pal! You're alright!").also { stage = END_DIALOGUE } + 10 -> player(FacialExpression.ASKING, "${player.name}?").also { stage++ } + 11 -> npcl(FacialExpression.DRUNK, "Nah nah nah, not them, the other one, whatshyerfashe!").also { stage++ } + 12 -> player(FacialExpression.ASKING, "${player.getAttribute("fremennikname","fremmyname")}?").also { stage++ } + 13 -> npc(FacialExpression.DRUNK, "Thatsh what I said diddle I?").also { stage++ } + 14 -> player(FacialExpression.ASKING, "Um.... okay. I'll leave you to your drinking.").also { stage++ } + 15 -> npc(FacialExpression.DRUNK, "Thanksh pal! You're alright!").also { stage = END_DIALOGUE } } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return BjornAndEldgrimDialogues(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/BlaninDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/BlaninDialogue.kt index 6eaa88a99..1bc5c3712 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/BlaninDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/BlaninDialogue.kt @@ -14,27 +14,27 @@ import core.tools.END_DIALOGUE */ @Initializable -class BlaninDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class BlaninDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (!isQuestComplete(player, "Fremennik Trials")) { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Good day.").also { stage = 0 } + player(FacialExpression.FRIENDLY, "Good day.").also { stage = 0 } } else { - player(core.game.dialogue.FacialExpression.FRIENDLY, "That's one less thing to worry about.").also { stage = 10 } + player(FacialExpression.FRIENDLY, "That's one less thing to worry about.").also { stage = 10 } } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Good day to you, sir.").also { stage = END_DIALOGUE } - 10 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Glad I could help.").also { stage = END_DIALOGUE } + 0 -> npc(FacialExpression.FRIENDLY, "Good day to you, sir.").also { stage = END_DIALOGUE } + 10 -> npc(FacialExpression.FRIENDLY, "Glad I could help.").also { stage = END_DIALOGUE } } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return BlaninDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/CouncilWorkerDiaryDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/CouncilWorkerDiaryDialogue.kt index 24f548842..a4600a34b 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/CouncilWorkerDiaryDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/CouncilWorkerDiaryDialogue.kt @@ -17,7 +17,7 @@ class CouncilWorkerDiaryDialogue() : DialogueFile() { //todo all this dialogue is inauthentic and sucks, this is just a patch to fix the absolutely garbage and incorrect way of granting the diary rewards that doesn't even give the lamp. -Ceik June 2023 when (stage) { START_DIALOGUE -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "About my achievement diary...");stage++ + player(FacialExpression.FRIENDLY, "About my achievement diary...");stage++ } 1 -> { if (!AchievementDiary.hasClaimedLevelRewards(player, DiaryType.FREMENNIK, 0)) { @@ -48,7 +48,7 @@ class CouncilWorkerDiaryDialogue() : DialogueFile() { 10 -> { npc(COUNCIL_WORKER, "Sure!") - AchievementDiary.grantReplacement(player, DiaryType.FREMENNIK, 0); + AchievementDiary.grantReplacement(player, DiaryType.FREMENNIK, 0) stage = 2 } } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/DronDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/DronDialogue.kt index 82499543e..586034287 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/DronDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/DronDialogue.kt @@ -14,27 +14,27 @@ import core.tools.END_DIALOGUE */ @Initializable -class DronDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class DronDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (!isQuestComplete(player, "Making History")) { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Excuse me.").also { stage = 0 } + player(FacialExpression.FRIENDLY, "Excuse me.").also { stage = 0 } } else { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Excuse me.").also { stage = 10 } + player(FacialExpression.FRIENDLY, "Excuse me.").also { stage = 10 } } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.ANNOYED, "Leave me or I'll destroy you!").also { stage = END_DIALOGUE } - 10 -> npc(core.game.dialogue.FacialExpression.ANNOYED, "You have your answers, now go away!").also { stage = END_DIALOGUE } + 0 -> npc(FacialExpression.ANNOYED, "Leave me or I'll destroy you!").also { stage = END_DIALOGUE } + 10 -> npc(FacialExpression.ANNOYED, "You have your answers, now go away!").also { stage = END_DIALOGUE } } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return DronDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/FishmongerRellekkaDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/FishmongerRellekkaDialogue.kt index 5ebcc8385..8a35e9dc3 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/FishmongerRellekkaDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/FishmongerRellekkaDialogue.kt @@ -14,14 +14,14 @@ import core.tools.END_DIALOGUE */ @Initializable -class FishmongerRellekkaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FishmongerRellekkaDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (!isQuestComplete(player, "Fremennik Trials")) { - npc(core.game.dialogue.FacialExpression.ANNOYED, "I don't sell to outerlanders.").also { stage = END_DIALOGUE } + npc(FacialExpression.ANNOYED, "I don't sell to outerlanders.").also { stage = END_DIALOGUE } } else { - npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there, ${player.getAttribute("fremennikname","fremmyname")}. Looking for fresh fish?").also { stage = 0 } + npcl(FacialExpression.FRIENDLY,"Hello there, ${player.getAttribute("fremennikname","fremmyname")}. Looking for fresh fish?").also { stage = 0 } } return true } @@ -33,7 +33,7 @@ class FishmongerRellekkaDialogue(player: Player? = null) : core.game.dialogue.Di return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FishmongerRellekkaDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/FurTraderDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/FurTraderDialogue.kt index dddc630cb..e8f11f81c 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/FurTraderDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/FurTraderDialogue.kt @@ -14,14 +14,14 @@ import core.tools.END_DIALOGUE */ @Initializable -class FurTraderDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FurTraderDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (!isQuestComplete(player, "Fremennik Trials")) { - npc(core.game.dialogue.FacialExpression.ANNOYED, "I don't sell to outerlanders.").also { stage = END_DIALOGUE } + npc(FacialExpression.ANNOYED, "I don't sell to outerlanders.").also { stage = END_DIALOGUE } } else { - npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Welcome back, ${player.getAttribute("fremennikname","fremmyname")}. Have you seen the furs I have today?").also { stage = 10 } + npcl(FacialExpression.FRIENDLY,"Welcome back, ${player.getAttribute("fremennikname","fremmyname")}. Have you seen the furs I have today?").also { stage = 10 } } return true } @@ -33,7 +33,7 @@ class FurTraderDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FurTraderDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/HuntingExpertRellekkaDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/HuntingExpertRellekkaDialogue.kt index 00ded9800..baa10c58f 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/HuntingExpertRellekkaDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/HuntingExpertRellekkaDialogue.kt @@ -15,9 +15,9 @@ import core.tools.START_DIALOGUE * @author vddcore */ @Initializable -class HuntingExpertRellekkaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class HuntingExpertRellekkaDialogue(player: Player? = null) : DialoguePlugin(player) { - override fun newInstance(player: Player): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player): DialoguePlugin { return HuntingExpertRellekkaDialogue(player) } @@ -25,7 +25,7 @@ class HuntingExpertRellekkaDialogue(player: Player? = null) : core.game.dialogue npc = args[0] as NPC npcl( - core.game.dialogue.FacialExpression.HAPPY, + FacialExpression.HAPPY, "Good day, you seem to have a keen eye. " + "Maybe even some hunter's blood in that body of yours?" ) @@ -36,48 +36,48 @@ class HuntingExpertRellekkaDialogue(player: Player? = null) : core.game.dialogue override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { START_DIALOGUE -> showTopics( - Topic(core.game.dialogue.FacialExpression.ASKING, "Is there anything you can teach me?", 1), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "Nevermind.", END_DIALOGUE) + Topic(FacialExpression.ASKING, "Is there anything you can teach me?", 1), + Topic(FacialExpression.NEUTRAL, "Nevermind.", END_DIALOGUE) ) 1 -> npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "I can teach you how to hunt." ).also { stage++ } 2 -> playerl( - core.game.dialogue.FacialExpression.THINKING, + FacialExpression.THINKING, "What kind of creatures can I hunt?" ).also { stage++ } 3 -> npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Many creatures in many ways. You need to make some traps " + "and catch birds!" ).also { stage++ } 4 -> playerl( - core.game.dialogue.FacialExpression.HALF_ASKING, + FacialExpression.HALF_ASKING, "Birds?" ).also { stage++ } 5 -> npcl( - core.game.dialogue.FacialExpression.ANNOYED, + FacialExpression.ANNOYED, "Yes, birds! Like the ones here!" ).also { stage++ } 6 -> npcl( - core.game.dialogue.FacialExpression.ANNOYED, + FacialExpression.ANNOYED, "Look. Just... Get some hunting gear and go set up some traps." ).also { stage++ } 7 -> playerl( - core.game.dialogue.FacialExpression.HALF_ROLLING_EYES, + FacialExpression.HALF_ROLLING_EYES, "Is that it?" ).also { stage++ } 8 -> npcl( - core.game.dialogue.FacialExpression.FURIOUS, + FacialExpression.FURIOUS, "JUST GO DO IT!" ).also { stage = END_DIALOGUE } } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/IngridHradsonDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/IngridHradsonDialogue.kt index 02bd29c44..bf81e8182 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/IngridHradsonDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/IngridHradsonDialogue.kt @@ -14,32 +14,32 @@ import core.tools.END_DIALOGUE */ @Initializable -class IngridHradsonDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class IngridHradsonDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (!isQuestComplete(player, "Fremennik Trials")) { - npcl(core.game.dialogue.FacialExpression.ANNOYED, "Outlander, I have work to be getting on with... Please stop bothering me.").also { stage = END_DIALOGUE } + npcl(FacialExpression.ANNOYED, "Outlander, I have work to be getting on with... Please stop bothering me.").also { stage = END_DIALOGUE } } else if (isQuestComplete(player, "Fremennik Trials") && !isQuestComplete(player, "Olaf's Quest")) { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "Good afternoon! How do you like our village?").also { stage = 0 } + npc(FacialExpression.FRIENDLY, "Good afternoon! How do you like our village?").also { stage = 0 } } else if (isQuestComplete(player, "Fremennik Trials") && isQuestComplete(player, "Olaf's Quest")) { - npc(core.game.dialogue.FacialExpression.ASKING, "Hello again! Have you any word from my husband?").also { stage = 10 } + npc(FacialExpression.ASKING, "Hello again! Have you any word from my husband?").also { stage = 10 } } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "It's lovely. You have a fine collection of goats.").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "We polish them every day to get them nice and clean.").also { stage = END_DIALOGUE } + 0 -> playerl(FacialExpression.FRIENDLY, "It's lovely. You have a fine collection of goats.").also { stage++ } + 1 -> npcl(FacialExpression.FRIENDLY, "We polish them every day to get them nice and clean.").also { stage = END_DIALOGUE } - 10 -> playerl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Err, no, not yet. It takes a while for the messages to reach me you know.").also { stage++ } - 11 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Well, when you do, tell him we'll be more than happy to see him again.").also { stage = END_DIALOGUE } + 10 -> playerl(FacialExpression.HALF_GUILTY, "Err, no, not yet. It takes a while for the messages to reach me you know.").also { stage++ } + 11 -> npcl(FacialExpression.FRIENDLY, "Well, when you do, tell him we'll be more than happy to see him again.").also { stage = END_DIALOGUE } } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return IngridHradsonDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/LonghallBouncerDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/LonghallBouncerDialogue.kt index d804c10f7..6e7db868e 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/LonghallBouncerDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/LonghallBouncerDialogue.kt @@ -14,27 +14,27 @@ import core.tools.END_DIALOGUE */ @Initializable -class LonghallBouncerDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class LonghallBouncerDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (!isQuestComplete(player, "Fremennik Trials")) { - npcl(core.game.dialogue.FacialExpression.ANNOYED, "Hey, outerlander. You can't go through there. Talent only, backstage.").also { stage = END_DIALOGUE } + npcl(FacialExpression.ANNOYED, "Hey, outerlander. You can't go through there. Talent only, backstage.").also { stage = END_DIALOGUE } } else{ - npcl(core.game.dialogue.FacialExpression.ANNOYED, "You can't go through there. Talent only, backstage.").also { stage = 0 } + npcl(FacialExpression.ANNOYED, "You can't go through there. Talent only, backstage.").also { stage = 0 } } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> player(core.game.dialogue.FacialExpression.PANICKED, "But I'm a Bard!").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "No you're not. I saw your performance. I was paid well to keep you from ever setting foot on stage here again.").also { stage = END_DIALOGUE } + 0 -> player(FacialExpression.PANICKED, "But I'm a Bard!").also { stage++ } + 1 -> npcl(FacialExpression.FRIENDLY, "No you're not. I saw your performance. I was paid well to keep you from ever setting foot on stage here again.").also { stage = END_DIALOGUE } } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return LonghallBouncerDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/ReesoDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/ReesoDialogue.kt index e01bb016d..b1ae7e78d 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/ReesoDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/ReesoDialogue.kt @@ -14,14 +14,14 @@ import core.tools.END_DIALOGUE */ @Initializable -class ReesoDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ReesoDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (!isQuestComplete(player, "Fremennik Trials")) { - npcl(core.game.dialogue.FacialExpression.ANNOYED, "Please do not disturb me, outerlander. I have much to do.").also { stage = END_DIALOGUE } + npcl(FacialExpression.ANNOYED, "Please do not disturb me, outerlander. I have much to do.").also { stage = END_DIALOGUE } } else { - npcl(core.game.dialogue.FacialExpression.STRUGGLE, "Sorry, ${player.getAttribute("fremennikname","fremmyname")}, I must get on with my work.").also { stage = END_DIALOGUE } + npcl(FacialExpression.STRUGGLE, "Sorry, ${player.getAttribute("fremennikname","fremmyname")}, I must get on with my work.").also { stage = END_DIALOGUE } } return true @@ -31,7 +31,7 @@ class ReesoDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ReesoDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/TalkToChiefDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/TalkToChiefDialogue.kt index ae6fd91c7..ecb633408 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/TalkToChiefDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/TalkToChiefDialogue.kt @@ -16,26 +16,26 @@ import core.tools.END_DIALOGUE */ @Initializable -class TalkToChiefDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class TalkToChiefDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (!isQuestComplete(player, "Fremennik Trials")) { - npcl(core.game.dialogue.FacialExpression.ANNOYED, "I cannot speak to you outerlander! Talk to Brundt, the Chieftain!").also { stage = END_DIALOGUE } + npcl(FacialExpression.ANNOYED, "I cannot speak to you outerlander! Talk to Brundt, the Chieftain!").also { stage = END_DIALOGUE } } else { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hello.").also { stage = 0 } + player(FacialExpression.FRIENDLY, "Hello.").also { stage = 0 } } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Hello to you, too!").also { stage = END_DIALOGUE } + 0 -> npc(FacialExpression.FRIENDLY, "Hello to you, too!").also { stage = END_DIALOGUE } } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return TalkToChiefDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/VolfOlasfsonDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/VolfOlasfsonDialogue.kt index dfcc0bff6..59e104ce2 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/VolfOlasfsonDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/VolfOlasfsonDialogue.kt @@ -14,31 +14,31 @@ import core.tools.END_DIALOGUE */ @Initializable -class VolfOlasfsonDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class VolfOlasfsonDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (!isQuestComplete(player, "Fremennik Trials")) { - npc(core.game.dialogue.FacialExpression.ANNOYED, "Sorry, outlander, but I have things to be doing.").also { stage = END_DIALOGUE } + npc(FacialExpression.ANNOYED, "Sorry, outlander, but I have things to be doing.").also { stage = END_DIALOGUE } } else if (isQuestComplete(player, "Fremennik Trials") && !isQuestComplete(player, "Olaf's Quest")) { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "Hello there. Enjoying the view?").also { stage = 0 } + npc(FacialExpression.FRIENDLY, "Hello there. Enjoying the view?").also { stage = 0 } } else if (isQuestComplete(player, "Fremennik Trials") && isQuestComplete(player, "Olaf's Quest")) { - npcl(core.game.dialogue.FacialExpression.ASKING, "Hello again, friend! Does my father send any word... or treasures like before?").also { stage = 10 } + npcl(FacialExpression.ASKING, "Hello again, friend! Does my father send any word... or treasures like before?").also { stage = 10 } } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Yes I am. You have a lovely yurt.").also { stage++ } - 1 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Thanks! I exercise it regularly.").also { stage = END_DIALOGUE } + 0 -> player(FacialExpression.FRIENDLY, "Yes I am. You have a lovely yurt.").also { stage++ } + 1 -> npc(FacialExpression.FRIENDLY, "Thanks! I exercise it regularly.").also { stage = END_DIALOGUE } - 10 -> playerl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Not today, but if he does, you will be the first to know.").also { stage = END_DIALOGUE } + 10 -> playerl(FacialExpression.HALF_GUILTY, "Not today, but if he does, you will be the first to know.").also { stage = END_DIALOGUE } } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return VolfOlasfsonDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/WaitingOnTheShowDialogues.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/WaitingOnTheShowDialogues.kt index 70ae42bce..d9b9fd99d 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/WaitingOnTheShowDialogues.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/WaitingOnTheShowDialogues.kt @@ -5,19 +5,19 @@ import core.game.dialogue.FacialExpression import core.game.node.entity.npc.NPC import core.game.node.entity.player.Player import core.plugin.Initializable -import org.rs09.consts.NPCs import core.tools.END_DIALOGUE +import org.rs09.consts.NPCs /** * @author qmqz */ @Initializable -class WaitingOnTheShowDialogues(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class WaitingOnTheShowDialogues(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.ANNOYED, "Shhh! I'm waiting for the show!").also { stage = END_DIALOGUE } + npc(FacialExpression.ANNOYED, "Shhh! I'm waiting for the show!").also { stage = END_DIALOGUE } return true } @@ -25,7 +25,7 @@ class WaitingOnTheShowDialogues(player: Player? = null) : core.game.dialogue.Dia return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return WaitingOnTheShowDialogues(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/AskeladdenDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/AskeladdenDialogue.kt index 22196cdde..387ccc2e7 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/AskeladdenDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/AskeladdenDialogue.kt @@ -9,26 +9,26 @@ import org.rs09.consts.Items @Initializable //Disabled because the quest isn't done yet. -class AskeladdenDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class AskeladdenDialogue(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { player?.let { if(player.inventory.contains(3709,1)){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I thought you really liked the long hall?") + playerl(FacialExpression.ASKING,"I thought you really liked the long hall?") stage = 27 return true } else if(player?.getAttribute("sigmund-steps", 0) == 13){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find a written promise from Askeladden to stay out of the Longhall?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a written promise from Askeladden to stay out of the Longhall?") stage = 15 return true } else if(player?.getAttribute("sigmundreturning",false) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I've lost one of the items I was supposed to be trading.") + playerl(FacialExpression.ASKING,"I've lost one of the items I was supposed to be trading.") stage = 35 return true } else if(player.questRepository.isComplete("Fremennik Trials")){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello again Askeladden.") + playerl(FacialExpression.HAPPY,"Hello again Askeladden.") stage = 40 return true } @@ -43,7 +43,7 @@ class AskeladdenDialogue(player: Player? = null) : core.game.dialogue.DialoguePl return true } else{ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello there.") + playerl(FacialExpression.HAPPY,"Hello there.") stage = 55 return true } @@ -51,86 +51,86 @@ class AskeladdenDialogue(player: Player? = null) : core.game.dialogue.DialoguePl return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { - return content.region.fremennik.rellekka.quest.thefremenniktrials.AskeladdenDialogue(player) + override fun newInstance(player: Player?): DialoguePlugin { + return AskeladdenDialogue(player) } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { - 0 -> npc(core.game.dialogue.FacialExpression.CHILD_LOUDLY_LAUGHING, "HAHAHA! Yeah, that Lalli... what a maroon!").also { stage++ } + 0 -> npc(FacialExpression.CHILD_LOUDLY_LAUGHING, "HAHAHA! Yeah, that Lalli... what a maroon!").also { stage++ } 1 -> player("So how did you manage to get the wool?").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.CHILD_FRIENDLY, "Well, as you know, I am doing the same trials that you", "are as part of my test of manhood, and that troll is the", "only one who can get that wool.").also { stage++ } - 3 -> npc(core.game.dialogue.FacialExpression.CHILD_NORMAL, "You might have noticed he's kind of... messed in the", "head buddy! He's real paranoid about people stealing his", "golden apples, isn't he?").also { stage++ } - 4 -> player(core.game.dialogue.FacialExpression.HALF_ASKING,"Indeed he is. So how did you manage to get some", "golden wool from him?").also { stage++ } - 5 -> npc(core.game.dialogue.FacialExpression.CHILD_NORMAL, "It was easy buddy! I persuaded him he needed a pet to", "help him guard his apples. A pet that would never sleep!", "A pet that would never need food or exercise!").also { stage++ } - 6 -> npc(core.game.dialogue.FacialExpression.CHILD_NORMAL, "A pet that would never need him to clean up its... well,", "you know, buddy. A pet that would always be loyal to", "him! A faithful companion for life!").also { stage++ } - 7 -> player(core.game.dialogue.FacialExpression.HALF_ASKING, "What pet is this then?").also { stage++ } - 8 -> npc(core.game.dialogue.FacialExpression.CHILD_LOUDLY_LAUGHING, "A pet ROCK!").also { stage++ } - 9 -> npc(core.game.dialogue.FacialExpression.CHILD_NORMAL, "Man, can you believe that stupid troll traded me some", "of his golden wool for a worthless ROCK?").also { stage++ } - 10 -> npc(core.game.dialogue.FacialExpression.CHILD_FRIENDLY, "Buddy, I hafta say: if brains were explosives, that troll", "wouldn't have enough to blow his nose!").also { stage++ } - 11 -> player(core.game.dialogue.FacialExpression.HALF_ASKING, "Do you have any spare rocks then?").also { stage++ } - 12 -> npc(core.game.dialogue.FacialExpression.CHILD_NEUTRAL, "Sure thing buddy, although I have to say, I doubt even", "that troll is stupid enough to fall for the SAME trick", "TWICE in a row! You can try anyways though!").also { + 2 -> npc(FacialExpression.CHILD_FRIENDLY, "Well, as you know, I am doing the same trials that you", "are as part of my test of manhood, and that troll is the", "only one who can get that wool.").also { stage++ } + 3 -> npc(FacialExpression.CHILD_NORMAL, "You might have noticed he's kind of... messed in the", "head buddy! He's real paranoid about people stealing his", "golden apples, isn't he?").also { stage++ } + 4 -> player(FacialExpression.HALF_ASKING,"Indeed he is. So how did you manage to get some", "golden wool from him?").also { stage++ } + 5 -> npc(FacialExpression.CHILD_NORMAL, "It was easy buddy! I persuaded him he needed a pet to", "help him guard his apples. A pet that would never sleep!", "A pet that would never need food or exercise!").also { stage++ } + 6 -> npc(FacialExpression.CHILD_NORMAL, "A pet that would never need him to clean up its... well,", "you know, buddy. A pet that would always be loyal to", "him! A faithful companion for life!").also { stage++ } + 7 -> player(FacialExpression.HALF_ASKING, "What pet is this then?").also { stage++ } + 8 -> npc(FacialExpression.CHILD_LOUDLY_LAUGHING, "A pet ROCK!").also { stage++ } + 9 -> npc(FacialExpression.CHILD_NORMAL, "Man, can you believe that stupid troll traded me some", "of his golden wool for a worthless ROCK?").also { stage++ } + 10 -> npc(FacialExpression.CHILD_FRIENDLY, "Buddy, I hafta say: if brains were explosives, that troll", "wouldn't have enough to blow his nose!").also { stage++ } + 11 -> player(FacialExpression.HALF_ASKING, "Do you have any spare rocks then?").also { stage++ } + 12 -> npc(FacialExpression.CHILD_NEUTRAL, "Sure thing buddy, although I have to say, I doubt even", "that troll is stupid enough to fall for the SAME trick", "TWICE in a row! You can try anyways though!").also { player.inventory.add(Item(Items.PET_ROCK_3695)) - player.setAttribute("/save:fremtrials:askeladden-talkedto",true); + player.setAttribute("/save:fremtrials:askeladden-talkedto",true) stage = 1000} - 15 -> npcl(core.game.dialogue.FacialExpression.CHILD_LOUDLY_LAUGHING,"What? I can't believe she asked you to get a written promise from me to stay out!").also { stage++ } - 16 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL,"Yup, she really did.").also { stage++ } - 17 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY,"Awwwwwww.... but the longhall is just SO MUCH FUN! I'd live there if I could! I suppose you really need that promise to help become a Fremennik, huh?").also { stage++ } - 18 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL,"Yeah, I really do...").also { stage++ } - 19 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY,"Well I'll tell you what buddy; As it's you, I'll give you that written promise. All I ask in return for it is a measly 5000 gold. What do you say?").also { stage++ } + 15 -> npcl(FacialExpression.CHILD_LOUDLY_LAUGHING,"What? I can't believe she asked you to get a written promise from me to stay out!").also { stage++ } + 16 -> playerl(FacialExpression.NEUTRAL,"Yup, she really did.").also { stage++ } + 17 -> npcl(FacialExpression.CHILD_FRIENDLY,"Awwwwwww.... but the longhall is just SO MUCH FUN! I'd live there if I could! I suppose you really need that promise to help become a Fremennik, huh?").also { stage++ } + 18 -> playerl(FacialExpression.NEUTRAL,"Yeah, I really do...").also { stage++ } + 19 -> npcl(FacialExpression.CHILD_FRIENDLY,"Well I'll tell you what buddy; As it's you, I'll give you that written promise. All I ask in return for it is a measly 5000 gold. What do you say?").also { stage++ } 20 -> options("Yes","No").also { stage++ } 21 -> when(buttonId){ 1 -> if(player?.inventory?.contains(995,5000)!! && !player.inventory.isFull){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"That's all you want in return? Sure thing. Here you go.") + playerl(FacialExpression.HAPPY,"That's all you want in return? Sure thing. Here you go.") stage = 22 }else stage = 25 2 -> stage = 25 } - 22 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY,"Done, and done. Let me know if you got any more cash burning a hole in your pocket I can relieve you of, buddy.").also { + 22 -> npcl(FacialExpression.CHILD_FRIENDLY,"Done, and done. Let me know if you got any more cash burning a hole in your pocket I can relieve you of, buddy.").also { player?.inventory?.remove(Item(Items.COINS_995,5000)) player?.inventory?.add(Item(Items.PROMISSORY_NOTE_3709)) player?.incrementAttribute("sigmund-steps",1) stage = 1000 } - 25 -> playerl(core.game.dialogue.FacialExpression.SAD,"I don't think so... That's really quite a lot of money...").also { stage++ } - 26 -> npcl(core.game.dialogue.FacialExpression.CHILD_LOUDLY_LAUGHING,"Hey, suit yourself buddy. You change your mind, the bank of Askeladden is open for deposits 24 hours a day! Eh-heh- heh-heh-heh.").also { stage = 1000 } + 25 -> playerl(FacialExpression.SAD,"I don't think so... That's really quite a lot of money...").also { stage++ } + 26 -> npcl(FacialExpression.CHILD_LOUDLY_LAUGHING,"Hey, suit yourself buddy. You change your mind, the bank of Askeladden is open for deposits 24 hours a day! Eh-heh- heh-heh-heh.").also { stage = 1000 } - 27 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY,"I do!").also { stage++ } - 28 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Then why did you sign this guarantee that you will never enter it again?").also { stage++ } - 29 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY,"Aha! It is because I am cunning! That guarantee says that Askeladden will never enter the longhall again!").also { stage++ } - 30 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY,"But when I have completed my Fremennik trials, and passed my trial of manhood,").also { stage++ } - 31 -> npcl(core.game.dialogue.FacialExpression.CHILD_LOUDLY_LAUGHING,"I will be given a new name, as is our custom, and will therefore not be Askeladden anymore!").also { stage++ } - 32 -> npcl(core.game.dialogue.FacialExpression.CHILD_LOUDLY_LAUGHING,"That guarantee isn't worth the paper it's written on!! You didn't think I would give up going to the longhall for only 5000 did you?").also { stage++ } - 33 -> playerl(core.game.dialogue.FacialExpression.ANNOYED,"Knowing you, I guess I didn't.").also { stage = 1000 } + 27 -> npcl(FacialExpression.CHILD_FRIENDLY,"I do!").also { stage++ } + 28 -> playerl(FacialExpression.ASKING,"Then why did you sign this guarantee that you will never enter it again?").also { stage++ } + 29 -> npcl(FacialExpression.CHILD_FRIENDLY,"Aha! It is because I am cunning! That guarantee says that Askeladden will never enter the longhall again!").also { stage++ } + 30 -> npcl(FacialExpression.CHILD_FRIENDLY,"But when I have completed my Fremennik trials, and passed my trial of manhood,").also { stage++ } + 31 -> npcl(FacialExpression.CHILD_LOUDLY_LAUGHING,"I will be given a new name, as is our custom, and will therefore not be Askeladden anymore!").also { stage++ } + 32 -> npcl(FacialExpression.CHILD_LOUDLY_LAUGHING,"That guarantee isn't worth the paper it's written on!! You didn't think I would give up going to the longhall for only 5000 did you?").also { stage++ } + 33 -> playerl(FacialExpression.ANNOYED,"Knowing you, I guess I didn't.").also { stage = 1000 } - 35 -> npcl(core.game.dialogue.FacialExpression.CHILD_NORMAL,"That's a shame. You should speak to the merchant.").also { stage = 1000 } + 35 -> npcl(FacialExpression.CHILD_NORMAL,"That's a shame. You should speak to the merchant.").also { stage = 1000 } - 40 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY,"Hey buddy! That ain't my name no more! My new Fremennik name is Larravak! What's yours?").also { stage++ } - 41 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"My Fremennik name is ${player.getAttribute("fremennikname","lebron james")}.").also { stage++ } - 42 -> npcl(core.game.dialogue.FacialExpression.CHILD_LOUDLY_LAUGHING,"Ha! Ain't as good as my name buddy! So what can I do ya for?").also { stage++ } + 40 -> npcl(FacialExpression.CHILD_FRIENDLY,"Hey buddy! That ain't my name no more! My new Fremennik name is Larravak! What's yours?").also { stage++ } + 41 -> playerl(FacialExpression.HAPPY,"My Fremennik name is ${player.getAttribute("fremennikname","lebron james")}.").also { stage++ } + 42 -> npcl(FacialExpression.CHILD_LOUDLY_LAUGHING,"Ha! Ain't as good as my name buddy! So what can I do ya for?").also { stage++ } 43 -> options("Ask about things to do","Ask for a new pet rock").also { stage++ } 44 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.ASKING,"So, Askeladd- sorry, Larravak; What is there to do around here now that we are both Fremenniks?").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Can I have another pet rock? I lost mine...").also { stage = 50 } + 1 -> playerl(FacialExpression.ASKING,"So, Askeladd- sorry, Larravak; What is there to do around here now that we are both Fremenniks?").also { stage++ } + 2 -> playerl(FacialExpression.ASKING,"Can I have another pet rock? I lost mine...").also { stage = 50 } } - 45 -> npcl(core.game.dialogue.FacialExpression.CHILD_THINKING,"I guess you could do a bit of shopping. We got fresh fish at the docks, and some armour and weapons at Skulgrimen's place.").also { stage++ } - 46 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Okay, thanks.").also { stage = 1000 } + 45 -> npcl(FacialExpression.CHILD_THINKING,"I guess you could do a bit of shopping. We got fresh fish at the docks, and some armour and weapons at Skulgrimen's place.").also { stage++ } + 46 -> playerl(FacialExpression.HAPPY,"Okay, thanks.").also { stage = 1000 } - 50 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY,"Sure thing buddy! I'd say take better care of this one, but it's just a rock! I have hundreds of them! Go wild!").also { + 50 -> npcl(FacialExpression.CHILD_FRIENDLY,"Sure thing buddy! I'd say take better care of this one, but it's just a rock! I have hundreds of them! Go wild!").also { player.inventory.add(Item(Items.PET_ROCK_3695)) stage = 1000 } - 55 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY,"Hey there, buddy. You're an outerlander, huh? I'm not really supposed to talk to you.").also { stage++ } - 56 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Why not?").also { stage++ } - 57 -> npcl(core.game.dialogue.FacialExpression.CHILD_THINKING,"I dunno buddy. Some stupid tradition or other. We're always told not to talk to outerlanders unless the Chieftain has allowed it.").also { stage++ } - 58 -> playerl(core.game.dialogue.FacialExpression.ASKING,"The Chieftain? Who is that?").also { stage++ } - 59 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY,"His names Brundt, buddy. He's a real boring guy. You can find him in the long hall there.").also { stage++ } - 60 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Can you take me to see him?").also { stage++ } - 61 -> npcl(core.game.dialogue.FacialExpression.CHILD_FRIENDLY,"Sorry buddy, I'm not allowed into the long hall. Don't worry, he's easy to spot. He's the one in the fancy helmet. Oh, and he only has one eye.").also { stage++ } - 62 -> playerl(core.game.dialogue.FacialExpression.ASKING,"He's a cyclops?").also { stage++ } - 63 -> npcl(core.game.dialogue.FacialExpression.CHILD_NORMAL,"Nah, nah, nah... He just wears an eyepatch! Well, see ya around buddy!").also { stage = 1000 } + 55 -> npcl(FacialExpression.CHILD_FRIENDLY,"Hey there, buddy. You're an outerlander, huh? I'm not really supposed to talk to you.").also { stage++ } + 56 -> playerl(FacialExpression.ASKING,"Why not?").also { stage++ } + 57 -> npcl(FacialExpression.CHILD_THINKING,"I dunno buddy. Some stupid tradition or other. We're always told not to talk to outerlanders unless the Chieftain has allowed it.").also { stage++ } + 58 -> playerl(FacialExpression.ASKING,"The Chieftain? Who is that?").also { stage++ } + 59 -> npcl(FacialExpression.CHILD_FRIENDLY,"His names Brundt, buddy. He's a real boring guy. You can find him in the long hall there.").also { stage++ } + 60 -> playerl(FacialExpression.ASKING,"Can you take me to see him?").also { stage++ } + 61 -> npcl(FacialExpression.CHILD_FRIENDLY,"Sorry buddy, I'm not allowed into the long hall. Don't worry, he's easy to spot. He's the one in the fancy helmet. Oh, and he only has one eye.").also { stage++ } + 62 -> playerl(FacialExpression.ASKING,"He's a cyclops?").also { stage++ } + 63 -> npcl(FacialExpression.CHILD_NORMAL,"Nah, nah, nah... He just wears an eyepatch! Well, see ya around buddy!").also { stage = 1000 } 1000 -> end() diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/ChieftanBrundtDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/ChieftanBrundtDialogue.kt index 835153a26..cd70b295b 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/ChieftanBrundtDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/ChieftanBrundtDialogue.kt @@ -12,7 +12,7 @@ import kotlin.random.Random import org.rs09.consts.* @Initializable -class ChieftanBrundt(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ChieftanBrundt(player: Player? = null) : DialoguePlugin(player){ val gender = if (player?.isMale == true){"brother"} else "sister" val fName = player?.getAttribute("fremennikname","bringle") @@ -281,7 +281,7 @@ class ChieftanBrundt(player: Player? = null) : core.game.dialogue.DialoguePlugin } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ChieftanBrundt(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/FishermanDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/FishermanDialogue.kt index a95a90c81..30f9bb225 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/FishermanDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/FishermanDialogue.kt @@ -10,74 +10,74 @@ import core.plugin.Initializable import core.tools.END_DIALOGUE @Initializable -class FishermanDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class FishermanDialogue(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { if(player?.inventory?.contains(3704,1) == true){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Here. I got you your map.") + playerl(FacialExpression.HAPPY,"Here. I got you your map.") stage = 15 return true } else if(player?.inventory?.contains(3703,1) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't see what's so special about this so called exotic fish.") + playerl(FacialExpression.ASKING,"I don't see what's so special about this so called exotic fish.") stage = 16 return true } else if(player?.getAttribute("sigmundreturning",false) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"Is this trade item for you?") + playerl(FacialExpression.ASKING,"Is this trade item for you?") stage = 17 return true } if(player?.getAttribute("sigmund-steps", 0) == 8){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find a map of deep sea fishing spots do you?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a map of deep sea fishing spots do you?") stage = 10 return true } else if(player?.getAttribute("sigmund-steps", 0) == 7){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find an exotic and extremely odd fish, do you?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find an exotic and extremely odd fish, do you?") stage = 1 return true } else if (isQuestComplete(player, "Fremennik Trials")){ - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hello there.").also { stage = 100 } + player(FacialExpression.FRIENDLY, "Hello there.").also { stage = 100 } } else if (!isQuestComplete(player, "Fremennik Trials")) { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hello there.").also { stage = 200 } + player(FacialExpression.FRIENDLY, "Hello there.").also { stage = 200 } } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 1 -> npcl(core.game.dialogue.FacialExpression.AMAZED,"Ah, so even outerlanders have heard of my amazing catch the other day!").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.THINKING,"You have it? Can I trade you something for it?").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"As exotic looking as it is, it is bad eating. I will happily trade it if you can find me the secret map of the best fishing spots that the navigator has hidden away.").also { stage++ } - 4 -> playerl(core.game.dialogue.FacialExpression.AMAZED,"Is that all?").also { stage++ } - 5 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Indeed it is, outerlander. The only reason I sit out here in the cold all day long is so I don't have to pay his outrageous prices.").also { stage++ } - 6 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"By getting me his copy of that map, I will finally be self sufficient. I might even make a profit!").also { stage++ } - 7 -> playerl(core.game.dialogue.FacialExpression.THINKING,"I'll see what I can do.").also { + 1 -> npcl(FacialExpression.AMAZED,"Ah, so even outerlanders have heard of my amazing catch the other day!").also { stage++ } + 2 -> playerl(FacialExpression.THINKING,"You have it? Can I trade you something for it?").also { stage++ } + 3 -> npcl(FacialExpression.HAPPY,"As exotic looking as it is, it is bad eating. I will happily trade it if you can find me the secret map of the best fishing spots that the navigator has hidden away.").also { stage++ } + 4 -> playerl(FacialExpression.AMAZED,"Is that all?").also { stage++ } + 5 -> npcl(FacialExpression.HAPPY,"Indeed it is, outerlander. The only reason I sit out here in the cold all day long is so I don't have to pay his outrageous prices.").also { stage++ } + 6 -> npcl(FacialExpression.HAPPY,"By getting me his copy of that map, I will finally be self sufficient. I might even make a profit!").also { stage++ } + 7 -> playerl(FacialExpression.THINKING,"I'll see what I can do.").also { player?.incrementAttribute("sigmund-steps",1) stage = 1000 } - 10 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"You should pay attention when I speak! I already told you, that rip off navigator has it, and I want it!").also { stage = 1000 } + 10 -> npcl(FacialExpression.ANNOYED,"You should pay attention when I speak! I already told you, that rip off navigator has it, and I want it!").also { stage = 1000 } - 15 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Great work outerlander! With this, I can finally catch enough fish to make an honest living from it! Here, have the stupid fish.").also { + 15 -> npcl(FacialExpression.HAPPY,"Great work outerlander! With this, I can finally catch enough fish to make an honest living from it! Here, have the stupid fish.").also { removeItem(player,3704) addItem(player,3703) stage = 1000 } - 16 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Me neither, outerlander. That is why I gave it to you.").also { stage = 1000 } + 16 -> npcl(FacialExpression.ANNOYED,"Me neither, outerlander. That is why I gave it to you.").also { stage = 1000 } - 17 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"I don't think so.").also { stage = 1000 } + 17 -> npcl(FacialExpression.ANNOYED,"I don't think so.").also { stage = 1000 } - 100 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Welcome back, ${if (player.isMale) "brother " else "sister "}${player.getAttribute("fremennikname","fremmyname")}. It has been too long since last we spoke! The fish are really biting today!").also { stage = END_DIALOGUE } - 200 -> npcl(core.game.dialogue.FacialExpression.ANNOYED, "Don't talk to me outerlander. Anything you have to say to me, you can say to the Chieftain. Goodbye.").also { stage = END_DIALOGUE } + 100 -> npcl(FacialExpression.FRIENDLY, "Welcome back, ${if (player.isMale) "brother " else "sister "}${player.getAttribute("fremennikname","fremmyname")}. It has been too long since last we spoke! The fish are really biting today!").also { stage = END_DIALOGUE } + 200 -> npcl(FacialExpression.ANNOYED, "Don't talk to me outerlander. Anything you have to say to me, you can say to the Chieftain. Goodbye.").also { stage = END_DIALOGUE } 1000 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FishermanDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/FremennikSailorDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/FremennikSailorDialogue.kt index 9ec63a43b..84f926395 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/FremennikSailorDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/FremennikSailorDialogue.kt @@ -8,30 +8,30 @@ import core.game.node.entity.player.Player import core.plugin.Initializable @Initializable -class SailorDialogue (player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class SailorDialogue (player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { if(player?.inventory?.contains(3699,1) == true){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"You'll be glad to know I have had a love song written just for you by Olaf. So can I have that flower of yours now?") + playerl(FacialExpression.HAPPY,"You'll be glad to know I have had a love song written just for you by Olaf. So can I have that flower of yours now?") stage = 15 } else if(player?.inventory?.contains(3698,1) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"So tell me... who is this woman that you are trying to impress anyway?") + playerl(FacialExpression.ASKING,"So tell me... who is this woman that you are trying to impress anyway?") stage = 20 return true } else if(player?.getAttribute("sigmundreturning",false) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I've got an item to trade.") + playerl(FacialExpression.ASKING,"I've got an item to trade.") stage = 25 return true } else if(player?.getAttribute("sigmund-steps",0) == 2){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find a love ballad, do you?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a love ballad, do you?") stage = 10 return true } else if(player?.getAttribute("sigmund-started",false)!!){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find a unique flower from across the sea, do you?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a unique flower from across the sea, do you?") stage = 1 return true } @@ -40,36 +40,36 @@ class SailorDialogue (player: Player? = null) : core.game.dialogue.DialoguePlugi override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 1 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Ah! Even the outerlanders have heard of my mysterious flower! I found it in a country far far away from here!").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Can I buy it from you?").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"I'm afraid not, outerlander. There is a woman in this village whose heart I seek to capture, and I think giving her this strange flower might be my best bet with her.").also { stage++ } - 4 -> playerl(core.game.dialogue.FacialExpression.THINKING,"Maybe you could let me have the flower and do something else to impress her?").also { stage++ } - 5 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Hmm... that is not a totally stupid idea outerlander. I know she is a lover of music, and a romantic ballad might be just the thing with which to woo her.").also { stage++ } - 6 -> npcl(core.game.dialogue.FacialExpression.THINKING,"Unfortunately I don't have a musical bone in my entire body, so someone else will have to write it for me.").also { stage++ } - 7 -> playerl(core.game.dialogue.FacialExpression.ASKING,"So if I can find someone to write you a romantic ballad, you will give me your flower?").also { stage++ } - 8 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"That sounds like a fair deal to me, outerlander.").also { + 1 -> npcl(FacialExpression.HAPPY,"Ah! Even the outerlanders have heard of my mysterious flower! I found it in a country far far away from here!").also { stage++ } + 2 -> playerl(FacialExpression.ASKING,"Can I buy it from you?").also { stage++ } + 3 -> npcl(FacialExpression.NEUTRAL,"I'm afraid not, outerlander. There is a woman in this village whose heart I seek to capture, and I think giving her this strange flower might be my best bet with her.").also { stage++ } + 4 -> playerl(FacialExpression.THINKING,"Maybe you could let me have the flower and do something else to impress her?").also { stage++ } + 5 -> npcl(FacialExpression.HAPPY,"Hmm... that is not a totally stupid idea outerlander. I know she is a lover of music, and a romantic ballad might be just the thing with which to woo her.").also { stage++ } + 6 -> npcl(FacialExpression.THINKING,"Unfortunately I don't have a musical bone in my entire body, so someone else will have to write it for me.").also { stage++ } + 7 -> playerl(FacialExpression.ASKING,"So if I can find someone to write you a romantic ballad, you will give me your flower?").also { stage++ } + 8 -> npcl(FacialExpression.HAPPY,"That sounds like a fair deal to me, outerlander.").also { player.incrementAttribute("sigmund-steps",1) stage = 1000 } - 10 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"Well, the only musician I know of in these parts would be that terrible bard Olaf... Ask him.").also { stage = 1000 } + 10 -> npcl(FacialExpression.NEUTRAL,"Well, the only musician I know of in these parts would be that terrible bard Olaf... Ask him.").also { stage = 1000 } - 15 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Oh. It's by Olaf? Hmm. Well, a deal's a deal. I just hope it's better than the usual rubbish he comes up with, or my chances are worse than ever.").also { + 15 -> npcl(FacialExpression.HAPPY,"Oh. It's by Olaf? Hmm. Well, a deal's a deal. I just hope it's better than the usual rubbish he comes up with, or my chances are worse than ever.").also { removeItem(player,3699) addItem(player,3698) stage = 1000 } - 20 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"It's Thora, the longhall barkeep. Please don't tell her though. She's not like the rest of the Fremennik girls, she has a secret desire to see the world.").also { stage++ } - 21 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Being a sailor, I can really relate to that.").also { stage = 1000 } + 20 -> npcl(FacialExpression.HAPPY,"It's Thora, the longhall barkeep. Please don't tell her though. She's not like the rest of the Fremennik girls, she has a secret desire to see the world.").also { stage++ } + 21 -> npcl(FacialExpression.HAPPY,"Being a sailor, I can really relate to that.").also { stage = 1000 } - 25 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Remember, it's not for me unless it's a love ballad.") + 25 -> npcl(FacialExpression.HAPPY,"Remember, it's not for me unless it's a love ballad.") 1000 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return SailorDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/FremennikTrials.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/FremennikTrials.kt index 94e12b15a..d50e8f42f 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/FremennikTrials.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/FremennikTrials.kt @@ -45,8 +45,8 @@ class FremennikTrials : Quest("Fremennik Trials",64,63,3,347,0,1,10){ line(player,"Thorvald the Warrior",line++,player.getAttribute("fremtrials:thorvald-vote",false)) line(player,"Sigmund the Merchant",line++,player.getAttribute("fremtrials:sigmund-vote",false)) line(player,"Peer the Seer",line++,player.getAttribute("fremtrials:peer-vote",false)) - val voteCount = player.getAttribute("fremtrials:votes",0); - var voteText = "${voteCount} votes"; + val voteCount = player.getAttribute("fremtrials:votes",0) + var voteText = "${voteCount} votes" if (voteCount === 1) { voteText = "1 vote" } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/KoscheiNPC.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/KoscheiNPC.kt index 7c4bf2540..1a936e792 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/KoscheiNPC.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/KoscheiNPC.kt @@ -196,7 +196,7 @@ class KoscheiNPC constructor(id: Int = 0, location: Location? = null, session: K when(counter++) { 0 -> player?.lock().also { player?.animate(Animation(1332)).also { player?.sendMessage("Oh dear you are...") }} 1 -> player?.setAttribute("/save:fremtrials:thorvald-vote",true).also { - player?.setAttribute("/save:fremtrials:votesplayer", player.getAttribute("fremtrials:votesplayer", 0) + 1); + player?.setAttribute("/save:fremtrials:votesplayer", player.getAttribute("fremtrials:votesplayer", 0) + 1) player?.removeAttribute("fremtrials:warrior-accepted") } 3 -> player?.teleport(Location.create(2666,3694,1)).also { koschei.session?.close() } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/LalliDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/LalliDialogue.kt index 80226454b..e4f2c9f65 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/LalliDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/LalliDialogue.kt @@ -11,32 +11,32 @@ import core.game.node.item.Item import org.rs09.consts.Items @Initializable -class LalliDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class LalliDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { player?.let { println(it.getAttribute("lalliEatStew", false)) if (it.questRepository.isComplete("Fremennik Trials")){ - playerl(core.game.dialogue.FacialExpression.NEUTRAL,"Hello there.") + playerl(FacialExpression.NEUTRAL,"Hello there.") stage = 100 return true } if (it.getAttribute("lalliStewCabbageAdded", false)!! && it.getAttribute("lalliStewOnionAdded", false)!! && it.getAttribute("lalliStewPotatoAdded", false)!! && it.getAttribute("lalliStewRockAdded", false)!!){ - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL,"It am ready now?") + npcl(FacialExpression.OLD_NORMAL,"It am ready now?") stage = 60 return true } if(it.getAttribute("lalliStewCabbageAdded", false)!! || it.getAttribute("lalliStewOnionAdded", false)!! || it.getAttribute("lalliStewPotatoAdded", false)!! || it.getAttribute("lalliStewRockAdded", false)!!){ - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL,"It am ready now?") + npcl(FacialExpression.OLD_NORMAL,"It am ready now?") stage = 58 return true } if (it.getAttribute("lalliEatStew", false)!!){ - playerl(core.game.dialogue.FacialExpression.NEUTRAL,"Hello there.") + playerl(FacialExpression.NEUTRAL,"Hello there.") stage = 65 return true } if (it.getAttribute("hasWool", false)!!){ - playerl(core.game.dialogue.FacialExpression.NEUTRAL,"Hello there.") + playerl(FacialExpression.NEUTRAL,"Hello there.") stage = 75 return true } @@ -46,7 +46,7 @@ class LalliDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( return true } if(player.questRepository.isComplete("Fremennik Trials")){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello there.") + playerl(FacialExpression.HAPPY,"Hello there.") stage = 100 return true } @@ -59,18 +59,18 @@ class LalliDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return LalliDialogue(player) } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.OLD_SNEAKY,"Bah! Puny humans always try steal Lalli's golden","apples! You go away now!").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.ANNOYED,"Actually, I'm not after your golden apples. I was","wondering if I could have some golden wool, I need it","to string a lyre.").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.OLD_SNEAKY,"Ha! You not fool me human! Me am smart! Other","trolls so jealous of how brainy I are, they kick me out","of camp and make me live down here in cave! But me","have last funny!").also { stage++ } - 3 -> npc(core.game.dialogue.FacialExpression.OLD_SNEAKY,"Me find golden apples on tree and me build wall to stop","anyone who not Lalli eating lovely golden apples! Did","me not tell you I are smart?").also { stage++ } + 0 -> npc(FacialExpression.OLD_SNEAKY,"Bah! Puny humans always try steal Lalli's golden","apples! You go away now!").also { stage++ } + 1 -> player(FacialExpression.ANNOYED,"Actually, I'm not after your golden apples. I was","wondering if I could have some golden wool, I need it","to string a lyre.").also { stage++ } + 2 -> npc(FacialExpression.OLD_SNEAKY,"Ha! You not fool me human! Me am smart! Other","trolls so jealous of how brainy I are, they kick me out","of camp and make me live down here in cave! But me","have last funny!").also { stage++ } + 3 -> npc(FacialExpression.OLD_SNEAKY,"Me find golden apples on tree and me build wall to stop","anyone who not Lalli eating lovely golden apples! Did","me not tell you I are smart?").also { stage++ } 4 -> player("Yes, yes, you are incredibly clever. Now please can I","have some golden wool?").also { stage++ } - 5 -> npc(core.game.dialogue.FacialExpression.OLD_SNEAKY,"Hmm, me think you not really think I are clever. Me","think you is trying to trick Lalli. Me not like you as much","as other human. He give me present. I give him wool.").also { stage++ } + 5 -> npc(FacialExpression.OLD_SNEAKY,"Hmm, me think you not really think I are clever. Me","think you is trying to trick Lalli. Me not like you as much","as other human. He give me present. I give him wool.").also { stage++ } 6 -> options("Other human?","No, honest, you're REALLY clever.","Can I give you a present?").also { stage++ } 7 -> when(buttonId){ 1 -> player("Other human? You mean someone else has been here","and you gave them wool?").also { stage = 10 } @@ -79,29 +79,29 @@ class LalliDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( } //Other human? - 10 -> npc(core.game.dialogue.FacialExpression.OLD_SNEAKY,"Human call itself Askeladden! It not trick Lalli. Lalli do","good deal with human! Stupid human get some dumb","wool, but did not get golden apples!").also { stage++ } + 10 -> npc(FacialExpression.OLD_SNEAKY,"Human call itself Askeladden! It not trick Lalli. Lalli do","good deal with human! Stupid human get some dumb","wool, but did not get golden apples!").also { stage++ } 11 -> player("I see... okay, well, bye!").also { player.setAttribute("/save:fremtrials:lalli-talkedto",true); stage = 1000 } //Honest, you're clever - 20 -> npc(core.game.dialogue.FacialExpression.OLD_SNEAKY,"Me no believe you tell truth. Go away.").also { stage = 1000 } + 20 -> npc(FacialExpression.OLD_SNEAKY,"Me no believe you tell truth. Go away.").also { stage = 1000 } //Can I give you a present - 30 -> npc(core.game.dialogue.FacialExpression.OLD_SNEAKY,"Me think about that.").also { stage = 1000 } + 30 -> npc(FacialExpression.OLD_SNEAKY,"Me think about that.").also { stage = 1000 } - 50 -> npc(core.game.dialogue.FacialExpression.OLD_SNEAKY,"Bah! Puny humans always try steal Lalli's golden","apples! You go away now!").also { stage++ } + 50 -> npc(FacialExpression.OLD_SNEAKY,"Bah! Puny humans always try steal Lalli's golden","apples! You go away now!").also { stage++ } 51 -> player("Wait! I have something that might interest you... a pet", "rock!").also { stage++ } - 52 -> npc(core.game.dialogue.FacialExpression.OLD_LAUGH2, "Hah! You think me stupid or something human? Me", "already got one! Me don't want lots of baby rocks either,", "so me don't want another one around the place!").also { stage++ } - 53 -> player(core.game.dialogue.FacialExpression.HALF_CRYING,"Please... all I want is some of your golden wool...").also { stage++ } - 54 -> npc(core.game.dialogue.FacialExpression.OLD_SNEAKY, "Stupid human think he can trick me into giving away", "some golden apples! Hah! Golden apples is all me got to", "eat. you not get them. no way!").also { stage++ } - 55 -> player(core.game.dialogue.FacialExpression.HALF_THINKING, "Hmm... So you're hungry? I think I will have the", "perfect thing for you to eat... I just need to get myself", "an onion, a potato, and a cabbage...").also { stage++ } + 52 -> npc(FacialExpression.OLD_LAUGH2, "Hah! You think me stupid or something human? Me", "already got one! Me don't want lots of baby rocks either,", "so me don't want another one around the place!").also { stage++ } + 53 -> player(FacialExpression.HALF_CRYING,"Please... all I want is some of your golden wool...").also { stage++ } + 54 -> npc(FacialExpression.OLD_SNEAKY, "Stupid human think he can trick me into giving away", "some golden apples! Hah! Golden apples is all me got to", "eat. you not get them. no way!").also { stage++ } + 55 -> player(FacialExpression.HALF_THINKING, "Hmm... So you're hungry? I think I will have the", "perfect thing for you to eat... I just need to get myself", "an onion, a potato, and a cabbage...").also { stage++ } 56 -> interpreter.sendDialogue("You have a cunning plan to trick this troll. You need your pet rock,", "a cabbage, a potato and an onion.").also { player.removeAttribute("fremtrials:fremtrials:lalli-talkedto");stage = 1000 } - 58 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL,"Not just yet...").also { stage = 1000 } + 58 -> playerl(FacialExpression.NEUTRAL,"Not just yet...").also { stage = 1000 } - 60 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Indeed it is. Try it and see.").also { stage++ } - 61 -> npcl(core.game.dialogue.FacialExpression.OLD_HAPPY,"Hmm... YUM! That are delicious! Me never know human know to make soup out of stone? It some special stone?").also { stage++ } - 62 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL,"Indeed it is. But I'm willing to trade it.").also { stage++ } - 63 -> npcl(core.game.dialogue.FacialExpression.OLD_SNEAKY,"Let me think about that, me like to think.").also { + 60 -> playerl(FacialExpression.HAPPY,"Indeed it is. Try it and see.").also { stage++ } + 61 -> npcl(FacialExpression.OLD_HAPPY,"Hmm... YUM! That are delicious! Me never know human know to make soup out of stone? It some special stone?").also { stage++ } + 62 -> playerl(FacialExpression.NEUTRAL,"Indeed it is. But I'm willing to trade it.").also { stage++ } + 63 -> npcl(FacialExpression.OLD_SNEAKY,"Let me think about that, me like to think.").also { player.setAttribute("/save:lalliEatStew",true) player.removeAttribute("lalliStewOnionAdded") player.removeAttribute("lalliStewPotatoAdded") @@ -110,31 +110,31 @@ class LalliDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( stage = 1000 } - 65 -> npcl(core.game.dialogue.FacialExpression.OLD_HAPPY,"Your soup very tasty, human! But me still not want trade golden apples for your stone. Me think pet rock get jealous.").also { stage++ } - 66 -> playerl(core.game.dialogue.FacialExpression.ANGRY,"I. DON'T. WANT. ANY. GOLDEN. APPLES. ALL. I. WANT. IS. A. GOLDEN. FLEECE.").also { stage++ } - 67 -> npcl(core.game.dialogue.FacialExpression.OLD_ALMOST_CRYING,"Gee, sorry human, all you have do is ask, me not need you to shout. You act like you think Lalli am stupid or something...").also { + 65 -> npcl(FacialExpression.OLD_HAPPY,"Your soup very tasty, human! But me still not want trade golden apples for your stone. Me think pet rock get jealous.").also { stage++ } + 66 -> playerl(FacialExpression.ANGRY,"I. DON'T. WANT. ANY. GOLDEN. APPLES. ALL. I. WANT. IS. A. GOLDEN. FLEECE.").also { stage++ } + 67 -> npcl(FacialExpression.OLD_ALMOST_CRYING,"Gee, sorry human, all you have do is ask, me not need you to shout. You act like you think Lalli am stupid or something...").also { if(player.inventory.isFull){ stage = 68 }else{ stage = 70 } } - 68 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL,"Me would give you golden fleece if me think you have enough room in your inventory.").also { stage = 1000 } - 70 -> npcl(core.game.dialogue.FacialExpression.OLD_HAPPY,"Here you go. Hah! Me trick you Human! All you got is worthless golden fleece! Me got very rare soup-making stone!").also { stage = 71 } - 71 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Glad you're happy Lalli!").also { + 68 -> npcl(FacialExpression.OLD_NORMAL,"Me would give you golden fleece if me think you have enough room in your inventory.").also { stage = 1000 } + 70 -> npcl(FacialExpression.OLD_HAPPY,"Here you go. Hah! Me trick you Human! All you got is worthless golden fleece! Me got very rare soup-making stone!").also { stage = 71 } + 71 -> playerl(FacialExpression.HAPPY,"Glad you're happy Lalli!").also { player.inventory.add(Item(Items.GOLDEN_FLEECE_3693)) player.setAttribute("/save:hasWool",true) player.removeAttribute("lalliEatStew") stage = 1000 } - 75 -> npcl(core.game.dialogue.FacialExpression.OLD_HAPPY,"Hah! How you like worthless golden fleece! Me very like rare soup-making stone!").also { stage++ } - 76 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Oh it's great, thank you again for the fleece Lalli, I hope you're enjoying your soup").also { stage = 1000 } + 75 -> npcl(FacialExpression.OLD_HAPPY,"Hah! How you like worthless golden fleece! Me very like rare soup-making stone!").also { stage++ } + 76 -> playerl(FacialExpression.HAPPY,"Oh it's great, thank you again for the fleece Lalli, I hope you're enjoying your soup").also { stage = 1000 } - 100 -> npcl(core.game.dialogue.FacialExpression.OLD_HAPPY,"Ha! Stupid human! You no get any golden apples! Even though me much like stone soup!").also { stage++ } - 101 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Can I please have some more golden wool?").also { stage++ } - 102 -> npcl(core.game.dialogue.FacialExpression.OLD_HAPPY,"Me will sell you some golden wool, but me no sell you any golden apples!").also { stage++ } - 103 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"How much for the golden wool?").also { stage++ } - 104 -> npcl(core.game.dialogue.FacialExpression.OLD_HAPPY,"Me want 1000 coins! You pay or go!").also { + 100 -> npcl(FacialExpression.OLD_HAPPY,"Ha! Stupid human! You no get any golden apples! Even though me much like stone soup!").also { stage++ } + 101 -> playerl(FacialExpression.ASKING,"Can I please have some more golden wool?").also { stage++ } + 102 -> npcl(FacialExpression.OLD_HAPPY,"Me will sell you some golden wool, but me no sell you any golden apples!").also { stage++ } + 103 -> playerl(FacialExpression.HAPPY,"How much for the golden wool?").also { stage++ } + 104 -> npcl(FacialExpression.OLD_HAPPY,"Me want 1000 coins! You pay or go!").also { stage = if(inInventory(player,Items.COINS_995,1000)){ 105 } @@ -142,17 +142,17 @@ class LalliDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( } 105 -> options("Pay","Don't pay").also { stage++ } 106 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Is that all? Here you go!").also { + 1 -> playerl(FacialExpression.HAPPY,"Is that all? Here you go!").also { removeItem(player,Item(Items.COINS_995,1000)) addItem(player,Items.GOLDEN_FLEECE_3693) stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.OLD_HAPPY,"You no pay, then you go! You no get any golden apples!").also { stage = 1000 } + 2 -> npcl(FacialExpression.OLD_HAPPY,"You no pay, then you go! You no get any golden apples!").also { stage = 1000 } } - 107 -> npcl(core.game.dialogue.FacialExpression.OLD_HAPPY,"Ha! Stupid human think he buy golden apples, but he actually get stupid wool! Hahaha!").also { stage = 1000 } + 107 -> npcl(FacialExpression.OLD_HAPPY,"Ha! Stupid human think he buy golden apples, but he actually get stupid wool! Hahaha!").also { stage = 1000 } - 115 -> playerl(core.game.dialogue.FacialExpression.THINKING,"I don't even have that much cash on me...").also { stage++ } - 116 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL,"Well stupid bad trade human don't get no wool then! Or any golden apples!").also { stage = 1000 } + 115 -> playerl(FacialExpression.THINKING,"I don't even have that much cash on me...").also { stage++ } + 116 -> npcl(FacialExpression.OLD_NORMAL,"Well stupid bad trade human don't get no wool then! Or any golden apples!").also { stage = 1000 } 1000 -> end() } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/ManniDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/ManniDialogue.kt index 7f734bc1f..689fc14d1 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/ManniDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/ManniDialogue.kt @@ -51,7 +51,7 @@ class ManniDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( return true } else { npc("Come back when you're ready to begin", "the contest.") - stage = 1000; + stage = 1000 return true } } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/OlafTheBard.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/OlafTheBard.kt index 8a73499eb..8af316688 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/OlafTheBard.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/OlafTheBard.kt @@ -7,34 +7,34 @@ import core.game.node.entity.player.Player import core.plugin.Initializable @Initializable -class OlafTheBard(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class OlafTheBard(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { if(player.inventory.contains(3700,1)){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello Olaf. Do you have a beautiful love song written for me?") + playerl(FacialExpression.HAPPY,"Hello Olaf. Do you have a beautiful love song written for me?") stage = 65 } else if(player.inventory.contains(3699,1)){ - playerl(core.game.dialogue.FacialExpression.ASKING,"So you think this song is pretty good then?") + playerl(FacialExpression.ASKING,"So you think this song is pretty good then?") stage = 70 return true } else if(player?.getAttribute("sigmundreturning",false) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I've got a trade item; is it for you?") + playerl(FacialExpression.ASKING,"I've got a trade item; is it for you?") stage = 75 return true } else if(player?.getAttribute("sigmund-steps",0) == 3){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find some custom sturdy boots, do you?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find some custom sturdy boots, do you?") stage = 60 return true } else if(player?.getAttribute("sigmund-steps",0)!! == 2){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find a love ballad, do you?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a love ballad, do you?") stage = 50 return true } else if(player?.getAttribute("lyreConcertPlayed",false)!!){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"So can I rely on your vote with the council of elders in my favour?") + playerl(FacialExpression.HAPPY,"So can I rely on your vote with the council of elders in my favour?") stage = 40 return true } @@ -44,7 +44,7 @@ class OlafTheBard(player: Player? = null) : core.game.dialogue.DialoguePlugin(pl return true } else if(player.questRepository.isComplete("Fremennik Trials")){ - npcl(core.game.dialogue.FacialExpression.HAPPY,"Hello again to you, ${player.getAttribute("fremennikname","schlonko")}. Us bards should stick together, what can I do for you?") + npcl(FacialExpression.HAPPY,"Hello again to you, ${player.getAttribute("fremennikname","schlonko")}. Us bards should stick together, what can I do for you?") stage = 98 return true } @@ -54,7 +54,7 @@ class OlafTheBard(player: Player? = null) : core.game.dialogue.DialoguePlugin(pl return true } else{ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello there. So you're a bard?") + playerl(FacialExpression.HAPPY,"Hello there. So you're a bard?") stage = 150 return true } @@ -99,9 +99,9 @@ class OlafTheBard(player: Player? = null) : core.game.dialogue.DialoguePlugin(pl 28 -> npc("Is that clear enough, outerlander? Would you like me","to repeat anything?").also { stage++ } 29 -> player("No thanks. I think I've got it.").also { stage = 1000 } - 40 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"You have a truly poetic soul! Anyone who can compose such a beautiful epic, and then perform it so flawlessly can only bring good to our clan!").also { stage++ } - 41 -> playerl(core.game.dialogue.FacialExpression.THINKING,"Erm... so that's a yes, then?").also { stage++ } - 42 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Absolutely! We must collaborate together on a duet sometime, don't you think?").also { + 40 -> npcl(FacialExpression.HAPPY,"You have a truly poetic soul! Anyone who can compose such a beautiful epic, and then perform it so flawlessly can only bring good to our clan!").also { stage++ } + 41 -> playerl(FacialExpression.THINKING,"Erm... so that's a yes, then?").also { stage++ } + 42 -> npcl(FacialExpression.HAPPY,"Absolutely! We must collaborate together on a duet sometime, don't you think?").also { setAttribute(player, "/save:fremtrials:olaf-vote",true) setAttribute(player, "/save:fremtrials:votes",getAttribute(player, "fremtrials:votes",0) + 1) stage = 1000 @@ -109,53 +109,53 @@ class OlafTheBard(player: Player? = null) : core.game.dialogue.DialoguePlugin(pl //Sigmund bullshit - 50 -> npcl(core.game.dialogue.FacialExpression.HAPPY," Well, as official Fremennik bard, it falls within my remit to compose all music for the tribe. I am fully versed in all the various types of romantic music.").also { stage++ } - 51 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Great! Can you write me one then?").also { stage++ } - 52 -> npcl(core.game.dialogue.FacialExpression.THINKING,"Well... Normally I would be thrilled at the chance to show my skill as a poet in composing a seductively romantic ballad...").also { stage++ } - 53 -> playerl(core.game.dialogue.FacialExpression.ANNOYED,"Let me guess; Here comes the 'but'.").also { stage++ } - 54 -> npcl(core.game.dialogue.FacialExpression.SAD,"...but unfortunately I cannot concentrate fully upon my work recently.").also { stage++ } - 55 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Why is that then?").also { stage++ } - 56 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"It is these old worn out shoes of mine... As a bard I am expected to wander the lands, singing of the glorious battles of our warriors.").also { stage++ } - 57 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"If you can find me a pair of sturdy boots to replace these old worn out ones of mine, I will be happy to spend the time on composing you a romantic ballad.").also { + 50 -> npcl(FacialExpression.HAPPY," Well, as official Fremennik bard, it falls within my remit to compose all music for the tribe. I am fully versed in all the various types of romantic music.").also { stage++ } + 51 -> playerl(FacialExpression.HAPPY,"Great! Can you write me one then?").also { stage++ } + 52 -> npcl(FacialExpression.THINKING,"Well... Normally I would be thrilled at the chance to show my skill as a poet in composing a seductively romantic ballad...").also { stage++ } + 53 -> playerl(FacialExpression.ANNOYED,"Let me guess; Here comes the 'but'.").also { stage++ } + 54 -> npcl(FacialExpression.SAD,"...but unfortunately I cannot concentrate fully upon my work recently.").also { stage++ } + 55 -> playerl(FacialExpression.ASKING,"Why is that then?").also { stage++ } + 56 -> npcl(FacialExpression.NEUTRAL,"It is these old worn out shoes of mine... As a bard I am expected to wander the lands, singing of the glorious battles of our warriors.").also { stage++ } + 57 -> npcl(FacialExpression.NEUTRAL,"If you can find me a pair of sturdy boots to replace these old worn out ones of mine, I will be happy to spend the time on composing you a romantic ballad.").also { player?.incrementAttribute("sigmund-steps",1) stage = 1000 } - 60 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"I'm sorry outerlander... If I did, I would not trouble you to go and find them for me, would I?").also { stage = 1000 } + 60 -> npcl(FacialExpression.ANNOYED,"I'm sorry outerlander... If I did, I would not trouble you to go and find them for me, would I?").also { stage = 1000 } - 65 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"That depends outerlander... Do you have some new boots for me? My feet get so tired roaming the land...").also { stage++ } - 66 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"As a matter of fact - I do!").also { + 65 -> npcl(FacialExpression.HAPPY,"That depends outerlander... Do you have some new boots for me? My feet get so tired roaming the land...").also { stage++ } + 66 -> playerl(FacialExpression.HAPPY,"As a matter of fact - I do!").also { removeItem(player,3700) addItem(player,3699) stage++ } - 67 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Oh! Superb! Those are great! They're just what I was looking for! Here, take this song with my compliments! It is one of my finest works yet!").also { stage = 1000 } + 67 -> npcl(FacialExpression.HAPPY,"Oh! Superb! Those are great! They're just what I was looking for! Here, take this song with my compliments! It is one of my finest works yet!").also { stage = 1000 } - 70 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Ahhh.... outerlander... it is the most beautiful romantic ballad I have ever been inspired to write...").also { stage++ } - 71 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Only a woman with a heart of icy stone could fail be to be moved by its beauty!").also { stage++ } - 72 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Thanks! That sounds perfect!").also { stage = 1000 } + 70 -> npcl(FacialExpression.HAPPY,"Ahhh.... outerlander... it is the most beautiful romantic ballad I have ever been inspired to write...").also { stage++ } + 71 -> npcl(FacialExpression.HAPPY,"Only a woman with a heart of icy stone could fail be to be moved by its beauty!").also { stage++ } + 72 -> playerl(FacialExpression.HAPPY,"Thanks! That sounds perfect!").also { stage = 1000 } - 75 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Only if it's a new pair of boots.").also { stage = 1000 } + 75 -> npcl(FacialExpression.HAPPY,"Only if it's a new pair of boots.").also { stage = 1000 } 98 -> options("I was wondering...","I forget now...").also { stage++ } 99 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.ASKING,"I was wondering... Can I learn to play my lyre again?").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.THINKING,"I forget now...").also { stage = 1000 } + 1 -> playerl(FacialExpression.ASKING,"I was wondering... Can I learn to play my lyre again?").also { stage++ } + 2 -> playerl(FacialExpression.THINKING,"I forget now...").also { stage = 1000 } } - 100 -> npcl(core.game.dialogue.FacialExpression.HAPPY, "Well that is an interesting question. Let me let you into a little secret. If you make another offering to the Fossegrimen you will learn a secret melody.").also { stage++ } - 101 -> playerl(core.game.dialogue.FacialExpression.ASKING,"What kind of melody?").also { stage++ } - 102 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"It is the song of Rellekka. When you play it, it will bring you back to this town where you are in this world.").also { stage++ } - 103 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"We often go adventuring with bards for precisely this reason. No matter where we have ended up we can return safe and sound to home.").also { stage++ } - 104 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Thanks, Olaf!").also { stage = 1000 } + 100 -> npcl(FacialExpression.HAPPY, "Well that is an interesting question. Let me let you into a little secret. If you make another offering to the Fossegrimen you will learn a secret melody.").also { stage++ } + 101 -> playerl(FacialExpression.ASKING,"What kind of melody?").also { stage++ } + 102 -> npcl(FacialExpression.HAPPY,"It is the song of Rellekka. When you play it, it will bring you back to this town where you are in this world.").also { stage++ } + 103 -> npcl(FacialExpression.HAPPY,"We often go adventuring with bards for precisely this reason. No matter where we have ended up we can return safe and sound to home.").also { stage++ } + 104 -> playerl(FacialExpression.HAPPY,"Thanks, Olaf!").also { stage = 1000 } - 150 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I am afraid I cannot speak to outerlanders. Besides, I am busy composing an epic.").also { stage = 1000 } + 150 -> npcl(FacialExpression.HAPPY,"I am afraid I cannot speak to outerlanders. Besides, I am busy composing an epic.").also { stage = 1000 } 1000 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return OlafTheBard(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/PoisonSalesman.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/PoisonSalesman.kt index 9f5129bdc..e3d874010 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/PoisonSalesman.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/PoisonSalesman.kt @@ -8,7 +8,7 @@ import core.tools.END_DIALOGUE import core.tools.START_DIALOGUE @Initializable -class PoisonSalesman(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class PoisonSalesman(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { options("Talk about the Murder Mystery Quest","Talk about the Fremennik Trials") @@ -92,7 +92,7 @@ class PoisonSalesman(player: Player? = null) : core.game.dialogue.DialoguePlugin return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return PoisonSalesman(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SigliTheHuntsman.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SigliTheHuntsman.kt index b5232819b..d987e061e 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SigliTheHuntsman.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SigliTheHuntsman.kt @@ -10,30 +10,30 @@ import core.game.dialogue.DialoguePlugin import core.game.dialogue.FacialExpression @Initializable -class SigliTheHuntsman(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class SigliTheHuntsman(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { if(player?.inventory?.contains(3702,1) == true){ - npcl(core.game.dialogue.FacialExpression.HAPPY,"Greetings outerlander.") + npcl(FacialExpression.HAPPY,"Greetings outerlander.") stage = 165 return true } else if(player?.inventory?.contains(3701,1) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"So you really don't mind giving this away to me?") + playerl(FacialExpression.ASKING,"So you really don't mind giving this away to me?") stage = 170 return true } else if(player?.getAttribute("sigmundreturning",false) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I have an item to trade.") + playerl(FacialExpression.ASKING,"I have an item to trade.") stage = 175 return true } if(player?.getAttribute("sigmund-steps", 0) == 6){ - npcl(core.game.dialogue.FacialExpression.HAPPY,"Greetings outerlander.") + npcl(FacialExpression.HAPPY,"Greetings outerlander.") stage = 160 return true } else if(player?.getAttribute("sigmund-steps", 0) == 5){ - npcl(core.game.dialogue.FacialExpression.HAPPY,"Greetings outerlander.") + npcl(FacialExpression.HAPPY,"Greetings outerlander.") stage = 150 return true } @@ -48,7 +48,7 @@ class SigliTheHuntsman(player: Player? = null) : core.game.dialogue.DialoguePlug return true } else if(player.questRepository.isComplete("Fremennik Trials")){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello again Sigli.") + playerl(FacialExpression.HAPPY,"Hello again Sigli.") stage = 180 return true } @@ -58,7 +58,7 @@ class SigliTheHuntsman(player: Player? = null) : core.game.dialogue.DialoguePlug return true } else{ - npcl(core.game.dialogue.FacialExpression.HAPPY,"I do not speak to outerlanders. If you have anything of import to say, go and speak to the Chieftain.") + npcl(FacialExpression.HAPPY,"I do not speak to outerlanders. If you have anything of import to say, go and speak to the Chieftain.") stage = 1000 return true } @@ -103,50 +103,50 @@ class SigliTheHuntsman(player: Player? = null) : core.game.dialogue.DialoguePlug //Draugen killed 100 -> player("Thanks!").also { - player.removeAttribute("fremtrials:draugen-killed"); - player.setAttribute("/save:fremtrials:sigli-vote",true) + player.removeAttribute("fremtrials:draugen-killed") + player.setAttribute("/save:fremtrials:sigli-vote",true) player?.setAttribute("/save:fremtrials:votes",player.getAttribute("fremtrials:votes",0) + 1) player?.inventory?.remove(Item(3697)) stage = 1000 } - 150 -> playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find a map to unspoiled hunting grounds, do you?").also { stage++ } - 151 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Well, of course I do. I wouldn't be much of a huntsman if I didn't know where to find my prey now, would I outerlander?").also { stage++ } - 152 -> playerl(core.game.dialogue.FacialExpression.ASKING,"No, I guess not. So can I have it?").also { stage++ } - 153 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Directions to my hunting grounds could mean the end of my livelihood. The only way I would be prepared to give them up would be...").also { stage++ } - 154 -> playerl(core.game.dialogue.FacialExpression.THINKING,"What? Power? Money? Women? Wine?").also { stage++ } - 155 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"...a new string for my hunting bow. Not just any bowstring; I need a custom bowstring, balanced for my bow precisely to keep my hunt competitive.").also { stage++ } - 156 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Only in this way would I allow the knowledge of my hunting grounds to be passed on to strangers.").also { stage++ } - 157 -> playerl(core.game.dialogue.FacialExpression.THINKING,"So where would I get that?").also { stage++ } - 158 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I have no idea. But then again, I'm happy with my old bowstring and being the only person who knows where my hunting ground is.").also { + 150 -> playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a map to unspoiled hunting grounds, do you?").also { stage++ } + 151 -> npcl(FacialExpression.HAPPY,"Well, of course I do. I wouldn't be much of a huntsman if I didn't know where to find my prey now, would I outerlander?").also { stage++ } + 152 -> playerl(FacialExpression.ASKING,"No, I guess not. So can I have it?").also { stage++ } + 153 -> npcl(FacialExpression.ANNOYED,"Directions to my hunting grounds could mean the end of my livelihood. The only way I would be prepared to give them up would be...").also { stage++ } + 154 -> playerl(FacialExpression.THINKING,"What? Power? Money? Women? Wine?").also { stage++ } + 155 -> npcl(FacialExpression.HAPPY,"...a new string for my hunting bow. Not just any bowstring; I need a custom bowstring, balanced for my bow precisely to keep my hunt competitive.").also { stage++ } + 156 -> npcl(FacialExpression.HAPPY,"Only in this way would I allow the knowledge of my hunting grounds to be passed on to strangers.").also { stage++ } + 157 -> playerl(FacialExpression.THINKING,"So where would I get that?").also { stage++ } + 158 -> npcl(FacialExpression.HAPPY,"I have no idea. But then again, I'm happy with my old bowstring and being the only person who knows where my hunting ground is.").also { player?.incrementAttribute("sigmund-steps",1) stage = 1000 } - 160 -> playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find a finely balanced custom bowstring, do you?").also { stage++ } - 161 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"If I knew I would not have asked you to go and get me one, now would I?").also { stage = 1000 } + 160 -> playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a finely balanced custom bowstring, do you?").also { stage++ } + 161 -> npcl(FacialExpression.ANNOYED,"If I knew I would not have asked you to go and get me one, now would I?").also { stage = 1000 } - 165 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Here. I have your bowstring. Give me your map to the hunting grounds.").also { + 165 -> playerl(FacialExpression.HAPPY,"Here. I have your bowstring. Give me your map to the hunting grounds.").also { removeItem(player,3702) addItem(player,3701) stage++ } - 166 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Well met, outerlander. I see some hunting potential within you. Here, take my map, I was getting too dependent on it for my skill anyway.").also { stage = 1000 } + 166 -> npcl(FacialExpression.HAPPY,"Well met, outerlander. I see some hunting potential within you. Here, take my map, I was getting too dependent on it for my skill anyway.").also { stage = 1000 } - 170 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"No outerlander... it is hard to explain. That map makes my role as huntsman too easy. I fear my skills are becoming dulled.").also { stage++ } - 171 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Now I must track my prey once more. To begin again from scratch... I feel this may keep me sharp.").also { stage = 1000 } + 170 -> npcl(FacialExpression.HAPPY,"No outerlander... it is hard to explain. That map makes my role as huntsman too easy. I fear my skills are becoming dulled.").also { stage++ } + 171 -> npcl(FacialExpression.HAPPY,"Now I must track my prey once more. To begin again from scratch... I feel this may keep me sharp.").also { stage = 1000 } - 175 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Not the one I want, outerlander.").also { stage = 1000 } + 175 -> npcl(FacialExpression.ANNOYED,"Not the one I want, outerlander.").also { stage = 1000 } - 180 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Hello again to you ${player.getAttribute("fremennikname","spinky")}. How goes the hunt?").also { stage++ } - 181 -> playerl(core.game.dialogue.FacialExpression.ASKING,"They hunt? I've already done your task! That's why I'm a Fremennik now!").also { stage++ } - 182 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"You think so do you? The Draugen is always out there, just as I and my hunters are always on its trail to keep it at bay. The hunt will never end until I do.").also { stage = 1000 } + 180 -> npcl(FacialExpression.HAPPY,"Hello again to you ${player.getAttribute("fremennikname","spinky")}. How goes the hunt?").also { stage++ } + 181 -> playerl(FacialExpression.ASKING,"They hunt? I've already done your task! That's why I'm a Fremennik now!").also { stage++ } + 182 -> npcl(FacialExpression.HAPPY,"You think so do you? The Draugen is always out there, just as I and my hunters are always on its trail to keep it at bay. The hunt will never end until I do.").also { stage = 1000 } 1000 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return SigliTheHuntsman(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SigmundDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SigmundDialogue.kt index 6e345f2c6..d00e6cf7f 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SigmundDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SigmundDialogue.kt @@ -10,7 +10,7 @@ import core.plugin.Initializable import org.rs09.consts.Items @Initializable -class SigmundDialogue (player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class SigmundDialogue (player: Player? = null) : DialoguePlugin(player) { private val QUEST_ITEMS = intArrayOf(3709,3707,3706,3710,3705,3704,3703,3702,3701,3708,3700,3699,3698) @@ -23,37 +23,37 @@ class SigmundDialogue (player: Player? = null) : core.game.dialogue.DialoguePlug override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if(player.questRepository.isComplete("Fremennik Trials")){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello there!") + playerl(FacialExpression.HAPPY,"Hello there!") stage = 50 return true } else if(!player.questRepository.hasStarted("Fremennik Trials")){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello there!") + playerl(FacialExpression.HAPPY,"Hello there!") stage = 60 return true } if(player?.inventory?.contains(3698,1) == true){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Here's that flower you wanted.") + playerl(FacialExpression.HAPPY,"Here's that flower you wanted.") stage = 30 return true } else if(player?.getAttribute("sigmundreturning",false) == true && !player.inventory.containsAtLeastOneItem(QUEST_ITEMS)){ - npcl(core.game.dialogue.FacialExpression.ASKING,"So... how goes it outerlander? Did you manage to obtain my flower for me yet? Or do you lack the necessary merchanting skills?") + npcl(FacialExpression.ASKING,"So... how goes it outerlander? Did you manage to obtain my flower for me yet? Or do you lack the necessary merchanting skills?") stage = 35 return true } if(player?.getAttribute("sigmund-started",false)!!){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello there!") + playerl(FacialExpression.HAPPY,"Hello there!") stage = 25 return true } else if(!player?.getAttribute("fremtrials:sigmund-vote",false)!!){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello there!") + playerl(FacialExpression.HAPPY,"Hello there!") stage = 1 return true } else if(player?.getAttribute("fremtrials:sigmund-vote",false) == true){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello there!") + playerl(FacialExpression.HAPPY,"Hello there!") stage = 40 return true } @@ -62,38 +62,38 @@ class SigmundDialogue (player: Player? = null) : core.game.dialogue.DialoguePlug override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 1 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"Hello outlander.").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL,"Are you a member of the council?").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"That I am outlander; it is a position that brings my family and I pride.").also { stage++ } - 4 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL,"I was wondering if I can count on your vote at the council of elders?").also { stage++ } - 5 -> npcl(core.game.dialogue.FacialExpression.THINKING,"You wish to become a Fremennik? I may be persuaded to swing my vote to your favor, but you will first need to do a little task for me.").also { stage++ } - 6 -> playerl(core.game.dialogue.FacialExpression.ANNOYED,"How did I know it wouldn't be that simple for your vote?").also { stage++ } - 7 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"Calm yourself outerlander. It is but a small task really... I simply require a flower.").also { stage++ } - 8 -> playerl(core.game.dialogue.FacialExpression.ASKING,"A flower? What's the catch?").also { stage++ } - 9 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"The catch? Well, it is not just any flower. Someone in this town has an extremely unique flower from a far off land that they picked up on their travels.").also { stage++ } - 10 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"I would like you to demonstrate your merchanting skills to me by persuading them to part with it, and then give it to me for my vote.").also { stage++ } - 11 -> playerl(core.game.dialogue.FacialExpression.THINKING,"Well... I guess that doesn't sound too hard.").also { stage++ } - 12 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Excellent! You will obtain this flower for me, then?").also { stage++ } + 1 -> npcl(FacialExpression.NEUTRAL,"Hello outlander.").also { stage++ } + 2 -> playerl(FacialExpression.NEUTRAL,"Are you a member of the council?").also { stage++ } + 3 -> npcl(FacialExpression.NEUTRAL,"That I am outlander; it is a position that brings my family and I pride.").also { stage++ } + 4 -> playerl(FacialExpression.NEUTRAL,"I was wondering if I can count on your vote at the council of elders?").also { stage++ } + 5 -> npcl(FacialExpression.THINKING,"You wish to become a Fremennik? I may be persuaded to swing my vote to your favor, but you will first need to do a little task for me.").also { stage++ } + 6 -> playerl(FacialExpression.ANNOYED,"How did I know it wouldn't be that simple for your vote?").also { stage++ } + 7 -> npcl(FacialExpression.NEUTRAL,"Calm yourself outerlander. It is but a small task really... I simply require a flower.").also { stage++ } + 8 -> playerl(FacialExpression.ASKING,"A flower? What's the catch?").also { stage++ } + 9 -> npcl(FacialExpression.NEUTRAL,"The catch? Well, it is not just any flower. Someone in this town has an extremely unique flower from a far off land that they picked up on their travels.").also { stage++ } + 10 -> npcl(FacialExpression.NEUTRAL,"I would like you to demonstrate your merchanting skills to me by persuading them to part with it, and then give it to me for my vote.").also { stage++ } + 11 -> playerl(FacialExpression.THINKING,"Well... I guess that doesn't sound too hard.").also { stage++ } + 12 -> npcl(FacialExpression.HAPPY,"Excellent! You will obtain this flower for me, then?").also { stage++ } 13 -> options("Yes","No").also { stage++ } 14 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Okay. I don't think this will be too difficult. Any suggestions on where to start looking for this flower?").also { + 1 -> playerl(FacialExpression.ASKING,"Okay. I don't think this will be too difficult. Any suggestions on where to start looking for this flower?").also { player?.setAttribute("/save:sigmund-started",true) player?.setAttribute("/save:sigmund-steps",1) stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.ANNOYED,"You know what? No. This all sounds like a lot of hassle to me, and frankly I just can't be bothered with it right now. I'll go get someone else to vote for me.").also { stage = 20 } + 2 -> playerl(FacialExpression.ANNOYED,"You know what? No. This all sounds like a lot of hassle to me, and frankly I just can't be bothered with it right now. I'll go get someone else to vote for me.").also { stage = 20 } } - 15 -> npcl(core.game.dialogue.FacialExpression.THINKING,"Ah, well outerlander, if I knew where to start looking I would simply do it myself!").also { stage++ } - 16 -> playerl(core.game.dialogue.FacialExpression.ANNOYED,"No help at ALL?").also { stage++ } - 17 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"We are a very insular clan, so I would not expect you to have to leave this town to find whatever you need.").also { stage = 1000 } + 15 -> npcl(FacialExpression.THINKING,"Ah, well outerlander, if I knew where to start looking I would simply do it myself!").also { stage++ } + 16 -> playerl(FacialExpression.ANNOYED,"No help at ALL?").also { stage++ } + 17 -> npcl(FacialExpression.NEUTRAL,"We are a very insular clan, so I would not expect you to have to leave this town to find whatever you need.").also { stage = 1000 } //No - 20 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"As you wish outlander. If you change your mind, come and see me again; I am very interested in getting my hands on that flower").also { stage = 1000 } + 20 -> npcl(FacialExpression.NEUTRAL,"As you wish outlander. If you change your mind, come and see me again; I am very interested in getting my hands on that flower").also { stage = 1000 } - 25 -> npcl(core.game.dialogue.FacialExpression.ASKING,"So... how goes it outerlander? Did you manage to obtain my flower for me yet? Or do you lack the necessary merchanting skills?").also { stage++ } - 26 -> playerl(core.game.dialogue.FacialExpression.ASKING,"I'm still working on it... Do you have any suggestion where to start looking for it?").also { stage++ } - 27 -> npcl(core.game.dialogue.FacialExpression.THINKING," I suggest you ask around the other Fremennik in the town. A good merchant will find exactly what their customer needs somewhere.").also { stage = 1000 } + 25 -> npcl(FacialExpression.ASKING,"So... how goes it outerlander? Did you manage to obtain my flower for me yet? Or do you lack the necessary merchanting skills?").also { stage++ } + 26 -> playerl(FacialExpression.ASKING,"I'm still working on it... Do you have any suggestion where to start looking for it?").also { stage++ } + 27 -> npcl(FacialExpression.THINKING," I suggest you ask around the other Fremennik in the town. A good merchant will find exactly what their customer needs somewhere.").also { stage = 1000 } - 30 -> npcl(core.game.dialogue.FacialExpression.AMAZED,"Incredible! Your merchanting skills might even match my own! I have no choice but to recommend you to the council of elders!").also { + 30 -> npcl(FacialExpression.AMAZED,"Incredible! Your merchanting skills might even match my own! I have no choice but to recommend you to the council of elders!").also { removeItem(player,3698) player?.removeAttribute("sigmund-steps") player?.removeAttribute("sigmund-started") @@ -103,40 +103,40 @@ class SigmundDialogue (player: Player? = null) : core.game.dialogue.DialoguePlug stage = 1000 } - 35 -> playerl(core.game.dialogue.FacialExpression.ASKING,"I'm still working on it... Do you have any suggestion where to start looking for it?").also { stage++ } - 36 -> npcl(core.game.dialogue.FacialExpression.ASKING,"I suggest you ask around the other Fremennik in the town. A good merchant will find exactly what their customer needs somewhere.").also { stage++ } - 37 -> playerl(core.game.dialogue.FacialExpression.ASKING,"I was making some trades, but then I lost the goods...").also { stage++ } - 38 -> npcl(core.game.dialogue.FacialExpression.THINKING,"Hmmm... well try and start again at the beginning. And try to be more careful of your wares in future.").also { + 35 -> playerl(FacialExpression.ASKING,"I'm still working on it... Do you have any suggestion where to start looking for it?").also { stage++ } + 36 -> npcl(FacialExpression.ASKING,"I suggest you ask around the other Fremennik in the town. A good merchant will find exactly what their customer needs somewhere.").also { stage++ } + 37 -> playerl(FacialExpression.ASKING,"I was making some trades, but then I lost the goods...").also { stage++ } + 38 -> npcl(FacialExpression.THINKING,"Hmmm... well try and start again at the beginning. And try to be more careful of your wares in future.").also { addItem(player, Items.PROMISSORY_NOTE_3709) stage = 1000 } - 40 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Hello again outerlander! I am amazed once more at your apparent skill at merchanting!").also { stage++ } - 41 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"So I can count on your vote at the council of elders?").also { stage++ } - 42 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Absolutely, outerlander. Your merchanting skills will be a real boon to the Fremennik.").also { stage = 1000 } + 40 -> npcl(FacialExpression.HAPPY,"Hello again outerlander! I am amazed once more at your apparent skill at merchanting!").also { stage++ } + 41 -> playerl(FacialExpression.HAPPY,"So I can count on your vote at the council of elders?").also { stage++ } + 42 -> npcl(FacialExpression.HAPPY,"Absolutely, outerlander. Your merchanting skills will be a real boon to the Fremennik.").also { stage = 1000 } - 50 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Greetings again $gender $fName! What can I do for you this day?").also { stage++ } + 50 -> npcl(FacialExpression.HAPPY,"Greetings again $gender $fName! What can I do for you this day?").also { stage++ } 51 -> options("Can I see your wares?","Nothing thanks").also { stage++ } 52 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Can I see your wares?").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Nothing thanks").also { stage = 55 } + 1 -> playerl(FacialExpression.HAPPY,"Can I see your wares?").also { stage++ } + 2 -> playerl(FacialExpression.HAPPY,"Nothing thanks").also { stage = 55 } } - 53 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Certainly, $fName.").also { + 53 -> npcl(FacialExpression.HAPPY,"Certainly, $fName.").also { npc.openShop(player) stage = 1000 } - 55 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Well, feel free to stop by anytime you wish $fName. You are always welcome here!").also { stage = 1000 } + 55 -> npcl(FacialExpression.HAPPY,"Well, feel free to stop by anytime you wish $fName. You are always welcome here!").also { stage = 1000 } - 60 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Hello outerlander. By the laws of our tribe, I am afraid I may not speak to you without the express permission of the chieftain.").also { stage++ } - 61 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Where would I find him?").also { stage++ } - 62 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"In the longhall, outerlander.").also { stage = 1000 } + 60 -> npcl(FacialExpression.HAPPY,"Hello outerlander. By the laws of our tribe, I am afraid I may not speak to you without the express permission of the chieftain.").also { stage++ } + 61 -> playerl(FacialExpression.ASKING,"Where would I find him?").also { stage++ } + 62 -> npcl(FacialExpression.HAPPY,"In the longhall, outerlander.").also { stage = 1000 } 1000 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return SigmundDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SkulgrimenDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SkulgrimenDialogue.kt index 6a09d38ce..f51b1cf71 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SkulgrimenDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SkulgrimenDialogue.kt @@ -9,42 +9,42 @@ import core.game.node.entity.player.Player import core.plugin.Initializable @Initializable -class SkulgrimenDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class SkulgrimenDialogue(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if(player?.inventory?.contains(3703,1) == true){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hi there. I got your fish, so can I have that bowstring for Sigli now?") + playerl(FacialExpression.HAPPY,"Hi there. I got your fish, so can I have that bowstring for Sigli now?") stage = 20 return true } else if(player?.inventory?.contains(3702,1) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"So about this bowstring... was it hard to make or something?") + playerl(FacialExpression.ASKING,"So about this bowstring... was it hard to make or something?") stage = 25 return true } else if(player?.getAttribute("sigmundreturning",false) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"Is this trade item for you?") + playerl(FacialExpression.ASKING,"Is this trade item for you?") stage = 26 return true } if(player?.getAttribute("sigmund-steps", 0) == 7){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find an exotic and extremely odd fish, do you?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find an exotic and extremely odd fish, do you?") stage = 15 return true } else if(player?.getAttribute("sigmund-steps", 0) == 6){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find a finely balanced custom bowstring, do you?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a finely balanced custom bowstring, do you?") stage = 1 return true } else if(player.questRepository.isComplete("Fremennik Trials")){ - npcl(core.game.dialogue.FacialExpression.HAPPY,"Hello again, ${player.getAttribute("fremennikname","ringo")}. Come to see what's for sale?") + npcl(FacialExpression.HAPPY,"Hello again, ${player.getAttribute("fremennikname","ringo")}. Come to see what's for sale?") stage = 1001 return true } else{ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello!") + playerl(FacialExpression.HAPPY,"Hello!") stage = 100 } return true @@ -52,36 +52,36 @@ class SkulgrimenDialogue(player: Player? = null) : core.game.dialogue.DialoguePl override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 1 -> npcl(core.game.dialogue.FacialExpression.THINKING,"Aye, I have a few in stock. What would an outerlander be wanting with equipment like that?").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"It's for Sigli. It needs to be weighted precisely to suit his hunting bow.").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"For Sigli eh? Well, I made his bow in the first place, so I'll be able to select the right string for you... just one small problem.").also { stage++ } - 4 -> playerl(core.game.dialogue.FacialExpression.THINKING,"What's that?").also { stage++ } - 5 -> npcl(core.game.dialogue.FacialExpression.THINKING,"This string you'll be wanting... Very special it is. Take a lot of time to recreate. Not sure you have the cash for it.").also { stage++ } - 6 -> playerl(core.game.dialogue.FacialExpression.THINKING,"Then maybe you'll accept something else...?").also { stage++ } - 7 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Heh. Good thinking outerlander. Well, it's true, there is more to life than just making money. Making weapons is good money, but it's not why I do it. I'll tell you what.").also { stage++ } - 8 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I heard a rumour that one of the fishermen down by the docks caught some weird looking fish as they were fishing the other day. From what I hear this fish is unique.").also { stage++ } - 9 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"From what I hear this fish is unique. Nobody's ever seen its like before. This intrigues me. I'd like to have it for myself.").also { stage++ } - 10 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Make a good trophy. You get me that fish, I give you the bowstring. What do you say? We got a deal?").also { stage++ } - 11 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Sounds good to me.").also { + 1 -> npcl(FacialExpression.THINKING,"Aye, I have a few in stock. What would an outerlander be wanting with equipment like that?").also { stage++ } + 2 -> playerl(FacialExpression.HAPPY,"It's for Sigli. It needs to be weighted precisely to suit his hunting bow.").also { stage++ } + 3 -> npcl(FacialExpression.HAPPY,"For Sigli eh? Well, I made his bow in the first place, so I'll be able to select the right string for you... just one small problem.").also { stage++ } + 4 -> playerl(FacialExpression.THINKING,"What's that?").also { stage++ } + 5 -> npcl(FacialExpression.THINKING,"This string you'll be wanting... Very special it is. Take a lot of time to recreate. Not sure you have the cash for it.").also { stage++ } + 6 -> playerl(FacialExpression.THINKING,"Then maybe you'll accept something else...?").also { stage++ } + 7 -> npcl(FacialExpression.HAPPY,"Heh. Good thinking outerlander. Well, it's true, there is more to life than just making money. Making weapons is good money, but it's not why I do it. I'll tell you what.").also { stage++ } + 8 -> npcl(FacialExpression.HAPPY,"I heard a rumour that one of the fishermen down by the docks caught some weird looking fish as they were fishing the other day. From what I hear this fish is unique.").also { stage++ } + 9 -> npcl(FacialExpression.HAPPY,"From what I hear this fish is unique. Nobody's ever seen its like before. This intrigues me. I'd like to have it for myself.").also { stage++ } + 10 -> npcl(FacialExpression.HAPPY,"Make a good trophy. You get me that fish, I give you the bowstring. What do you say? We got a deal?").also { stage++ } + 11 -> playerl(FacialExpression.HAPPY,"Sounds good to me.").also { player?.incrementAttribute("sigmund-steps",1) stage = 1000 } - 15 -> npcl(core.game.dialogue.FacialExpression.EXTREMELY_SHOCKED,"What? There's another one?").also { stage++ } - 16 -> playerl(core.game.dialogue.FacialExpression.ANNOYED,"Er... no, it's the one for you that I'm looking for...").also { stage++ } - 17 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Ah. I see. I already told you. Some guy down by the docks was bragging. Best ask there, I reckon.").also { stage = 1000 } + 15 -> npcl(FacialExpression.EXTREMELY_SHOCKED,"What? There's another one?").also { stage++ } + 16 -> playerl(FacialExpression.ANNOYED,"Er... no, it's the one for you that I'm looking for...").also { stage++ } + 17 -> npcl(FacialExpression.ANNOYED,"Ah. I see. I already told you. Some guy down by the docks was bragging. Best ask there, I reckon.").also { stage = 1000 } - 20 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Ohh... That's a nice fish. Very pleased. Here. Take the bowstring. You fulfilled agreement. Only fair I do same. Good work outerlander.").also { + 20 -> npcl(FacialExpression.HAPPY,"Ohh... That's a nice fish. Very pleased. Here. Take the bowstring. You fulfilled agreement. Only fair I do same. Good work outerlander.").also { removeItem(player,3703) addItem(player,3702) stage++ } - 21 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Thanks!").also { stage = 1000 } + 21 -> playerl(FacialExpression.HAPPY,"Thanks!").also { stage = 1000 } - 25 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Not hard. Just a trick to it. Takes skill to learn, but when learnt, easy. Sigli will be happy. Finest bowstring on continent. Will suit his needs perfectly.").also { stage = 1000 } + 25 -> npcl(FacialExpression.HAPPY,"Not hard. Just a trick to it. Takes skill to learn, but when learnt, easy. Sigli will be happy. Finest bowstring on continent. Will suit his needs perfectly.").also { stage = 1000 } - 26 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Not for me, I'm afraid.").also { stage = 1000 } + 26 -> npcl(FacialExpression.ANNOYED,"Not for me, I'm afraid.").also { stage = 1000 } - 100 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Sorry. I can't sell weapons to outerlanders. Wouldn't be right. Against our beliefs.").also { stage = 1000 } + 100 -> npcl(FacialExpression.HAPPY,"Sorry. I can't sell weapons to outerlanders. Wouldn't be right. Against our beliefs.").also { stage = 1000 } 1000 -> end() 1001 ->{ @@ -92,7 +92,7 @@ class SkulgrimenDialogue(player: Player? = null) : core.game.dialogue.DialoguePl return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return SkulgrimenDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SwensenTheNavigator.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SwensenTheNavigator.kt index e712b989c..c06ff2266 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SwensenTheNavigator.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/SwensenTheNavigator.kt @@ -9,32 +9,32 @@ import core.game.dialogue.DialoguePlugin import core.game.dialogue.FacialExpression @Initializable -class SwensenTheNavigator(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class SwensenTheNavigator(player: Player? = null) : DialoguePlugin(player){ val gender = if (player?.isMale == true){"brother"} else "sister" val fName = player?.getAttribute("fremennikname","doug hug'em") override fun open(vararg args: Any?): Boolean { if(player?.inventory?.contains(3705,1) == true){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"I would like your map of fishing spots.") + playerl(FacialExpression.HAPPY,"I would like your map of fishing spots.") stage = 120 return true } else if(player?.inventory?.contains(3704,1) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"If this map of fishing spots is so valuable, why did you give it away to me so easily?") + playerl(FacialExpression.ASKING,"If this map of fishing spots is so valuable, why did you give it away to me so easily?") stage = 125 return true } else if(player?.getAttribute("sigmundreturning",false) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I have a trade item here.") + playerl(FacialExpression.ASKING,"I have a trade item here.") stage = 130 return true } if(player?.getAttribute("sigmund-steps", 0) == 9){ - npcl(core.game.dialogue.FacialExpression.HAPPY,"Greetings outerlander.") + npcl(FacialExpression.HAPPY,"Greetings outerlander.") stage = 115 return true } else if(player?.getAttribute("sigmund-steps", 0) == 8){ - npcl(core.game.dialogue.FacialExpression.HAPPY,"Greetings outerlander.") + npcl(FacialExpression.HAPPY,"Greetings outerlander.") stage = 105 return true } @@ -48,7 +48,7 @@ class SwensenTheNavigator(player: Player? = null) : core.game.dialogue.DialogueP return true } else if(player.questRepository.isComplete("Fremennik Trials")){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello!") + playerl(FacialExpression.HAPPY,"Hello!") stage = 140 return true } @@ -58,7 +58,7 @@ class SwensenTheNavigator(player: Player? = null) : core.game.dialogue.DialogueP return true } else{ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello!") + playerl(FacialExpression.HAPPY,"Hello!") stage = 145 return true } @@ -90,8 +90,8 @@ class SwensenTheNavigator(player: Player? = null) : core.game.dialogue.DialogueP 100 -> {player("So does that mean I can rely on your vote at the","council of elders to allow me into your village?");stage++} 101 -> {npc("Of course outerlander! I am nothing if not a man of","my word!");stage++} 102 -> { - player("Thanks!"); - player?.removeAttribute("fremtrials:maze-complete") + player("Thanks!") + player?.removeAttribute("fremtrials:maze-complete") player?.removeAttribute("fremtrials:swensen-accepted") player?.setAttribute("/save:fremtrials:swensen-vote",true) player?.setAttribute("/save:fremtrials:votes",player.getAttribute("fremtrials:votes",0) + 1) @@ -99,50 +99,50 @@ class SwensenTheNavigator(player: Player? = null) : core.game.dialogue.DialogueP } //Sigmund subquest - 105 -> playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find a map of deep sea fishing spots do you?").also { stage++ } - 106 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Hmmm? Why of course! As the navigator for the Fremennik I keep all of our maps secure right here.").also { stage++ } - 107 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Great! Can I have it?").also { stage++ } - 108 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Have it? Just like that? I think not outerlander. This map shows all of the prime fishing locations nearby. It is very valuable to our clan. I am afraid I can not just give it away.").also { stage++ } - 109 -> playerl(core.game.dialogue.FacialExpression.THINKING,"Perhaps I can trade you something for it?").also { stage++ } - 110 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"A trade? For a map of the best fishing spots in a hundred leagues? I will trade it for no less than a weather forecast from our Seer.").also { stage++ } - 111 -> npcl(core.game.dialogue.FacialExpression.THINKING,"As a navigator, the weather is extremely important for plotting the best course. Unfortunately the Seer is always too busy to help me with a forecast.").also { stage++ } - 112 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Where could I get a weather forecast from then?").also { stage++ } - 113 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"I just told you: from the Seer. You will need to persuade him to take the time to make a forecast somehow.").also { + 105 -> playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a map of deep sea fishing spots do you?").also { stage++ } + 106 -> npcl(FacialExpression.HAPPY,"Hmmm? Why of course! As the navigator for the Fremennik I keep all of our maps secure right here.").also { stage++ } + 107 -> playerl(FacialExpression.HAPPY,"Great! Can I have it?").also { stage++ } + 108 -> npcl(FacialExpression.ANNOYED,"Have it? Just like that? I think not outerlander. This map shows all of the prime fishing locations nearby. It is very valuable to our clan. I am afraid I can not just give it away.").also { stage++ } + 109 -> playerl(FacialExpression.THINKING,"Perhaps I can trade you something for it?").also { stage++ } + 110 -> npcl(FacialExpression.ANNOYED,"A trade? For a map of the best fishing spots in a hundred leagues? I will trade it for no less than a weather forecast from our Seer.").also { stage++ } + 111 -> npcl(FacialExpression.THINKING,"As a navigator, the weather is extremely important for plotting the best course. Unfortunately the Seer is always too busy to help me with a forecast.").also { stage++ } + 112 -> playerl(FacialExpression.ASKING,"Where could I get a weather forecast from then?").also { stage++ } + 113 -> npcl(FacialExpression.ANNOYED,"I just told you: from the Seer. You will need to persuade him to take the time to make a forecast somehow.").also { player?.incrementAttribute("sigmund-steps",1) stage = 1000 } - 115 -> playerl(core.game.dialogue.FacialExpression.THINKING,"I don't suppose you have any idea where I could find a weather forecast from the Fremennik Seer do you?").also { stage++ } - 116 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Uh... from the Seer perhaps?").also { stage = 1000 } + 115 -> playerl(FacialExpression.THINKING,"I don't suppose you have any idea where I could find a weather forecast from the Fremennik Seer do you?").also { stage++ } + 116 -> npcl(FacialExpression.ANNOYED,"Uh... from the Seer perhaps?").also { stage = 1000 } - 120 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"I have already told you outerlander; I will not exchange it for anything other than a divination on the weather from our seer himself!").also { stage++ } - 121 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"What, like this one I have here?").also { stage++ } - 122 -> npcl(core.game.dialogue.FacialExpression.AMAZED,"W-what...? I don't believe it! How did you...?").also { stage++ } - 123 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I suppose it doesn't matter, you have my gratitude outerlander! With this forecast I will be able to plan a safe course for our next raiding expedition!").also { + 120 -> npcl(FacialExpression.ANNOYED,"I have already told you outerlander; I will not exchange it for anything other than a divination on the weather from our seer himself!").also { stage++ } + 121 -> playerl(FacialExpression.HAPPY,"What, like this one I have here?").also { stage++ } + 122 -> npcl(FacialExpression.AMAZED,"W-what...? I don't believe it! How did you...?").also { stage++ } + 123 -> npcl(FacialExpression.HAPPY,"I suppose it doesn't matter, you have my gratitude outerlander! With this forecast I will be able to plan a safe course for our next raiding expedition!").also { removeItem(player,3705) addItem(player,3704) stage++ } - 124 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Here, outerlander; you may take my map of local fishing patterns with my gratitude!").also { stage = 1000 } + 124 -> npcl(FacialExpression.HAPPY,"Here, outerlander; you may take my map of local fishing patterns with my gratitude!").also { stage = 1000 } - 125 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Hmmm? Well, firstly it will be of value to our entire clan, so I have lost nothing from giving it to you.").also { stage++ } - 126 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"The other reason is of course that I have already memorised it, so I can make myself another copy whenever I want!").also { stage = 1000 } + 125 -> npcl(FacialExpression.HAPPY,"Hmmm? Well, firstly it will be of value to our entire clan, so I have lost nothing from giving it to you.").also { stage++ } + 126 -> npcl(FacialExpression.HAPPY,"The other reason is of course that I have already memorised it, so I can make myself another copy whenever I want!").also { stage = 1000 } - 130 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"It isn't for me, I'm afraid.").also { stage = 1000 } + 130 -> npcl(FacialExpression.ANNOYED,"It isn't for me, I'm afraid.").also { stage = 1000 } - 140 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Greetings to you $gender $fName. How fare you today?").also { stage++ } - 141 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"I am fine thanks Swensen. How are you doing?").also { stage++ } - 142 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I am fine too!").also { stage = 1000 } + 140 -> npcl(FacialExpression.HAPPY,"Greetings to you $gender $fName. How fare you today?").also { stage++ } + 141 -> playerl(FacialExpression.HAPPY,"I am fine thanks Swensen. How are you doing?").also { stage++ } + 142 -> npcl(FacialExpression.HAPPY,"I am fine too!").also { stage = 1000 } - 145 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Hello outerlander. This is my home, I would be grateful if you would leave.").also { stage++ } - 146 -> playerl(core.game.dialogue.FacialExpression.THINKING,"Oh. Okay.").also { stage++ } - 147 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I am sorry outerlander, I will not offer you hospitality until my Chieftain has vouched for your honesty. This is our way.").also { stage = 1000 } + 145 -> npcl(FacialExpression.HAPPY,"Hello outerlander. This is my home, I would be grateful if you would leave.").also { stage++ } + 146 -> playerl(FacialExpression.THINKING,"Oh. Okay.").also { stage++ } + 147 -> npcl(FacialExpression.HAPPY,"I am sorry outerlander, I will not offer you hospitality until my Chieftain has vouched for your honesty. This is our way.").also { stage = 1000 } 1000 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return SwensenTheNavigator(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/ThoraDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/ThoraDialogue.kt index 0b65880d0..647d74df1 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/ThoraDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/ThoraDialogue.kt @@ -10,38 +10,38 @@ import core.plugin.Initializable import org.rs09.consts.Items @Initializable -class ThoraDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ThoraDialogue(player: Player? = null) : DialoguePlugin(player){ val fName = player?.getAttribute("fremennikname","name jeff") var curNPC: NPC? = NPC(0, Location(0,0,0)) override fun open(vararg args: Any?): Boolean { curNPC = args[0] as? NPC npc = args[0] as NPC if(player.inventory.contains(3707,1)){ - playerl(core.game.dialogue.FacialExpression.ASKING,"Thanks for making me this cocktail. Why don't you make them anymore normally?") + playerl(FacialExpression.ASKING,"Thanks for making me this cocktail. Why don't you make them anymore normally?") stage = 35 } else if(player.inventory.contains(3709,1)){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hi! Can I please have one of your legendary cocktails now?") + playerl(FacialExpression.HAPPY,"Hi! Can I please have one of your legendary cocktails now?") stage = 25 } else if(player?.getAttribute("sigmundreturning",false) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I'm trying to remember who I was meant to give this trade item to.") + playerl(FacialExpression.ASKING,"I'm trying to remember who I was meant to give this trade item to.") stage = 30 } else if(player?.getAttribute("sigmund-steps", 0) == 13){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find a written promise from Askeladden to stay out of the Longhall?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a written promise from Askeladden to stay out of the Longhall?") stage = 20 } else if(player?.getAttribute("sigmund-steps", 0) == 12){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find the longhall barkeeps' legendary cocktail, do you?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find the longhall barkeeps' legendary cocktail, do you?") stage = 1 } else if(player.questRepository.isComplete("Fremennik Trials")){ - npcl(core.game.dialogue.FacialExpression.HAPPY,"Hello again, $fName. I suppose you want a drink? Or are you going to try another scam with that terrible Askeladden again?") + npcl(FacialExpression.HAPPY,"Hello again, $fName. I suppose you want a drink? Or are you going to try another scam with that terrible Askeladden again?") stage = 50 } else{ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello there.") + playerl(FacialExpression.HAPPY,"Hello there.") stage = 60 } return true @@ -49,77 +49,77 @@ class ThoraDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 1 -> npcl(core.game.dialogue.FacialExpression.AMAZED,"How did you hear about that? I didn't think anybody knew about that.").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Well, it is true that in my younger years as a barkeep, I wandered the lands trying various alcoholic delicacies.").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Do know how many different types of alcohol there are here in Gielinor? Lots!").also { stage++ } - 4 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Well, anyway, I used a fusion of various drinks from all around the world to create the greatest cocktail ever made!").also { stage++ } - 5 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Of course, when my wander lust was gone, and I returned to Rellekka to serve as barkeep here, I gave all that up.").also { stage++ } - 6 -> playerl(core.game.dialogue.FacialExpression.ASKING,"But you still remember how to make it, right?").also { stage++ } - 7 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Of course.").also { stage++ } - 8 -> playerl(core.game.dialogue.FacialExpression.ASKING,"And you have all the ingredients here? I don't need to go chasing round the world for obscure ingredients to make it?").also { stage++ } - 9 -> npcl(core.game.dialogue.FacialExpression.ASKING,"No, I have them all here. Why?").also { stage++ } - 10 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Can you make me your legendary cocktail then?").also { stage++ } - 11 -> npcl(core.game.dialogue.FacialExpression.SAD,"I would rather not; it is a reminder of a life I left behind when I came back.").also { stage++ } - 12 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Any way I could change your mind?").also { stage++ } - 13 -> npcl(core.game.dialogue.FacialExpression.THINKING,"You need this to become a Fremennik, right? Well, you seem okay for an outerlander, it would be a shame to see you fail. You know Askeladden?").also { stage++ } - 14 -> playerl(core.game.dialogue.FacialExpression.THINKING,"That kid outside? Sure.").also { stage++ } - 15 -> npcl(core.game.dialogue.FacialExpression.ANGRY,"He is nothing but a pest. He keeps sneaking in and stealing beer.").also { stage++ } - 16 -> npcl(core.game.dialogue.FacialExpression.ANGRY,"I shudder to think what he will be like when he has passed his trial of manhood, and is allowed in here legitimately.").also { stage++ } - 17 -> npcl(core.game.dialogue.FacialExpression.ANGRY,"If you can get him to sign a contract promising that he will NEVER EVER EVER darken my doorway here again, you get the drink.").also { stage++ } - 18 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Any idea how I can get him to do that?").also { stage++ } - 19 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Knowing that little horror, he'll probably be willing to in exchange for some cash. You should go ask him yourself though.").also { + 1 -> npcl(FacialExpression.AMAZED,"How did you hear about that? I didn't think anybody knew about that.").also { stage++ } + 2 -> npcl(FacialExpression.HAPPY,"Well, it is true that in my younger years as a barkeep, I wandered the lands trying various alcoholic delicacies.").also { stage++ } + 3 -> npcl(FacialExpression.HAPPY,"Do know how many different types of alcohol there are here in Gielinor? Lots!").also { stage++ } + 4 -> npcl(FacialExpression.HAPPY,"Well, anyway, I used a fusion of various drinks from all around the world to create the greatest cocktail ever made!").also { stage++ } + 5 -> npcl(FacialExpression.HAPPY,"Of course, when my wander lust was gone, and I returned to Rellekka to serve as barkeep here, I gave all that up.").also { stage++ } + 6 -> playerl(FacialExpression.ASKING,"But you still remember how to make it, right?").also { stage++ } + 7 -> npcl(FacialExpression.HAPPY,"Of course.").also { stage++ } + 8 -> playerl(FacialExpression.ASKING,"And you have all the ingredients here? I don't need to go chasing round the world for obscure ingredients to make it?").also { stage++ } + 9 -> npcl(FacialExpression.ASKING,"No, I have them all here. Why?").also { stage++ } + 10 -> playerl(FacialExpression.ASKING,"Can you make me your legendary cocktail then?").also { stage++ } + 11 -> npcl(FacialExpression.SAD,"I would rather not; it is a reminder of a life I left behind when I came back.").also { stage++ } + 12 -> playerl(FacialExpression.ASKING,"Any way I could change your mind?").also { stage++ } + 13 -> npcl(FacialExpression.THINKING,"You need this to become a Fremennik, right? Well, you seem okay for an outerlander, it would be a shame to see you fail. You know Askeladden?").also { stage++ } + 14 -> playerl(FacialExpression.THINKING,"That kid outside? Sure.").also { stage++ } + 15 -> npcl(FacialExpression.ANGRY,"He is nothing but a pest. He keeps sneaking in and stealing beer.").also { stage++ } + 16 -> npcl(FacialExpression.ANGRY,"I shudder to think what he will be like when he has passed his trial of manhood, and is allowed in here legitimately.").also { stage++ } + 17 -> npcl(FacialExpression.ANGRY,"If you can get him to sign a contract promising that he will NEVER EVER EVER darken my doorway here again, you get the drink.").also { stage++ } + 18 -> playerl(FacialExpression.ASKING,"Any idea how I can get him to do that?").also { stage++ } + 19 -> npcl(FacialExpression.HAPPY,"Knowing that little horror, he'll probably be willing to in exchange for some cash. You should go ask him yourself though.").also { player?.incrementAttribute("sigmund-steps",1) stage = 1000 } - 20 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Well, as I say, you should talk to him about that. Knowing the little runt as I do though He'll probably do it for the cash.").also {stage++} + 20 -> npcl(FacialExpression.ANNOYED,"Well, as I say, you should talk to him about that. Knowing the little runt as I do though He'll probably do it for the cash.").also {stage++} - 25 -> npcl(core.game.dialogue.FacialExpression.AMAZED,"What?!?! I can't believe you... Let me look at that... Askeladden would NEVER... Gosh. It looks legitimate.").also { + 25 -> npcl(FacialExpression.AMAZED,"What?!?! I can't believe you... Let me look at that... Askeladden would NEVER... Gosh. It looks legitimate.").also { player?.inventory?.remove(Item(Items.PROMISSORY_NOTE_3709)) player?.inventory?.add(Item(Items.LEGENDARY_COCKTAIL_3707)) player?.setAttribute("/save:sigmundreturning",true) stage++ } - 26 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Here you go, on the house! You have made my life SO much easier! Knowing that little monster won't be bugging me in here all the time anymore!").also { stage++ } - 27 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"That little weasel will have to abide by this written promise that Askeladden can never ever enter the Longhall again! He can't get round this one!").also { stage++ } - 28 -> playerl(core.game.dialogue.FacialExpression.SUSPICIOUS,"Uh... yeah... yeah, you probably won't see someone called Askeladden coming in here...").also { stage = 1000 } + 26 -> npcl(FacialExpression.HAPPY,"Here you go, on the house! You have made my life SO much easier! Knowing that little monster won't be bugging me in here all the time anymore!").also { stage++ } + 27 -> npcl(FacialExpression.HAPPY,"That little weasel will have to abide by this written promise that Askeladden can never ever enter the Longhall again! He can't get round this one!").also { stage++ } + 28 -> playerl(FacialExpression.SUSPICIOUS,"Uh... yeah... yeah, you probably won't see someone called Askeladden coming in here...").also { stage = 1000 } - 30 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"If it's not the note from Askeladden it isn't me, I'm afraid.").also { stage = 1000 } + 30 -> npcl(FacialExpression.NEUTRAL,"If it's not the note from Askeladden it isn't me, I'm afraid.").also { stage = 1000 } - 35 -> npcl(core.game.dialogue.FacialExpression.SAD,"Ah... when I gave up my travels across the world many years back, to return to my expected role as longhall barkeep,").also { stage++ } - 36 -> npcl(core.game.dialogue.FacialExpression.SAD,"as my mother, and her mother, were before me, I gave up a lot of the freedom I had found in the outside world.").also { stage++ } - 37 -> npcl(core.game.dialogue.FacialExpression.SAD,"I know it is our custom to shun outerlanders and their ways, but I didn't find them as bad as the stories say.").also { stage++ } - 38 -> npcl(core.game.dialogue.FacialExpression.SAD,"Sometimes I feel as though we Fremennik live in a prison that we have constructed for ourselves,").also { stage++ } - 39 -> npcl(core.game.dialogue.FacialExpression.SAD,"and that WE are the outerlanders, out here on the edge of the world...").also { stage++ } - 40 -> npcl(core.game.dialogue.FacialExpression.SAD,"I'm sorry, I think it is part of the job of Longhall barkeep to get philosophical about things ocassionally.").also { stage++ } - 41 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I wish you all the best of luck with your trials, outerlander.").also { stage++ } - 42 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"When you have finished, perhaps you will come back here, and we can share a drink over tales of the outside world?").also { stage++ } - 43 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Thanks, I'd like that.").also { stage = 1000 } + 35 -> npcl(FacialExpression.SAD,"Ah... when I gave up my travels across the world many years back, to return to my expected role as longhall barkeep,").also { stage++ } + 36 -> npcl(FacialExpression.SAD,"as my mother, and her mother, were before me, I gave up a lot of the freedom I had found in the outside world.").also { stage++ } + 37 -> npcl(FacialExpression.SAD,"I know it is our custom to shun outerlanders and their ways, but I didn't find them as bad as the stories say.").also { stage++ } + 38 -> npcl(FacialExpression.SAD,"Sometimes I feel as though we Fremennik live in a prison that we have constructed for ourselves,").also { stage++ } + 39 -> npcl(FacialExpression.SAD,"and that WE are the outerlanders, out here on the edge of the world...").also { stage++ } + 40 -> npcl(FacialExpression.SAD,"I'm sorry, I think it is part of the job of Longhall barkeep to get philosophical about things ocassionally.").also { stage++ } + 41 -> npcl(FacialExpression.HAPPY,"I wish you all the best of luck with your trials, outerlander.").also { stage++ } + 42 -> npcl(FacialExpression.HAPPY,"When you have finished, perhaps you will come back here, and we can share a drink over tales of the outside world?").also { stage++ } + 43 -> playerl(FacialExpression.HAPPY,"Thanks, I'd like that.").also { stage = 1000 } - 50 -> playerl(core.game.dialogue.FacialExpression.THINKING,"Scam? Oh... You mean his promise to not come in here anymore?").also { stage++ } - 51 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Yes. Yes I do. I should have never trusted him not to come in here, even with that written promise. Anyway, do you want a drink or not?").also { stage++ } + 50 -> playerl(FacialExpression.THINKING,"Scam? Oh... You mean his promise to not come in here anymore?").also { stage++ } + 51 -> npcl(FacialExpression.ANNOYED,"Yes. Yes I do. I should have never trusted him not to come in here, even with that written promise. Anyway, do you want a drink or not?").also { stage++ } 52 -> options("Yes please","No thanks").also { stage++ } 53 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Yes please").also { + 1 -> playerl(FacialExpression.HAPPY,"Yes please").also { npc.openShop(player) stage = 1000 } - 2 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"No thanks.").also { stage++ } + 2 -> playerl(FacialExpression.HAPPY,"No thanks.").also { stage++ } } - 54 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Okay then.").also { stage = 1000 } + 54 -> npcl(FacialExpression.HAPPY,"Okay then.").also { stage = 1000 } - 60 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Hello yourself, outerlander. A little out of the way up here, aren't you?").also { stage++ } - 61 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I would love to stop and chat with you, but unfortunately we have a custom that no Fremennik may speak with the outerlanders without the permission of our chieftain. Don't take it personally.").also { stage++ } - 62 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"The Chieftain is stood just over there, his name is Brundt. I suggest you go and introduce yourself.").also { stage++ } - 63 -> npcl(core.game.dialogue.FacialExpression.ASKING,"You wouldn't want to go making any enemies because you weren't aware of our customs now, would you?").also { stage++ } - 64 -> playerl(core.game.dialogue.FacialExpression.THINKING,"No, I guess not. Thanks anyway.").also { stage++ } - 65 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Not a problem, outerlander. It's always nice to see a new face in the long hall; it happens so rarely.").also { stage = 1000 } + 60 -> npcl(FacialExpression.HAPPY,"Hello yourself, outerlander. A little out of the way up here, aren't you?").also { stage++ } + 61 -> npcl(FacialExpression.HAPPY,"I would love to stop and chat with you, but unfortunately we have a custom that no Fremennik may speak with the outerlanders without the permission of our chieftain. Don't take it personally.").also { stage++ } + 62 -> npcl(FacialExpression.HAPPY,"The Chieftain is stood just over there, his name is Brundt. I suggest you go and introduce yourself.").also { stage++ } + 63 -> npcl(FacialExpression.ASKING,"You wouldn't want to go making any enemies because you weren't aware of our customs now, would you?").also { stage++ } + 64 -> playerl(FacialExpression.THINKING,"No, I guess not. Thanks anyway.").also { stage++ } + 65 -> npcl(FacialExpression.HAPPY,"Not a problem, outerlander. It's always nice to see a new face in the long hall; it happens so rarely.").also { stage = 1000 } 1000 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ThoraDialogue(player) } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/YrsaDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/YrsaDialogue.kt index 83e782706..ef174fa42 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/YrsaDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/YrsaDialogue.kt @@ -9,44 +9,44 @@ import core.game.node.entity.player.Player import core.plugin.Initializable @Initializable -class YrsaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class YrsaDialogue(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if(player?.inventory?.contains(3708,1) == true){ - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello. Can I have those boots now? Here is a written statement from Brundt outlining future tax burdens upon Fremennik merchants and shopkeepers for the year.") + playerl(FacialExpression.HAPPY,"Hello. Can I have those boots now? Here is a written statement from Brundt outlining future tax burdens upon Fremennik merchants and shopkeepers for the year.") stage = 15 return true } else if(player?.inventory?.contains(3700,1) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"Hey, these shoes look pretty comfy. Think you could make me a pair like them?") + playerl(FacialExpression.ASKING,"Hey, these shoes look pretty comfy. Think you could make me a pair like them?") stage = 20 return true } else if(player?.getAttribute("sigmundreturning",false) == true){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I have this trade item but I can't remember who it's for.") + playerl(FacialExpression.ASKING,"I have this trade item but I can't remember who it's for.") stage = 25 return true } if(player?.getAttribute("sigmund-steps",0) == 4){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find a guarantee of a reduction on sales taxes, do you?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a guarantee of a reduction on sales taxes, do you?") stage = 10 return true } else if(player?.getAttribute("sigmund-steps",0) == 3){ - playerl(core.game.dialogue.FacialExpression.ASKING,"I don't suppose you have any idea where I could find some custom sturdy boots, do you?") + playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find some custom sturdy boots, do you?") stage = 1 return true } else if(player.questRepository.isComplete("Fremennik Trials")){ - npcl(core.game.dialogue.FacialExpression.HAPPY,"Welcome to my clothes shop. I can change your shoes, or I've got a fine selection of clothes for sale.") + npcl(FacialExpression.HAPPY,"Welcome to my clothes shop. I can change your shoes, or I've got a fine selection of clothes for sale.") stage = 30 //Uncomment this out when we got the shoe shop up and running //npcl(FacialExpression.HAPPY,"Welcome to my clothes shop. I can change your shows, or I've got a fine selection of clothes for sale") return true } else { - playerl(core.game.dialogue.FacialExpression.HAPPY,"Hello!") + playerl(FacialExpression.HAPPY,"Hello!") stage = 35 } return true @@ -54,46 +54,46 @@ class YrsaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 1 -> npcl(core.game.dialogue.FacialExpression.THINKING,"Well, I don't usually have many shoes in stock here in my little clothes shop... I will be able to make you up a pair if you are really desperate though?").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL,"They're not for me... I need them for Olaf.").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.ANGRY,"Oh, that foolish bard... Why didn't he just ask me to make him some? It is his stupid pride, I believe! I will tell you what I will do outlander.").also { stage++ } - 4 -> npcl(core.game.dialogue.FacialExpression.ASKING,"I know that you must have the ear of the chieftain for him to consider you as worthy of becoming a Fremennik by trial.").also { stage++ } - 5 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I will make you a pair of sturdy boots for Olaf if you will persuade him to reduce the sales tax placed upon all Fremennik shopkeepers. It does nothing but hurt my business now.").also { stage++ } - 6 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL,"Okay, I will see what I can do").also { + 1 -> npcl(FacialExpression.THINKING,"Well, I don't usually have many shoes in stock here in my little clothes shop... I will be able to make you up a pair if you are really desperate though?").also { stage++ } + 2 -> playerl(FacialExpression.NEUTRAL,"They're not for me... I need them for Olaf.").also { stage++ } + 3 -> npcl(FacialExpression.ANGRY,"Oh, that foolish bard... Why didn't he just ask me to make him some? It is his stupid pride, I believe! I will tell you what I will do outlander.").also { stage++ } + 4 -> npcl(FacialExpression.ASKING,"I know that you must have the ear of the chieftain for him to consider you as worthy of becoming a Fremennik by trial.").also { stage++ } + 5 -> npcl(FacialExpression.HAPPY,"I will make you a pair of sturdy boots for Olaf if you will persuade him to reduce the sales tax placed upon all Fremennik shopkeepers. It does nothing but hurt my business now.").also { stage++ } + 6 -> playerl(FacialExpression.NEUTRAL,"Okay, I will see what I can do").also { player?.incrementAttribute("sigmund-steps",1) stage = 1000 } - 10 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"Yes I do outerlander. Only the Chieftain may permit such a thing. Talk to him.").also { stage = 1000 } + 10 -> npcl(FacialExpression.NEUTRAL,"Yes I do outerlander. Only the Chieftain may permit such a thing. Talk to him.").also { stage = 1000 } - 15 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Certainly! Let me have a look at what he has written here, just give me a moment...").also { + 15 -> npcl(FacialExpression.HAPPY,"Certainly! Let me have a look at what he has written here, just give me a moment...").also { removeItem(player,3708) addItem(player,3700) stage++ } - 16 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Yes, that all appears in order. Tell Olaf to come to me next time for shoes!").also { stage = 1000 } + 16 -> npcl(FacialExpression.HAPPY,"Yes, that all appears in order. Tell Olaf to come to me next time for shoes!").also { stage = 1000 } - 20 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Maybe if you pass your trial and become a full fledged member of the Fremennik...").also { stage = 1000 } + 20 -> npcl(FacialExpression.HAPPY,"Maybe if you pass your trial and become a full fledged member of the Fremennik...").also { stage = 1000 } - 25 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Not me, I'm afraid.").also { stage = 1000 } + 25 -> npcl(FacialExpression.ANNOYED,"Not me, I'm afraid.").also { stage = 1000 } 30 -> options("I'd like to buy some clothes","Nothing, thanks.").also { stage++ } 31 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"I'd like to buy some clothes").also { + 1 -> playerl(FacialExpression.HAPPY,"I'd like to buy some clothes").also { npc.openShop(player) stage = 1000 } - 2 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Nothing, thanks.").also { stage++ } + 2 -> playerl(FacialExpression.HAPPY,"Nothing, thanks.").also { stage++ } } - 32 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"As you wish.").also { stage = 1000 } + 32 -> npcl(FacialExpression.HAPPY,"As you wish.").also { stage = 1000 } - 35 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I'm sorry outerlander, I cannot sell you any clothes. Our customs forbid it.").also { stage = 1000 } + 35 -> npcl(FacialExpression.HAPPY,"I'm sorry outerlander, I cannot sell you any clothes. Our customs forbid it.").also { stage = 1000 } 1000 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return YrsaDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/ardougne/dialogue/ChadwellDialogue.kt b/Server/src/main/content/region/kandarin/ardougne/dialogue/ChadwellDialogue.kt index 2fcad3fff..118e67f4b 100644 --- a/Server/src/main/content/region/kandarin/ardougne/dialogue/ChadwellDialogue.kt +++ b/Server/src/main/content/region/kandarin/ardougne/dialogue/ChadwellDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class ChadwellDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ChadwellDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Good day. What can I get you?").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"Good day. What can I get you?").also { stage = 0 } return true } @@ -24,20 +24,20 @@ class ChadwellDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug when(stage){ 0 -> options("Let's see what you've got.", "Nothing thanks.").also { stage++ } 1 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Let's see what you've got.").also { stage = 5 } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Nothing thanks.").also { stage = 10 } + 1 -> player(FacialExpression.FRIENDLY, "Let's see what you've got.").also { stage = 5 } + 2 -> player(FacialExpression.FRIENDLY, "Nothing thanks.").also { stage = 10 } } 5 -> end().also { npc.openShop(player) } - 10 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Okay then.").also { stage = 99 } + 10 -> npc(FacialExpression.FRIENDLY, "Okay then.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ChadwellDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/ardougne/dialogue/MonkeyChildThingZooDialogue.kt b/Server/src/main/content/region/kandarin/ardougne/dialogue/MonkeyChildThingZooDialogue.kt index 72415b9eb..4aa655a47 100644 --- a/Server/src/main/content/region/kandarin/ardougne/dialogue/MonkeyChildThingZooDialogue.kt +++ b/Server/src/main/content/region/kandarin/ardougne/dialogue/MonkeyChildThingZooDialogue.kt @@ -13,21 +13,21 @@ import org.rs09.consts.NPCs */ @Initializable -class MonkeyChildThingZooDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class MonkeyChildThingZooDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"").also { stage = 0 } if (!player.equipment.contains(Items.MSPEAK_AMULET_4021, 1)) { - npc(core.game.dialogue.FacialExpression.OLD_LAUGH1, "Eeekeek ookeek!").also { stage = 99 } + npc(FacialExpression.OLD_LAUGH1, "Eeekeek ookeek!").also { stage = 99 } } else { var a = 1..5 when(a.random()) { - 1 -> npc(core.game.dialogue.FacialExpression.OLD_LAUGH1, "Arr!").also { stage = 10 } - 2 -> npcl(core.game.dialogue.FacialExpression.OLD_LAUGH1, "Let me go, can't ye hear them? Howlin' in the dark...").also { stage = 20 } - 3 -> npcl(core.game.dialogue.FacialExpression.OLD_DEFAULT, "I'm not goin' back in that brewery, not fer all the Bitternuts I can carry!").also { stage = 99 } - 4 -> npc(core.game.dialogue.FacialExpression.OLD_DEFAULT, "Are ye here for...the stuff?").also { stage = 30 } - 5 -> npc(core.game.dialogue.FacialExpression.OLD_DISTRESSED, "Arr! Yer messin with me monkey plunder!").also { stage = 40 } + 1 -> npc(FacialExpression.OLD_LAUGH1, "Arr!").also { stage = 10 } + 2 -> npcl(FacialExpression.OLD_LAUGH1, "Let me go, can't ye hear them? Howlin' in the dark...").also { stage = 20 } + 3 -> npcl(FacialExpression.OLD_DEFAULT, "I'm not goin' back in that brewery, not fer all the Bitternuts I can carry!").also { stage = 99 } + 4 -> npc(FacialExpression.OLD_DEFAULT, "Are ye here for...the stuff?").also { stage = 30 } + 5 -> npc(FacialExpression.OLD_DISTRESSED, "Arr! Yer messin with me monkey plunder!").also { stage = 40 } } } return true @@ -36,32 +36,32 @@ class MonkeyChildThingZooDialogue(player: Player? = null) : core.game.dialogue.D override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 10 -> player(core.game.dialogue.FacialExpression.JOLLY, "Arr!").also { stage++ } - 11 -> npc(core.game.dialogue.FacialExpression.OLD_LAUGH1, "Arr!").also { stage++ } - 12 -> player(core.game.dialogue.FacialExpression.JOLLY, "Arr!").also { stage++ } - 13 -> npc(core.game.dialogue.FacialExpression.OLD_LAUGH1, "Arr!").also { stage++ } - 14 -> player(core.game.dialogue.FacialExpression.JOLLY, "Arr!").also { stage++ } - 15 -> npc(core.game.dialogue.FacialExpression.OLD_LAUGH1, "Arr!").also { stage++ } - 16 -> player(core.game.dialogue.FacialExpression.JOLLY, "Arr!").also { stage++ } - 17 -> npc(core.game.dialogue.FacialExpression.OLD_LAUGH1, "Bored now...").also { stage = 99 } + 10 -> player(FacialExpression.JOLLY, "Arr!").also { stage++ } + 11 -> npc(FacialExpression.OLD_LAUGH1, "Arr!").also { stage++ } + 12 -> player(FacialExpression.JOLLY, "Arr!").also { stage++ } + 13 -> npc(FacialExpression.OLD_LAUGH1, "Arr!").also { stage++ } + 14 -> player(FacialExpression.JOLLY, "Arr!").also { stage++ } + 15 -> npc(FacialExpression.OLD_LAUGH1, "Arr!").also { stage++ } + 16 -> player(FacialExpression.JOLLY, "Arr!").also { stage++ } + 17 -> npc(FacialExpression.OLD_LAUGH1, "Bored now...").also { stage = 99 } - 20 -> player(core.game.dialogue.FacialExpression.ASKING, "What do you mean?").also { stage++ } - 21 -> npc(core.game.dialogue.FacialExpression.OLD_DISTRESSED, "I'm not hangin' around te be killed!").also { stage++ } - 22 -> npc(core.game.dialogue.FacialExpression.OLD_DISTRESSED, "The Horrors, the Horrors!").also { stage = 99 } + 20 -> player(FacialExpression.ASKING, "What do you mean?").also { stage++ } + 21 -> npc(FacialExpression.OLD_DISTRESSED, "I'm not hangin' around te be killed!").also { stage++ } + 22 -> npc(FacialExpression.OLD_DISTRESSED, "The Horrors, the Horrors!").also { stage = 99 } - 30 -> player(core.game.dialogue.FacialExpression.ASKING, "What?").also { stage++ } - 31 -> npc(core.game.dialogue.FacialExpression.OLD_DEFAULT, "You know...the 'special' bananas?").also { stage++ } - 32 -> player(core.game.dialogue.FacialExpression.ASKING, "No... why do you ask?").also { stage++ } - 33 -> npc(core.game.dialogue.FacialExpression.OLD_SAD, "No reason. Have a nice day.").also { stage = 99 } + 30 -> player(FacialExpression.ASKING, "What?").also { stage++ } + 31 -> npc(FacialExpression.OLD_DEFAULT, "You know...the 'special' bananas?").also { stage++ } + 32 -> player(FacialExpression.ASKING, "No... why do you ask?").also { stage++ } + 33 -> npc(FacialExpression.OLD_SAD, "No reason. Have a nice day.").also { stage = 99 } - 40 -> player(core.game.dialogue.FacialExpression.ASKING, "What?").also { stage = 99 } + 40 -> player(FacialExpression.ASKING, "What?").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return MonkeyChildThingZooDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/ardougne/dialogue/ZookeeperDialogue.kt b/Server/src/main/content/region/kandarin/ardougne/dialogue/ZookeeperDialogue.kt index 6630c1225..c4ff1a89e 100644 --- a/Server/src/main/content/region/kandarin/ardougne/dialogue/ZookeeperDialogue.kt +++ b/Server/src/main/content/region/kandarin/ardougne/dialogue/ZookeeperDialogue.kt @@ -13,56 +13,56 @@ import org.rs09.consts.NPCs */ @Initializable -class ZookeeperDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ZookeeperDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hi!").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hi!").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "Welcome to the Ardougne Zoo! How can I help you?").also { stage++ } + npc(FacialExpression.FRIENDLY, "Welcome to the Ardougne Zoo! How can I help you?").also { stage++ } } 1 -> { options("Do you have any quests for me?", "Where did you get the animals from?").also { stage++ } } 2 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Do you have any quests for me?").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Where did you get the animals from?").also { stage = 20 } + 1 -> player(FacialExpression.FRIENDLY, "Do you have any quests for me?").also { stage = 10 } + 2 -> player(FacialExpression.FRIENDLY, "Where did you get the animals from?").also { stage = 20 } } 10 -> { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "Not at the moment.", + npc(FacialExpression.FRIENDLY, "Not at the moment.", "The explorers that come back from far away lands tell", "such amazing tales. Make sure you keep eyes and ears", "open as you may find new places to explore!").also { stage++ } } 11 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Ooh, I will!").also { stage = 99 } + player(FacialExpression.FRIENDLY, "Ooh, I will!").also { stage = 99 } } 20 -> { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "We get them from all over the place!", + npc(FacialExpression.FRIENDLY, "We get them from all over the place!", "The most exotic creatures have been brought", "back by explorers and sold to us.").also { stage++ } } 21 -> { - player(core.game.dialogue.FacialExpression.HALF_ASKING, "Where on Gielinor did you get that scary", + player(FacialExpression.HALF_ASKING, "Where on Gielinor did you get that scary", "looking Cyclops?!").also { stage++ } } 22 -> { - npc(core.game.dialogue.FacialExpression.LAUGH, "Yes he is scary looking!").also { stage++ } + npc(FacialExpression.LAUGH, "Yes he is scary looking!").also { stage++ } } 23 -> { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "He's from a very far away land, we couldn't", + npc(FacialExpression.FRIENDLY, "He's from a very far away land, we couldn't", "find out more as the explorer who brought", "him back died shortly afterwards!").also { stage = 99 } } @@ -72,7 +72,7 @@ class ZookeeperDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ZookeeperDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/ardougne/quest/arena/FightArena.kt b/Server/src/main/content/region/kandarin/ardougne/quest/arena/FightArena.kt index 0c38b8e72..20ac88e15 100644 --- a/Server/src/main/content/region/kandarin/ardougne/quest/arena/FightArena.kt +++ b/Server/src/main/content/region/kandarin/ardougne/quest/arena/FightArena.kt @@ -90,7 +90,7 @@ class FightArena : Quest("Fight Arena", 61, 60, 2, 17, 0, 1, 14) { player ?: return var ln = 10 - player.packetDispatch.sendItemZoomOnInterface(Items.COINS_995, 230, 277, 5) + player.packetDispatch.sendItemZoomOnInterface(COINS_995, 230, 277, 5) drawReward(player, "2 Quest Point", ln++) drawReward(player, "1000 gold coins", ln++) diff --git a/Server/src/main/content/region/kandarin/dialogue/EniolaDialogue.kt b/Server/src/main/content/region/kandarin/dialogue/EniolaDialogue.kt index e8af8d314..de5a3e3c8 100644 --- a/Server/src/main/content/region/kandarin/dialogue/EniolaDialogue.kt +++ b/Server/src/main/content/region/kandarin/dialogue/EniolaDialogue.kt @@ -13,19 +13,19 @@ import core.tools.END_DIALOGUE import core.tools.START_DIALOGUE @Initializable -class EniolaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class EniolaDialogue(player: Player? = null) : DialoguePlugin(player) { override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { START_DIALOGUE -> if (hasIronmanRestriction(player, IronmanMode.ULTIMATE)) { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "My apologies, dear ${if (player.isMale) "sir" else "madam"}, " + "our services are not available for Ultimate ${if (player.isMale) "Ironmen" else "Ironwomen"}." ).also { stage = END_DIALOGUE } } else { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Good day, how may I help you?" ).also { if (hasAwaitingGrandExchangeCollections(player)) { @@ -37,107 +37,107 @@ class EniolaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin } 1 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Before we go any further, I should inform you that you " + "have items ready for collection from the Grand Exchange." ).also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.ASKING, "Who are you?") + 2 -> playerl(FacialExpression.ASKING, "Who are you?") .also { stage++ } 3 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "How frightfully rude of me, my dear ${if (player.isMale) "sir" else "lady"}. " + "My name is Eniola and I work for that excellent enterprise, the Bank of Gielinor." ).also { stage++ } 4 -> showTopics( - Topic(core.game.dialogue.FacialExpression.HALF_THINKING, "If you work for the bank, what are you doing here?", 10), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I'd like to access my bank account, please.", 30), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I'd like to check my PIN settings.", 31), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I'd like to see my collection box.", 32), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "Never mind.", END_DIALOGUE) + Topic(FacialExpression.HALF_THINKING, "If you work for the bank, what are you doing here?", 10), + Topic(FacialExpression.NEUTRAL, "I'd like to access my bank account, please.", 30), + Topic(FacialExpression.NEUTRAL, "I'd like to check my PIN settings.", 31), + Topic(FacialExpression.NEUTRAL, "I'd like to see my collection box.", 32), + Topic(FacialExpression.NEUTRAL, "Never mind.", END_DIALOGUE) ) 10 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "My presence here is the start of a new enterprise of travelling banks. " + "I, and others like me, will provide you with the convenience of having " + "bank facilities where they will be of optimum use to you." ).also { stage++ } 11 -> playerl( - core.game.dialogue.FacialExpression.ASKING, + FacialExpression.ASKING, "So... What are you doing here?" ).also { stage++ } 12 -> npcl( - core.game.dialogue.FacialExpression.HALF_GUILTY, + FacialExpression.HALF_GUILTY, "The Z.M.I. - that is - the Zamorakian Magical Institute, required my services " + "upon discovery of this altar." ).also { stage++ } 13 -> npcl( - core.game.dialogue.FacialExpression.HALF_GUILTY, + FacialExpression.HALF_GUILTY, "We at the Bank of Gielinor are a neutral party and are willing to offer our " + "services regardless of affiliation. So that is why I am here." ).also { stage++ } 14 -> playerl( - core.game.dialogue.FacialExpression.ASKING, + FacialExpression.ASKING, "Can I access my bank account by speaking to you?" ).also { stage++ } 15 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Of course, dear ${if (player.isMale) "sir" else "lady"}. However, I must inform you " + "that because the Z.M.I. are paying for my services, they require anyone not part of " + "the Institute to pay an access fee to open their bank account." ).also { stage++ } 16 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "But, as our goal as travelling bankers is to make our customers' lives more convenient, " + "we have accomodated to your needs." ).also { stage++ } 17 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "We know you will be busy creating runes and do not wish " + "to carry money with you." ).also { stage++ } 18 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "The charge to open your account is the small amount of twenty of one type of rune. " + "The type of rune is up to you." ).also { stage++ } 19 -> npcl( - core.game.dialogue.FacialExpression.HALF_ASKING, + FacialExpression.HALF_ASKING, "Would you like to pay the price of twenty runes to open " + "your bank account?" ).also { stage++ } 20 -> showTopics( - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "Yes, please.", 30), - Topic(core.game.dialogue.FacialExpression.SUSPICIOUS, "Let me open my account and then I'll give you the runes.", 21), - Topic(core.game.dialogue.FacialExpression.ANNOYED, "No way! I'm not paying to withdraw my own stuff.", 22) + Topic(FacialExpression.NEUTRAL, "Yes, please.", 30), + Topic(FacialExpression.SUSPICIOUS, "Let me open my account and then I'll give you the runes.", 21), + Topic(FacialExpression.ANNOYED, "No way! I'm not paying to withdraw my own stuff.", 22) ) 21 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "It's not that I don't trust you, old ${if (player.isMale) "chap" else "girl"}, " + "but as the old adage goes: 'Payment comes before friends'." ).also { stage = END_DIALOGUE } 22 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "I'm sorry to hear that, dear ${if (player.isMale) "sir" else "madam"}. " ).also { stage++ } 23 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Should you reconsider, because I believe this service offers excellent " + "value for the price, do not hesitate to contact me." ).also { stage = END_DIALOGUE } diff --git a/Server/src/main/content/region/kandarin/dialogue/OttoGodblessedDialogue.kt b/Server/src/main/content/region/kandarin/dialogue/OttoGodblessedDialogue.kt index aa20a9618..dd0865501 100644 --- a/Server/src/main/content/region/kandarin/dialogue/OttoGodblessedDialogue.kt +++ b/Server/src/main/content/region/kandarin/dialogue/OttoGodblessedDialogue.kt @@ -15,9 +15,9 @@ import core.tools.START_DIALOGUE * @author vddCore */ @Initializable -class OttoGodblessedDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class OttoGodblessedDialogue(player: Player? = null) : DialoguePlugin(player) { - override fun newInstance(player: Player): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player): DialoguePlugin { return OttoGodblessedDialogue(player) } @@ -25,7 +25,7 @@ class OttoGodblessedDialogue(player: Player? = null) : core.game.dialogue.Dialog npc = args[0] as NPC npcl( - core.game.dialogue.FacialExpression.HAPPY, + FacialExpression.HAPPY, "Good day, you seem a hearty warrior. " + "Maybe even some barbarian blood in that body of yours?" ) @@ -36,51 +36,51 @@ class OttoGodblessedDialogue(player: Player? = null) : core.game.dialogue.Dialog override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { START_DIALOGUE -> showTopics( - Topic(core.game.dialogue.FacialExpression.ASKING, "Is there anything you can teach me?", 1), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "Nevermind.", END_DIALOGUE) + Topic(FacialExpression.ASKING, "Is there anything you can teach me?", 1), + Topic(FacialExpression.NEUTRAL, "Nevermind.", END_DIALOGUE) ) 1 -> npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "I can teach you how to fish." ).also { stage++ } 2 -> playerl( - core.game.dialogue.FacialExpression.HALF_ROLLING_EYES, + FacialExpression.HALF_ROLLING_EYES, "Oh, that's pretty underwhelming. But uhhh, okay!" ).also { stage++ } 3 -> npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Alright, so here's what you gotta do: you need to grab a pole and some bait, and then... " + "Fling it into the water!" ).also { stage++ } 4 -> playerl( - core.game.dialogue.FacialExpression.HALF_ASKING, + FacialExpression.HALF_ASKING, "The whole... Pole?" ).also { stage++ } 5 -> npcl( - core.game.dialogue.FacialExpression.ANNOYED, + FacialExpression.ANNOYED, "No, not the whole pole!" ).also { stage++ } 6 -> npcl( - core.game.dialogue.FacialExpression.ANNOYED, + FacialExpression.ANNOYED, "Look. Just... Grab the pole from under my bed and go click on that fishing spot." ).also { stage++ } 7 -> playerl( - core.game.dialogue.FacialExpression.STRUGGLE, + FacialExpression.STRUGGLE, "...click?" ).also { stage++ } 8 -> npcl( - core.game.dialogue.FacialExpression.FURIOUS, + FacialExpression.FURIOUS, "JUST GO DO IT!" ).also { - stage = END_DIALOGUE; + stage = END_DIALOGUE player.setAttribute("/save:barbtraining:fishing", true) } } diff --git a/Server/src/main/content/region/kandarin/feldip/ooglog/dialogue/BalneaDialogue.kt b/Server/src/main/content/region/kandarin/feldip/ooglog/dialogue/BalneaDialogue.kt index 4fb34c407..34b967093 100644 --- a/Server/src/main/content/region/kandarin/feldip/ooglog/dialogue/BalneaDialogue.kt +++ b/Server/src/main/content/region/kandarin/feldip/ooglog/dialogue/BalneaDialogue.kt @@ -15,31 +15,31 @@ import core.tools.START_DIALOGUE * @author vddCore */ @Initializable -class BalneaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class BalneaDialogue(player: Player? = null) : DialoguePlugin(player) { override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { START_DIALOGUE -> playerl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Hi there!" ).also { stage++ } 1 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "I'm ever so busy at the moment; please come back after the grand opening." ).also { stage++ } 2 -> playerl( - core.game.dialogue.FacialExpression.HALF_ASKING, + FacialExpression.HALF_ASKING, "What grand reopening?" ).also { stage++ } 3 -> npcl( - core.game.dialogue.FacialExpression.ANNOYED, + FacialExpression.ANNOYED, "I'm sorry, I really can't spare the time to talk to you." ).also { stage++ } 4 -> playerl( - core.game.dialogue.FacialExpression.THINKING, + FacialExpression.THINKING, "Uh, sure." ).also { stage = END_DIALOGUE } } diff --git a/Server/src/main/content/region/kandarin/feldip/ooglog/dialogue/OgressBankerDialogue.kt b/Server/src/main/content/region/kandarin/feldip/ooglog/dialogue/OgressBankerDialogue.kt index 21b5b8d7b..045e01862 100644 --- a/Server/src/main/content/region/kandarin/feldip/ooglog/dialogue/OgressBankerDialogue.kt +++ b/Server/src/main/content/region/kandarin/feldip/ooglog/dialogue/OgressBankerDialogue.kt @@ -15,7 +15,7 @@ import core.tools.START_DIALOGUE * @author vddCore */ @Initializable -class OgressBankerDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class OgressBankerDialogue(player: Player? = null) : DialoguePlugin(player) { override fun getIds(): IntArray = intArrayOf( NPCs.OGRESS_BANKER_7049, NPCs.OGRESS_BANKER_7050 @@ -24,17 +24,17 @@ class OgressBankerDialogue(player: Player? = null) : core.game.dialogue.Dialogue override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { START_DIALOGUE -> npcl( - core.game.dialogue.FacialExpression.ANNOYED, + FacialExpression.ANNOYED, "..." ).also { stage++ } 1 -> playerl( - core.game.dialogue.FacialExpression.ANNOYED, + FacialExpression.ANNOYED, "Excuse me, can I get some service here, please?" ).also { stage++ } 2 -> npcl( - core.game.dialogue.FacialExpression.ANGRY, + FacialExpression.ANGRY, "GRAAAAAH! You go away, human! Me too busy with training to talk to puny thing like you." ).also { stage++ } @@ -42,7 +42,7 @@ class OgressBankerDialogue(player: Player? = null) : core.game.dialogue.Dialogue player, NPCs.BALNEA_7047, "I do apologise, sir. We're temporarily unable to meet your banking needs.", - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, ).also { stage++ } 4 -> sendNPCDialogue( @@ -51,11 +51,11 @@ class OgressBankerDialogue(player: Player? = null) : core.game.dialogue.Dialogue "We'll be open as soon as we realize our customer experience goals " + "and can guarantee the high standards of service that you expect from all " + "branches of the Bank of Gielinor.", - core.game.dialogue.FacialExpression.NEUTRAL + FacialExpression.NEUTRAL ).also { stage++ } 5 -> playerl( - core.game.dialogue.FacialExpression.THINKING, + FacialExpression.THINKING, "What did you just say to me?" ).also { stage++ } @@ -63,11 +63,11 @@ class OgressBankerDialogue(player: Player? = null) : core.game.dialogue.Dialogue player, NPCs.BALNEA_7047, "We're closed until I can teach these wretched creatures some manners.", - core.game.dialogue.FacialExpression.ANNOYED + FacialExpression.ANNOYED ).also { stage++ } 7 -> playerl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Ah, right. Good luck with that." ).also { stage = END_DIALOGUE } } diff --git a/Server/src/main/content/region/kandarin/feldip/quest/chompybird/ChompyBirdDialogues.kt b/Server/src/main/content/region/kandarin/feldip/quest/chompybird/ChompyBirdDialogues.kt index 9fb338594..be7387f17 100644 --- a/Server/src/main/content/region/kandarin/feldip/quest/chompybird/ChompyBirdDialogues.kt +++ b/Server/src/main/content/region/kandarin/feldip/quest/chompybird/ChompyBirdDialogues.kt @@ -20,12 +20,12 @@ import core.game.node.entity.player.Player import core.game.node.entity.player.link.quest.Quest @Initializable -class RantzDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class RantzDialogue(player: Player? = null) : DialoguePlugin(player) { override fun getIds() : IntArray { return intArrayOf(NPCs.RANTZ_1010) } - override fun newInstance(player: Player?) : core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?) : DialoguePlugin { return RantzDialogue(player) } @@ -54,37 +54,37 @@ class RantzDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( override fun handle(componentId: Int, buttonId: Int) : Boolean { when(stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Creature done good, cooking da chompy. Maybe you wants a free hatsie? Rantz got lots of hatsies for chompy shooters.").also { stage++ } + 0 -> npcl(FacialExpression.OLD_NORMAL, "Creature done good, cooking da chompy. Maybe you wants a free hatsie? Rantz got lots of hatsies for chompy shooters.").also { stage++ } 1 -> options("What are these 'hatsies'?", "Okay, show me your 'hatsies'.", "No thanks.").also { stage++ } 2 -> when(buttonId) { - 1 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "What are these 'hatsies'?").also { stage = 3 } - 2 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Okay, show me your 'hatsies'.").also { stage = 100 } - 3 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "No thanks.").also { stage = END_DIALOGUE } + 1 -> playerl(FacialExpression.FRIENDLY, "What are these 'hatsies'?").also { stage = 3 } + 2 -> playerl(FacialExpression.FRIENDLY, "Okay, show me your 'hatsies'.").also { stage = 100 } + 3 -> playerl(FacialExpression.FRIENDLY, "No thanks.").also { stage = END_DIALOGUE } } - 3 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Creature stupid? Hatsies to wear on head, make you look good. Huh huh huh.").also { stage++ } - 4 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Ah, I see, you're offering me hats.").also { stage++ } - 5 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Dat's what Rantz said. You want hatsies or not?").also { stage = 1 } + 3 -> npcl(FacialExpression.OLD_NORMAL, "Creature stupid? Hatsies to wear on head, make you look good. Huh huh huh.").also { stage++ } + 4 -> playerl(FacialExpression.FRIENDLY, "Ah, I see, you're offering me hats.").also { stage++ } + 5 -> npcl(FacialExpression.OLD_NORMAL, "Dat's what Rantz said. You want hatsies or not?").also { stage = 1 } 100 -> { val hasBow = inInventory(player, Items.OGRE_BOW_2883) || inEquipment(player, Items.OGRE_BOW_2883) if (!hasBow) { - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Stupid creature. Me need bow to see how many chompy creature kill. Bring bow.") + npcl(FacialExpression.OLD_NORMAL, "Stupid creature. Me need bow to see how many chompy creature kill. Bring bow.") stage = 200 return true } val hats = ChompyHat.getApplicableHats(player) if (hats.isEmpty()) { - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Sorry, creature, no hatsies for you. Come back when kill more chompy.") + npcl(FacialExpression.OLD_NORMAL, "Sorry, creature, no hatsies for you. Come back when kill more chompy.") } else { val spaces = freeSlots(player) if (spaces < hats.size) { for (i in 0 until spaces) addItem(player, hats[i]) - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "There all hats you can fit, creature. Come back when have more room for hatsies.") + npcl(FacialExpression.OLD_NORMAL, "There all hats you can fit, creature. Come back when have more room for hatsies.") } else { for (hat in hats) addItem(player, hat) - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "There all hats, creature. Come back when kill more chompy. Unless you kill all chompy already.") + npcl(FacialExpression.OLD_NORMAL, "There all hats, creature. Come back when kill more chompy. Unless you kill all chompy already.") } } stage = END_DIALOGUE @@ -95,15 +95,15 @@ class RantzDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( Topic("Okay.", END_DIALOGUE) ) - 201 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Yes, creature?").also { stage++ } - 202 -> playerl(core.game.dialogue.FacialExpression.HALF_GUILTY, "I lost my bow.").also { stage++ } - 203 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Haha! Stupid creature! That okay, me can sell new one.").also { stage++ } - 204 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Really? How much?").also { stage++ } - 205 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Hmm.. let me think...").also { stage++ } + 201 -> npcl(FacialExpression.OLD_NORMAL, "Yes, creature?").also { stage++ } + 202 -> playerl(FacialExpression.HALF_GUILTY, "I lost my bow.").also { stage++ } + 203 -> npcl(FacialExpression.OLD_NORMAL, "Haha! Stupid creature! That okay, me can sell new one.").also { stage++ } + 204 -> playerl(FacialExpression.FRIENDLY, "Really? How much?").also { stage++ } + 205 -> npcl(FacialExpression.OLD_NORMAL, "Hmm.. let me think...").also { stage++ } 206 -> { val cost = RandomFunction.random(500,550) setAttribute(player, "/save:chompybird:new-bow-cost", cost) - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Me think $cost shiny coins be ok.") + npcl(FacialExpression.OLD_NORMAL, "Me think $cost shiny coins be ok.") stage++ } @@ -118,9 +118,9 @@ class RantzDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( 208 -> { if (removeItem(player, Item(Items.COINS_995, getAttribute(player, "chompybird:new-bow-cost", 500)))) { addItemOrDrop(player, Items.OGRE_BOW_2883) - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "There you go, creature, now hunt chompy.") + npcl(FacialExpression.OLD_NORMAL, "There you go, creature, now hunt chompy.") } else { - playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Actually, I can't afford it right now.") + playerl(FacialExpression.FRIENDLY, "Actually, I can't afford it right now.") } stage = END_DIALOGUE } @@ -130,12 +130,12 @@ class RantzDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( } @Initializable -class BugsDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class BugsDialogue(player: Player? = null) : DialoguePlugin(player) { override fun getIds() : IntArray { return intArrayOf(NPCs.BUGS_1012) } - override fun newInstance(player: Player?) : core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?) : DialoguePlugin { return BugsDialogue(player) } @@ -160,12 +160,12 @@ class BugsDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p } @Initializable -class FycieDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class FycieDialogue(player: Player? = null) : DialoguePlugin(player) { override fun getIds() : IntArray { return intArrayOf(NPCs.FYCIE_1011) } - override fun newInstance(player: Player?) : core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?) : DialoguePlugin { return FycieDialogue(player) } @@ -192,7 +192,7 @@ class FycieDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( class BugsChompyBirdDialogue(val quest: Quest) : DialogueFile() { override fun handle(componentId: Int, buttonId: Int) { when (quest.getStage(player)) { - in 0 until 20 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "You's better talk to Dad, him chasey sneaky da chompy.").also { stage = END_DIALOGUE } + in 0 until 20 -> npcl(FacialExpression.OLD_NORMAL, "You's better talk to Dad, him chasey sneaky da chompy.").also { stage = END_DIALOGUE } in 20 until 70 -> handleBellowsDialogue(player, buttonId) in 70 until 90 -> handleIngredientDialogue(player, buttonId) } @@ -201,14 +201,14 @@ class BugsChompyBirdDialogue(val quest: Quest) : DialogueFile() { private fun handleBellowsDialogue(player: Player?, buttonId: Int) { when(stage) { 0 -> playerl("Rantz said that you play with the fatsy toadies, what are they?").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Oh, we sometimes use da blower on da toadies but Dad don't let us get in da locked box no more. He he it was good fun making da toadies fat on da swamp gas.").also { stage = END_DIALOGUE } + 1 -> npcl(FacialExpression.OLD_NORMAL, "Oh, we sometimes use da blower on da toadies but Dad don't let us get in da locked box no more. He he it was good fun making da toadies fat on da swamp gas.").also { stage = END_DIALOGUE } } } private fun handleIngredientDialogue(player: Player?, buttonId: Int) { val bugsIngredient = getAttribute(player!!, ChompyBird.ATTR_ING_BUGS, -1) when(stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Dad say's you's making da chompy for us! Slurp! Me's has to have ${getItemName(bugsIngredient)} wiv mine! Chompy is our favourite yummms!").also { stage = END_DIALOGUE } + 0 -> npcl(FacialExpression.OLD_NORMAL, "Dad say's you's making da chompy for us! Slurp! Me's has to have ${getItemName(bugsIngredient)} wiv mine! Chompy is our favourite yummms!").also { stage = END_DIALOGUE } } setAttribute(player!!, ChompyBird.ATTR_BUGS_ASKED, true) } @@ -217,7 +217,7 @@ class BugsChompyBirdDialogue(val quest: Quest) : DialogueFile() { class FycieChompyBirdDialogue(val quest: Quest) : DialogueFile() { override fun handle(componentId: Int, buttonId: Int) { when (quest.getStage(player)) { - in 0 until 70 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "You's better talk to Dad, We not talk to wierdly 'umans.").also { stage = END_DIALOGUE } + in 0 until 70 -> npcl(FacialExpression.OLD_NORMAL, "You's better talk to Dad, We not talk to wierdly 'umans.").also { stage = END_DIALOGUE } in 70 until 90 -> handleIngredientDialogue(player, buttonId) } } @@ -225,7 +225,7 @@ class FycieChompyBirdDialogue(val quest: Quest) : DialogueFile() { private fun handleIngredientDialogue(player: Player?, buttonId: Int) { val fycieIngredient = getAttribute(player!!, ChompyBird.ATTR_ING_FYCIE, -1) when(stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Dad say's you's roasting da chompy for us! Slurp! Me's wants ${getItemName(fycieIngredient)} wiv mine! Yummy can't wait to eats it.").also { stage = END_DIALOGUE } + 0 -> npcl(FacialExpression.OLD_NORMAL, "Dad say's you's roasting da chompy for us! Slurp! Me's wants ${getItemName(fycieIngredient)} wiv mine! Yummy can't wait to eats it.").also { stage = END_DIALOGUE } } setAttribute(player!!, ChompyBird.ATTR_FYCIE_ASKED, true) } @@ -247,7 +247,7 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { private fun handleQuestStartDialogue(player: Player?, buttonId: Int) { when(stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Hey you creature! Make some stabbers! I wanna hunt da chompy?").also { stage++ } + 0 -> npcl(FacialExpression.OLD_NORMAL, "Hey you creature! Make some stabbers! I wanna hunt da chompy?").also { stage++ } 1 -> options("What are 'stabbers'?", "What's a 'chompy'?", "Ok, I'll make you some 'stabbers'.", "Er, make your own 'stabbers'!").also { stage++ } 2 -> when(buttonId) { 1 -> playerl("What are 'stabbers'?").also { stage = 3 } @@ -255,14 +255,14 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { 3 -> playerl("Ok, I'll make you some 'stabbers'.").also { stage = 10 } 4 -> playerl("Er, make your own 'stabbers'!").also { stage = END_DIALOGUE } } - 3 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "For da stabbie chucker, I's wanna hunt da chompy! Creature knows what Rantz wants... ...flyin' to stabbie da chompy!").also { stage++ } - 4 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "The ogre shows you a huge but crude bow and then starts to nod energetically in an effort to help you understand.").also { stage++ } + 3 -> npcl(FacialExpression.OLD_NORMAL, "For da stabbie chucker, I's wanna hunt da chompy! Creature knows what Rantz wants... ...flyin' to stabbie da chompy!").also { stage++ } + 4 -> npcl(FacialExpression.OLD_NORMAL, "The ogre shows you a huge but crude bow and then starts to nod energetically in an effort to help you understand.").also { stage++ } 5 -> playerl("I think I understand. You want me to make some arrows for you?").also { stage++ } - 6 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Yeah, is what Rantz sayed, make da stabbers for da stabby chucker!").also { stage = 1 } - 7 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Da chompy is der bestest yummies for Rantz, Fycie and Bugs! We's looking for da yummies all da time. Da chompy is a big flapper, Rantz want's stabbers to sneaky, sneaky, stick da chompy.").also { stage++ } + 6 -> npcl(FacialExpression.OLD_NORMAL, "Yeah, is what Rantz sayed, make da stabbers for da stabby chucker!").also { stage = 1 } + 7 -> npcl(FacialExpression.OLD_NORMAL, "Da chompy is der bestest yummies for Rantz, Fycie and Bugs! We's looking for da yummies all da time. Da chompy is a big flapper, Rantz want's stabbers to sneaky, sneaky, stick da chompy.").also { stage++ } 8 -> playerl("Ah, so 'da chompy' is some kind of bird?").also { stage++ } - 9 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Yeah, is what Rantz sayed, Da chompy is da big flapper and is bestest yummies. But Rantz needs stabbers to stick da chompy... Will creatures make dem stabbers for us?").also {stage = 1 } - 10 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Good you creature, you need sticksies from achey tree and stabbies from dog bones.").also { stage = END_DIALOGUE; quest.start(player) } + 9 -> npcl(FacialExpression.OLD_NORMAL, "Yeah, is what Rantz sayed, Da chompy is da big flapper and is bestest yummies. But Rantz needs stabbers to stick da chompy... Will creatures make dem stabbers for us?").also {stage = 1 } + 10 -> npcl(FacialExpression.OLD_NORMAL, "Good you creature, you need sticksies from achey tree and stabbies from dog bones.").also { stage = END_DIALOGUE; quest.start(player) } } } @@ -270,27 +270,27 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { val hasArrows = amountInInventory(player!!, Items.OGRE_ARROW_2866) > 0 when(stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Hey you creature... Have you made me da stabbers? I wanna stick da chompy?").also { stage++ } + 0 -> npcl(FacialExpression.OLD_NORMAL, "Hey you creature... Have you made me da stabbers? I wanna stick da chompy?").also { stage++ } 1 -> { if (!hasArrows) { playerl("Er not exactly?").also { stage++ } } else { - playerl(core.game.dialogue.FacialExpression.ANNOYED, "Well, yes actually, as you asked so nicely. Here you go! Here's your 'stabbers'.") + playerl(FacialExpression.ANNOYED, "Well, yes actually, as you asked so nicely. Here you go! Here's your 'stabbers'.") stage = 100 } } - 2 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "You do stabbers quick!...quick!.. Or Rantz make stabbers for Rantz and then practice for chompy sticking on creature!").also { stage++ } + 2 -> npcl(FacialExpression.OLD_NORMAL, "You do stabbers quick!...quick!.. Or Rantz make stabbers for Rantz and then practice for chompy sticking on creature!").also { stage++ } 3 -> options("How do I make the 'stabbers' again?", "Ok, I'll make the 'stabbers' for you.").also { stage++ } 4 -> when(buttonId) { 1 -> playerl("How do I make the 'stabbers' again?").also { stage = 5 } 2 -> playerl("Ok, I'll make the 'stabbers' for you.").also { stage = END_DIALOGUE } } - 5 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Grrr creature... you's no good stabber maker! You's make da stabbie bit from da dog bones, and get da sticksies from da Achey tree... simple see! Oh and da flufgies from da flappers as well!").also { stage++ } + 5 -> npcl(FacialExpression.OLD_NORMAL, "Grrr creature... you's no good stabber maker! You's make da stabbie bit from da dog bones, and get da sticksies from da Achey tree... simple see! Oh and da flufgies from da flappers as well!").also { stage++ } 6 -> playerl("Oh, so I need logs from the achey tree, bones from a canine... and feather?").also { stage++ } - 7 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Is just what Rantz sayed!").also { stage++ } - 8 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "The hulking ogre nods excitedly.").also { stage = END_DIALOGUE } + 7 -> npcl(FacialExpression.OLD_NORMAL, "Is just what Rantz sayed!").also { stage++ } + 8 -> npcl(FacialExpression.OLD_NORMAL, "The hulking ogre nods excitedly.").also { stage = END_DIALOGUE } 100 -> { sendItemDialogue(player!!, Item(Items.OGRE_ARROW_2866, 20), "Rantz takes six ogre arrows off you.") @@ -299,7 +299,7 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { } 101 -> { - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Ahh, der creature has dem...goodly, goodly. Now us can stick der chompy bird...") + npcl(FacialExpression.OLD_NORMAL, "Ahh, der creature has dem...goodly, goodly. Now us can stick der chompy bird...") stage = 4 //Skips to "How do we make the chompsys come?" in the dialogue below quest.setStage(player, 20) } @@ -310,8 +310,8 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { val hasToads = amountInInventory(player!!, Items.BLOATED_TOAD_2875) > 0 when(stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Hey you creature you still here?").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Da chompy still not coming! We need da fatsy toady to get da chompy, do you got it? Do you got da fatsy toady? Then we can sneaky, sneaky stick da chompy.").also { stage++ } + 0 -> npcl(FacialExpression.OLD_NORMAL, "Hey you creature you still here?").also { stage++ } + 1 -> npcl(FacialExpression.OLD_NORMAL, "Da chompy still not coming! We need da fatsy toady to get da chompy, do you got it? Do you got da fatsy toady? Then we can sneaky, sneaky stick da chompy.").also { stage++ } 2 -> { if (hasToads) { playerl("Yes, I have a 'fatsy toady' for you, here look!") @@ -320,7 +320,7 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { playerl("No I haven't got the 'fatsy toady' yet!").also { stage++ } } } - 3 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Dat's a pidy... but maybe Rantz can help da creature?").also { stage++ } + 3 -> npcl(FacialExpression.OLD_NORMAL, "Dat's a pidy... but maybe Rantz can help da creature?").also { stage++ } 4 -> options("How do we make the chompys come?", "What are 'fatsy toadies'?", "Where do we put the fatsy toadies?", "What do you mean 'sneaky..sneaky.. stick da chompy?'", "Ok, thanks.").also { stage++ } 5 -> when(buttonId) { 1 -> playerl("How do we make the chompys come?").also { stage = 6 } @@ -329,16 +329,16 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { 4 -> playerl("What do you mean 'sneaky..sneaky.. stick da chompy?'").also { stage = 12 } 5 -> playerl("Ok, thanks.").also { stage = END_DIALOGUE } } - 6 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Chompys love da fatsy toadies. Toadies get big on der swamp gas and der chomys are licking der lips for em as me is licking lips for da chompy. Da chompys don't like da smaller toadies from nearby swampy.").also { stage++ } - 7 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Dey's fussie eaters like Rantz. Fycie an Bugs play with toadies and blower dey's all times making fatsy toadies.").also { stage = 4 } - 8 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Fatsy toadies are da chompy burds bestest yumms. But da toadies here are too small for da chompy. You've godda make da toadies big and round!").also { stage = 4 } - 9 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Over der!").also { stage++ } - 10 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "The ogre points to a small clearing to da south.").also { stage++ } - 11 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Ok creature? You got dat? Over here by der no tree's place.").also { stage = 4 } - 12 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Duh! You creature is a bit stoopid yes? Us needs to sneaky, sneaky.. and stick da chompy! Den we can eat da chompy!").also { stage = 4 } + 6 -> npcl(FacialExpression.OLD_NORMAL, "Chompys love da fatsy toadies. Toadies get big on der swamp gas and der chomys are licking der lips for em as me is licking lips for da chompy. Da chompys don't like da smaller toadies from nearby swampy.").also { stage++ } + 7 -> npcl(FacialExpression.OLD_NORMAL, "Dey's fussie eaters like Rantz. Fycie an Bugs play with toadies and blower dey's all times making fatsy toadies.").also { stage = 4 } + 8 -> npcl(FacialExpression.OLD_NORMAL, "Fatsy toadies are da chompy burds bestest yumms. But da toadies here are too small for da chompy. You've godda make da toadies big and round!").also { stage = 4 } + 9 -> npcl(FacialExpression.OLD_NORMAL, "Over der!").also { stage++ } + 10 -> npcl(FacialExpression.OLD_NORMAL, "The ogre points to a small clearing to da south.").also { stage++ } + 11 -> npcl(FacialExpression.OLD_NORMAL, "Ok creature? You got dat? Over here by der no tree's place.").also { stage = 4 } + 12 -> npcl(FacialExpression.OLD_NORMAL, "Duh! You creature is a bit stoopid yes? Us needs to sneaky, sneaky.. and stick da chompy! Den we can eat da chompy!").also { stage = 4 } 100 -> sendItemDialogue(player!!, Items.BLOATED_TOAD_2875, "You show the bloated toad to Rantz. He nods with approval.").also { stage++ } - 101 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Dat's a good fatsy toady, now we's need to put it for da chompy to come.").also { stage++ } + 101 -> npcl(FacialExpression.OLD_NORMAL, "Dat's a good fatsy toady, now we's need to put it for da chompy to come.").also { stage++ } 102 -> { playerl("Where do I put the 'fatsy toadies'?").also { stage++ } quest.setStage(player, 30) @@ -348,7 +348,7 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { } private fun handlePlaceToadsiesDialogue(player: Player?, buttonId: Int) { - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Over 'dere creature, put da toadies over der! ~ The ogre points to a clearing to the south. ~") + npcl(FacialExpression.OLD_NORMAL, "Over 'dere creature, put da toadies over der! ~ The ogre points to a clearing to the south. ~") clearHintIcon(player!!) registerHintIcon(player!!, ChompyBird.TOAD_LOCATION, 5) //TODO: ADD OFFSETS WHEN WE UNFUCK ARIOS'S MISTAKES, YEET stage = END_DIALOGUE @@ -357,9 +357,9 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { private fun handlePlacedBaitDialogue(player: Player?, buttonId: Int) { when(stage) { 0 -> playerl("There you go, I've placed the bait.").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Goodz me now waits for da chompy! It shouldn't be long now. Sneaky...sneaky...").also { stage++ } + 1 -> npcl(FacialExpression.OLD_NORMAL, "Goodz me now waits for da chompy! It shouldn't be long now. Sneaky...sneaky...").also { stage++ } 2 -> playerl("Yes, I know...stick da chompy!").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Hey.. you's creature, is da fatsy toady still dere? Go get more fatsy toadies if dey all gone!").also { stage++ } + 3 -> npcl(FacialExpression.OLD_NORMAL, "Hey.. you's creature, is da fatsy toady still dere? Go get more fatsy toadies if dey all gone!").also { stage++ } 4 -> playerl("What? I have to get more bait if there's none there? Does this Chompy Bird even exist I wonder?").also { stage = END_DIALOGUE } } } @@ -367,19 +367,19 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { private fun handleRantzSucksDialogue(player: Player?, buttonId: Int) { when(stage) { 0 -> playerl("Hey there, you keep missing the chompy bird.").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "I knows, I keeps missing... because your stabbers are worserer at flying than a dead dog.").also { stage++ } + 1 -> npcl(FacialExpression.OLD_NORMAL, "I knows, I keeps missing... because your stabbers are worserer at flying than a dead dog.").also { stage++ } 2 -> options("Oh, keep trying then... you might hit one through pure luck.", "Come on, let me have a go...").also { stage++ } 3 -> when(buttonId) { 1 -> playerl("Oh, keep trying then... you might hit one through pure luck.").also { stage = END_DIALOGUE } 2 -> playerl("Come on, let me have a go...").also { stage = 4 } } - 4 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "No, is Rantz stabby thrower... you too weedy...").also { stage++ } + 4 -> npcl(FacialExpression.OLD_NORMAL, "No, is Rantz stabby thrower... you too weedy...").also { stage++ } 5 -> options("I'm actually quite strong... please let me try.", "Oh suit yourself, you'll just have to go hungry.").also { stage++ } 6 -> when(buttonId) { 1 -> playerl("I'm actually quite strong... please let me try.").also { stage = 7 } 2 -> playerl("Oh suit yourself, you'll just have to go hungry.").also { stage = END_DIALOGUE } } - 7 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Oh, ok... I lend you other stabby thrower... but creature don't better cry when it hurts itself.").also { stage++ } + 7 -> npcl(FacialExpression.OLD_NORMAL, "Oh, ok... I lend you other stabby thrower... but creature don't better cry when it hurts itself.").also { stage++ } 8 -> { sendItemDialogue(player!!, Items.OGRE_BOW_2883, "Rantz hands over an ogre bow. It's huge! You can barely drawn back the string!") addItemOrDrop(player!!, Items.OGRE_BOW_2883) @@ -396,7 +396,7 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { val rantzIngredient = getAttribute(player, ChompyBird.ATTR_ING_RANTZ, -1) when(stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Hey You! Got da chompy yet?").also { stage++ } + 0 -> npcl(FacialExpression.OLD_NORMAL, "Hey You! Got da chompy yet?").also { stage++ } 1 -> { if (hasChompyBird) { playerl("Yep, here's your chompy Bird!") @@ -405,14 +405,14 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { playerl("Not yet!").also { stage++ } } } - 2 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Well hurry up and get some, we is hungry!").also { stage = END_DIALOGUE } + 2 -> npcl(FacialExpression.OLD_NORMAL, "Well hurry up and get some, we is hungry!").also { stage = END_DIALOGUE } 100 -> sendItemDialogue(player!!, Items.RAW_CHOMPY_2876, "You show Rantz the freshly plucked chompy carcass.").also { stage++ } - 101 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Dat's a great chompy, you musta got a lucky shot wiv da stabbie chucker.").also { stage++ } - 102 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Okay's now you's needs to cook da chompy! Slurp! You's can cook it's over der! ~Rantz points to a nearby spit roast.~").also { stage++ } - 103 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "But's we's particular about our chompy yumms. Me's wants ${getItemName(rantzIngredient)} wiv mine! Fycie and Bugs want something wiv der's as well, go and ask 'em wat dey want.").also { stage++ } + 101 -> npcl(FacialExpression.OLD_NORMAL, "Dat's a great chompy, you musta got a lucky shot wiv da stabbie chucker.").also { stage++ } + 102 -> npcl(FacialExpression.OLD_NORMAL, "Okay's now you's needs to cook da chompy! Slurp! You's can cook it's over der! ~Rantz points to a nearby spit roast.~").also { stage++ } + 103 -> npcl(FacialExpression.OLD_NORMAL, "But's we's particular about our chompy yumms. Me's wants ${getItemName(rantzIngredient)} wiv mine! Fycie and Bugs want something wiv der's as well, go and ask 'em wat dey want.").also { stage++ } 104 -> playerl("What! Now I've got the chompy bird, you expect me to cook it as well?").also { stage++ } - 105 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Yep, da spit's over der! Last time Rantz did yummies, got very bad, did bad things to food.. and belly.").also { stage++ } + 105 -> npcl(FacialExpression.OLD_NORMAL, "Yep, da spit's over der! Last time Rantz did yummies, got very bad, did bad things to food.. and belly.").also { stage++ } 106 -> { playerl("HUH!").also { stage = END_DIALOGUE } quest.setStage(player, 70) @@ -424,7 +424,7 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { val hasCookedChompy = amountInInventory(player!!, Items.SEASONED_CHOMPY_2882) > 0 when (stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Hey You! Cook da chompy yet?").also { stage++ } + 0 -> npcl(FacialExpression.OLD_NORMAL, "Hey You! Cook da chompy yet?").also { stage++ } 1 -> { if (hasCookedChompy) { playerl("Yep, here you go, here's your cooked chompy bird.") @@ -433,11 +433,11 @@ class RantzChompyBirdDialogue(val quest: Quest) : DialogueFile() { playerl("Not yet!").also { stage++ } } } - 2 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Well hurry up, we is hungry!").also { stage = END_DIALOGUE } + 2 -> npcl(FacialExpression.OLD_NORMAL, "Well hurry up, we is hungry!").also { stage = END_DIALOGUE } 100 -> sendItemDialogue(player!!, Items.SEASONED_CHOMPY_2882, "You hand over the cooked chompy bird to Rantz.").also { stage++ } - 101 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Hey hey! We got da delicious chompy bird Yay! This looks really tasty as well!").also { stage++ } - 102 -> npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Tank's very much for da chompy... Fycie an Bugs like very much da chompy yumms!").also { stage++ } + 101 -> npcl(FacialExpression.OLD_NORMAL, "Hey hey! We got da delicious chompy bird Yay! This looks really tasty as well!").also { stage++ } + 102 -> npcl(FacialExpression.OLD_NORMAL, "Tank's very much for da chompy... Fycie an Bugs like very much da chompy yumms!").also { stage++ } 103 -> sendDialogue(player, "~The family of ogres sit down together~").also { stage++ } 104 -> sendDialogue(player, "~and enjoy your well cooked chompy bird.~").also { stage++ } 105 -> playerl("It's my pleasure!").also { stage = END_DIALOGUE; quest.finish(player) } diff --git a/Server/src/main/content/region/kandarin/gnomestronghold/dialogue/AluftGianneJrDialogue.kt b/Server/src/main/content/region/kandarin/gnomestronghold/dialogue/AluftGianneJrDialogue.kt index d9accfee9..685abce87 100644 --- a/Server/src/main/content/region/kandarin/gnomestronghold/dialogue/AluftGianneJrDialogue.kt +++ b/Server/src/main/content/region/kandarin/gnomestronghold/dialogue/AluftGianneJrDialogue.kt @@ -9,15 +9,15 @@ import core.game.node.entity.player.Player import core.plugin.Initializable @Initializable -class AluftGianneJrDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class AluftGianneJrDialogue(player: Player? = null) : DialoguePlugin(player) { var tutorialStage = -1 - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return AluftGianneJrDialogue(player) } override fun npc(vararg messages: String?): Component { - return super.npc(core.game.dialogue.FacialExpression.OLD_NORMAL,*messages) + return super.npc(FacialExpression.OLD_NORMAL,*messages) } override fun open(vararg args: Any?): Boolean { @@ -33,7 +33,7 @@ class AluftGianneJrDialogue(player: Player? = null) : core.game.dialogue.Dialogu override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> npc("Sure, go talk to my dad. I'll put","a good word in!").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.THINKING,"Th-thanks...?").also { stage++ } + 1 -> player(FacialExpression.THINKING,"Th-thanks...?").also { stage++ } 2 -> { end() player.setAttribute("/save:$GC_BASE_ATTRIBUTE:$GC_TUT_PROG",0) diff --git a/Server/src/main/content/region/kandarin/pisc/dialogue/ArnoldLydsporDialogue.kt b/Server/src/main/content/region/kandarin/pisc/dialogue/ArnoldLydsporDialogue.kt index cb048284c..1fd390535 100644 --- a/Server/src/main/content/region/kandarin/pisc/dialogue/ArnoldLydsporDialogue.kt +++ b/Server/src/main/content/region/kandarin/pisc/dialogue/ArnoldLydsporDialogue.kt @@ -20,36 +20,36 @@ import core.tools.START_DIALOGUE * @author vddCore */ @Initializable -class ArnoldLydsporDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class ArnoldLydsporDialogue(player: Player? = null) : DialoguePlugin(player) { override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { START_DIALOGUE -> npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Ah, you come back! What you want from Arnold, heh?" ).also { stage++ } 1 -> showTopics( IfTopic( - core.game.dialogue.FacialExpression.ASKING, + FacialExpression.ASKING, "Can you open my bank account, please?", 2, !hasIronmanRestriction(player, IronmanMode.ULTIMATE) ), IfTopic( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "I'd like to check my bank PIN settings.", 3, !hasIronmanRestriction(player, IronmanMode.ULTIMATE) ), IfTopic( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "I'd like to collect items.", 4, !hasIronmanRestriction(player, IronmanMode.ULTIMATE) ), - Topic(core.game.dialogue.FacialExpression.ASKING, "Would you like to trade?", 5), - Topic(core.game.dialogue.FacialExpression.FRIENDLY, "Nothing, I just came to chat.", 7) + Topic(FacialExpression.ASKING, "Would you like to trade?", 5), + Topic(FacialExpression.FRIENDLY, "Nothing, I just came to chat.", 7) ) 2 -> { @@ -68,7 +68,7 @@ class ArnoldLydsporDialogue(player: Player? = null) : core.game.dialogue.Dialogu } 5 -> npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Ja, I have wide range of stock..." ).also { stage++ } @@ -77,7 +77,7 @@ class ArnoldLydsporDialogue(player: Player? = null) : core.game.dialogue.Dialogu end() } - 7 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, + 7 -> npcl(FacialExpression.FRIENDLY, "Ah, that is nice - always I like to chat, but " + "Herr Caranos tell me to get back to work! " + "Here, you been nice, so have a present." @@ -93,17 +93,17 @@ class ArnoldLydsporDialogue(player: Player? = null) : core.game.dialogue.Dialogu } 9 -> playerl( - core.game.dialogue.FacialExpression.HALF_THINKING, + FacialExpression.HALF_THINKING, "A cabbage?" ).also { stage++ } 10 -> npcl( - core.game.dialogue.FacialExpression.HAPPY, + FacialExpression.HAPPY, "Ja, cabbage is good for you!" ).also { stage++ } 11 -> playerl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Um... Thanks!" ).also { stage = END_DIALOGUE } } diff --git a/Server/src/main/content/region/kandarin/quest/grandtree/BlackDemonCutscene.kt b/Server/src/main/content/region/kandarin/quest/grandtree/BlackDemonCutscene.kt index 05d62d989..cbab8e7bb 100644 --- a/Server/src/main/content/region/kandarin/quest/grandtree/BlackDemonCutscene.kt +++ b/Server/src/main/content/region/kandarin/quest/grandtree/BlackDemonCutscene.kt @@ -79,7 +79,7 @@ class BlackDemonCutscene(player: Player) : Cutscene(player) { } 11 -> { end{ - BlackDemonNPC(NPCs.BLACK_DEMON_677, Location.create(2485, 9864, 0)).init(); + BlackDemonNPC(NPCs.BLACK_DEMON_677, Location.create(2485, 9864, 0)).init() } } } diff --git a/Server/src/main/content/region/kandarin/quest/grandtree/CaptainErrdoDialogue.kt b/Server/src/main/content/region/kandarin/quest/grandtree/CaptainErrdoDialogue.kt index 2eac91105..1460a7399 100644 --- a/Server/src/main/content/region/kandarin/quest/grandtree/CaptainErrdoDialogue.kt +++ b/Server/src/main/content/region/kandarin/quest/grandtree/CaptainErrdoDialogue.kt @@ -58,7 +58,7 @@ class CaptainErrdoDialogue: DialogueFile(){ 1 -> npcl("If you wish.").also { stage = END_DIALOGUE player!!.interfaceManager.open(Component(138)) - Gliders.sendConfig(npc, player); + Gliders.sendConfig(npc, player) } } diff --git a/Server/src/main/content/region/kandarin/quest/grandtree/CharlieDialogue.kt b/Server/src/main/content/region/kandarin/quest/grandtree/CharlieDialogue.kt index df7f4965d..ea6390a47 100644 --- a/Server/src/main/content/region/kandarin/quest/grandtree/CharlieDialogue.kt +++ b/Server/src/main/content/region/kandarin/quest/grandtree/CharlieDialogue.kt @@ -60,7 +60,7 @@ class CharlieDialogue : DialogueFile() { when (count) { 0 -> { // Spawn in narnode - npc.init(); + npc.init() lock(player!!,10) forceWalk(npc, player!!.location.transform(Direction.EAST, 2), "SMART") } @@ -77,9 +77,9 @@ class CharlieDialogue : DialogueFile() { } 8 -> { unlock(player!!) - npc.clear(); + npc.clear() setQuestStage(player!!, questName, 55) - return true; + return true } } count++ diff --git a/Server/src/main/content/region/kandarin/quest/grandtree/ForemanNPC.kt b/Server/src/main/content/region/kandarin/quest/grandtree/ForemanNPC.kt index e4aa6e8c5..3bc92a2c0 100644 --- a/Server/src/main/content/region/kandarin/quest/grandtree/ForemanNPC.kt +++ b/Server/src/main/content/region/kandarin/quest/grandtree/ForemanNPC.kt @@ -32,7 +32,7 @@ class ForemanNPC(id: Int = 0, location: Location? = null) : AbstractNPC(id,locat override fun defineListeners() { on(this.ids, IntType.NPC, "talk-to"){ player, npc -> openDialogue(player, ForemanDialogue(), npc) - return@on true; + return@on true } } @@ -58,7 +58,7 @@ class ForemanDialogue: DialogueFile(){ 3 -> npcl("Right. Glough sent a human?").also { stage++ } 4 -> playerl("His gnomes are busy.").also { stage++ } 5 -> npcl("Hmm...in that case we'd better go to my office. Follow me.").also { - val foremanOffice = Location.create(2954, 3024, 0); + val foremanOffice = Location.create(2954, 3024, 0) GameWorld.Pulser.submit(object : Pulse(0) { var count = 0 override fun pulse(): Boolean { @@ -78,7 +78,7 @@ class ForemanDialogue: DialogueFile(){ return false } }) - stage++; + stage++ } 6 -> npcl("Tell me again why you're here.").also { stage++ } 7 -> playerl("Er...Glough sent me?").also { stage++ } diff --git a/Server/src/main/content/region/kandarin/quest/grandtree/GloughDialogue.kt b/Server/src/main/content/region/kandarin/quest/grandtree/GloughDialogue.kt index 2b19ae4ff..5b538b8d4 100644 --- a/Server/src/main/content/region/kandarin/quest/grandtree/GloughDialogue.kt +++ b/Server/src/main/content/region/kandarin/quest/grandtree/GloughDialogue.kt @@ -44,13 +44,13 @@ class GloughDialogue : DialogueFile() { var count = 0 val npc = NPC.create(163,Location.create(2477, 3462, 1), null) val ladderClimbAnimation = Animation(828) - val cell = Location.create(2464, 3496, 3); + val cell = Location.create(2464, 3496, 3) override fun pulse(): Boolean { when (count) { 0 -> { // Spawn in the gnome guard lock(player!!, 10) - npc.init(); + npc.init() forceWalk(npc, player!!.location.transform(Direction.WEST,2), "SMART") player!!.dialogueInterpreter.sendDialogues(npc, FacialExpression.ANNOYED, "Come with me!") } @@ -69,11 +69,11 @@ class GloughDialogue : DialogueFile() { player!!.animator.animate(ladderClimbAnimation) } 8 -> { - npc.clear(); + npc.clear() setQuestStage(player!!, questName, 50) teleport(player!!, cell) player!!.unlock() - return true; + return true } } count++ diff --git a/Server/src/main/content/region/kandarin/quest/grandtree/KingNarnodeDialogue.kt b/Server/src/main/content/region/kandarin/quest/grandtree/KingNarnodeDialogue.kt index 558e06571..333022cbd 100644 --- a/Server/src/main/content/region/kandarin/quest/grandtree/KingNarnodeDialogue.kt +++ b/Server/src/main/content/region/kandarin/quest/grandtree/KingNarnodeDialogue.kt @@ -21,10 +21,10 @@ import org.rs09.consts.NPCs class KingNarnodeDialogue : DialogueFile() { - val trapdoorLocation = Location(2464,3497,0); + val trapdoorLocation = Location(2464,3497,0) val closedTrapDoor = Scenery(2446, Location(2463,3497,0), 22, 0) val openedTrapDoor = Scenery(2445, Location(2463,3497,0), 22, 0) - val tunnels = Location(2464, 9897, 0); + val tunnels = Location(2464, 9897, 0) val ladderClimbAnimation = Animation(828) fun leadDownLadder(){ @@ -49,8 +49,8 @@ class KingNarnodeDialogue : DialogueFile() { player!!.animator.animate(ladderClimbAnimation) } 5 -> { - teleport(player!!, tunnels); - npc!!.pulseManager.clear(); + teleport(player!!, tunnels) + npc!!.pulseManager.clear() } 7 -> { // We are now underground @@ -59,7 +59,7 @@ class KingNarnodeDialogue : DialogueFile() { unlock(player!!) openDialogue(player!!, KingNarnodeUnderGroundDialogue(), undergroundNarnode) } - 10 -> return true; + 10 -> return true } count++ return false @@ -81,7 +81,7 @@ class KingNarnodeDialogue : DialogueFile() { 5 -> npcl("Traveller, can I speak to you in strictest confidence?").also { stage++ } 6 -> playerl("Of course sire.").also { stage++ } 7 -> npcl("Not here, follow me.").also { - stage = END_DIALOGUE; + stage = END_DIALOGUE // Animate Narnode to walk to the trapdoor and climb the ladder leadDownLadder() } @@ -100,10 +100,10 @@ class KingNarnodeDialogue : DialogueFile() { if(!player!!.hasItem(Item(Items.TRANSLATION_BOOK_784))) { addItemOrDrop(player!!,Items.TRANSLATION_BOOK_784) } - stage = END_DIALOGUE; + stage = END_DIALOGUE } else { npcl("Traveller, any word from Hazelmere?") - stage++; + stage++ } } 1 -> playerl("Not yet.").also { stage = END_DIALOGUE } @@ -371,8 +371,8 @@ class KingNarnodeUnderGroundDialogue : DialogueFile() { player!!.animator.animate(ladderClimbAnimation) } 5 -> { - teleport(player!!, ladderExit); - npc!!.pulseManager.clear(); + teleport(player!!, ladderExit) + npc!!.pulseManager.clear() unlock(player!!) } 10 -> return true @@ -466,7 +466,7 @@ class KingNarnodeUnderGroundDialogue : DialogueFile() { 17 -> npcl("I'll show you the way back up.").also { stage++ } 18 -> { npcl("Up here.") - leadUpLadder(); + leadUpLadder() stage = END_DIALOGUE } @@ -497,7 +497,7 @@ class KingNarnodeUnderGroundDialogue : DialogueFile() { setQuestStage(player!!, questName, 10) addItemOrDrop(player!!, Items.BARK_SAMPLE_783) addItemOrDrop(player!!, Items.TRANSLATION_BOOK_784) - leadUpLadder(); + leadUpLadder() } else { npcl("You don't have inventory space for my book or the bark! Clear some space and speak to me again") }.also { stage = END_DIALOGUE } diff --git a/Server/src/main/content/region/kandarin/seers/dialogue/FionellaDialogue.kt b/Server/src/main/content/region/kandarin/seers/dialogue/FionellaDialogue.kt index fbdc2faa7..ea78bf714 100644 --- a/Server/src/main/content/region/kandarin/seers/dialogue/FionellaDialogue.kt +++ b/Server/src/main/content/region/kandarin/seers/dialogue/FionellaDialogue.kt @@ -13,11 +13,11 @@ import org.rs09.consts.NPCs */ @Initializable -class FionellaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FionellaDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Can I help you at all?").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"Can I help you at all?").also { stage = 0 } return true } @@ -30,15 +30,15 @@ class FionellaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug 1 -> when(buttonId){ 1 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Yes please. What are you selling?").also { stage = 10 } + player(FacialExpression.FRIENDLY, "Yes please. What are you selling?").also { stage = 10 } } 2 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 } + player(FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 } } } - 10 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Take a look.").also { stage = 100 } + 10 -> npc(FacialExpression.FRIENDLY, "Take a look.").also { stage = 100 } 99 -> end() 100 -> end().also { npc.openShop(player) } @@ -46,7 +46,7 @@ class FionellaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FionellaDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/seers/dialogue/GeoffreyDialogue.kt b/Server/src/main/content/region/kandarin/seers/dialogue/GeoffreyDialogue.kt index 944e3c7df..87eac97a9 100644 --- a/Server/src/main/content/region/kandarin/seers/dialogue/GeoffreyDialogue.kt +++ b/Server/src/main/content/region/kandarin/seers/dialogue/GeoffreyDialogue.kt @@ -9,7 +9,7 @@ import core.plugin.Initializable import org.rs09.consts.Items @Initializable -class GeoffreyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class GeoffreyDialogue(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { val diary = player.achievementDiaryManager.getDiary(DiaryType.SEERS_VILLAGE) if (diary.levelRewarded.any()) { @@ -38,7 +38,7 @@ class GeoffreyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return GeoffreyDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/seers/dialogue/LegendsGuardDialogue.kt b/Server/src/main/content/region/kandarin/seers/dialogue/LegendsGuardDialogue.kt index c12725198..8cacba296 100644 --- a/Server/src/main/content/region/kandarin/seers/dialogue/LegendsGuardDialogue.kt +++ b/Server/src/main/content/region/kandarin/seers/dialogue/LegendsGuardDialogue.kt @@ -11,33 +11,33 @@ import core.plugin.Initializable * @author qmqz */ @Initializable -class LegendsGuardDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class LegendsGuardDialogue(player: Player? = null) : DialoguePlugin(player){ fun gender (male : String = "sir", female : String = "madam") = if (player.isMale) male else female override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"! ! ! Attention ! ! !") + npc(FacialExpression.FRIENDLY,"! ! ! Attention ! ! !") stage = 0 return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.FRIENDLY,"Legends Guild Member Approaching").also { stage++ } - 1 -> npc(core.game.dialogue.FacialExpression.FRIENDLY,"Welcome "+ gender() + "!", "I hope you enjoy your time in the Legends Guild.").also { stage = 99 } + 0 -> npc(FacialExpression.FRIENDLY,"Legends Guild Member Approaching").also { stage++ } + 1 -> npc(FacialExpression.FRIENDLY,"Welcome "+ gender() + "!", "I hope you enjoy your time in the Legends Guild.").also { stage = 99 } //while doing legend's quest - 10 -> npc(core.game.dialogue.FacialExpression.FRIENDLY,"I hope the quest is going well " + gender() + ".").also { stage = 99 } + 10 -> npc(FacialExpression.FRIENDLY,"I hope the quest is going well " + gender() + ".").also { stage = 99 } //after the legend's quest is done - 20 -> npc(core.game.dialogue.FacialExpression.FRIENDLY,"Legends Guild Member Approaching!").also { stage = 99 } + 20 -> npc(FacialExpression.FRIENDLY,"Legends Guild Member Approaching!").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return LegendsGuardDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop/BatteredBookHandler.kt b/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop/BatteredBookHandler.kt index ec157b031..4e3854225 100644 --- a/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop/BatteredBookHandler.kt +++ b/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop/BatteredBookHandler.kt @@ -17,7 +17,7 @@ class BatteredBookHandler : InteractionListener { companion object { private val TITLE = "Book of the elemental shield" - private val CONTENTS = EWUtils.PAGES; + private val CONTENTS = EWUtils.PAGES private fun display(player:Player, pageNum: Int, buttonID: Int) : Boolean { BookInterface.pageSetup(player, BookInterface.FANCY_BOOK_3_49, TITLE, CONTENTS) diff --git a/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop/SlashedBookHandler.kt b/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop/SlashedBookHandler.kt index 9c10a3cb1..01f24b0e6 100644 --- a/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop/SlashedBookHandler.kt +++ b/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop/SlashedBookHandler.kt @@ -1,7 +1,6 @@ package content.region.kandarin.seers.quest.elementalworkshop import content.global.handlers.iface.BookInterface -import core.api.setAttribute import core.game.interaction.IntType import core.game.interaction.InteractionListener import core.game.node.entity.player.Player @@ -15,7 +14,7 @@ import org.rs09.consts.Items class SlashedBookHandler : InteractionListener { companion object { private val TITLE = "Book of the elemental shield" - private val CONTENTS = EWUtils.PAGES; + private val CONTENTS = EWUtils.PAGES private fun display(player:Player, pageNum: Int, buttonID: Int) : Boolean { BookInterface.pageSetup(player, BookInterface.FANCY_BOOK_3_49, TITLE, CONTENTS) diff --git a/Server/src/main/content/region/kandarin/seers/quest/merlinsquest/ArheinMCDialogue.kt b/Server/src/main/content/region/kandarin/seers/quest/merlinsquest/ArheinMCDialogue.kt index a4d4cf715..c59014ec4 100644 --- a/Server/src/main/content/region/kandarin/seers/quest/merlinsquest/ArheinMCDialogue.kt +++ b/Server/src/main/content/region/kandarin/seers/quest/merlinsquest/ArheinMCDialogue.kt @@ -16,9 +16,9 @@ import core.tools.START_DIALOGUE class ArheinMCDialogue (val questStage: Int) : DialogueFile() { override fun handle(componentID: Int, buttonID: Int) { when (stage) { - START_DIALOGUE -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Can you drop me off on the way down please?").also { stage++ } + START_DIALOGUE -> playerl(FacialExpression.NEUTRAL, "Can you drop me off on the way down please?").also { stage++ } 1 -> { - npcl(core.game.dialogue.FacialExpression.ANNOYED,"I don't think Sir Mordred would like that. He wants as few outsiders visiting as possible. I wouldn't want to lose his business.") + npcl(FacialExpression.ANNOYED,"I don't think Sir Mordred would like that. He wants as few outsiders visiting as possible. I wouldn't want to lose his business.") val quest = player!!.questRepository.getQuest("Merlin's Crystal") player!!.questRepository.setStage(quest, 40) stage = END_DIALOGUE diff --git a/Server/src/main/content/region/kandarin/seers/quest/merlinsquest/TheLadyOfTheLake.kt b/Server/src/main/content/region/kandarin/seers/quest/merlinsquest/TheLadyOfTheLake.kt index 2489694e0..c20b25b54 100644 --- a/Server/src/main/content/region/kandarin/seers/quest/merlinsquest/TheLadyOfTheLake.kt +++ b/Server/src/main/content/region/kandarin/seers/quest/merlinsquest/TheLadyOfTheLake.kt @@ -15,7 +15,7 @@ import org.rs09.consts.Items * @author Splinter * @author pain */ -class TheLadyOfTheLake(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class TheLadyOfTheLake(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any): Boolean { npc = args[0] as NPC @@ -24,7 +24,7 @@ class TheLadyOfTheLake(player: Player? = null) : core.game.dialogue.DialoguePlug 0 } else if(player.achievementDiaryManager.getDiary(DiaryType.SEERS_VILLAGE).isComplete(2) && player.equipment.contains(14631,1) && player.equipment.contains(35,1)){ - npcl(core.game.dialogue.FacialExpression.HAPPY,"I am the Lady of the Lake.") + npcl(FacialExpression.HAPPY,"I am the Lady of the Lake.") 110 } else { @@ -49,7 +49,7 @@ class TheLadyOfTheLake(player: Player? = null) : core.game.dialogue.DialoguePlug } 3 -> player("Good day.").also { stage = 10000 } } - 100 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I am the Lady of the Lake.").also { stage = 145 } + 100 -> npcl(FacialExpression.HAPPY,"I am the Lady of the Lake.").also { stage = 145 } 110 -> player("And I'm-").also { stage++ } 111 -> npc( "You're " + player.name + ". And I see from the sign you", @@ -143,7 +143,7 @@ class TheLadyOfTheLake(player: Player? = null) : core.game.dialogue.DialoguePlug return true } - override fun newInstance(player: Player): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player): DialoguePlugin { return TheLadyOfTheLake(player) } diff --git a/Server/src/main/content/region/kandarin/witchhaven/dialogue/BrotherMaledictDialogue.kt b/Server/src/main/content/region/kandarin/witchhaven/dialogue/BrotherMaledictDialogue.kt index 17c70f0bd..72e26afca 100644 --- a/Server/src/main/content/region/kandarin/witchhaven/dialogue/BrotherMaledictDialogue.kt +++ b/Server/src/main/content/region/kandarin/witchhaven/dialogue/BrotherMaledictDialogue.kt @@ -13,11 +13,11 @@ import org.rs09.consts.NPCs */ @Initializable -class BrotherMaledictDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class BrotherMaledictDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"The blessings of Saradomin be with you child.").also { stage = 99 } + npc(FacialExpression.FRIENDLY,"The blessings of Saradomin be with you child.").also { stage = 99 } return true } @@ -28,7 +28,7 @@ class BrotherMaledictDialogue(player: Player? = null) : core.game.dialogue.Dialo return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return BrotherMaledictDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/witchhaven/dialogue/CarolineDialogue.kt b/Server/src/main/content/region/kandarin/witchhaven/dialogue/CarolineDialogue.kt index 86ca9527d..477aa8020 100644 --- a/Server/src/main/content/region/kandarin/witchhaven/dialogue/CarolineDialogue.kt +++ b/Server/src/main/content/region/kandarin/witchhaven/dialogue/CarolineDialogue.kt @@ -12,26 +12,26 @@ import org.rs09.consts.NPCs */ @Initializable -class CarolineDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class CarolineDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello again.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello again.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Hello traveller, how are you?").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Not bad thanks, yourself?").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I'm good. Busy as always looking after Kent and Kennith but no complaints.").also { stage = 99 } + 0 -> npc(FacialExpression.FRIENDLY, "Hello traveller, how are you?").also { stage++ } + 1 -> player(FacialExpression.FRIENDLY, "Not bad thanks, yourself?").also { stage++ } + 2 -> npcl(FacialExpression.FRIENDLY, "I'm good. Busy as always looking after Kent and Kennith but no complaints.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return CarolineDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/witchhaven/dialogue/ColONiallDialogue.kt b/Server/src/main/content/region/kandarin/witchhaven/dialogue/ColONiallDialogue.kt index 9ed6feb21..5dddfe275 100644 --- a/Server/src/main/content/region/kandarin/witchhaven/dialogue/ColONiallDialogue.kt +++ b/Server/src/main/content/region/kandarin/witchhaven/dialogue/ColONiallDialogue.kt @@ -13,40 +13,40 @@ import org.rs09.consts.NPCs */ @Initializable -class ColONiallDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ColONiallDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Hello. What can I do for you?").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Oh, I'm just wondering what you're doing.").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "A spot of fishing.").also { stage++ } - 3 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "That doesn't look much like a fishing rod.").also { stage++ } - 4 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "That my friend, depends on what you're fishing for.").also { stage++ } - 5 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "And what would that be?").also { stage++ } - 6 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "A little of this, a little of that; the usual things.").also { stage++ } - 7 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Have you caught much?").also { stage++ } - 8 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "The odd bite here and there. Hmm.").also { stage++ } - 9 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "What?").also { stage++ } - 10 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "You look like a capable lad. Tell you what, when you've got a bit more experience under your belt, get yourself over to Falador.").also { stage++ } - 11 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "What's in Falador?").also { stage++ } - 12 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "An old friend of mine. You'll find him sitting on a bench in Falador Park. See what he can do for you.").also { stage++ } - 13 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "What's his name? Who should I say sent me?").also { stage++ } - 14 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "None of that matters if you can find him and if you're ready my name isn't necessary.").also { stage++ } - 15 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Oh right. I'll get going then. Goodbye.").also { stage++ } - 16 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Goodbye and good luck.").also { stage = 99 } + 0 -> npc(FacialExpression.FRIENDLY, "Hello. What can I do for you?").also { stage++ } + 1 -> player(FacialExpression.FRIENDLY, "Oh, I'm just wondering what you're doing.").also { stage++ } + 2 -> npc(FacialExpression.FRIENDLY, "A spot of fishing.").also { stage++ } + 3 -> player(FacialExpression.FRIENDLY, "That doesn't look much like a fishing rod.").also { stage++ } + 4 -> npc(FacialExpression.FRIENDLY, "That my friend, depends on what you're fishing for.").also { stage++ } + 5 -> player(FacialExpression.FRIENDLY, "And what would that be?").also { stage++ } + 6 -> npcl(FacialExpression.FRIENDLY, "A little of this, a little of that; the usual things.").also { stage++ } + 7 -> player(FacialExpression.FRIENDLY, "Have you caught much?").also { stage++ } + 8 -> npc(FacialExpression.FRIENDLY, "The odd bite here and there. Hmm.").also { stage++ } + 9 -> player(FacialExpression.FRIENDLY, "What?").also { stage++ } + 10 -> npcl(FacialExpression.FRIENDLY, "You look like a capable lad. Tell you what, when you've got a bit more experience under your belt, get yourself over to Falador.").also { stage++ } + 11 -> player(FacialExpression.FRIENDLY, "What's in Falador?").also { stage++ } + 12 -> npcl(FacialExpression.FRIENDLY, "An old friend of mine. You'll find him sitting on a bench in Falador Park. See what he can do for you.").also { stage++ } + 13 -> player(FacialExpression.FRIENDLY, "What's his name? Who should I say sent me?").also { stage++ } + 14 -> npcl(FacialExpression.FRIENDLY, "None of that matters if you can find him and if you're ready my name isn't necessary.").also { stage++ } + 15 -> player(FacialExpression.FRIENDLY, "Oh right. I'll get going then. Goodbye.").also { stage++ } + 16 -> npc(FacialExpression.FRIENDLY, "Goodbye and good luck.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ColONiallDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/witchhaven/dialogue/EzekialLovecraftDialogue.kt b/Server/src/main/content/region/kandarin/witchhaven/dialogue/EzekialLovecraftDialogue.kt index 4d3ab3772..4f9c68fbe 100644 --- a/Server/src/main/content/region/kandarin/witchhaven/dialogue/EzekialLovecraftDialogue.kt +++ b/Server/src/main/content/region/kandarin/witchhaven/dialogue/EzekialLovecraftDialogue.kt @@ -13,11 +13,11 @@ import org.rs09.consts.NPCs */ @Initializable -class EzekialLovecraftDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class EzekialLovecraftDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Well hello there; welcome to our little village. Pray, stay awhile.").also { stage = 0 } + npcl(FacialExpression.FRIENDLY,"Well hello there; welcome to our little village. Pray, stay awhile.").also { stage = 0 } return true } @@ -26,26 +26,26 @@ class EzekialLovecraftDialogue(player: Player? = null) : core.game.dialogue.Dial 0 -> options("What do you do here?", "Can I buy some fishing supplies please?", "You are a bit too strange for me. Bye.").also { stage++ } 1 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.ASKING, "What do you do here?").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.HALF_ASKING, "Can I buy some fishing supplies please?").also { stage = 25 } - 3 -> player(core.game.dialogue.FacialExpression.ANNOYED, "You are a bit too strange for me. Bye.").also { stage = 30 } + 1 -> player(FacialExpression.ASKING, "What do you do here?").also { stage = 10 } + 2 -> player(FacialExpression.HALF_ASKING, "Can I buy some fishing supplies please?").also { stage = 25 } + 3 -> player(FacialExpression.ANNOYED, "You are a bit too strange for me. Bye.").also { stage = 30 } } - 10 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I supply the local fishermen with the tools and bait they need to do their job.").also { stage++ } - 11 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Interesting. Have you been doing it long?").also { stage++ } - 12 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Why yes, all of my life. I took over from my father, who inherited the business from his father and so on. In fact, there have been Lovecraft's selling bait for over ten generations.").also { stage++ } - 13 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Wow, that's some lineage.").also { stage++ } - 14 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "Oh yes, we have a long and interesting family history. For one reason or another the Lovecraft's have always been bait sellers or writers.").also { stage++ } - 15 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Hmm, yes well. I'm sure it's all fascinating, but I...").also { stage++ } - 16 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Oh very, very fascinating, for instance my great grandfather Howard...").also { stage++ } - 17 -> playerl(core.game.dialogue.FacialExpression.HALF_ROLLING_EYES, "Yawn. Oh, I'm sorry but I really must be getting on. I think my giraffe needs feeding.").also { stage++ } - 18 -> npc(core.game.dialogue.FacialExpression.HALF_ASKING, "Your?").also { stage++ } - 19 -> playerl(core.game.dialogue.FacialExpression.ANNOYED, "Giraffe. Sorry, but he gets cranky without enough sugar. Bye now!").also { stage++ } - 20 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Oh right, goodbye.").also { stage = 99 } + 10 -> npcl(FacialExpression.FRIENDLY, "I supply the local fishermen with the tools and bait they need to do their job.").also { stage++ } + 11 -> player(FacialExpression.FRIENDLY, "Interesting. Have you been doing it long?").also { stage++ } + 12 -> npcl(FacialExpression.FRIENDLY, "Why yes, all of my life. I took over from my father, who inherited the business from his father and so on. In fact, there have been Lovecraft's selling bait for over ten generations.").also { stage++ } + 13 -> player(FacialExpression.FRIENDLY, "Wow, that's some lineage.").also { stage++ } + 14 -> npcl(FacialExpression.LAUGH, "Oh yes, we have a long and interesting family history. For one reason or another the Lovecraft's have always been bait sellers or writers.").also { stage++ } + 15 -> playerl(FacialExpression.FRIENDLY, "Hmm, yes well. I'm sure it's all fascinating, but I...").also { stage++ } + 16 -> npcl(FacialExpression.FRIENDLY, "Oh very, very fascinating, for instance my great grandfather Howard...").also { stage++ } + 17 -> playerl(FacialExpression.HALF_ROLLING_EYES, "Yawn. Oh, I'm sorry but I really must be getting on. I think my giraffe needs feeding.").also { stage++ } + 18 -> npc(FacialExpression.HALF_ASKING, "Your?").also { stage++ } + 19 -> playerl(FacialExpression.ANNOYED, "Giraffe. Sorry, but he gets cranky without enough sugar. Bye now!").also { stage++ } + 20 -> npc(FacialExpression.FRIENDLY, "Oh right, goodbye.").also { stage = 99 } 25 -> end().also { npc.openShop(player) } - 30 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Sniff. Yes, everyone says that.").also { stage = 99 } + 30 -> npc(FacialExpression.FRIENDLY, "Sniff. Yes, everyone says that.").also { stage = 99 } @@ -54,7 +54,7 @@ class EzekialLovecraftDialogue(player: Player? = null) : core.game.dialogue.Dial return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return EzekialLovecraftDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/witchhaven/dialogue/HolgartDialogue.kt b/Server/src/main/content/region/kandarin/witchhaven/dialogue/HolgartDialogue.kt index 83c827b9f..4d99bdf08 100644 --- a/Server/src/main/content/region/kandarin/witchhaven/dialogue/HolgartDialogue.kt +++ b/Server/src/main/content/region/kandarin/witchhaven/dialogue/HolgartDialogue.kt @@ -12,28 +12,28 @@ import org.rs09.consts.NPCs */ @Initializable -class HolgartDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class HolgartDialogue(player: Player? = null) : DialoguePlugin(player){ fun gender (male : String = "sir", female : String = "madam") = if (player.isMale) male else female override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Well hello " + gender() + ", beautiful day isn't it?").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Not bad I suppose.").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Just smell that sea air... beautiful.").also { stage++ } - 3 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Hmm... lovely...").also { stage = 99 } + 0 -> npc(FacialExpression.FRIENDLY, "Well hello " + gender() + ", beautiful day isn't it?").also { stage++ } + 1 -> player(FacialExpression.FRIENDLY, "Not bad I suppose.").also { stage++ } + 2 -> npc(FacialExpression.FRIENDLY, "Just smell that sea air... beautiful.").also { stage++ } + 3 -> player(FacialExpression.FRIENDLY, "Hmm... lovely...").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return HolgartDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/witchhaven/dialogue/JebDialogue.kt b/Server/src/main/content/region/kandarin/witchhaven/dialogue/JebDialogue.kt index c750ebf71..970d61f4d 100644 --- a/Server/src/main/content/region/kandarin/witchhaven/dialogue/JebDialogue.kt +++ b/Server/src/main/content/region/kandarin/witchhaven/dialogue/JebDialogue.kt @@ -13,11 +13,11 @@ import org.rs09.consts.NPCs */ @Initializable -class JebDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class JebDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there.").also { stage = 99 } + npc(FacialExpression.FRIENDLY,"Hello there.").also { stage = 99 } return true } @@ -28,7 +28,7 @@ class JebDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(pl return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return JebDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/witchhaven/dialogue/MayorHobbDialogue.kt b/Server/src/main/content/region/kandarin/witchhaven/dialogue/MayorHobbDialogue.kt index d1367e81e..dafb2f88f 100644 --- a/Server/src/main/content/region/kandarin/witchhaven/dialogue/MayorHobbDialogue.kt +++ b/Server/src/main/content/region/kandarin/witchhaven/dialogue/MayorHobbDialogue.kt @@ -13,11 +13,11 @@ import org.rs09.consts.NPCs */ @Initializable -class MayorHobbDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class MayorHobbDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Well hello there; welcome to our little village. Pray, stay awhile.").also { stage = 99 } + npcl(FacialExpression.FRIENDLY,"Well hello there; welcome to our little village. Pray, stay awhile.").also { stage = 99 } return true } @@ -28,7 +28,7 @@ class MayorHobbDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return MayorHobbDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/witchhaven/dialogue/WitchhavenVillageDialogue.kt b/Server/src/main/content/region/kandarin/witchhaven/dialogue/WitchhavenVillageDialogue.kt index 68f9b6d42..38b0f00e8 100644 --- a/Server/src/main/content/region/kandarin/witchhaven/dialogue/WitchhavenVillageDialogue.kt +++ b/Server/src/main/content/region/kandarin/witchhaven/dialogue/WitchhavenVillageDialogue.kt @@ -12,13 +12,13 @@ import org.rs09.consts.NPCs */ @Initializable -class WitchhavenVillageDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class WitchhavenVillageDialogue(player: Player? = null) : DialoguePlugin(player){ private val conversations = arrayOf (0, 7, 11, 19, 24) override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hello there.").also { stage = conversations.random() } + player(FacialExpression.FRIENDLY, "Hello there.").also { stage = conversations.random() } return true } @@ -26,39 +26,39 @@ class WitchhavenVillageDialogue(player: Player? = null) : core.game.dialogue.Dia when(stage){ 0 -> sendDialogue("Their eyes are staring vacantly into space.").also { stage++ } - 1 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "Ye mariners all, as ye pass by,").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "Come in and drink if you are dry,").also { stage++ } - 3 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "Come spend, me lads, your money brisk,").also { stage++ } - 4 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "And pop your nose in a jug of this.").also { stage++ } - 5 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "You're not fooling anyone you know.").also { stage++ } - 6 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "We fooled you easily enough.").also { stage = 99 } + 1 -> npc(FacialExpression.NEUTRAL, "Ye mariners all, as ye pass by,").also { stage++ } + 2 -> npc(FacialExpression.NEUTRAL, "Come in and drink if you are dry,").also { stage++ } + 3 -> npc(FacialExpression.NEUTRAL, "Come spend, me lads, your money brisk,").also { stage++ } + 4 -> npc(FacialExpression.NEUTRAL, "And pop your nose in a jug of this.").also { stage++ } + 5 -> player(FacialExpression.NEUTRAL, "You're not fooling anyone you know.").also { stage++ } + 6 -> npc(FacialExpression.NEUTRAL, "We fooled you easily enough.").also { stage = 99 } 7 -> sendDialogue("Their eyes are staring vacantly into space.").also { stage++ } - 8 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "Free. She is free...").also { stage++ } - 9 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "What?").also { stage++ } - 10 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "The mother is free.").also { stage = 99 } + 8 -> npc(FacialExpression.NEUTRAL, "Free. She is free...").also { stage++ } + 9 -> player(FacialExpression.NEUTRAL, "What?").also { stage++ } + 10 -> npc(FacialExpression.NEUTRAL, "The mother is free.").also { stage = 99 } 11 -> sendDialogue("Their eyes are staring vacantly into space.").also { stage++ } - 12 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "You! You did it!").also { stage++ } - 13 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "I didn't mean to!").also { stage++ } - 14 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "You killed him!").also { stage++ } - 15 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "It was an accide... Killed who?").also { stage++ } - 16 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "Our Prince, you killed our Prince.").also { stage++ } - 17 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "Oh that, yes I did.").also { stage++ } - 18 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "Leave us alone.").also { stage = 99 } + 12 -> npc(FacialExpression.NEUTRAL, "You! You did it!").also { stage++ } + 13 -> player(FacialExpression.NEUTRAL, "I didn't mean to!").also { stage++ } + 14 -> npc(FacialExpression.NEUTRAL, "You killed him!").also { stage++ } + 15 -> player(FacialExpression.NEUTRAL, "It was an accide... Killed who?").also { stage++ } + 16 -> npc(FacialExpression.NEUTRAL, "Our Prince, you killed our Prince.").also { stage++ } + 17 -> player(FacialExpression.NEUTRAL, "Oh that, yes I did.").also { stage++ } + 18 -> npc(FacialExpression.NEUTRAL, "Leave us alone.").also { stage = 99 } 19 -> sendDialogue("Their eyes are staring vacantly into space.").also { stage++ } - 20 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "Soon now... So soon...").also { stage++ } - 21 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "The stars are almost right.").also { stage++ } - 22 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "For what?").also { stage++ } - 23 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, ". . .").also { stage = 99 } + 20 -> npc(FacialExpression.NEUTRAL, "Soon now... So soon...").also { stage++ } + 21 -> npc(FacialExpression.NEUTRAL, "The stars are almost right.").also { stage++ } + 22 -> player(FacialExpression.NEUTRAL, "For what?").also { stage++ } + 23 -> npc(FacialExpression.NEUTRAL, ". . .").also { stage = 99 } 24 -> sendDialogue("Their eyes are staring vacantly into space.").also { stage++ } - 25 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "Ahh, our saviour.").also { stage++ } - 26 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "Please don't remind me.").also { stage++ } - 27 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "Do not worry, soon your regret will be gone.").also { stage++ } - 28 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "If you think you will get to me...").also { stage++ } - 29 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "All in good time.").also { stage = 99 } + 25 -> npc(FacialExpression.NEUTRAL, "Ahh, our saviour.").also { stage++ } + 26 -> player(FacialExpression.NEUTRAL, "Please don't remind me.").also { stage++ } + 27 -> npc(FacialExpression.NEUTRAL, "Do not worry, soon your regret will be gone.").also { stage++ } + 28 -> player(FacialExpression.NEUTRAL, "If you think you will get to me...").also { stage++ } + 29 -> npc(FacialExpression.NEUTRAL, "All in good time.").also { stage = 99 } 99 -> end() @@ -66,7 +66,7 @@ class WitchhavenVillageDialogue(player: Player? = null) : core.game.dialogue.Dia return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return WitchhavenVillageDialogue(player) } diff --git a/Server/src/main/content/region/kandarin/yanille/handlers/YanilleAgilityDungeon.kt b/Server/src/main/content/region/kandarin/yanille/handlers/YanilleAgilityDungeon.kt index 7e954345f..509ea4e58 100644 --- a/Server/src/main/content/region/kandarin/yanille/handlers/YanilleAgilityDungeon.kt +++ b/Server/src/main/content/region/kandarin/yanille/handlers/YanilleAgilityDungeon.kt @@ -31,7 +31,7 @@ val SINISTER_CHEST_HERBS = arrayOf(Item(205, 2), Item(207, 3), Item(209), Item(2 public class YanilleAgilityDungeonListeners : InteractionListener { override fun defineListeners() { - ZoneBuilder.configure(YanilleAgilityDungeon()); + ZoneBuilder.configure(YanilleAgilityDungeon()) on(1728, IntType.SCENERY, "climb-down") { player, _ -> player.teleport(Location(2620, 9565, 0)) @@ -65,17 +65,17 @@ public class YanilleAgilityDungeonListeners : InteractionListener { player.sendMessage("The chest is locked.") } else { if (player.getInventory().freeSlots() == 0) { - player.sendMessage("You don't have enough inventory space."); + player.sendMessage("You don't have enough inventory space.") return@on true } player.lock(1) if(player.inventory.remove(Item(Items.SINISTER_KEY_993, 1))) { - player.sendMessages("You unlock the chest with your key...", "A foul gas seeps from the chest"); + player.sendMessages("You unlock the chest with your key...", "A foul gas seeps from the chest") applyPoison (player, player, 2) for(item in SINISTER_CHEST_HERBS) { addItemOrDrop(player, item.id, item.amount) } - SceneryBuilder.replace(target.asScenery(), target.asScenery().transform(target.id + 1), 5); + SceneryBuilder.replace(target.asScenery(), target.asScenery().transform(target.id + 1), 5) } } return@on true @@ -97,14 +97,14 @@ public class YanilleAgilityDungeonListeners : InteractionListener { */ fun handleBalancingLedge(player: Player, scenery: Scenery) { if (player.skills.getLevel(Skills.AGILITY) < 40) { - player.getDialogueInterpreter().sendDialogue("You need an Agility level of at least 40 in order to do this."); - return; - } + player.getDialogueInterpreter().sendDialogue("You need an Agility level of at least 40 in order to do this.") + return + } val dir = Direction.getLogicalDirection(player.location, scenery.location) val diff = if(player.location.y == 9512) { 0 } else { 1 } - var end = scenery.location; - var xp = 0.0; - if (AgilityHandler.hasFailed(player, 40, 0.01)) { + var end = scenery.location + var xp = 0.0 + if (AgilityHandler.hasFailed(player, 40, 0.01)) { player.lock(3) GameWorld.Pulser.submit(object : Pulse(2, player) { override public fun pulse(): Boolean { @@ -113,11 +113,11 @@ public class YanilleAgilityDungeonListeners : InteractionListener { } }) } else { - xp = 22.5; - end = scenery.location.transform(dir.getStepX() * 7, dir.getStepY() * 7, 0); - } - AgilityHandler.walk(player, -1, player.location, end, Animation.create(157 - diff), xp, null); - } + xp = 22.5 + end = scenery.location.transform(dir.getStepX() * 7, dir.getStepY() * 7, 0) + } + AgilityHandler.walk(player, -1, player.location, end, Animation.create(157 - diff), xp, null) + } } @@ -173,7 +173,7 @@ public class SalarinTwistedNPC : AbstractNPC { } override public fun getIds(): IntArray { - return intArrayOf(205); + return intArrayOf(205) } } diff --git a/Server/src/main/content/region/karamja/quest/tribaltotem/GPDTEmployeeDialogue.kt b/Server/src/main/content/region/karamja/quest/tribaltotem/GPDTEmployeeDialogue.kt index f7ed2539e..81af76e12 100644 --- a/Server/src/main/content/region/karamja/quest/tribaltotem/GPDTEmployeeDialogue.kt +++ b/Server/src/main/content/region/karamja/quest/tribaltotem/GPDTEmployeeDialogue.kt @@ -7,9 +7,9 @@ import core.plugin.Initializable import org.rs09.consts.NPCs @Initializable -class GPDTEmployeeDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class GPDTEmployeeDialogue(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.HAPPY,"Welcome to G.P.D.T.!") + npcl(FacialExpression.HAPPY,"Welcome to G.P.D.T.!") stage = if(player.questRepository.getStage("Tribal Totem") == 20){ 5 }else 0 @@ -18,10 +18,10 @@ class GPDTEmployeeDialogue(player: Player? = null) : core.game.dialogue.Dialogue override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Thank you very much.").also { stage = 1000 } + 0 -> playerl(FacialExpression.HAPPY,"Thank you very much.").also { stage = 1000 } - 5 -> playerl(core.game.dialogue.FacialExpression.ASKING,"So, when are you going to deliver this crate?").also { stage++ } - 6 -> npcl(core.game.dialogue.FacialExpression.THINKING,"Well... I guess we could do it now...").also { + 5 -> playerl(FacialExpression.ASKING,"So, when are you going to deliver this crate?").also { stage++ } + 6 -> npcl(FacialExpression.THINKING,"Well... I guess we could do it now...").also { player.questRepository.getQuest("Tribal Totem").setStage(player,25) stage = 1000 } @@ -31,7 +31,7 @@ class GPDTEmployeeDialogue(player: Player? = null) : core.game.dialogue.Dialogue return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return GPDTEmployeeDialogue(player) } diff --git a/Server/src/main/content/region/karamja/quest/tribaltotem/HoracioDialogue.kt b/Server/src/main/content/region/karamja/quest/tribaltotem/HoracioDialogue.kt index c6f2b8a16..da8cd274e 100644 --- a/Server/src/main/content/region/karamja/quest/tribaltotem/HoracioDialogue.kt +++ b/Server/src/main/content/region/karamja/quest/tribaltotem/HoracioDialogue.kt @@ -6,15 +6,15 @@ import core.game.node.entity.player.Player import core.plugin.Initializable @Initializable -class HoracioDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class HoracioDialogue(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { if(player.questRepository.hasStarted("Tribal Totem")){ - npcl(core.game.dialogue.FacialExpression.HAPPY,"It's a fine day to be out in a garden, isn't it? ") + npcl(FacialExpression.HAPPY,"It's a fine day to be out in a garden, isn't it? ") stage = 5 } else{ - npcl(core.game.dialogue.FacialExpression.HAPPY,"It's a fine day to be out in a garden, isn't it? ") + npcl(FacialExpression.HAPPY,"It's a fine day to be out in a garden, isn't it? ") stage = 0 } return true @@ -22,33 +22,33 @@ class HoracioDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Yes it's very nice.").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Days like these make me glad to be alive!").also { stage = 1000 } + 0 -> playerl(FacialExpression.HAPPY,"Yes it's very nice.").also { stage++ } + 1 -> npcl(FacialExpression.HAPPY,"Days like these make me glad to be alive!").also { stage = 1000 } - 5 -> playerl(core.game.dialogue.FacialExpression.ASKING,"So... who are you?").also { stage++ } - 6 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"My name is Horacio Dobson. I'm a gardener to Lord Handlemort.").also { stage++ } - 7 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Take a look around this beautiful garden, all of this is my handiwork.").also { stage++ } + 5 -> playerl(FacialExpression.ASKING,"So... who are you?").also { stage++ } + 6 -> npcl(FacialExpression.HAPPY,"My name is Horacio Dobson. I'm a gardener to Lord Handlemort.").also { stage++ } + 7 -> npcl(FacialExpression.HAPPY,"Take a look around this beautiful garden, all of this is my handiwork.").also { stage++ } 8 -> options("So... do you garden round the back too?","Do you need any help?").also { stage++ } 9 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.THINKING,"So... do you garden round the back, too?").also { stage = 10 } - 2 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Do you need any help?").also { stage = 20 } + 1 -> playerl(FacialExpression.THINKING,"So... do you garden round the back, too?").also { stage = 10 } + 2 -> playerl(FacialExpression.ASKING,"Do you need any help?").also { stage = 20 } } - 10 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"That I do!").also { stage++ } - 11 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Doesn't all of the security around the house get in your way then?").also { stage++ } - 12 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Ah. I'm used to all that. I have my keys, the guard dogs know me, and I know the combination to the door lock.").also { stage++ } - 13 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"It's rather easy, it's his middle name.").also { stage++ } - 14 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Whose middle name?").also { stage++ } - 15 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Hum. I probably shouldn't have said that. Forget I mentioned it.").also { stage = 1000 } + 10 -> npcl(FacialExpression.HAPPY,"That I do!").also { stage++ } + 11 -> playerl(FacialExpression.ASKING,"Doesn't all of the security around the house get in your way then?").also { stage++ } + 12 -> npcl(FacialExpression.HAPPY,"Ah. I'm used to all that. I have my keys, the guard dogs know me, and I know the combination to the door lock.").also { stage++ } + 13 -> npcl(FacialExpression.HAPPY,"It's rather easy, it's his middle name.").also { stage++ } + 14 -> playerl(FacialExpression.ASKING,"Whose middle name?").also { stage++ } + 15 -> npcl(FacialExpression.ANNOYED,"Hum. I probably shouldn't have said that. Forget I mentioned it.").also { stage = 1000 } - 20 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Trying to muscle in on my job, eh? I'm more than happy to do this all by myself!").also { stage = 1000 } + 20 -> npcl(FacialExpression.ANNOYED,"Trying to muscle in on my job, eh? I'm more than happy to do this all by myself!").also { stage = 1000 } 1000 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return HoracioDialogue(player) } diff --git a/Server/src/main/content/region/karamja/quest/tribaltotem/KangaiMauDialogue.kt b/Server/src/main/content/region/karamja/quest/tribaltotem/KangaiMauDialogue.kt index 57968ab94..9f35bc75f 100644 --- a/Server/src/main/content/region/karamja/quest/tribaltotem/KangaiMauDialogue.kt +++ b/Server/src/main/content/region/karamja/quest/tribaltotem/KangaiMauDialogue.kt @@ -9,22 +9,22 @@ import core.plugin.Initializable import org.rs09.consts.Items @Initializable -class KangaiMauDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class KangaiMauDialogue(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { if(!player.questRepository.hasStarted("Tribal Totem")){ - npcl(core.game.dialogue.FacialExpression.HAPPY,"Hello. I'm Kangai Mau of the Rantuki Tribe.") + npcl(FacialExpression.HAPPY,"Hello. I'm Kangai Mau of the Rantuki Tribe.") stage = 0 } else if(isQuestComplete(player, "Tribal Totem")) { - npcl(core.game.dialogue.FacialExpression.HAPPY, "Many greetings esteemed thief.") + npcl(FacialExpression.HAPPY, "Many greetings esteemed thief.") stage = 40 } else if(player.inventory.containsAtLeastOneItem(Items.TOTEM_1857)){ - npcl(core.game.dialogue.FacialExpression.ASKING,"Have you got our totem back?") + npcl(FacialExpression.ASKING,"Have you got our totem back?") stage = 35 } else if(player.questRepository.hasStarted("Tribal Totem")){ - npcl(core.game.dialogue.FacialExpression.ASKING,"Have you got our totem back?") + npcl(FacialExpression.ASKING,"Have you got our totem back?") stage = 30 } return true @@ -34,37 +34,37 @@ class KangaiMauDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu when(stage){ 0 -> options("And what are you doing here in Brimhaven?","I'm in search of adventure!","Who are the Rantuki tribe?").also { stage++ } 1 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.ASKING,"And what are you doing here in Brimhaven?").also { stage = 5 } - 2 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"I'm in search of adventure!").also { stage = 15 } - 3 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Who are the Rantuki Tribe?").also { stage = 10 } + 1 -> playerl(FacialExpression.ASKING,"And what are you doing here in Brimhaven?").also { stage = 5 } + 2 -> playerl(FacialExpression.HAPPY,"I'm in search of adventure!").also { stage = 15 } + 3 -> playerl(FacialExpression.ASKING,"Who are the Rantuki Tribe?").also { stage = 10 } } - 5 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I'm looking for someone brave to go on important mission. Someone skilled in thievery and sneaking about.").also { stage++ } - 6 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I am told I can find such people in Brimhaven.").also { stage++ } - 7 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Yep. I have heard there are many of that type here.").also { stage++ } - 8 -> npcl(core.game.dialogue.FacialExpression.THINKING,"Let's hope I find them.").also { stage = 1000 } + 5 -> npcl(FacialExpression.HAPPY,"I'm looking for someone brave to go on important mission. Someone skilled in thievery and sneaking about.").also { stage++ } + 6 -> npcl(FacialExpression.HAPPY,"I am told I can find such people in Brimhaven.").also { stage++ } + 7 -> playerl(FacialExpression.HAPPY,"Yep. I have heard there are many of that type here.").also { stage++ } + 8 -> npcl(FacialExpression.THINKING,"Let's hope I find them.").also { stage = 1000 } - 10 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"A proud and noble tribe of Karamja.").also { stage++ } - 11 -> npcl(core.game.dialogue.FacialExpression.ANGRY,"But now we are few, as men come from across, steal our land, and settle on our hunting grounds").also { stage = 1000 } + 10 -> npcl(FacialExpression.HAPPY,"A proud and noble tribe of Karamja.").also { stage++ } + 11 -> npcl(FacialExpression.ANGRY,"But now we are few, as men come from across, steal our land, and settle on our hunting grounds").also { stage = 1000 } - 15 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Adventure is something I may be able to give. I need someone to go on a mission to the city of Ardougne.").also { stage++ } - 16 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"There you will find the house of Lord Handlemort. In his house he has our tribal totem. We need it back.").also { stage++ } - 17 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Why does he have it?").also { stage++ } - 18 -> npcl(core.game.dialogue.FacialExpression.ANGRY,"Lord Handlemort is an Ardougnese explorer which means he think he have the right to come to my tribal home,").also { stage++ } - 19 -> npcl(core.game.dialogue.FacialExpression.ANGRY,"steal our stuff and put in his private museum.").also { stage++ } - 20 -> playerl(core.game.dialogue.FacialExpression.THINKING,"How can I find Handlemoret's house? Ardougne IS a big place...").also { stage++ } - 21 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"I don't know Ardougne. You tell me.").also { stage++ } - 22 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Ok, I will get it back.").also { + 15 -> npcl(FacialExpression.HAPPY,"Adventure is something I may be able to give. I need someone to go on a mission to the city of Ardougne.").also { stage++ } + 16 -> npcl(FacialExpression.HAPPY,"There you will find the house of Lord Handlemort. In his house he has our tribal totem. We need it back.").also { stage++ } + 17 -> playerl(FacialExpression.ASKING,"Why does he have it?").also { stage++ } + 18 -> npcl(FacialExpression.ANGRY,"Lord Handlemort is an Ardougnese explorer which means he think he have the right to come to my tribal home,").also { stage++ } + 19 -> npcl(FacialExpression.ANGRY,"steal our stuff and put in his private museum.").also { stage++ } + 20 -> playerl(FacialExpression.THINKING,"How can I find Handlemoret's house? Ardougne IS a big place...").also { stage++ } + 21 -> npcl(FacialExpression.ANNOYED,"I don't know Ardougne. You tell me.").also { stage++ } + 22 -> playerl(FacialExpression.HAPPY,"Ok, I will get it back.").also { player.questRepository.getQuest("Tribal Totem").start(player) player.questRepository.getQuest("Tribal Totem").setStage(player, 10) stage++ } - 23 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Best of luck with that adventurer").also { stage = 1000 } + 23 -> npcl(FacialExpression.HAPPY,"Best of luck with that adventurer").also { stage = 1000 } - 30 -> playerl(core.game.dialogue.FacialExpression.SAD,"Not yet, sorry.").also { stage = 1000 } + 30 -> playerl(FacialExpression.SAD,"Not yet, sorry.").also { stage = 1000 } - 35 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Yes I have.").also { stage++ } - 36 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"You have??? Many thanks brave adventurer! Here, have some freshly cooked Karamjan fish, caught specially by my tribe.").also { stage++ } + 35 -> playerl(FacialExpression.HAPPY,"Yes I have.").also { stage++ } + 36 -> npcl(FacialExpression.HAPPY,"You have??? Many thanks brave adventurer! Here, have some freshly cooked Karamjan fish, caught specially by my tribe.").also { stage++ } 37 -> sendDialogue("You hand over the totem").also { if(!isQuestComplete(player, "Tribal Totem") && removeItem(player, Items.TOTEM_1857)) { player.questRepository.getQuest("Tribal Totem").finish(player) @@ -74,14 +74,14 @@ class KangaiMauDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu } } - 40 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "Hey.").also { stage = 1000 } + 40 -> player(FacialExpression.NEUTRAL, "Hey.").also { stage = 1000 } 1000 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return KangaiMauDialogue(player) } diff --git a/Server/src/main/content/region/karamja/shilo/dialogue/FernaheiDialogue.kt b/Server/src/main/content/region/karamja/shilo/dialogue/FernaheiDialogue.kt index ba79870d7..3a2655ac4 100644 --- a/Server/src/main/content/region/karamja/shilo/dialogue/FernaheiDialogue.kt +++ b/Server/src/main/content/region/karamja/shilo/dialogue/FernaheiDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class FernaheiDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FernaheiDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Welcome to Fernahei's Fishing Shop Bwana!", + npc(FacialExpression.FRIENDLY,"Welcome to Fernahei's Fishing Shop Bwana!", "Would you like to see my items?").also { stage = 0 } return true } @@ -28,8 +28,8 @@ class FernaheiDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug } 1 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, please.").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "No, but thanks for the offer.").also { stage = 20 } + 1 -> player(FacialExpression.FRIENDLY, "Yes, please.").also { stage = 10 } + 2 -> player(FacialExpression.FRIENDLY, "No, but thanks for the offer.").also { stage = 20 } } 10 -> { @@ -37,7 +37,7 @@ class FernaheiDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug } 20 -> { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "That's fine, and thanks for your interest.").also { stage = 99 } + npc(FacialExpression.FRIENDLY, "That's fine, and thanks for your interest.").also { stage = 99 } } 99 -> end() @@ -45,7 +45,7 @@ class FernaheiDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FernaheiDialogue(player) } diff --git a/Server/src/main/content/region/karamja/shilo/dialogue/ObliDialogue.kt b/Server/src/main/content/region/karamja/shilo/dialogue/ObliDialogue.kt index 2f7b5d11a..6299c94ee 100644 --- a/Server/src/main/content/region/karamja/shilo/dialogue/ObliDialogue.kt +++ b/Server/src/main/content/region/karamja/shilo/dialogue/ObliDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class ObliDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ObliDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Welcome to Obli's General Store Bwana!", + npc(FacialExpression.FRIENDLY,"Welcome to Obli's General Store Bwana!", "Would you like to see my items?").also { stage = 0 } return true } @@ -28,8 +28,8 @@ class ObliDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p } 1 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, please.").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "No, but thanks for the offer.").also { stage = 99 } + 1 -> player(FacialExpression.FRIENDLY, "Yes, please.").also { stage = 10 } + 2 -> player(FacialExpression.FRIENDLY, "No, but thanks for the offer.").also { stage = 99 } } 10 -> { @@ -41,7 +41,7 @@ class ObliDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ObliDialogue(player) } diff --git a/Server/src/main/content/region/karamja/taibwo/dialogue/GabootyDialogue.kt b/Server/src/main/content/region/karamja/taibwo/dialogue/GabootyDialogue.kt index 1908b4c3f..a590492c6 100644 --- a/Server/src/main/content/region/karamja/taibwo/dialogue/GabootyDialogue.kt +++ b/Server/src/main/content/region/karamja/taibwo/dialogue/GabootyDialogue.kt @@ -12,24 +12,24 @@ import core.game.shops.Shops * @author qmqz */ @Initializable -class GabootyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class GabootyDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY, "What do you do here?").also { stage = 0 } + player(FacialExpression.FRIENDLY, "What do you do here?").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.FRIENDLY,"Not much really... I run a local shop which earns", "me a few trading sticks, but that's about it.", "I keep myself to myself really.").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "What are trading sticks?").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, + 0 -> npc(FacialExpression.FRIENDLY,"Not much really... I run a local shop which earns", "me a few trading sticks, but that's about it.", "I keep myself to myself really.").also { stage++ } + 1 -> player(FacialExpression.FRIENDLY, "What are trading sticks?").also { stage++ } + 2 -> npc(FacialExpression.FRIENDLY, "They're the local currency Bwana, ", "it's used in Tai Bwo Wannai, there's usually", "some odd jobs that need doing around the village", "which you could do to earn some trading sticks.").also { stage++ } - 3 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, + 3 -> npc(FacialExpression.FRIENDLY, "Or, if you have something which the local villagers", "might like, you could sell it to me and I'll pay", "you for it in trading sticks.").also { stage++ } @@ -48,29 +48,29 @@ class GabootyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi 4 -> player("Ok, thanks.").also { stage = 99 } } - 10 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, + 10 -> npc(FacialExpression.FRIENDLY, "Gnome cocktails! It's amazing but we all just love them!", "Luckily I've managed to get stocks of the gnome made", "cocktails and I supply those to my favourite customers.", "However, many of the customers really like the cocktails").also { stage++ } - 11 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, + 11 -> npc(FacialExpression.FRIENDLY, "made by the adventurers passing through this way.", "If you ever happen to have any, bring them my way! ", "I'll give you a good deal on it that's for sure!").also { stage++ } - 12 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "How did the villagers ever get to try any gnome cocktails?").also { stage++ } - 13 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, + 12 -> player(FacialExpression.FRIENDLY, "How did the villagers ever get to try any gnome cocktails?").also { stage++ } + 13 -> npc(FacialExpression.FRIENDLY, "I think it was that gnome pilot who crashed his glider,", "perhaps he had a little mini-bar on board?", "Come to think about it, you'd expect the little guy to get ", "his stuff together and move on out of here wouldn't you?").also { stage++ } - 14 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "He must love the jungle to have stayed here so long!").also { stage = 4 } + 14 -> npc(FacialExpression.FRIENDLY, "He must love the jungle to have stayed here so long!").also { stage = 4 } - 21 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, + 21 -> npc(FacialExpression.FRIENDLY, "Yes, it's the Tai Bwo cooperative... catchy name huh!", "We sell a few local village trinkets and tools.", "Also, there are a few items that we're actually", "looking to stock for the locals' sake.").also { stage++ } - 22 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, + 22 -> npc(FacialExpression.FRIENDLY, "If you happen across any of them please bring them to me,", "I'll pay a good price for them.", "I'm sure you'll find the prices very reasonable.").also { stage++ } @@ -90,7 +90,7 @@ class GabootyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi 5 -> player("I want to ask another question.").also { stage = 4 } } - 30 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Sure you can...which shop would you like to see?", + 30 -> npc(FacialExpression.FRIENDLY, "Sure you can...which shop would you like to see?", "The Cooperative or Drinks store?").also { stage++ } 31 ->interpreter.sendOptions("Select an Option", @@ -105,13 +105,13 @@ class GabootyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi 3 -> player("None thanks...").also { stage = 99 } } - 40 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "It's funny that, actually. I've managed to get a ", + 40 -> npc(FacialExpression.FRIENDLY, "It's funny that, actually. I've managed to get a ", "good deal with the pilot of that gnome glider. He can supply", "me directly now. However, it's really interesting that the ", "local villagers really like the gnome cocktails made by the").also { stage++ } - 41 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "adventurers passing through this way.").also { stage++ } - 42 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Why, what's the difference?").also { stage++ } - 43 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "I think it may just be that they're made fresher,", + 41 -> npc(FacialExpression.FRIENDLY, "adventurers passing through this way.").also { stage++ } + 42 -> player(FacialExpression.FRIENDLY, "Why, what's the difference?").also { stage++ } + 43 -> npc(FacialExpression.FRIENDLY, "I think it may just be that they're made fresher,", "or there is a slight twist in the flavour of the drink,", "you know, a little more of this, a little less of that, it all", "adds up and makes for an interesting tipple!").also { stage = 23 } @@ -124,7 +124,7 @@ class GabootyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return GabootyDialogue(player) } diff --git a/Server/src/main/content/region/misc/apeatoll/dialogue/bananaplantation/BonzaraDialogue.kt b/Server/src/main/content/region/misc/apeatoll/dialogue/bananaplantation/BonzaraDialogue.kt index e61eb228a..80e833132 100644 --- a/Server/src/main/content/region/misc/apeatoll/dialogue/bananaplantation/BonzaraDialogue.kt +++ b/Server/src/main/content/region/misc/apeatoll/dialogue/bananaplantation/BonzaraDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class BonzaraDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class BonzaraDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npcl(core.game.dialogue.FacialExpression.OLD_DEFAULT,"It looks like you're trying to escape. Would you like some help?").also { stage = 0 } + npcl(FacialExpression.OLD_DEFAULT,"It looks like you're trying to escape. Would you like some help?").also { stage = 0 } return true } @@ -24,27 +24,27 @@ class BonzaraDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi when(stage){ 0 -> options("Yes", "No").also { stage++ } 1 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.WORRIED, "I ... uh ... yes.").also { stage = 10 } - 2 -> playerl(core.game.dialogue.FacialExpression.ASKING, "No thank you. Who are you by the way?").also { stage = 20 } + 1 -> player(FacialExpression.WORRIED, "I ... uh ... yes.").also { stage = 10 } + 2 -> playerl(FacialExpression.ASKING, "No thank you. Who are you by the way?").also { stage = 20 } } - 10 -> npc(core.game.dialogue.FacialExpression.OLD_DEFAULT, "Right you are.").also { stage++ } + 10 -> npc(FacialExpression.OLD_DEFAULT, "Right you are.").also { stage++ } 11 -> { end() //teleport to ape atoll } - 20 -> npcl(core.game.dialogue.FacialExpression.OLD_DEFAULT, "Never mind that child. You should worry more about who you are and the nature of the forces that have driven you here.").also { stage++ } - 21 -> player(core.game.dialogue.FacialExpression.THINKING, "I'll ... keep that in mind, thanks.").also { stage++ } - 22 -> npc(core.game.dialogue.FacialExpression.OLD_DEFAULT, "We WILL meet again, " + player.name + ".").also { stage++ } - 23 -> player(core.game.dialogue.FacialExpression.SUSPICIOUS, "Ok...").also { stage = 99 } + 20 -> npcl(FacialExpression.OLD_DEFAULT, "Never mind that child. You should worry more about who you are and the nature of the forces that have driven you here.").also { stage++ } + 21 -> player(FacialExpression.THINKING, "I'll ... keep that in mind, thanks.").also { stage++ } + 22 -> npc(FacialExpression.OLD_DEFAULT, "We WILL meet again, " + player.name + ".").also { stage++ } + 23 -> player(FacialExpression.SUSPICIOUS, "Ok...").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return BonzaraDialogue(player) } diff --git a/Server/src/main/content/region/misc/apeatoll/dialogue/dungeon/ZooknockDialogue.kt b/Server/src/main/content/region/misc/apeatoll/dialogue/dungeon/ZooknockDialogue.kt index 4c1ec3698..c84225bd8 100644 --- a/Server/src/main/content/region/misc/apeatoll/dialogue/dungeon/ZooknockDialogue.kt +++ b/Server/src/main/content/region/misc/apeatoll/dialogue/dungeon/ZooknockDialogue.kt @@ -13,15 +13,15 @@ import org.rs09.consts.NPCs */ @Initializable -class ZooknockDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ZooknockDialogue(player: Player? = null) : DialoguePlugin(player){ - var fr = core.game.dialogue.FacialExpression.FRIENDLY - var neu = core.game.dialogue.FacialExpression.NEUTRAL - var ask = core.game.dialogue.FacialExpression.ASKING - var nor = core.game.dialogue.FacialExpression.OLD_NORMAL - var ntalk1 = core.game.dialogue.FacialExpression.OLD_CALM_TALK1 - var ntalk2 = core.game.dialogue.FacialExpression.OLD_CALM_TALK2 + var fr = FacialExpression.FRIENDLY + var neu = FacialExpression.NEUTRAL + var ask = FacialExpression.ASKING + var nor = FacialExpression.OLD_NORMAL + var ntalk1 = FacialExpression.OLD_CALM_TALK1 + var ntalk2 = FacialExpression.OLD_CALM_TALK2 var hasSpokenToZook = false @@ -52,7 +52,7 @@ class ZooknockDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug 12 -> playerl(neu, "No, I have been accompanied by Flight Commander Waydar. We flew south on a special type of glider and landed on a small island to our east.").also { stage++ } 13 -> npcl(ntalk2, "The so called Crash Island. We left there one of our number, Lumdo, to guard our gliders until our return.").also { stage++ } 14 -> player(neu, "Yes, we have met. He ferried me across to the atoll.").also { stage++ } - 15 -> npcl(core.game.dialogue.FacialExpression.OLD_ANGRY1, "He did!? He was explicitly ordered to guard the gliders! How did this happen? Who is guarding the gliders now?").also { stage++ } + 15 -> npcl(FacialExpression.OLD_ANGRY1, "He did!? He was explicitly ordered to guard the gliders! How did this happen? Who is guarding the gliders now?").also { stage++ } 16 -> playerl(ntalk1, "Waydar ordered him to leave his post. He is guarding the gliders himself.").also { stage++ } 17 -> npcl(ntalk2, "Flight Commander Waydar you said? For some reason that name is familiar...").also { stage++ } 18 -> player(ask, "So why are you here?").also { stage++ } @@ -61,7 +61,7 @@ class ZooknockDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug 21 -> npc(ntalk1, "Correct. I assume Lumdo told you this?").also { stage++ } 22 -> player(ask, "Yes. What happened when you landed here?").also { stage++ } 23 -> npcl(ntalk2, "We split up into several small groups to search the island for potential gnome glider launch sites. Whilst we knew the island to be inhabited, we did not expect its occupants to be quite so ... militant.").also { stage++ } - 24 -> player(core.game.dialogue.FacialExpression.THINKING, "...").also { stage++ } + 24 -> player(FacialExpression.THINKING, "...").also { stage++ } 25 -> npcl(ntalk1, "Monkeys. Lots of monkeys. They are unlike any other type of monkey we've come across. A far cry from the usual wild variety, these were armed with high quality weaponry and uncanny tactical ability.").also { stage++ } 26 -> npcl(ntalk2, "We were overwhelmed in numbers. Some of us managed to escape, but the rest were taken captive.").also { stage++ } 27 -> player(ask, "Who survived?").also { stage++ } @@ -135,7 +135,7 @@ class ZooknockDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ZooknockDialogue(player) } diff --git a/Server/src/main/content/region/misc/apeatoll/dialogue/marim/AberabDialogue.kt b/Server/src/main/content/region/misc/apeatoll/dialogue/marim/AberabDialogue.kt index 8eee92aa5..5d84c1aae 100644 --- a/Server/src/main/content/region/misc/apeatoll/dialogue/marim/AberabDialogue.kt +++ b/Server/src/main/content/region/misc/apeatoll/dialogue/marim/AberabDialogue.kt @@ -12,11 +12,11 @@ import core.plugin.Initializable */ @Initializable -class AberabDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class AberabDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_ANGRY1,"Grr ... Get out of my way...") + npc(FacialExpression.OLD_ANGRY1,"Grr ... Get out of my way...") stage = 99 return true } @@ -28,7 +28,7 @@ class AberabDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return AberabDialogue(player) } diff --git a/Server/src/main/content/region/misc/apeatoll/dialogue/marim/DagaDialogue.kt b/Server/src/main/content/region/misc/apeatoll/dialogue/marim/DagaDialogue.kt index 572138fcb..5be5285bf 100644 --- a/Server/src/main/content/region/misc/apeatoll/dialogue/marim/DagaDialogue.kt +++ b/Server/src/main/content/region/misc/apeatoll/dialogue/marim/DagaDialogue.kt @@ -17,11 +17,11 @@ import core.tools.END_DIALOGUE */ @Initializable -class DagaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class DagaDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"Would you like to buy or sell some scimitars?").also { stage = 0 } + npc(FacialExpression.OLD_DEFAULT,"Would you like to buy or sell some scimitars?").also { stage = 0 } return true } @@ -30,29 +30,29 @@ class DagaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p 0 -> options("Yes, please.", "No, thanks.", "Do you have any Dragon Scimitars in stock?").also { stage++ } 1 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, please.").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "No, thanks.").also { stage = END_DIALOGUE } - 3 -> player(core.game.dialogue.FacialExpression.HALF_ASKING, "Do you have any Dragon Scimitars in stock?").also { stage = 30 } + 1 -> player(FacialExpression.FRIENDLY, "Yes, please.").also { stage = 10 } + 2 -> player(FacialExpression.FRIENDLY, "No, thanks.").also { stage = END_DIALOGUE } + 3 -> player(FacialExpression.HALF_ASKING, "Do you have any Dragon Scimitars in stock?").also { stage = 30 } } 10 -> end().also { npc.openShop(player) } - 30 -> npcl(core.game.dialogue.FacialExpression.OLD_DEFAULT, "It just so happens I recently got a fresh delivery, do you want to buy one?").also { stage++ } + 30 -> npcl(FacialExpression.OLD_DEFAULT, "It just so happens I recently got a fresh delivery, do you want to buy one?").also { stage++ } 31 -> options("Yes, please.", "No, thanks.").also { stage++ } 32 -> when (buttonId) { 1 -> if (inInventory(player, Items.COINS_995, 100000)) { end().also { return removeItem(player, Item(Items.COINS_995, 100000)) && addItem(player, Items.DRAGON_SCIMITAR_4587, 1) } } else { - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL, "Sorry but you don't have enough to buy one, at the moment it costs 100,000 gold coins.").also { stage = END_DIALOGUE } + npcl(FacialExpression.OLD_NORMAL, "Sorry but you don't have enough to buy one, at the moment it costs 100,000 gold coins.").also { stage = END_DIALOGUE } } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "No thanks.").also { stage = END_DIALOGUE } + 2 -> player(FacialExpression.FRIENDLY, "No thanks.").also { stage = END_DIALOGUE } } } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return DagaDialogue(player) } diff --git a/Server/src/main/content/region/misc/apeatoll/dialogue/marim/ElderGuardDialogue.kt b/Server/src/main/content/region/misc/apeatoll/dialogue/marim/ElderGuardDialogue.kt index 85a38feb8..6902cbaa6 100644 --- a/Server/src/main/content/region/misc/apeatoll/dialogue/marim/ElderGuardDialogue.kt +++ b/Server/src/main/content/region/misc/apeatoll/dialogue/marim/ElderGuardDialogue.kt @@ -13,7 +13,7 @@ import org.rs09.consts.NPCs */ @Initializable -class ElderGuardDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ElderGuardDialogue(player: Player? = null) : DialoguePlugin(player){ val ids = 4025..4031 @@ -27,11 +27,11 @@ class ElderGuardDialogue(player: Player? = null) : core.game.dialogue.DialoguePl if (player.equipment.containsAtLeastOneItem(ids.toIntArray())) { if (outside) { - npc(core.game.dialogue.FacialExpression.OLD_ANGRY1, "Grrr ... What do you want?").also { stage = 10 } + npc(FacialExpression.OLD_ANGRY1, "Grrr ... What do you want?").also { stage = 10 } } else if(cornerGuard){ - npc(core.game.dialogue.FacialExpression.OLD_ANGRY1, "Grrr ... What do you want?").also { stage = 20 } + npc(FacialExpression.OLD_ANGRY1, "Grrr ... What do you want?").also { stage = 20 } } else { - npc(core.game.dialogue.FacialExpression.OLD_ANGRY1, "Move!").also { stage = 99 } + npc(FacialExpression.OLD_ANGRY1, "Move!").also { stage = 99 } } } else { //todo monke is gonna knock you out if you don't have a monkey gree gree thang, chicken wang @@ -42,18 +42,18 @@ class ElderGuardDialogue(player: Player? = null) : core.game.dialogue.DialoguePl override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 10 -> playerl(core.game.dialogue.FacialExpression.ASKING, "I must speak with Awowogei on a subject of great import.").also { stage ++ } - 11 -> npc(core.game.dialogue.FacialExpression.OLD_NORMAL, "As you wish.").also { stage = 99 } + 10 -> playerl(FacialExpression.ASKING, "I must speak with Awowogei on a subject of great import.").also { stage ++ } + 11 -> npc(FacialExpression.OLD_NORMAL, "As you wish.").also { stage = 99 } - 20 -> player(core.game.dialogue.FacialExpression.ASKING, "I would like to leave now.").also { stage ++ } - 21 -> npc(core.game.dialogue.FacialExpression.OLD_NORMAL, "As you wish.").also { stage = 99 } + 20 -> player(FacialExpression.ASKING, "I would like to leave now.").also { stage ++ } + 21 -> npc(FacialExpression.OLD_NORMAL, "As you wish.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ElderGuardDialogue(player) } diff --git a/Server/src/main/content/region/misc/apeatoll/dialogue/marim/MuruwoiDialogue.kt b/Server/src/main/content/region/misc/apeatoll/dialogue/marim/MuruwoiDialogue.kt index c9f5e9f57..fd621df95 100644 --- a/Server/src/main/content/region/misc/apeatoll/dialogue/marim/MuruwoiDialogue.kt +++ b/Server/src/main/content/region/misc/apeatoll/dialogue/marim/MuruwoiDialogue.kt @@ -13,11 +13,11 @@ import org.rs09.consts.NPCs */ @Initializable -class MuruwoiDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class MuruwoiDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_ANGRY1,"Grr ... Get out of my way...") + npc(FacialExpression.OLD_ANGRY1,"Grr ... Get out of my way...") stage = 99 return true } @@ -29,7 +29,7 @@ class MuruwoiDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return MuruwoiDialogue(player) } diff --git a/Server/src/main/content/region/misc/entrana/dialogue/HighPriestEntranaDialogue.kt b/Server/src/main/content/region/misc/entrana/dialogue/HighPriestEntranaDialogue.kt index bee5903bd..c650a958d 100644 --- a/Server/src/main/content/region/misc/entrana/dialogue/HighPriestEntranaDialogue.kt +++ b/Server/src/main/content/region/misc/entrana/dialogue/HighPriestEntranaDialogue.kt @@ -14,13 +14,13 @@ import org.rs09.consts.NPCs */ @Initializable -class HighPriestEntranaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class HighPriestEntranaDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (!player.questRepository.isComplete("Heroes' Quest")) { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "Many greetings. Welcome to our fair island.").also { stage = 10 } + npc(FacialExpression.FRIENDLY, "Many greetings. Welcome to our fair island.").also { stage = 10 } } else { options("Have you seen a pair of ice gloves?", "Ask about Entrana").also { stage = 5 } } @@ -31,34 +31,34 @@ class HighPriestEntranaDialogue(player: Player? = null) : core.game.dialogue.Dia override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "and devoted the island to those who wish peace for the world.").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "The inhabitants of this island are mostly monks who spend their time meditating on Saradomin's ways.").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Of course, there are now more pilgrims to this holy site, since Saradomin defeated Zamorak in the battle of Lumbridge. It is good that so many see Saradomin's true glory!").also { stage = 99 } + 1 -> npcl(FacialExpression.FRIENDLY, "and devoted the island to those who wish peace for the world.").also { stage++ } + 2 -> npcl(FacialExpression.FRIENDLY, "The inhabitants of this island are mostly monks who spend their time meditating on Saradomin's ways.").also { stage++ } + 3 -> npcl(FacialExpression.FRIENDLY, "Of course, there are now more pilgrims to this holy site, since Saradomin defeated Zamorak in the battle of Lumbridge. It is good that so many see Saradomin's true glory!").also { stage = 99 } 5 -> when (buttonId) { - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "By which you mean the pair of mythical gloves you stole from the cold dead body of the Queen of the Ice?").also { stage = 20 } - 2 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY,"You are standing on the holy island of Entrana. It was here that Saradomin first stepped upon Gielinor. In homage to Saradomin's first arrival, we have built a great church,").also { stage = 1 } + 1 -> npcl(FacialExpression.FRIENDLY, "By which you mean the pair of mythical gloves you stole from the cold dead body of the Queen of the Ice?").also { stage = 20 } + 2 -> npcl(FacialExpression.FRIENDLY,"You are standing on the holy island of Entrana. It was here that Saradomin first stepped upon Gielinor. In homage to Saradomin's first arrival, we have built a great church,").also { stage = 1 } } - 10 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Enjoy our stay here. May it be spiritually uplifting!").also { stage = 99 } + 10 -> npc(FacialExpression.FRIENDLY, "Enjoy our stay here. May it be spiritually uplifting!").also { stage = 99 } - 20 -> player(core.game.dialogue.FacialExpression.SUSPICIOUS, "Er...").also { stage++ } - 21 -> npcl(core.game.dialogue.FacialExpression.ANNOYED, "The gloves that you acquired to aid you in plucking the Entranan firebird? Another victim of your murderous nature, I should add.").also { stage++ } - 22 -> npcl(core.game.dialogue.FacialExpression.ANNOYED, "The ice gloves that, from context, I would assume you have lost, if not carelessly discarded?").also { stage++ } + 20 -> player(FacialExpression.SUSPICIOUS, "Er...").also { stage++ } + 21 -> npcl(FacialExpression.ANNOYED, "The gloves that you acquired to aid you in plucking the Entranan firebird? Another victim of your murderous nature, I should add.").also { stage++ } + 22 -> npcl(FacialExpression.ANNOYED, "The ice gloves that, from context, I would assume you have lost, if not carelessly discarded?").also { stage++ } - 23 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Those ice gloves, yes.").also { stage++ } + 23 -> player(FacialExpression.FRIENDLY, "Those ice gloves, yes.").also { stage++ } 24 -> sendDialogue("The high priest of Entrana shivers as he hands you your lost ice gloves.").also { addItemOrDrop(player, Items.ICE_GLOVES_1580, 1) stage++ } - 25 -> npcl(core.game.dialogue.FacialExpression.ANNOYED, "One of my monks found these gloves. If only to spare this world from further carnage, I return them to you.").also { stage = 99 } + 25 -> npcl(FacialExpression.ANNOYED, "One of my monks found these gloves. If only to spare this world from further carnage, I return them to you.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return HighPriestEntranaDialogue(player) } diff --git a/Server/src/main/content/region/misc/entrana/dialogue/MazionDialogue.kt b/Server/src/main/content/region/misc/entrana/dialogue/MazionDialogue.kt index 6c084daae..63801ca58 100644 --- a/Server/src/main/content/region/misc/entrana/dialogue/MazionDialogue.kt +++ b/Server/src/main/content/region/misc/entrana/dialogue/MazionDialogue.kt @@ -12,14 +12,14 @@ import org.rs09.consts.NPCs */ @Initializable -class MazionDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class MazionDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC when ((1..3).random()) { - 1 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Nice weather we're having today!").also { stage = 99 } - 2 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Hello " + player.name + ", fine day today!").also { stage = 99 } - 3 -> npc(core.game.dialogue.FacialExpression.ANNOYED, "Please leave me alone, a parrot stole my banana.").also { stage = 99 } + 1 -> npc(FacialExpression.FRIENDLY, "Nice weather we're having today!").also { stage = 99 } + 2 -> npc(FacialExpression.FRIENDLY, "Hello " + player.name + ", fine day today!").also { stage = 99 } + 3 -> npc(FacialExpression.ANNOYED, "Please leave me alone, a parrot stole my banana.").also { stage = 99 } } return true } @@ -31,7 +31,7 @@ class MazionDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return MazionDialogue(player) } diff --git a/Server/src/main/content/region/misc/etceteria/dialogue/FishmongerEtcDialogue.kt b/Server/src/main/content/region/misc/etceteria/dialogue/FishmongerEtcDialogue.kt index 297e80eef..39f349294 100644 --- a/Server/src/main/content/region/misc/etceteria/dialogue/FishmongerEtcDialogue.kt +++ b/Server/src/main/content/region/misc/etceteria/dialogue/FishmongerEtcDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class FishmongerEtcDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FishmongerEtcDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Welcome, ${player.getAttribute("fremennikname","fremmyname")}. My fish is fresher than any in Miscellania.").also { stage = 0 } + npcl(FacialExpression.FRIENDLY,"Welcome, ${player.getAttribute("fremennikname","fremmyname")}. My fish is fresher than any in Miscellania.").also { stage = 0 } return true } @@ -27,7 +27,7 @@ class FishmongerEtcDialogue(player: Player? = null) : core.game.dialogue.Dialogu return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FishmongerEtcDialogue(player) } diff --git a/Server/src/main/content/region/misc/keldagrim/dialogue/AgmundiDialogue.kt b/Server/src/main/content/region/misc/keldagrim/dialogue/AgmundiDialogue.kt index 6e097d97d..0f93ddaf6 100644 --- a/Server/src/main/content/region/misc/keldagrim/dialogue/AgmundiDialogue.kt +++ b/Server/src/main/content/region/misc/keldagrim/dialogue/AgmundiDialogue.kt @@ -11,45 +11,45 @@ import core.plugin.Initializable */ @Initializable -class AgmundiDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class AgmundiDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.CHILD_NORMAL,"Oh no, not another human... what do you want then?") + npc(FacialExpression.CHILD_NORMAL,"Oh no, not another human... what do you want then?") stage = 0 return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> player(core.game.dialogue.FacialExpression.ASKING, "Oh, do you get humans here often?").also { stage++ } - 1 -> npc(core.game.dialogue.FacialExpression.OLD_NORMAL, "Not that often, no, but sometimes.").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.OLD_NORMAL, "Of course, since you people are too big for dwarven", + 0 -> player(FacialExpression.ASKING, "Oh, do you get humans here often?").also { stage++ } + 1 -> npc(FacialExpression.OLD_NORMAL, "Not that often, no, but sometimes.").also { stage++ } + 2 -> npc(FacialExpression.OLD_NORMAL, "Of course, since you people are too big for dwarven", "clothes, they typically don't stay very long.").also { stage++ } - 3 -> player(core.game.dialogue.FacialExpression.SUSPICIOUS, "Why don't you make bigger clothes then?").also { stage++ } - 4 -> npc(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "What'd be the point? Besides, I don't make", "these clothes myself.").also { stage++ } + 3 -> player(FacialExpression.SUSPICIOUS, "Why don't you make bigger clothes then?").also { stage++ } + 4 -> npc(FacialExpression.OLD_NOT_INTERESTED, "What'd be the point? Besides, I don't make", "these clothes myself.").also { stage++ } 5 -> options ("Who makes these clothes then?", "I still want to buy your clothes.", "So do you have any quests for me?").also { stage++ } 6 -> when(buttonId){ - 1 -> player(core.game.dialogue.FacialExpression.GUILTY, "Who makes the clothes then?").also { stage = 10 } + 1 -> player(FacialExpression.GUILTY, "Who makes the clothes then?").also { stage = 10 } 2 -> npc.openShop(player) - 3 -> npc(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED,"Quests? Why would I have any quests?").also { stage = 20 } + 3 -> npc(FacialExpression.OLD_NOT_INTERESTED,"Quests? Why would I have any quests?").also { stage = 20 } } - 10 -> npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"Oh, my sister, she lives in Keldagrim-East.", + 10 -> npc(FacialExpression.OLD_DEFAULT,"Oh, my sister, she lives in Keldagrim-East.", "Has a little stall on the other side of", "the Kelda.").also { stage++ } - 11 -> npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"If she only worked a little harder, like me,", + 11 -> npc(FacialExpression.OLD_DEFAULT,"If she only worked a little harder, like me,", "she wouldn't have to live in the sewers of the city.", "Shame really.").also { stage++ } 12 -> player("The sewers? Your sister lives in the sewers?").also { stage++ } - 13 -> npc(core.game.dialogue.FacialExpression.OLD_SAD,"Keldagrim-East, such a ghastly place.", + 13 -> npc(FacialExpression.OLD_SAD,"Keldagrim-East, such a ghastly place.", "Not civil, polite and clean like we are in the West.").also { stage++ } - 14 -> player(core.game.dialogue.FacialExpression.SUSPICIOUS, "Uh-huh.").also { stage=99 } + 14 -> player(FacialExpression.SUSPICIOUS, "Uh-huh.").also { stage=99 } 20 -> player("Oh, just anything to do would be fine.").also { stage++ } - 21 -> npc(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED,"No, not right now... maybe I'll have something", + 21 -> npc(FacialExpression.OLD_NOT_INTERESTED,"No, not right now... maybe I'll have something", "for you to do later, but nothing at the moment.").also { stage = 99 } 99 -> end() @@ -57,7 +57,7 @@ class AgmundiDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return AgmundiDialogue(player) } diff --git a/Server/src/main/content/region/misc/keldagrim/dialogue/BlackGuardDialogue.kt b/Server/src/main/content/region/misc/keldagrim/dialogue/BlackGuardDialogue.kt index d56b17611..586243a23 100644 --- a/Server/src/main/content/region/misc/keldagrim/dialogue/BlackGuardDialogue.kt +++ b/Server/src/main/content/region/misc/keldagrim/dialogue/BlackGuardDialogue.kt @@ -11,7 +11,7 @@ import org.rs09.consts.NPCs */ @Initializable -class BlackGuardDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class BlackGuardDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC @@ -26,7 +26,7 @@ class BlackGuardDialogue(player: Player? = null) : core.game.dialogue.DialoguePl return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return BlackGuardDialogue(player) } diff --git a/Server/src/main/content/region/misc/keldagrim/dialogue/CartConductorDialogue.kt b/Server/src/main/content/region/misc/keldagrim/dialogue/CartConductorDialogue.kt index f47aca3ac..d88d0841c 100644 --- a/Server/src/main/content/region/misc/keldagrim/dialogue/CartConductorDialogue.kt +++ b/Server/src/main/content/region/misc/keldagrim/dialogue/CartConductorDialogue.kt @@ -15,7 +15,7 @@ private const val WHITE_WOLF_CONDUCTOR = 2181 private const val KELDAGRIM_CONDUCTOR = 2182 @Initializable -class CartConductorDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class CartConductorDialogue(player: Player? = null) : DialoguePlugin(player) { var visitedKeldagrim = false override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ @@ -61,7 +61,7 @@ class CartConductorDialogue(player: Player? = null) : core.game.dialogue.Dialogu } override fun npc(vararg messages: String?): Component { - return super.npc(core.game.dialogue.FacialExpression.OLD_NORMAL, *messages) + return super.npc(FacialExpression.OLD_NORMAL, *messages) } override fun open(vararg args: Any?): Boolean { @@ -77,7 +77,7 @@ class CartConductorDialogue(player: Player? = null) : core.game.dialogue.Dialogu return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return CartConductorDialogue(player) } diff --git a/Server/src/main/content/region/misc/keldagrim/dialogue/InnKeeperDialogue.kt b/Server/src/main/content/region/misc/keldagrim/dialogue/InnKeeperDialogue.kt index 1dfaebdeb..f341e6d53 100644 --- a/Server/src/main/content/region/misc/keldagrim/dialogue/InnKeeperDialogue.kt +++ b/Server/src/main/content/region/misc/keldagrim/dialogue/InnKeeperDialogue.kt @@ -12,34 +12,34 @@ import org.rs09.consts.NPCs */ @Initializable -class InnKeeperDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class InnKeeperDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> { - npc(core.game.dialogue.FacialExpression.CHILD_NEUTRAL, "Welcome to the King's Axe inn!", "What can I help you with?").also { stage++ } + npc(FacialExpression.CHILD_NEUTRAL, "Welcome to the King's Axe inn!", "What can I help you with?").also { stage++ } } 1 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Can I have some beer please?").also { stage++ } + player(FacialExpression.ASKING, "Can I have some beer please?").also { stage++ } } 2 -> { - npc(core.game.dialogue.FacialExpression.CHILD_NORMAL, "Go to the bar downstairs.", "I only deal with residents.").also { stage++ } + npc(FacialExpression.CHILD_NORMAL, "Go to the bar downstairs.", "I only deal with residents.").also { stage++ } } 3 -> { - player(core.game.dialogue.FacialExpression.THINKING, "Residents? People live here?").also { stage++ } + player(FacialExpression.THINKING, "Residents? People live here?").also { stage++ } } 4 -> { - npc(core.game.dialogue.FacialExpression.CHILD_LOUDLY_LAUGHING, "No, just guests that stay the night.").also { stage = 99 } + npc(FacialExpression.CHILD_LOUDLY_LAUGHING, "No, just guests that stay the night.").also { stage = 99 } } 99 -> end() @@ -47,7 +47,7 @@ class InnKeeperDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return InnKeeperDialogue(player) } diff --git a/Server/src/main/content/region/misc/keldagrim/dialogue/NolarDialogue.kt b/Server/src/main/content/region/misc/keldagrim/dialogue/NolarDialogue.kt index 99a22d6cf..b619c8f0d 100644 --- a/Server/src/main/content/region/misc/keldagrim/dialogue/NolarDialogue.kt +++ b/Server/src/main/content/region/misc/keldagrim/dialogue/NolarDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class NolarDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class NolarDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.CHILD_NORMAL,"I have a wide variety of crafting tools on offer,", + npc(FacialExpression.CHILD_NORMAL,"I have a wide variety of crafting tools on offer,", "care to take a look?").also { stage = 0 } return true } @@ -29,10 +29,10 @@ class NolarDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( 1 -> when(buttonId){ 1 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Yes please!").also { stage = 10 } + player(FacialExpression.FRIENDLY, "Yes please!").also { stage = 10 } } 2 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 } + player(FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 } } } @@ -45,7 +45,7 @@ class NolarDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return NolarDialogue(player) } diff --git a/Server/src/main/content/region/misc/keldagrim/dialogue/Reinald.kt b/Server/src/main/content/region/misc/keldagrim/dialogue/Reinald.kt index 96b102e62..243a92792 100644 --- a/Server/src/main/content/region/misc/keldagrim/dialogue/Reinald.kt +++ b/Server/src/main/content/region/misc/keldagrim/dialogue/Reinald.kt @@ -16,7 +16,7 @@ const val REINALD = 2194 * @author Ceikry */ @Initializable -class ReinaldDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ReinaldDialogue(player: Player? = null) : DialoguePlugin(player){ override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage++){ 0 -> options("Yes, please!", "No, thanks.") @@ -34,7 +34,7 @@ class ReinaldDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ReinaldDialogue(player) } diff --git a/Server/src/main/content/region/misc/keldagrim/handlers/KeldagrimPlugin.kt b/Server/src/main/content/region/misc/keldagrim/handlers/KeldagrimPlugin.kt index bfdcceff0..205fb29d6 100644 --- a/Server/src/main/content/region/misc/keldagrim/handlers/KeldagrimPlugin.kt +++ b/Server/src/main/content/region/misc/keldagrim/handlers/KeldagrimPlugin.kt @@ -79,7 +79,7 @@ class KeldagrimOptionHandlers : OptionHandler() { * Dialogue used for the trapdoor in the grand exchange. */ @Initializable -class GETrapdoorDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class GETrapdoorDialogue(player: Player? = null) : DialoguePlugin(player){ override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> end() @@ -103,7 +103,7 @@ class GETrapdoorDialogue(player: Player? = null) : core.game.dialogue.DialoguePl return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return GETrapdoorDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/AlvissDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/AlvissDialogue.kt index 354ab4f80..b3f4f7004 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/AlvissDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/AlvissDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class AlvissDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class AlvissDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"Good day, sir.").also { stage = 0 } + npc(FacialExpression.OLD_DEFAULT,"Good day, sir.").also { stage = 0 } return true } @@ -28,26 +28,26 @@ class AlvissDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin 1 -> when(buttonId){ 1 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "What are you doing down here?").also { stage = 10 } + player(FacialExpression.FRIENDLY, "What are you doing down here?").also { stage = 10 } } 2 -> { - player(core.game.dialogue.FacialExpression.NEUTRAL, "Good day.").also { stage = 99 } + player(FacialExpression.NEUTRAL, "Good day.").also { stage = 99 } } } 10 -> { - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"I'm waiting for my shift, of course.", + npc(FacialExpression.OLD_DEFAULT,"I'm waiting for my shift, of course.", "We can't dig all the time, you know.").also { stage++ } } 11 -> { - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT," I'm also researching the links between the ", + npc(FacialExpression.OLD_DEFAULT," I'm also researching the links between the ", "Fremenniks and the Dwarves.").also { stage++ } } 12 -> { - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"I've found that we have some mythology in common.").also { stage = 99 } + npc(FacialExpression.OLD_DEFAULT,"I've found that we have some mythology in common.").also { stage = 99 } } 99 -> end() @@ -55,7 +55,7 @@ class AlvissDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return AlvissDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/DerrikDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/DerrikDialogue.kt index cefd28535..4e55e6f08 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/DerrikDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/DerrikDialogue.kt @@ -13,11 +13,11 @@ import org.rs09.consts.NPCs */ @Initializable -class DerrikDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class DerrikDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Good day, Sir. Can I help you with anything?").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"Good day, Sir. Can I help you with anything?").also { stage = 0 } return true } @@ -30,15 +30,15 @@ class DerrikDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin 1 -> when(buttonId){ 1 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Can I use your anvil?").also { stage = 5 } + player(FacialExpression.ASKING, "Can I use your anvil?").also { stage = 5 } } 2 -> { - player(core.game.dialogue.FacialExpression.NEUTRAL, "Nothing, thanks.").also { stage = 99 } + player(FacialExpression.NEUTRAL, "Nothing, thanks.").also { stage = 99 } } } 5 -> { - npc(core.game.dialogue.FacialExpression.NEUTRAL, "You may.").also { stage = 99 } + npc(FacialExpression.NEUTRAL, "You may.").also { stage = 99 } } 99 -> end() @@ -46,7 +46,7 @@ class DerrikDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return DerrikDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/DonalDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/DonalDialogue.kt index 77447aa88..a7aafe588 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/DonalDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/DonalDialogue.kt @@ -12,37 +12,37 @@ import org.rs09.consts.NPCs */ @Initializable -class DonalDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class DonalDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"What do you want?").also { stage = 0 } + npc(FacialExpression.OLD_DEFAULT,"What do you want?").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> { - player(core.game.dialogue.FacialExpression.THINKING, "Just wondering if you were still here.").also { stage++ } + player(FacialExpression.THINKING, "Just wondering if you were still here.").also { stage++ } } 1 -> { - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT, "Of course I'm still here.").also { stage++ } + npc(FacialExpression.OLD_DEFAULT, "Of course I'm still here.").also { stage++ } } 2 -> { - npc(core.game.dialogue.FacialExpression.OLD_DISTRESSED, "I'm not going near that crack in the wall again.").also { stage++ } + npc(FacialExpression.OLD_DISTRESSED, "I'm not going near that crack in the wall again.").also { stage++ } } 3 -> { - npc(core.game.dialogue.FacialExpression.OLD_DISTRESSED, "Rock falls and so on are fine, ", "but sea monsters in caves - never!").also { stage = 99 } + npc(FacialExpression.OLD_DISTRESSED, "Rock falls and so on are fine, ", "but sea monsters in caves - never!").also { stage = 99 } } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return DonalDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/FerdDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/FerdDialogue.kt index 22c7cf8f0..92d018524 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/FerdDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/FerdDialogue.kt @@ -12,51 +12,51 @@ import org.rs09.consts.NPCs */ @Initializable -class FerdDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FerdDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"Good day, sir.").also { stage = 0 } + npc(FacialExpression.OLD_DEFAULT,"Good day, sir.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> { - player(core.game.dialogue.FacialExpression.THINKING, "What are you doing down here?.").also { stage++ } + player(FacialExpression.THINKING, "What are you doing down here?.").also { stage++ } } 1 -> { - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT, "Shoring up the walls.").also { stage++ } + npc(FacialExpression.OLD_DEFAULT, "Shoring up the walls.").also { stage++ } } 2 -> { - player(core.game.dialogue.FacialExpression.ASKING, "What does that do?").also { stage++ } + player(FacialExpression.ASKING, "What does that do?").also { stage++ } } 3 -> { - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT, "Stops them falling down.").also { stage = 99 } + npc(FacialExpression.OLD_DEFAULT, "Stops them falling down.").also { stage = 99 } } 4 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Oh, I see.").also { stage++ } + player(FacialExpression.ASKING, "Oh, I see.").also { stage++ } } 5 -> { - npc(core.game.dialogue.FacialExpression.OLD_NOT_INTERESTED, "Aye.", + npc(FacialExpression.OLD_NOT_INTERESTED, "Aye.", "If you want to chatter, you'd better talk to ", "Thorodin over there. I'm working.").also { stage = 99 } } 6 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Okay then.").also { stage++ } + player(FacialExpression.ASKING, "Okay then.").also { stage++ } } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FerdDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/FinnDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/FinnDialogue.kt index df03a1062..f9c813a53 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/FinnDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/FinnDialogue.kt @@ -13,11 +13,11 @@ import org.rs09.consts.NPCs */ @Initializable -class FinnDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FinnDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Can I help you, your Royal Highness?").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"Can I help you, your Royal Highness?").also { stage = 0 } stage = 0 return true } @@ -30,15 +30,15 @@ class FinnDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p 1 -> when(buttonId){ 1 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Yes please. What are you selling?").also { stage = 10 } + player(FacialExpression.ASKING, "Yes please. What are you selling?").also { stage = 10 } } 2 -> { - player(core.game.dialogue.FacialExpression.NEUTRAL, "No thanks.").also { stage = 99 } + player(FacialExpression.NEUTRAL, "No thanks.").also { stage = 99 } } 3 -> { - player(core.game.dialogue.FacialExpression.ASKING, "What's it like living down here?").also { stage = 20 } + player(FacialExpression.ASKING, "What's it like living down here?").also { stage = 20 } } } @@ -47,7 +47,7 @@ class FinnDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p } 20 -> { - npc(core.game.dialogue.FacialExpression.HALF_WORRIED, "A lot drier in the winter than it is above ground.").also { stage = 99 } + npc(FacialExpression.HALF_WORRIED, "A lot drier in the winter than it is above ground.").also { stage = 99 } } 99 -> { @@ -58,7 +58,7 @@ class FinnDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FinnDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/FishmongerMiscDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/FishmongerMiscDialogue.kt index 18d23fee0..9f2a60285 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/FishmongerMiscDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/FishmongerMiscDialogue.kt @@ -13,14 +13,14 @@ import org.rs09.consts.NPCs */ @Initializable -class FishmongerMiscDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FishmongerMiscDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (!isQuestComplete(player, "Throne of Miscellania")) { - npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Greetings, Sir. Get your fresh fish here! I've heard that the Etceterian fish is stored in a cow shed.").also { stage = 0 } + npcl(FacialExpression.FRIENDLY,"Greetings, Sir. Get your fresh fish here! I've heard that the Etceterian fish is stored in a cow shed.").also { stage = 0 } } else { - npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Greetings, Your Highness. Have some fresh fish! I've heard that the Etceterian fish is stored in a cow shed.").also { stage = 0 } + npcl(FacialExpression.FRIENDLY,"Greetings, Your Highness. Have some fresh fish! I've heard that the Etceterian fish is stored in a cow shed.").also { stage = 0 } } return true } @@ -32,7 +32,7 @@ class FishmongerMiscDialogue(player: Player? = null) : core.game.dialogue.Dialog return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FishmongerMiscDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/FlowerGirlDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/FlowerGirlDialogue.kt index 9b4fcfcb1..c46e2f42e 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/FlowerGirlDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/FlowerGirlDialogue.kt @@ -15,7 +15,7 @@ import org.rs09.consts.NPCs */ @Initializable -class FlowerGirlDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FlowerGirlDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC @@ -27,14 +27,14 @@ class FlowerGirlDialogue(player: Player? = null) : core.game.dialogue.DialoguePl false -> npc(FacialExpression.NEUTRAL, "Hello.").also { stage = 1 } } */ - npc(core.game.dialogue.FacialExpression.NEUTRAL, "Hello.").also { stage = 1 } + npc(FacialExpression.NEUTRAL, "Hello.").also { stage = 1 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 1 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Good day. What are you doing?").also { stage++ } + player(FacialExpression.ASKING, "Good day. What are you doing?").also { stage++ } } 2 -> { @@ -44,7 +44,7 @@ class FlowerGirlDialogue(player: Player? = null) : core.game.dialogue.DialoguePl false -> npc(FacialExpression.NEUTRAL, "I'm selling flowers, 15gp for three. Would you like some?").also { stage++ } } */ - npc(core.game.dialogue.FacialExpression.NEUTRAL, "I'm selling flowers, 15gp for three. Would you like some?").also { stage++ } + npc(FacialExpression.NEUTRAL, "I'm selling flowers, 15gp for three. Would you like some?").also { stage++ } } 3 -> { @@ -54,15 +54,15 @@ class FlowerGirlDialogue(player: Player? = null) : core.game.dialogue.DialoguePl 4 -> when(buttonId){ 1 -> { if (player.inventory.contains(995,15)) { - npc(core.game.dialogue.FacialExpression.HAPPY, "Thank you! Here you go.").also { stage = 99 } + npc(FacialExpression.HAPPY, "Thank you! Here you go.").also { stage = 99 } player.inventory.remove(Item(995, 15)) addItemOrDrop(player, 2460, 1) } else { - player(core.game.dialogue.FacialExpression.HALF_THINKING, "I'm sorry, but I don't have 15gp.").also { stage = 99 } + player(FacialExpression.HALF_THINKING, "I'm sorry, but I don't have 15gp.").also { stage = 99 } } } 2 -> { - player(core.game.dialogue.FacialExpression.NEUTRAL, "No, thank you.").also { stage = 99 } + player(FacialExpression.NEUTRAL, "No, thank you.").also { stage = 99 } } } @@ -71,7 +71,7 @@ class FlowerGirlDialogue(player: Player? = null) : core.game.dialogue.DialoguePl return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FlowerGirlDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/FullangrDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/FullangrDialogue.kt index 0ab58465e..c8e0530e8 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/FullangrDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/FullangrDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class FullangrDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FullangrDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"Good day, sir.").also { stage = 0 } + npc(FacialExpression.OLD_DEFAULT,"Good day, sir.").also { stage = 0 } return true } @@ -28,16 +28,16 @@ class FullangrDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug 1 -> when(buttonId){ 1 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "What are you doing down here?").also { stage = 10 } + player(FacialExpression.FRIENDLY, "What are you doing down here?").also { stage = 10 } } 2 -> { - player(core.game.dialogue.FacialExpression.NEUTRAL, "Good day.").also { stage = 99 } + player(FacialExpression.NEUTRAL, "Good day.").also { stage = 99 } } } 10 -> { - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"I'm working on the digging, of course.", + npc(FacialExpression.OLD_DEFAULT,"I'm working on the digging, of course.", "It's a small excavation, so only two of us ", "can work on it at a time.").also { stage = 99 } } @@ -47,7 +47,7 @@ class FullangrDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FullangrDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/GreengrocerMiscDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/GreengrocerMiscDialogue.kt index 74ff66ee0..789d09154 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/GreengrocerMiscDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/GreengrocerMiscDialogue.kt @@ -13,11 +13,11 @@ import org.rs09.consts.NPCs */ @Initializable -class GreengrocerMiscDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class GreengrocerMiscDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Welcome, Sir.", + npc(FacialExpression.FRIENDLY,"Welcome, Sir.", "I sell only the finest and freshest vegetables!").also { stage = 0 } return true } @@ -31,7 +31,7 @@ class GreengrocerMiscDialogue(player: Player? = null) : core.game.dialogue.Dialo return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return GreengrocerMiscDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/HallaDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/HallaDialogue.kt index 93acdbee3..ca55da312 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/HallaDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/HallaDialogue.kt @@ -12,18 +12,18 @@ import org.rs09.consts.NPCs */ @Initializable -class HallaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class HallaDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Welcome to Miscellania's first clothing store!", "We sell clothing made especially for Fremenniks", "and Dwarves.").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"Welcome to Miscellania's first clothing store!", "We sell clothing made especially for Fremenniks", "and Dwarves.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Can I help you with anything, your Royal Highness?").also { stage++ } + npc(FacialExpression.ASKING, "Can I help you with anything, your Royal Highness?").also { stage++ } } 1 -> { @@ -32,15 +32,15 @@ class HallaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( 2 -> when(buttonId){ 1 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "I'd like to look at what you have for sale.").also { stage = 10 } + player(FacialExpression.FRIENDLY, "I'd like to look at what you have for sale.").also { stage = 10 } } 2 -> { - player(core.game.dialogue.FacialExpression.NEUTRAL, "No thank you, I'm fine.").also { stage = 99 } + player(FacialExpression.NEUTRAL, "No thank you, I'm fine.").also { stage = 99 } } 3 -> { - player(core.game.dialogue.FacialExpression.ASKING, "What's it like living down here?").also { stage = 20 } + player(FacialExpression.ASKING, "What's it like living down here?").also { stage = 20 } } } @@ -49,10 +49,10 @@ class HallaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( } 20 -> { - npc(core.game.dialogue.FacialExpression.NEUTRAL, "It's very spacious down here.", "One of the dwarves said that the caves go on for miles!").also { stage++ } + npc(FacialExpression.NEUTRAL, "It's very spacious down here.", "One of the dwarves said that the caves go on for miles!").also { stage++ } } 21 -> { - npc(core.game.dialogue.FacialExpression.NEUTRAL, "The only problem I find is that the lighting's not very good,", "which means I make mistakes when cutting cloth.").also { stage = 99 } + npc(FacialExpression.NEUTRAL, "The only problem I find is that the lighting's not very good,", "which means I make mistakes when cutting cloth.").also { stage = 99 } } 99 -> end() @@ -60,7 +60,7 @@ class HallaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return HallaDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/JariDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/JariDialogue.kt index b765c7fff..94e6c2def 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/JariDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/JariDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class JariDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class JariDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"Good day, sir.").also { stage = 0 } + npc(FacialExpression.OLD_DEFAULT,"Good day, sir.").also { stage = 0 } return true } @@ -28,20 +28,20 @@ class JariDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p 1 -> when(buttonId){ 1 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "What are you doing down here?").also { stage = 10 } + player(FacialExpression.FRIENDLY, "What are you doing down here?").also { stage = 10 } } 2 -> { - player(core.game.dialogue.FacialExpression.NEUTRAL, "Good day.").also { stage = 99 } + player(FacialExpression.NEUTRAL, "Good day.").also { stage = 99 } } } 10 -> { - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"I'm waiting to work on the digging.").also { stage++ } + npc(FacialExpression.OLD_DEFAULT,"I'm waiting to work on the digging.").also { stage++ } } 11 -> { - npc(core.game.dialogue.FacialExpression.OLD_HAPPY,"It's the first excavation I've worked on, ", + npc(FacialExpression.OLD_HAPPY,"It's the first excavation I've worked on, ", "and I'm looking forward to it.").also { stage = 99 } } @@ -50,7 +50,7 @@ class JariDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return JariDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/MiscCitizenGoodDayDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/MiscCitizenGoodDayDialogue.kt index ea3f56294..72247144d 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/MiscCitizenGoodDayDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/MiscCitizenGoodDayDialogue.kt @@ -12,25 +12,25 @@ import org.rs09.consts.NPCs */ @Initializable -class MiscCitizenGoodDayDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class MiscCitizenGoodDayDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "Good day, Your Royal Highness.").also { stage = 99 } + npc(FacialExpression.FRIENDLY, "Good day, Your Royal Highness.").also { stage = 99 } } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return MiscCitizenGoodDayDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/OsvaldDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/OsvaldDialogue.kt index 82e271b32..ad21fb7ea 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/OsvaldDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/OsvaldDialogue.kt @@ -12,18 +12,18 @@ import org.rs09.consts.NPCs */ @Initializable -class OsvaldDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class OsvaldDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Welcome to the Miscellania food store.","We've only opened recently.").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"Welcome to the Miscellania food store.","We've only opened recently.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0-> { - npc(core.game.dialogue.FacialExpression.NEUTRAL, "Would you like to buy anything,", + npc(FacialExpression.NEUTRAL, "Would you like to buy anything,", "your Royal Highness?").also { stage++ } } @@ -35,15 +35,15 @@ class OsvaldDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin 2 -> when(buttonId){ 1 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Could you show me what you have for sale?").also { stage = 10 } + player(FacialExpression.ASKING, "Could you show me what you have for sale?").also { stage = 10 } } 2 -> { - player(core.game.dialogue.FacialExpression.NEUTRAL, "No thank you, I don't need food just now.").also { end() } + player(FacialExpression.NEUTRAL, "No thank you, I don't need food just now.").also { end() } } 3 -> { - player(core.game.dialogue.FacialExpression.ASKING, "What's it like living down here?").also { stage = 20 } + player(FacialExpression.ASKING, "What's it like living down here?").also { stage = 20 } } } @@ -52,7 +52,7 @@ class OsvaldDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin } 20 -> { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "The town's thriving.", + npc(FacialExpression.FRIENDLY, "The town's thriving.", "I'm sure it'll soon be as busy as Rellekka!").also { stage = 99 } } @@ -63,7 +63,7 @@ class OsvaldDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return OsvaldDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/RunaDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/RunaDialogue.kt index fb8a6b062..8a13bdabe 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/RunaDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/RunaDialogue.kt @@ -12,22 +12,22 @@ import org.rs09.consts.NPCs */ @Initializable -class RunaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class RunaDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Would you like to try some fine Miscellanian ale,", "your Royal Highness?").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"Would you like to try some fine Miscellanian ale,", "your Royal Highness?").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> { - npc(core.game.dialogue.FacialExpression.ASKING, "Well I say Miscellanian, but it's actually brewed", "on the mainland.").also { stage++ } + npc(FacialExpression.ASKING, "Well I say Miscellanian, but it's actually brewed", "on the mainland.").also { stage++ } } 1 -> { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "Would you like to try some anyway?").also { stage++ } + npc(FacialExpression.FRIENDLY, "Would you like to try some anyway?").also { stage++ } } 2 -> { @@ -36,15 +36,15 @@ class RunaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p 3 -> when(buttonId){ 1 -> { - player(core.game.dialogue.FacialExpression.ASKING, "Yes please.").also { stage = 10 } + player(FacialExpression.ASKING, "Yes please.").also { stage = 10 } } 2 -> { - player(core.game.dialogue.FacialExpression.NEUTRAL, "No thank you.").also { stage = 99 } + player(FacialExpression.NEUTRAL, "No thank you.").also { stage = 99 } } 3 -> { - player(core.game.dialogue.FacialExpression.ASKING, "What's it like living down here?").also { stage = 20 } + player(FacialExpression.ASKING, "What's it like living down here?").also { stage = 20 } } } @@ -53,11 +53,11 @@ class RunaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p } 20 -> { - npc(core.game.dialogue.FacialExpression.HALF_WORRIED, "Business is booming!").also { stage++ } + npc(FacialExpression.HALF_WORRIED, "Business is booming!").also { stage++ } } 21 -> { - npc(core.game.dialogue.FacialExpression.HALF_WORRIED, "Now, if only I hadn't taken a loss to the beer I sold", "to those teenagers.").also { end() } + npc(FacialExpression.HALF_WORRIED, "Now, if only I hadn't taken a loss to the beer I sold", "to those teenagers.").also { end() } } 99 -> { @@ -67,7 +67,7 @@ class RunaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(p return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return RunaDialogue(player) } diff --git a/Server/src/main/content/region/misc/miscellania/dialogue/ThorodinDialogue.kt b/Server/src/main/content/region/misc/miscellania/dialogue/ThorodinDialogue.kt index c34711819..6cf33d5d5 100644 --- a/Server/src/main/content/region/misc/miscellania/dialogue/ThorodinDialogue.kt +++ b/Server/src/main/content/region/misc/miscellania/dialogue/ThorodinDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class ThorodinDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ThorodinDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"Good day, sir.").also { stage = 0 } + npc(FacialExpression.OLD_DEFAULT,"Good day, sir.").also { stage = 0 } return true } @@ -28,35 +28,35 @@ class ThorodinDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug 1 -> when(buttonId){ 1 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY, "What are you doing down here?").also { stage = 10 } + player(FacialExpression.FRIENDLY, "What are you doing down here?").also { stage = 10 } } 2 -> { - player(core.game.dialogue.FacialExpression.NEUTRAL, "Good day.").also { stage = 99 } + player(FacialExpression.NEUTRAL, "Good day.").also { stage = 99 } } } 10 -> { - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"We're extending the cave so more people can live in it.", + npc(FacialExpression.OLD_DEFAULT,"We're extending the cave so more people can live in it.", "These Miscellanians aren't so bad.", "They appreciate the benefits of living underground.").also { stage++ } } 11 -> { - player(core.game.dialogue.FacialExpression.ASKING,"...such as?").also { stage++ } + player(FacialExpression.ASKING,"...such as?").also { stage++ } } 12 -> { - npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"Not getting rained on, for example.", + npc(FacialExpression.OLD_DEFAULT,"Not getting rained on, for example.", "Did you do anything about that monster Donal", "was talking about?").also { stage++ } } 13 -> { - player(core.game.dialogue.FacialExpression.FRIENDLY,"It's been taken care of.").also { stage++ } + player(FacialExpression.FRIENDLY,"It's been taken care of.").also { stage++ } } 14 -> { - npc(core.game.dialogue.FacialExpression.OLD_HAPPY,"Glad to hear it.", + npc(FacialExpression.OLD_HAPPY,"Glad to hear it.", "Now we can get on with excavating.").also { stage = 99 } } @@ -65,7 +65,7 @@ class ThorodinDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ThorodinDialogue(player) } diff --git a/Server/src/main/content/region/misc/mosle/dialogue/CharleyDialogue.kt b/Server/src/main/content/region/misc/mosle/dialogue/CharleyDialogue.kt index ab1ee240f..9461b96a2 100644 --- a/Server/src/main/content/region/misc/mosle/dialogue/CharleyDialogue.kt +++ b/Server/src/main/content/region/misc/mosle/dialogue/CharleyDialogue.kt @@ -13,15 +13,15 @@ import org.rs09.consts.NPCs */ @Initializable -class CharleyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class CharleyDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if (player.inventory.contains(Items.BOOK_O_PIRACY_7144, 1)) { - npc(core.game.dialogue.FacialExpression.FRIENDLY, "I got fish, you got gold?").also { stage = 10 } + npc(FacialExpression.FRIENDLY, "I got fish, you got gold?").also { stage = 10 } } else { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hello!").also { stage = 0 } + player(FacialExpression.FRIENDLY, "Hello!").also { stage = 0 } } return true @@ -29,37 +29,37 @@ class CharleyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Arr? Be ye wantin' te go on account with our gang o' fillibusters?").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "The powder monkey be takin' a caulk after gettin' rowdy on bumboo, so there be plenty of room for ye.").also { stage++ } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Riiiiight...").also { stage++ } - 3 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "I'll just be over here if you need me.").also { stage = 99 } + 0 -> npcl(FacialExpression.FRIENDLY, "Arr? Be ye wantin' te go on account with our gang o' fillibusters?").also { stage++ } + 1 -> npcl(FacialExpression.FRIENDLY, "The powder monkey be takin' a caulk after gettin' rowdy on bumboo, so there be plenty of room for ye.").also { stage++ } + 2 -> player(FacialExpression.FRIENDLY, "Riiiiight...").also { stage++ } + 3 -> player(FacialExpression.FRIENDLY, "I'll just be over here if you need me.").also { stage = 99 } 10 -> options("Yes.", "Yes, but I don't want your fish.", "What happened to your legs?").also { stage++ } 11 -> when(buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Yes.").also { stage = 80 } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, but I don't want your fish.").also { stage = 20 } - 3 -> player(core.game.dialogue.FacialExpression.HALF_ASKING, "What happened to your legs?").also { stage = 30 } + 1 -> player(FacialExpression.FRIENDLY, "Yes.").also { stage = 80 } + 2 -> player(FacialExpression.FRIENDLY, "Yes, but I don't want your fish.").also { stage = 20 } + 3 -> player(FacialExpression.HALF_ASKING, "What happened to your legs?").also { stage = 30 } } - 20 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Then what are ye doin' in a fish shop? Looking fer work?").also { stage++ } - 21 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Possibly, do you have any quests?").also { stage++ } - 22 -> npcl(core.game.dialogue.FacialExpression.HALF_ASKING, "I dunno, I haven't gone through the last catch yet. What sort of a fish is it?").also { stage++ } - 23 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "A quest isn't a type of fish!").also { stage++ } - 24 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Then I don't have any, and yer wastin' my time!").also { stage = 99 } + 20 -> npcl(FacialExpression.FRIENDLY, "Then what are ye doin' in a fish shop? Looking fer work?").also { stage++ } + 21 -> player(FacialExpression.FRIENDLY, "Possibly, do you have any quests?").also { stage++ } + 22 -> npcl(FacialExpression.HALF_ASKING, "I dunno, I haven't gone through the last catch yet. What sort of a fish is it?").also { stage++ } + 23 -> player(FacialExpression.FRIENDLY, "A quest isn't a type of fish!").also { stage++ } + 24 -> npcl(FacialExpression.FRIENDLY, "Then I don't have any, and yer wastin' my time!").also { stage = 99 } - 30 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Ye wanna know what happened to my legs?").also { stage++ } - 31 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Yer too much of a lilly-livered, hat wearin' landlubber to know what happened to my legs!").also { stage++ } - 32 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "No I'm not! I've seen some freaky stuff! I can take it!").also { stage++ } - 33 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "All right, lad, since yer so insistent, I'll tell ye.").also { stage++ } - 34 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "See, I was clingin' onto a barrel, me ship havin' just had an encounter with this albatross.").also { stage++ } - 35 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "The sea was thrashin' and wild, but not so wild that I didn't see the fins of some sharks closin' in on me.").also { stage++ } - 36 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I managed to yank a sliver of wood from the barrel just as one of them grabbed me from below, but I slipped down the things throat by about two feet before I managed te kill it.").also { stage++ } - 37 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "How did you survive?").also { stage++ } - 38 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "A passin' ship saw the sharks and knew there would be survivors in the water. They sent a longboat and picked me up, but not before the sharks had taken off my legs.").also { stage++ } - 39 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "And that lad is why they call me two feet Charley, because they found me jammed two feet down a shark's throat.").also { stage++ } - 40 -> player(core.game.dialogue.FacialExpression.DISGUSTED, "I think I'm gonna be sick...").also { stage++ } - 41 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I knew ye couldn't handle the truth!").also { stage = 99 } + 30 -> npcl(FacialExpression.FRIENDLY, "Ye wanna know what happened to my legs?").also { stage++ } + 31 -> npcl(FacialExpression.FRIENDLY, "Yer too much of a lilly-livered, hat wearin' landlubber to know what happened to my legs!").also { stage++ } + 32 -> playerl(FacialExpression.FRIENDLY, "No I'm not! I've seen some freaky stuff! I can take it!").also { stage++ } + 33 -> npcl(FacialExpression.FRIENDLY, "All right, lad, since yer so insistent, I'll tell ye.").also { stage++ } + 34 -> npcl(FacialExpression.FRIENDLY, "See, I was clingin' onto a barrel, me ship havin' just had an encounter with this albatross.").also { stage++ } + 35 -> npcl(FacialExpression.FRIENDLY, "The sea was thrashin' and wild, but not so wild that I didn't see the fins of some sharks closin' in on me.").also { stage++ } + 36 -> npcl(FacialExpression.FRIENDLY, "I managed to yank a sliver of wood from the barrel just as one of them grabbed me from below, but I slipped down the things throat by about two feet before I managed te kill it.").also { stage++ } + 37 -> player(FacialExpression.FRIENDLY, "How did you survive?").also { stage++ } + 38 -> npcl(FacialExpression.FRIENDLY, "A passin' ship saw the sharks and knew there would be survivors in the water. They sent a longboat and picked me up, but not before the sharks had taken off my legs.").also { stage++ } + 39 -> npcl(FacialExpression.FRIENDLY, "And that lad is why they call me two feet Charley, because they found me jammed two feet down a shark's throat.").also { stage++ } + 40 -> player(FacialExpression.DISGUSTED, "I think I'm gonna be sick...").also { stage++ } + 41 -> npcl(FacialExpression.FRIENDLY, "I knew ye couldn't handle the truth!").also { stage = 99 } 80 -> end().also { npc.openShop(player) } 99 -> end() @@ -67,7 +67,7 @@ class CharleyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return CharleyDialogue(player) } diff --git a/Server/src/main/content/region/misc/piratecove/dialogue/BeefyBurnsDialogue.kt b/Server/src/main/content/region/misc/piratecove/dialogue/BeefyBurnsDialogue.kt index 0744cdc74..9ee5b708c 100644 --- a/Server/src/main/content/region/misc/piratecove/dialogue/BeefyBurnsDialogue.kt +++ b/Server/src/main/content/region/misc/piratecove/dialogue/BeefyBurnsDialogue.kt @@ -12,28 +12,28 @@ import org.rs09.consts.NPCs */ @Initializable -class BeefyBurnsDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class BeefyBurnsDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.HALF_ASKING, "What are you cooking?").also { stage = 0 } + player(FacialExpression.HALF_ASKING, "What are you cooking?").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.LAUGH, "My speciality! What else could I be cooking?").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.THINKING, "Ok, and your speciality is...?").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "Boiled shark guts with a hint of rosemary and a dash of squid ink.").also { stage++ } - 3 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"I think I'll stick to making my own food.").also { stage++ } - 4 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Your loss!").also { stage = 99 } + 0 -> npc(FacialExpression.LAUGH, "My speciality! What else could I be cooking?").also { stage++ } + 1 -> player(FacialExpression.THINKING, "Ok, and your speciality is...?").also { stage++ } + 2 -> npcl(FacialExpression.LAUGH, "Boiled shark guts with a hint of rosemary and a dash of squid ink.").also { stage++ } + 3 -> player(FacialExpression.FRIENDLY,"I think I'll stick to making my own food.").also { stage++ } + 4 -> npc(FacialExpression.FRIENDLY, "Your loss!").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return BeefyBurnsDialogue(player) } diff --git a/Server/src/main/content/region/misc/piratecove/dialogue/DaveyBoyDialogue.kt b/Server/src/main/content/region/misc/piratecove/dialogue/DaveyBoyDialogue.kt index 70e35c311..756915ac2 100644 --- a/Server/src/main/content/region/misc/piratecove/dialogue/DaveyBoyDialogue.kt +++ b/Server/src/main/content/region/misc/piratecove/dialogue/DaveyBoyDialogue.kt @@ -12,13 +12,13 @@ import org.rs09.consts.NPCs */ @Initializable -class DaveyBoyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class DaveyBoyDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC when ((1..2).random()) { - 1 -> playerl(core.game.dialogue.FacialExpression.HALF_ASKING, "What does it take to become first mate on a ship?").also { stage = 0 } - 2 -> npcl(core.game.dialogue.FacialExpression.ANNOYED, "It is customary when stowing away on a vessel to not introduce yourself to the Captains First Mate, oh foolish one.").also { stage = 10 } + 1 -> playerl(FacialExpression.HALF_ASKING, "What does it take to become first mate on a ship?").also { stage = 0 } + 2 -> npcl(FacialExpression.ANNOYED, "It is customary when stowing away on a vessel to not introduce yourself to the Captains First Mate, oh foolish one.").also { stage = 10 } } return true @@ -26,22 +26,22 @@ class DaveyBoyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlug override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "Good question. We have a diplomatic consession at the turn of the financial year. Said pirate is chosen should the existing mate be absent without leave.").also { stage++ } - 1 -> playerl(core.game.dialogue.FacialExpression.THINKING, "I had no idea. I always figured it was all about popularity.").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "It is. I'm just pulling your leg.").also { stage++ } - 3 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"Oh....").also { stage = 99 } + 0 -> npcl(FacialExpression.LAUGH, "Good question. We have a diplomatic consession at the turn of the financial year. Said pirate is chosen should the existing mate be absent without leave.").also { stage++ } + 1 -> playerl(FacialExpression.THINKING, "I had no idea. I always figured it was all about popularity.").also { stage++ } + 2 -> npc(FacialExpression.FRIENDLY, "It is. I'm just pulling your leg.").also { stage++ } + 3 -> player(FacialExpression.FRIENDLY,"Oh....").also { stage = 99 } - 10 -> player(core.game.dialogue.FacialExpression.ANNOYED, "Hey! I'm not a stowaway!").also { stage++ } - 11 -> player(core.game.dialogue.FacialExpression.ANNOYED, "That Lokar guy invited me aboard...").also { stage++ } - 12 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I see. Well, don't distract me as I'm making preparations for departure.").also { stage++ } - 13 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Try not to distract any of the crew either, Zamorak knows it's hard enough to get them to do any work around here without strangers wandering round the ship asking them inane questions.").also { stage = 99 } + 10 -> player(FacialExpression.ANNOYED, "Hey! I'm not a stowaway!").also { stage++ } + 11 -> player(FacialExpression.ANNOYED, "That Lokar guy invited me aboard...").also { stage++ } + 12 -> npcl(FacialExpression.FRIENDLY, "I see. Well, don't distract me as I'm making preparations for departure.").also { stage++ } + 13 -> npcl(FacialExpression.FRIENDLY, "Try not to distract any of the crew either, Zamorak knows it's hard enough to get them to do any work around here without strangers wandering round the ship asking them inane questions.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return DaveyBoyDialogue(player) } diff --git a/Server/src/main/content/region/misc/piratecove/dialogue/EagleEyeShultzDialogue.kt b/Server/src/main/content/region/misc/piratecove/dialogue/EagleEyeShultzDialogue.kt index 486498765..ab7083b0b 100644 --- a/Server/src/main/content/region/misc/piratecove/dialogue/EagleEyeShultzDialogue.kt +++ b/Server/src/main/content/region/misc/piratecove/dialogue/EagleEyeShultzDialogue.kt @@ -12,27 +12,27 @@ import org.rs09.consts.NPCs */ @Initializable -class EagleEyeShultzDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class EagleEyeShultzDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - playerl(core.game.dialogue.FacialExpression.HALF_ASKING, "What do you do for fun on this ship? You know, when you're not doing pirate stuff.").also { stage = 0 } + playerl(FacialExpression.HALF_ASKING, "What do you do for fun on this ship? You know, when you're not doing pirate stuff.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "All sorts! Hide and seek, pin the patch on the pirate, walk the plank!").also { stage++ } - 1 -> playerl(core.game.dialogue.FacialExpression.WORRIED, "What a life! Wait a minute. 'Walk the plank'? Surely that's a bit dangerous?").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "Well of course, but where's the fun without a few deaths?").also { stage++ } - 3 -> player(core.game.dialogue.FacialExpression.HALF_THINKING,"I think I'll stick to Runelink.").also { stage = 99 } + 0 -> npcl(FacialExpression.FRIENDLY, "All sorts! Hide and seek, pin the patch on the pirate, walk the plank!").also { stage++ } + 1 -> playerl(FacialExpression.WORRIED, "What a life! Wait a minute. 'Walk the plank'? Surely that's a bit dangerous?").also { stage++ } + 2 -> npcl(FacialExpression.LAUGH, "Well of course, but where's the fun without a few deaths?").also { stage++ } + 3 -> player(FacialExpression.HALF_THINKING,"I think I'll stick to Runelink.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return EagleEyeShultzDialogue(player) } diff --git a/Server/src/main/content/region/misc/piratecove/dialogue/LecherousLeeDialogue.kt b/Server/src/main/content/region/misc/piratecove/dialogue/LecherousLeeDialogue.kt index 63aa1c1e3..566450942 100644 --- a/Server/src/main/content/region/misc/piratecove/dialogue/LecherousLeeDialogue.kt +++ b/Server/src/main/content/region/misc/piratecove/dialogue/LecherousLeeDialogue.kt @@ -12,84 +12,84 @@ import org.rs09.consts.NPCs */ @Initializable -class LecherousLeeDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class LecherousLeeDialogue(player: Player? = null) : DialoguePlugin(player){ private val conversations = arrayOf (0, 10, 13, 17, 21, 27, 31, 36, 43, 52) override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hello.").also { stage = conversations.random() } + player(FacialExpression.FRIENDLY, "Hello.").also { stage = conversations.random() } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "So how's life as a pirate?").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "What kind of question is that? How's life as a... I dunno. Whatever it is that you do for a living.").also { stage++ } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"I'm a freelance troubleshooter.").also { stage++ } - 3 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "What does that entail then?").also { stage++ } - 4 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY,"Mostly killing things for money and delivering items around the planet for people.").also { stage++ } - 5 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"I collect stuff.").also { stage++ } - 6 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "So how's that life?").also { stage++ } - 7 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"Can't complain, can't complain...").also { stage++ } - 8 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Well, there you go.").also { stage = 99 } + 0 -> player(FacialExpression.FRIENDLY, "So how's life as a pirate?").also { stage++ } + 1 -> npcl(FacialExpression.LAUGH, "What kind of question is that? How's life as a... I dunno. Whatever it is that you do for a living.").also { stage++ } + 2 -> player(FacialExpression.FRIENDLY,"I'm a freelance troubleshooter.").also { stage++ } + 3 -> npc(FacialExpression.FRIENDLY, "What does that entail then?").also { stage++ } + 4 -> playerl(FacialExpression.FRIENDLY,"Mostly killing things for money and delivering items around the planet for people.").also { stage++ } + 5 -> player(FacialExpression.FRIENDLY,"I collect stuff.").also { stage++ } + 6 -> npc(FacialExpression.FRIENDLY, "So how's that life?").also { stage++ } + 7 -> player(FacialExpression.FRIENDLY,"Can't complain, can't complain...").also { stage++ } + 8 -> npc(FacialExpression.FRIENDLY, "Well, there you go.").also { stage = 99 } - 10 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Aren't you a little short for a pirate?").also { stage++ } - 11 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "My mother was a gnome. Apparently it was a very painful birth.").also { stage++ } - 12 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"More info than I wanted, thanks!").also { stage = 99 } + 10 -> player(FacialExpression.FRIENDLY, "Aren't you a little short for a pirate?").also { stage++ } + 11 -> npcl(FacialExpression.LAUGH, "My mother was a gnome. Apparently it was a very painful birth.").also { stage++ } + 12 -> player(FacialExpression.FRIENDLY,"More info than I wanted, thanks!").also { stage = 99 } - 13 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Sorry, can't stop, the Captain will have my guts for garters if he catches me slacking off talking to the stowaway.").also { stage++ } - 14 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"I'm not a stowaway! I was invited aboard!").also { stage++ } - 15 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Yeah, whatever guy, it doesn't really matter who you are I'll get in trouble!").also { stage = 99 } + 13 -> npcl(FacialExpression.FRIENDLY, "Sorry, can't stop, the Captain will have my guts for garters if he catches me slacking off talking to the stowaway.").also { stage++ } + 14 -> player(FacialExpression.FRIENDLY,"I'm not a stowaway! I was invited aboard!").also { stage++ } + 15 -> npcl(FacialExpression.FRIENDLY, "Yeah, whatever guy, it doesn't really matter who you are I'll get in trouble!").also { stage = 99 } - 17 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "You know, I've always wondered what life as a pirate actually entails.").also { stage++ } - 18 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "Well, at the moment it mostly involves being asked random questions by a stowaway.").also { stage++ } - 19 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY,"I'm not a stowaway! I was invited aboard! By Lokar! Ask him!").also { stage++ } - 20 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Hey, whatever pal. Just make sure the captain doesn't catch you, pirates don't like stowaways much.").also { stage = 99 } + 17 -> playerl(FacialExpression.FRIENDLY, "You know, I've always wondered what life as a pirate actually entails.").also { stage++ } + 18 -> npcl(FacialExpression.LAUGH, "Well, at the moment it mostly involves being asked random questions by a stowaway.").also { stage++ } + 19 -> playerl(FacialExpression.FRIENDLY,"I'm not a stowaway! I was invited aboard! By Lokar! Ask him!").also { stage++ } + 20 -> npcl(FacialExpression.FRIENDLY, "Hey, whatever pal. Just make sure the captain doesn't catch you, pirates don't like stowaways much.").also { stage = 99 } - 21 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "Ah, good day to you sirrah! Your face is unfamiliar, did you perhaps join us aboard the ship at Lunar Isle?").also { stage++ } - 22 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY,"No, Lokar offered me a lift in Rellekka actually.").also { stage++ } - 23 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Oh, really? You don't look like a Fremennik to me!").also { stage++ } - 24 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY,"Well... I kind of am, and I kind of aren't. It's a long story.").also { stage++ } - 25 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Sorry I don't have time to hear it then! See you around young fremennik-who-is-not-really-a- fremennik!").also { stage++ } - 26 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY,"'Bye.").also { stage = 99 } + 21 -> npcl(FacialExpression.LAUGH, "Ah, good day to you sirrah! Your face is unfamiliar, did you perhaps join us aboard the ship at Lunar Isle?").also { stage++ } + 22 -> playerl(FacialExpression.FRIENDLY,"No, Lokar offered me a lift in Rellekka actually.").also { stage++ } + 23 -> npcl(FacialExpression.FRIENDLY, "Oh, really? You don't look like a Fremennik to me!").also { stage++ } + 24 -> playerl(FacialExpression.FRIENDLY,"Well... I kind of am, and I kind of aren't. It's a long story.").also { stage++ } + 25 -> npcl(FacialExpression.FRIENDLY, "Sorry I don't have time to hear it then! See you around young fremennik-who-is-not-really-a- fremennik!").also { stage++ } + 26 -> playerl(FacialExpression.FRIENDLY,"'Bye.").also { stage = 99 } - 27 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Brrrr! Its cold up here!").also { stage++ } - 28 -> npcl(core.game.dialogue.FacialExpression.LAUGH, "You think this is cold? Up by Acheron it gets so cold that when you talk you see the words freeze in the air in front of you!").also { stage++ } - 29 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"REALLY?").also { stage++ } - 30 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Nah, not really. I was exaggerating for humourous effect. It is very very cold though!").also { stage = 99 } + 27 -> player(FacialExpression.FRIENDLY, "Brrrr! Its cold up here!").also { stage++ } + 28 -> npcl(FacialExpression.LAUGH, "You think this is cold? Up by Acheron it gets so cold that when you talk you see the words freeze in the air in front of you!").also { stage++ } + 29 -> player(FacialExpression.FRIENDLY,"REALLY?").also { stage++ } + 30 -> npcl(FacialExpression.FRIENDLY, "Nah, not really. I was exaggerating for humourous effect. It is very very cold though!").also { stage = 99 } - 31 -> npc(core.game.dialogue.FacialExpression.LAUGH, "Hello to you too.").also { stage++ } - 32 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY,"Yar! We be pirates, yar! Avast, ye scurvy land-lubbing lychee!").also { stage++ } - 33 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Please don't talk like that, it is extremely irritating.").also { stage++ } - 34 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Also, please don't call me a lychee, whatever that may be.").also { stage++ } - 35 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"Oh. Okay. Sorry.").also { stage = 99} + 31 -> npc(FacialExpression.LAUGH, "Hello to you too.").also { stage++ } + 32 -> playerl(FacialExpression.FRIENDLY,"Yar! We be pirates, yar! Avast, ye scurvy land-lubbing lychee!").also { stage++ } + 33 -> npcl(FacialExpression.FRIENDLY, "Please don't talk like that, it is extremely irritating.").also { stage++ } + 34 -> npcl(FacialExpression.FRIENDLY, "Also, please don't call me a lychee, whatever that may be.").also { stage++ } + 35 -> player(FacialExpression.FRIENDLY,"Oh. Okay. Sorry.").also { stage = 99} - 36 -> npc(core.game.dialogue.FacialExpression.LAUGH, "ARGH!", "SOUND THE ALARM!", "STOWAWAY ON BOARD!", "STOWAWAY ON BOARD!").also { stage++ } - 37 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"No! I'm not a stowaway! Honest! I was invited here!").also { stage++ } - 38 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Oh, sorry, my mistake then.").also { stage++ } - 39 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "You must admit you do look a lot like a stowaway though.").also { stage++ } - 40 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"Why, what do they usually look like?").also { stage++ } - 41 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Erm... I've never actually met one...").also { stage++ } - 42 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"Okay then...").also { stage = 99 } + 36 -> npc(FacialExpression.LAUGH, "ARGH!", "SOUND THE ALARM!", "STOWAWAY ON BOARD!", "STOWAWAY ON BOARD!").also { stage++ } + 37 -> player(FacialExpression.FRIENDLY,"No! I'm not a stowaway! Honest! I was invited here!").also { stage++ } + 38 -> npc(FacialExpression.FRIENDLY, "Oh, sorry, my mistake then.").also { stage++ } + 39 -> npcl(FacialExpression.FRIENDLY, "You must admit you do look a lot like a stowaway though.").also { stage++ } + 40 -> player(FacialExpression.FRIENDLY,"Why, what do they usually look like?").also { stage++ } + 41 -> npc(FacialExpression.FRIENDLY, "Erm... I've never actually met one...").also { stage++ } + 42 -> player(FacialExpression.FRIENDLY,"Okay then...").also { stage = 99 } - 43 -> npc(core.game.dialogue.FacialExpression.LAUGH, "Hello.").also { stage++ } - 44 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"So... You're a pirate, huh?").also { stage++ } - 45 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "It's what it says on my pay-packet at the end of the month.").also { stage++ } - 46 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"How's that working out for you?").also { stage++ } - 47 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Pretty good so far. All the grog and loot that we can plunder, plus full medical including dental.").also { stage++ } - 48 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"You mean you have insurance?").also { stage++ } - 49 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Not as such. If any of us get sick we kidnap a doctor and don't let him go until we're better.").also { stage++ } - 50 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "You'd be surprised what an incentive for expert health care that is.").also { stage++ } - 51 -> player(core.game.dialogue.FacialExpression.FRIENDLY,"I can imagine.").also { stage = 99 } + 43 -> npc(FacialExpression.LAUGH, "Hello.").also { stage++ } + 44 -> player(FacialExpression.FRIENDLY,"So... You're a pirate, huh?").also { stage++ } + 45 -> npcl(FacialExpression.FRIENDLY, "It's what it says on my pay-packet at the end of the month.").also { stage++ } + 46 -> player(FacialExpression.FRIENDLY,"How's that working out for you?").also { stage++ } + 47 -> npcl(FacialExpression.FRIENDLY, "Pretty good so far. All the grog and loot that we can plunder, plus full medical including dental.").also { stage++ } + 48 -> player(FacialExpression.FRIENDLY,"You mean you have insurance?").also { stage++ } + 49 -> npcl(FacialExpression.FRIENDLY, "Not as such. If any of us get sick we kidnap a doctor and don't let him go until we're better.").also { stage++ } + 50 -> npcl(FacialExpression.FRIENDLY, "You'd be surprised what an incentive for expert health care that is.").also { stage++ } + 51 -> player(FacialExpression.FRIENDLY,"I can imagine.").also { stage = 99 } - 52 -> npc(core.game.dialogue.FacialExpression.LAUGH, "Hello there. So what brings you aboard the Lady Zay?").also { stage++ } - 53 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY,"Well, I was planning on visiting the Moon Clan, but I have to say your ship is very impressive.").also { stage++ } - 54 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Aye, she's a beauty alright! The Lady Zay has been my home for many hard months, through storm and sun, and she always gets us to here we were headed!").also { stage++ } - 55 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY,"Yes, she's certainly one of the finest boats I've seen on my travels!").also { stage++ } - 56 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "That she is lad, that she is.").also { stage = 99 } + 52 -> npc(FacialExpression.LAUGH, "Hello there. So what brings you aboard the Lady Zay?").also { stage++ } + 53 -> playerl(FacialExpression.FRIENDLY,"Well, I was planning on visiting the Moon Clan, but I have to say your ship is very impressive.").also { stage++ } + 54 -> npcl(FacialExpression.FRIENDLY, "Aye, she's a beauty alright! The Lady Zay has been my home for many hard months, through storm and sun, and she always gets us to here we were headed!").also { stage++ } + 55 -> playerl(FacialExpression.FRIENDLY,"Yes, she's certainly one of the finest boats I've seen on my travels!").also { stage++ } + 56 -> npc(FacialExpression.FRIENDLY, "That she is lad, that she is.").also { stage = 99 } 99 -> end() @@ -97,7 +97,7 @@ class LecherousLeeDialogue(player: Player? = null) : core.game.dialogue.Dialogue return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return LecherousLeeDialogue(player) } diff --git a/Server/src/main/content/region/misc/tutisland/dialogue/SkipTutorialDialogue.kt b/Server/src/main/content/region/misc/tutisland/dialogue/SkipTutorialDialogue.kt index 99503423a..3a16f44c9 100644 --- a/Server/src/main/content/region/misc/tutisland/dialogue/SkipTutorialDialogue.kt +++ b/Server/src/main/content/region/misc/tutisland/dialogue/SkipTutorialDialogue.kt @@ -15,13 +15,13 @@ import content.region.misc.tutisland.handlers.TutorialStage * @author Ceikry */ @Initializable -class SkipTutorialDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class SkipTutorialDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return SkipTutorialDialogue(player) } override fun open(vararg args: Any?): Boolean { - npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Hey, would you like to skip to the end? Choose wisely! This is the only time you get this choice.") + npcl(FacialExpression.FRIENDLY, "Hey, would you like to skip to the end? Choose wisely! This is the only time you get this choice.") return true } diff --git a/Server/src/main/content/region/misc/tutisland/dialogue/SurvivalExpertDialogue.kt b/Server/src/main/content/region/misc/tutisland/dialogue/SurvivalExpertDialogue.kt index 0a4b61aa9..21c914b98 100644 --- a/Server/src/main/content/region/misc/tutisland/dialogue/SurvivalExpertDialogue.kt +++ b/Server/src/main/content/region/misc/tutisland/dialogue/SurvivalExpertDialogue.kt @@ -18,8 +18,8 @@ import content.region.misc.tutisland.handlers.TutorialStage * @author Ceikry */ @Initializable -class SurvivalExpertDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class SurvivalExpertDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return SurvivalExpertDialogue(player) } @@ -32,7 +32,7 @@ class SurvivalExpertDialogue(player: Player? = null) : core.game.dialogue.Dialog player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Hello there, newcomer. My name is Brynna. My job is", "to teach you a few survival tips and tricks. First off", "we're going to start with the most basic survival skill of", @@ -44,7 +44,7 @@ class SurvivalExpertDialogue(player: Player? = null) : core.game.dialogue.Dialog player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Well done! Next we need to get some food in our", "bellies. We'll need something to cook. There are shrimp", "in the pond there, so let's catch and cook some." diff --git a/Server/src/main/content/region/misc/tutisland/dialogue/TutorialCombatInstructorDialogue.kt b/Server/src/main/content/region/misc/tutisland/dialogue/TutorialCombatInstructorDialogue.kt index 71f6a0d98..4e73a799d 100644 --- a/Server/src/main/content/region/misc/tutisland/dialogue/TutorialCombatInstructorDialogue.kt +++ b/Server/src/main/content/region/misc/tutisland/dialogue/TutorialCombatInstructorDialogue.kt @@ -15,8 +15,8 @@ import content.region.misc.tutisland.handlers.TutorialStage * @author Ceikry */ @Initializable -class TutorialCombatInstructorDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class TutorialCombatInstructorDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return TutorialCombatInstructorDialogue(player) } @@ -25,9 +25,9 @@ class TutorialCombatInstructorDialogue(player: Player? = null) : core.game.dialo when(getAttribute(player, "tutorial:stage", 0)) { - 44 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Hi! My name's ${player.username}.") - 47 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Very good, but that little butter knife isn't going to protect you much. Here, take these.") - 53 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "I did it! I killed a giant rat!") + 44 -> playerl(FacialExpression.FRIENDLY, "Hi! My name's ${player.username}.") + 47 -> npcl(FacialExpression.FRIENDLY, "Very good, but that little butter knife isn't going to protect you much. Here, take these.") + 53 -> playerl(FacialExpression.FRIENDLY, "I did it! I killed a giant rat!") 54 -> { player.dialogueInterpreter.sendDoubleItemMessage(Items.SHORTBOW_841, Items.BRONZE_ARROW_882, "The Combat Guide gives you some bronze arrows and a shortbow!") if(!inInventory(player, Items.SHORTBOW_841) && !inEquipment(player, Items.SHORTBOW_841)) @@ -43,9 +43,9 @@ class TutorialCombatInstructorDialogue(player: Player? = null) : core.game.dialo when(getAttribute(player, "tutorial:stage", 0)) { 44 -> when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.ANGRY, "Do I look like I care? To me you're just another newcomer who thinks they're ready to fight.").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I'm Vannaka, the greatest swordsman alive.").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Let's get started by teaching you to wield a weapon.").also { stage++ } + 0 -> npcl(FacialExpression.ANGRY, "Do I look like I care? To me you're just another newcomer who thinks they're ready to fight.").also { stage++ } + 1 -> npcl(FacialExpression.FRIENDLY, "I'm Vannaka, the greatest swordsman alive.").also { stage++ } + 2 -> npcl(FacialExpression.FRIENDLY, "Let's get started by teaching you to wield a weapon.").also { stage++ } 3 -> { end() setAttribute(player, "tutorial:stage", 45) @@ -68,8 +68,8 @@ class TutorialCombatInstructorDialogue(player: Player? = null) : core.game.dialo } 53 -> when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I saw, ${player.username}. You seem better at this than I thought. Now that you have grasped basic swordplay, let's move on.").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Let's try some ranged attacking, with this you can kill foes from a distance. Also, foes unable to reach you are as good as dead. You'll be able to attack the rats, without entering the pit.").also { stage++ } + 0 -> npcl(FacialExpression.FRIENDLY, "I saw, ${player.username}. You seem better at this than I thought. Now that you have grasped basic swordplay, let's move on.").also { stage++ } + 1 -> npcl(FacialExpression.FRIENDLY, "Let's try some ranged attacking, with this you can kill foes from a distance. Also, foes unable to reach you are as good as dead. You'll be able to attack the rats, without entering the pit.").also { stage++ } 2 -> { sendDoubleItemDialogue(player, Items.SHORTBOW_841, Items.BRONZE_ARROW_882, "The Combat Guide gives you some bronze arrows and a shortbow!") if(!inInventory(player, Items.SHORTBOW_841) && !inEquipment(player, Items.SHORTBOW_841)) diff --git a/Server/src/main/content/region/misc/tutisland/dialogue/TutorialMasterChefDialogue.kt b/Server/src/main/content/region/misc/tutisland/dialogue/TutorialMasterChefDialogue.kt index 124f07aba..2db699406 100644 --- a/Server/src/main/content/region/misc/tutisland/dialogue/TutorialMasterChefDialogue.kt +++ b/Server/src/main/content/region/misc/tutisland/dialogue/TutorialMasterChefDialogue.kt @@ -16,8 +16,8 @@ import content.region.misc.tutisland.handlers.TutorialStage * @author Ceikry */ @Initializable -class TutorialMasterChefDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class TutorialMasterChefDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return TutorialMasterChefDialogue(player) } @@ -29,7 +29,7 @@ class TutorialMasterChefDialogue(player: Player? = null) : core.game.dialogue.Di player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Ah! Welcome, newcomer. I am the Master Chef, Lev. It", "is here I will teach you how to cook food truly fit for a", "king." @@ -69,7 +69,7 @@ class TutorialMasterChefDialogue(player: Player? = null) : core.game.dialogue.Di player, interpreter.sendDialogues( player, - core.game.dialogue.FacialExpression.HALF_GUILTY, + FacialExpression.HALF_GUILTY, "I already know how to cook. Brynna taught me just", "now." ) @@ -78,7 +78,7 @@ class TutorialMasterChefDialogue(player: Player? = null) : core.game.dialogue.Di player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.LAUGH, + FacialExpression.LAUGH, "Hahahahahaha! You call THAT cooking? Some shrimp", "on an open log fire? Oh, no, no no. I am going to", "teach you the fine art of cooking bread." @@ -88,7 +88,7 @@ class TutorialMasterChefDialogue(player: Player? = null) : core.game.dialogue.Di player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "And no fine meal is complete without good music, so", "we'll cover that while you're here too." ) diff --git a/Server/src/main/content/region/misc/tutisland/dialogue/TutorialMiningInstructorDialogue.kt b/Server/src/main/content/region/misc/tutisland/dialogue/TutorialMiningInstructorDialogue.kt index a2aef8c26..ad9f6c77e 100644 --- a/Server/src/main/content/region/misc/tutisland/dialogue/TutorialMiningInstructorDialogue.kt +++ b/Server/src/main/content/region/misc/tutisland/dialogue/TutorialMiningInstructorDialogue.kt @@ -18,16 +18,16 @@ import content.region.misc.tutisland.handlers.TutorialStage * @author Ceikry */ @Initializable -class TutorialMiningInstructorDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class TutorialMiningInstructorDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return TutorialMiningInstructorDialogue(player) } override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC when(getAttribute(player, "tutorial:stage", 0)) { - 30 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Hi there. You must be new around here. So what do I call you? 'Newcomer' seems so impersonal, and if we're going to be working together, I'd rather tell you by name.") - 34 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "I prospected both types of rock! One set contains tin and the other has copper ore inside.") + 30 -> npcl(FacialExpression.FRIENDLY, "Hi there. You must be new around here. So what do I call you? 'Newcomer' seems so impersonal, and if we're going to be working together, I'd rather tell you by name.") + 34 -> playerl(FacialExpression.FRIENDLY, "I prospected both types of rock! One set contains tin and the other has copper ore inside.") 35 -> { if(!inInventory(player, Items.BRONZE_PICKAXE_1265)) { addItem(player, Items.BRONZE_PICKAXE_1265) @@ -38,7 +38,7 @@ class TutorialMiningInstructorDialogue(player: Player? = null) : core.game.dialo TutorialStage.load(player, 35) } } - 40 -> playerl(core.game.dialogue.FacialExpression.ASKING, "How do I make a weapon out of this?") + 40 -> playerl(FacialExpression.ASKING, "How do I make a weapon out of this?") 41 -> { if(!inInventory(player, Items.HAMMER_2347)) { addItem(player, Items.HAMMER_2347) @@ -59,8 +59,8 @@ class TutorialMiningInstructorDialogue(player: Player? = null) : core.game.dialo override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(getAttribute(player, "tutorial:stage", 0)) { 30 -> when(stage) { - 0 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "You can call me ${player.username}.").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Ok then, ${player.username}. My name is Dezzick and I'm a miner by trade. Let's prospect some of these rocks.").also { stage++ } + 0 -> playerl(FacialExpression.FRIENDLY, "You can call me ${player.username}.").also { stage++ } + 1 -> npcl(FacialExpression.FRIENDLY, "Ok then, ${player.username}. My name is Dezzick and I'm a miner by trade. Let's prospect some of these rocks.").also { stage++ } 2 -> { end() setAttribute(player, "tutorial:stage", 31) @@ -69,8 +69,8 @@ class TutorialMiningInstructorDialogue(player: Player? = null) : core.game.dialo } 34,35 -> when(stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Absolutely right, ${player.username}. These two ore types can be smelted together to make bronze.").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "So now you know what ore is in the rocks over there, why don't you have a go at mining some tin and copper? Here, you'll need this to start with.").also { stage++ } + 0 -> npcl(FacialExpression.FRIENDLY, "Absolutely right, ${player.username}. These two ore types can be smelted together to make bronze.").also { stage++ } + 1 -> npcl(FacialExpression.FRIENDLY, "So now you know what ore is in the rocks over there, why don't you have a go at mining some tin and copper? Here, you'll need this to start with.").also { stage++ } 2 -> { addItem(player, Items.BRONZE_PICKAXE_1265) player.dialogueInterpreter.sendItemMessage(Items.BRONZE_PICKAXE_1265, "Dezzick gives you a bronze pickaxe!") @@ -84,7 +84,7 @@ class TutorialMiningInstructorDialogue(player: Player? = null) : core.game.dialo } 40,41 -> when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Okay, I'll show you how to make a dagger out of it. You'll be needing this..").also { stage++ } + 0 -> npcl(FacialExpression.FRIENDLY, "Okay, I'll show you how to make a dagger out of it. You'll be needing this..").also { stage++ } 1 -> { addItem(player, Items.HAMMER_2347) player.dialogueInterpreter.sendItemMessage(Items.HAMMER_2347, "Drezzick gives you a hammer!") diff --git a/Server/src/main/content/region/misc/tutisland/dialogue/TutorialPrayerDialogue.kt b/Server/src/main/content/region/misc/tutisland/dialogue/TutorialPrayerDialogue.kt index bd580ef5f..5278dc65d 100644 --- a/Server/src/main/content/region/misc/tutisland/dialogue/TutorialPrayerDialogue.kt +++ b/Server/src/main/content/region/misc/tutisland/dialogue/TutorialPrayerDialogue.kt @@ -15,8 +15,8 @@ import content.region.misc.tutisland.handlers.TutorialStage * @author Ceikry */ @Initializable -class TutorialPrayerDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class TutorialPrayerDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return TutorialPrayerDialogue(player) } @@ -24,9 +24,9 @@ class TutorialPrayerDialogue(player: Player? = null) : core.game.dialogue.Dialog npc = args[0] as NPC when(getAttribute(player, "tutorial:stage", 0)) { - 60 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Greetings! I'd just like to briefly go over two topics with you: Prayer, and Friend's.") - 62 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Prayers have all sorts of wonderful benefits! From boosting defence and damage, to protecting you from outside damage, to saving items on death!") - 65 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "For your friend and ignore lists, it's quite simple really! Use your friend list to keep track of players who you like, and ignore those you don't!") + 60 -> npcl(FacialExpression.FRIENDLY, "Greetings! I'd just like to briefly go over two topics with you: Prayer, and Friend's.") + 62 -> npcl(FacialExpression.FRIENDLY, "Prayers have all sorts of wonderful benefits! From boosting defence and damage, to protecting you from outside damage, to saving items on death!") + 65 -> npcl(FacialExpression.FRIENDLY, "For your friend and ignore lists, it's quite simple really! Use your friend list to keep track of players who you like, and ignore those you don't!") } return true } @@ -35,8 +35,8 @@ class TutorialPrayerDialogue(player: Player? = null) : core.game.dialogue.Dialog when(getAttribute(player, "tutorial:stage", 0)) { 60 -> when(stage++){ - 0 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Alright, sounds fun!") - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Right, so first thing: Prayer. Prayer is trained by offering bones to the gods, and can grant you many boons!") + 0 -> playerl(FacialExpression.FRIENDLY, "Alright, sounds fun!") + 1 -> npcl(FacialExpression.FRIENDLY, "Right, so first thing: Prayer. Prayer is trained by offering bones to the gods, and can grant you many boons!") 2 -> { end() setAttribute(player, "tutorial:stage", 61) @@ -45,8 +45,8 @@ class TutorialPrayerDialogue(player: Player? = null) : core.game.dialogue.Dialog } 62 -> when(stage++){ - 0 -> playerl(core.game.dialogue.FacialExpression.AMAZED, "Very cool!") - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Next up, let's talk about friends.") + 0 -> playerl(FacialExpression.AMAZED, "Very cool!") + 1 -> npcl(FacialExpression.FRIENDLY, "Next up, let's talk about friends.") 2 -> { end() setAttribute(player, "tutorial:stage", 63) diff --git a/Server/src/main/content/region/misc/tutisland/dialogue/TutorialQuestGuideDialogue.kt b/Server/src/main/content/region/misc/tutisland/dialogue/TutorialQuestGuideDialogue.kt index 305a488b2..015928854 100644 --- a/Server/src/main/content/region/misc/tutisland/dialogue/TutorialQuestGuideDialogue.kt +++ b/Server/src/main/content/region/misc/tutisland/dialogue/TutorialQuestGuideDialogue.kt @@ -18,8 +18,8 @@ import content.region.misc.tutisland.handlers.TutorialStage * @author Ceikry */ @Initializable -class TutorialQuestGuideDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class TutorialQuestGuideDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return TutorialQuestGuideDialogue(player) } @@ -31,7 +31,7 @@ class TutorialQuestGuideDialogue(player: Player? = null) : core.game.dialogue.Di player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Ah. Welcome, adventurer. I'm here to tell you all about", "quests. Lets start by opening the Quest List." ) @@ -41,7 +41,7 @@ class TutorialQuestGuideDialogue(player: Player? = null) : core.game.dialogue.Di player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Now you have the journal open. I'll tell you a bit about", "it At the moment all the quests are shown in red, which", "means you have not started them yet." @@ -76,7 +76,7 @@ class TutorialQuestGuideDialogue(player: Player? = null) : core.game.dialogue.Di player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "When you start a quest it will change colour to yellow,", "and to green when you've finished. This is so you can", "easily see what's complete, what's started and what's left", @@ -87,7 +87,7 @@ class TutorialQuestGuideDialogue(player: Player? = null) : core.game.dialogue.Di player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "The start of quests are easy to find. Look out for the", "star icons on the minimap, just like the one you should", "see marking my house." @@ -97,7 +97,7 @@ class TutorialQuestGuideDialogue(player: Player? = null) : core.game.dialogue.Di player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "There's not a lot more I can tell you about questing.", "You have to experience the thrill of it yourself to fully", "understand. You may find some adventure in the caves", diff --git a/Server/src/main/content/region/misc/tutisland/dialogue/TutorialRSGuideDialogue.kt b/Server/src/main/content/region/misc/tutisland/dialogue/TutorialRSGuideDialogue.kt index a2b19d47e..4d7653695 100644 --- a/Server/src/main/content/region/misc/tutisland/dialogue/TutorialRSGuideDialogue.kt +++ b/Server/src/main/content/region/misc/tutisland/dialogue/TutorialRSGuideDialogue.kt @@ -15,8 +15,8 @@ import content.region.misc.tutisland.handlers.TutorialStage * @author Ceikry */ @Initializable -class TutorialRSGuideDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class TutorialRSGuideDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return TutorialRSGuideDialogue(player) } @@ -32,7 +32,7 @@ class TutorialRSGuideDialogue(player: Player? = null) : core.game.dialogue.Dialo player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.HALF_GUILTY, + FacialExpression.HALF_GUILTY, "Greetings! Please follow the onscreen", "instructions!" ) @@ -46,7 +46,7 @@ class TutorialRSGuideDialogue(player: Player? = null) : core.game.dialogue.Dialo player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.HALF_GUILTY, + FacialExpression.HALF_GUILTY, "Greetings! I see you are a new arrival to this land. My", "job is to welcome all new visitors. So welcome!" ) @@ -60,7 +60,7 @@ class TutorialRSGuideDialogue(player: Player? = null) : core.game.dialogue.Dialo player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.HALF_GUILTY, + FacialExpression.HALF_GUILTY, "Please follow the onscreen instructions!" ) ) @@ -75,7 +75,7 @@ class TutorialRSGuideDialogue(player: Player? = null) : core.game.dialogue.Dialo player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "You have already learned the first thing needed to", "succeed in this world: talking to other people!" ) @@ -85,7 +85,7 @@ class TutorialRSGuideDialogue(player: Player? = null) : core.game.dialogue.Dialo player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "You will find many inhabitants of this world have useful", "things to say to you. By clicking on them with your", "mouse you can talk to them." @@ -96,7 +96,7 @@ class TutorialRSGuideDialogue(player: Player? = null) : core.game.dialogue.Dialo player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "I would also suggest reading through some of the", "supporting information on the website. There you can", "find the starter guides, which contain all the", @@ -108,7 +108,7 @@ class TutorialRSGuideDialogue(player: Player? = null) : core.game.dialogue.Dialo player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "contain helpful tips to help you on your", "journey." ) @@ -118,7 +118,7 @@ class TutorialRSGuideDialogue(player: Player? = null) : core.game.dialogue.Dialo player, interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "To continue the tutorial go through that door over", "there and speak to your first instructor!" ) diff --git a/Server/src/main/content/region/misc/zanaris/dialogue/BlaecDialogue.kt b/Server/src/main/content/region/misc/zanaris/dialogue/BlaecDialogue.kt index 6fb736c4f..339f40c2a 100644 --- a/Server/src/main/content/region/misc/zanaris/dialogue/BlaecDialogue.kt +++ b/Server/src/main/content/region/misc/zanaris/dialogue/BlaecDialogue.kt @@ -12,14 +12,14 @@ import org.rs09.consts.NPCs */ @Initializable -class BlaecDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class BlaecDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC when ((1..3).random()) { - 1 -> npc(core.game.dialogue.FacialExpression.FRIENDLY,"Wunnerful weather we're having today!").also { stage = 99 } - 2 -> npc(core.game.dialogue.FacialExpression.FRIENDLY,"Greetin's " + player.name + ", fine day today!").also { stage = 99 } - 3 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Please leave me alone, I'm busy trapping the pygmy shrews.").also { stage = 99 } + 1 -> npc(FacialExpression.FRIENDLY,"Wunnerful weather we're having today!").also { stage = 99 } + 2 -> npc(FacialExpression.FRIENDLY,"Greetin's " + player.name + ", fine day today!").also { stage = 99 } + 3 -> npcl(FacialExpression.ANNOYED,"Please leave me alone, I'm busy trapping the pygmy shrews.").also { stage = 99 } } return true } @@ -32,7 +32,7 @@ class BlaecDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return BlaecDialogue(player) } diff --git a/Server/src/main/content/region/misc/zanaris/dialogue/CoOrdinatorDialogue.kt b/Server/src/main/content/region/misc/zanaris/dialogue/CoOrdinatorDialogue.kt index 929b91cc9..2d190847d 100644 --- a/Server/src/main/content/region/misc/zanaris/dialogue/CoOrdinatorDialogue.kt +++ b/Server/src/main/content/region/misc/zanaris/dialogue/CoOrdinatorDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class CoOrdinatorDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class CoOrdinatorDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hello, what are you doing?").also { stage = 0 } + player(FacialExpression.FRIENDLY, "Hello, what are you doing?").also { stage = 0 } return true } @@ -24,11 +24,11 @@ class CoOrdinatorDialogue(player: Player? = null) : core.game.dialogue.DialogueP when(stage){ 0 -> { when ((1..5).random()) { - 1 -> npcl(core.game.dialogue.FacialExpression.OLD_DISTRESSED,"Sorry, I don't have time for idle chit-chat, I need to find a Winter Fairy to send to Trollheim!").also { stage = 99 } - 2 -> npcl(core.game.dialogue.FacialExpression.OLD_DISTRESSED,"Sorry, I don't have time for idle chit-chat, I need to send a fairy to get little Freddie's tooth!").also { stage = 99 } - 3 -> npcl(core.game.dialogue.FacialExpression.OLD_DISTRESSED,"Sorry, I don't have time for idle chit-chat, I need to send an Autumn Fairy off to Burthorpe!").also { stage = 99 } - 4 -> npcl(core.game.dialogue.FacialExpression.OLD_DISTRESSED,"Sorry, I don't have time to talk, I need to send a Tooth Fairy to visit Sarah-Jane!").also { stage = 99 } - 5 -> npcl(core.game.dialogue.FacialExpression.OLD_DISTRESSED,"Sorry, I don't have time to stop, I need to send a weather fairy off to Etceteria!").also { stage = 99 } + 1 -> npcl(FacialExpression.OLD_DISTRESSED,"Sorry, I don't have time for idle chit-chat, I need to find a Winter Fairy to send to Trollheim!").also { stage = 99 } + 2 -> npcl(FacialExpression.OLD_DISTRESSED,"Sorry, I don't have time for idle chit-chat, I need to send a fairy to get little Freddie's tooth!").also { stage = 99 } + 3 -> npcl(FacialExpression.OLD_DISTRESSED,"Sorry, I don't have time for idle chit-chat, I need to send an Autumn Fairy off to Burthorpe!").also { stage = 99 } + 4 -> npcl(FacialExpression.OLD_DISTRESSED,"Sorry, I don't have time to talk, I need to send a Tooth Fairy to visit Sarah-Jane!").also { stage = 99 } + 5 -> npcl(FacialExpression.OLD_DISTRESSED,"Sorry, I don't have time to stop, I need to send a weather fairy off to Etceteria!").also { stage = 99 } } } @@ -37,7 +37,7 @@ class CoOrdinatorDialogue(player: Player? = null) : core.game.dialogue.DialogueP return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return CoOrdinatorDialogue(player) } diff --git a/Server/src/main/content/region/misc/zanaris/dialogue/FairyChefDialogue.kt b/Server/src/main/content/region/misc/zanaris/dialogue/FairyChefDialogue.kt index 95f0c2b8e..8db8031b0 100644 --- a/Server/src/main/content/region/misc/zanaris/dialogue/FairyChefDialogue.kt +++ b/Server/src/main/content/region/misc/zanaris/dialogue/FairyChefDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class FairyChefDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FairyChefDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npcl(core.game.dialogue.FacialExpression.OLD_DEFAULT,"'Ello, sugar. I'm afraid I can't gossip right now, I've got a cake in the oven.").also { stage = 99 } + npcl(FacialExpression.OLD_DEFAULT,"'Ello, sugar. I'm afraid I can't gossip right now, I've got a cake in the oven.").also { stage = 99 } return true } @@ -28,7 +28,7 @@ class FairyChefDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FairyChefDialogue(player) } diff --git a/Server/src/main/content/region/misc/zanaris/dialogue/FairyDialogue.kt b/Server/src/main/content/region/misc/zanaris/dialogue/FairyDialogue.kt index 84708542c..ff10ef193 100644 --- a/Server/src/main/content/region/misc/zanaris/dialogue/FairyDialogue.kt +++ b/Server/src/main/content/region/misc/zanaris/dialogue/FairyDialogue.kt @@ -12,38 +12,38 @@ import org.rs09.consts.NPCs */ @Initializable -class FairyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FairyDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC when ((1..7).random()) { - 1 -> npcl(core.game.dialogue.FacialExpression.OLD_CALM_TALK1,"Err, hello. Do you have any idea what a Winter Fairy actually does?").also { stage = 10 } - 2 -> npcl(core.game.dialogue.FacialExpression.OLD_DISTRESSED,"Have you got any idea where Burthorpe is? The co-ordinator says I need to go there and paint all the leaves yellow, but I've never heard of that place!").also { stage = 99 } - 3 -> npcl(core.game.dialogue.FacialExpression.OLD_DISTRESSED,"Be careful when you pick mushrooms near the strange ruins to the south. Some of them will try to eat you!").also { stage = 99 } - 4 -> npcl(core.game.dialogue.FacialExpression.OLD_DISTRESSED,"I'm afraid I can't stop to chat. I've just been told to get ready to go to Etceteria for some reason or other!").also { stage = 99 } - 5 -> npcl(core.game.dialogue.FacialExpression.OLD_CALM_TALK2,"Picking mushrooms near the forge will probably end quite badly for you. Not as bad as the ones by the strange ruins to the south though. They're much bigger.").also { stage = 99 } - 6 -> npc(core.game.dialogue.FacialExpression.OLD_DISTRESSED,"Sorry, I can't talk I'm looking for Sarah-Jane!").also { stage = 99 } - 7 -> npc(core.game.dialogue.FacialExpression.OLD_CALM_TALK2,"Is your name Freddie, and are you losing your teeth?").also { stage = 20 } + 1 -> npcl(FacialExpression.OLD_CALM_TALK1,"Err, hello. Do you have any idea what a Winter Fairy actually does?").also { stage = 10 } + 2 -> npcl(FacialExpression.OLD_DISTRESSED,"Have you got any idea where Burthorpe is? The co-ordinator says I need to go there and paint all the leaves yellow, but I've never heard of that place!").also { stage = 99 } + 3 -> npcl(FacialExpression.OLD_DISTRESSED,"Be careful when you pick mushrooms near the strange ruins to the south. Some of them will try to eat you!").also { stage = 99 } + 4 -> npcl(FacialExpression.OLD_DISTRESSED,"I'm afraid I can't stop to chat. I've just been told to get ready to go to Etceteria for some reason or other!").also { stage = 99 } + 5 -> npcl(FacialExpression.OLD_CALM_TALK2,"Picking mushrooms near the forge will probably end quite badly for you. Not as bad as the ones by the strange ruins to the south though. They're much bigger.").also { stage = 99 } + 6 -> npc(FacialExpression.OLD_DISTRESSED,"Sorry, I can't talk I'm looking for Sarah-Jane!").also { stage = 99 } + 7 -> npc(FacialExpression.OLD_CALM_TALK2,"Is your name Freddie, and are you losing your teeth?").also { stage = 20 } } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 10 -> player(core.game.dialogue.FacialExpression.THINKING, "No, no idea at all.").also { stage++ } - 11 -> npcl(core.game.dialogue.FacialExpression.OLD_DISTRESSED,"Oh, pity. Neither do I, but I'm supposed to be one this week.").also { stage = 99 } + 10 -> player(FacialExpression.THINKING, "No, no idea at all.").also { stage++ } + 11 -> npcl(FacialExpression.OLD_DISTRESSED,"Oh, pity. Neither do I, but I'm supposed to be one this week.").also { stage = 99 } - 20 -> player(core.game.dialogue.FacialExpression.THINKING, "Err, no. I'm afraid not.").also { stage++ } - 21 -> npcl(core.game.dialogue.FacialExpression.OLD_CALM_TALK2, "Oh, right. You don't have any idea where I can find him do you?").also { stage++ } - 22 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "No, I don't know that either.").also { stage++ } - 23 -> npcl(core.game.dialogue.FacialExpression.OLD_CALM_TALK1, "Oh, ok then. If you do find out please let me know. The co-ordinator has sent me to find him.").also { stage = 99 } + 20 -> player(FacialExpression.THINKING, "Err, no. I'm afraid not.").also { stage++ } + 21 -> npcl(FacialExpression.OLD_CALM_TALK2, "Oh, right. You don't have any idea where I can find him do you?").also { stage++ } + 22 -> player(FacialExpression.NEUTRAL, "No, I don't know that either.").also { stage++ } + 23 -> npcl(FacialExpression.OLD_CALM_TALK1, "Oh, ok then. If you do find out please let me know. The co-ordinator has sent me to find him.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FairyDialogue(player) } diff --git a/Server/src/main/content/region/misc/zanaris/dialogue/FairyFixit.kt b/Server/src/main/content/region/misc/zanaris/dialogue/FairyFixit.kt index 0ca46939a..f0e851ce1 100644 --- a/Server/src/main/content/region/misc/zanaris/dialogue/FairyFixit.kt +++ b/Server/src/main/content/region/misc/zanaris/dialogue/FairyFixit.kt @@ -12,7 +12,7 @@ import org.rs09.consts.NPCs */ @Initializable -class FairyFixit(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FairyFixit(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC @@ -21,9 +21,9 @@ class FairyFixit(player: Player? = null) : core.game.dialogue.DialoguePlugin(pla //post quest dialogue is missing for rs3 and osrs is too modern, so i'm just gonna use osrs as a placeholder var completedFairyQueen = false if (completedFairyQueen) { - npc(core.game.dialogue.FacialExpression.OLD_CALM_TALK1, "Pssst! Human! I've got something for you.").also { stage = 20 } + npc(FacialExpression.OLD_CALM_TALK1, "Pssst! Human! I've got something for you.").also { stage = 20 } } else { - npc(core.game.dialogue.FacialExpression.OLD_DISTRESSED, "What is it, human? Busy busy busy!").also { stage = 0 } + npc(FacialExpression.OLD_DISTRESSED, "What is it, human? Busy busy busy!").also { stage = 0 } } return true } @@ -32,25 +32,25 @@ class FairyFixit(player: Player? = null) : core.game.dialogue.DialoguePlugin(pla when(stage){ 0 -> options("Why are you carrying that toolbox?", "I'm okay, thanks.").also { stage++ } 1 -> when (buttonId){ - 1 -> player(core.game.dialogue.FacialExpression.ASKING,"Why are you carrying that toolbox?").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "I'm okay, thanks.").also { stage = 99 } + 1 -> player(FacialExpression.ASKING,"Why are you carrying that toolbox?").also { stage = 10 } + 2 -> player(FacialExpression.FRIENDLY, "I'm okay, thanks.").also { stage = 99 } } - 10 -> npc(core.game.dialogue.FacialExpression.OLD_DEFAULT, "It's the fizgog! It's picking up cable again!").also { stage++ } - 11 -> playerl(core.game.dialogue.FacialExpression.ASKING, "Uh, right. So is it safe to use the fairy rings then?").also { stage++ } - 12 -> npcl(core.game.dialogue.FacialExpression.OLD_CALM_TALK1, "Sure, as long as you have been given permission to use them. You should just be aware that using the fairy rings sometimes has strange results - the locations that you have been to may").also { stage++ } - 13 -> npcl(core.game.dialogue.FacialExpression.OLD_CALM_TALK2, "affect the locations you are trying to reach. I could fix it by replacing the fizgog and the whosprangit; I've put in a request for some new parts, but they're").also { stage++ } - 14 -> npc(core.game.dialogue.FacialExpression.OLD_CALM_TALK1, "pretty hard to get hold of it seems.").also { stage = 99 } + 10 -> npc(FacialExpression.OLD_DEFAULT, "It's the fizgog! It's picking up cable again!").also { stage++ } + 11 -> playerl(FacialExpression.ASKING, "Uh, right. So is it safe to use the fairy rings then?").also { stage++ } + 12 -> npcl(FacialExpression.OLD_CALM_TALK1, "Sure, as long as you have been given permission to use them. You should just be aware that using the fairy rings sometimes has strange results - the locations that you have been to may").also { stage++ } + 13 -> npcl(FacialExpression.OLD_CALM_TALK2, "affect the locations you are trying to reach. I could fix it by replacing the fizgog and the whosprangit; I've put in a request for some new parts, but they're").also { stage++ } + 14 -> npc(FacialExpression.OLD_CALM_TALK1, "pretty hard to get hold of it seems.").also { stage = 99 } 20 -> options("What have you got for me?", "Why are you carrying that toolbox?", "Not interested, thanks.").also { stage++ } 21 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.ASKING, "What have you got for me?").also { stage = 30 } - 2 -> player(core.game.dialogue.FacialExpression.ASKING,"Why are you carrying that toolbox?").also { stage = 10 } - 3 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "Not interested, thanks.").also { stage = 99 } + 1 -> player(FacialExpression.ASKING, "What have you got for me?").also { stage = 30 } + 2 -> player(FacialExpression.ASKING,"Why are you carrying that toolbox?").also { stage = 10 } + 3 -> player(FacialExpression.NEUTRAL, "Not interested, thanks.").also { stage = 99 } } - 30 -> npcl(core.game.dialogue.FacialExpression.OLD_CALM_TALK1, "They said you'd helped cure our Queen. I haven't got a lot of rewards to offer, but my enchantment scrolls might help if you're working with fairy rings in your home.").also { stage++ } + 30 -> npcl(FacialExpression.OLD_CALM_TALK1, "They said you'd helped cure our Queen. I haven't got a lot of rewards to offer, but my enchantment scrolls might help if you're working with fairy rings in your home.").also { stage++ } 31 -> { end() npc.openShop(player) @@ -62,7 +62,7 @@ class FairyFixit(player: Player? = null) : core.game.dialogue.DialoguePlugin(pla return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FairyFixit(player) } diff --git a/Server/src/main/content/region/misc/zanaris/dialogue/FairyShopAssistantDialogue.kt b/Server/src/main/content/region/misc/zanaris/dialogue/FairyShopAssistantDialogue.kt index 5043fc9f5..ea0d18c04 100644 --- a/Server/src/main/content/region/misc/zanaris/dialogue/FairyShopAssistantDialogue.kt +++ b/Server/src/main/content/region/misc/zanaris/dialogue/FairyShopAssistantDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class FairyShopAssistantDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class FairyShopAssistantDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_HAPPY,"Can I help you at all?").also { stage = 0 } + npc(FacialExpression.OLD_HAPPY,"Can I help you at all?").also { stage = 0 } return true } @@ -26,7 +26,7 @@ class FairyShopAssistantDialogue(player: Player? = null) : core.game.dialogue.Di 1 -> when (buttonId) { 1 -> end().also { npc.openShop(player) } - 2 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "No thanks.").also { stage = 99 } + 2 -> player(FacialExpression.NEUTRAL, "No thanks.").also { stage = 99 } } 99 -> end() @@ -34,7 +34,7 @@ class FairyShopAssistantDialogue(player: Player? = null) : core.game.dialogue.Di return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return FairyShopAssistantDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/digsite/dialogue/ElissaDialogue.kt b/Server/src/main/content/region/misthalin/digsite/dialogue/ElissaDialogue.kt index 9bda3a0a5..d41dc2d87 100644 --- a/Server/src/main/content/region/misthalin/digsite/dialogue/ElissaDialogue.kt +++ b/Server/src/main/content/region/misthalin/digsite/dialogue/ElissaDialogue.kt @@ -12,18 +12,18 @@ import org.rs09.consts.NPCs */ @Initializable -class ElissaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ElissaDialogue(player: Player? = null) : DialoguePlugin(player){ - var fr = core.game.dialogue.FacialExpression.FRIENDLY - var ask = core.game.dialogue.FacialExpression.ASKING - var ann = core.game.dialogue.FacialExpression.ANNOYED - var neu = core.game.dialogue.FacialExpression.ANNOYED - var ama = core.game.dialogue.FacialExpression.AMAZED + var fr = FacialExpression.FRIENDLY + var ask = FacialExpression.ASKING + var ann = FacialExpression.ANNOYED + var neu = FacialExpression.ANNOYED + var ama = FacialExpression.AMAZED var qb = 2 override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 } return true } @@ -91,7 +91,7 @@ class ElissaDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ElissaDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/BarlakDialogue.kt b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/BarlakDialogue.kt index 8d8a9cd53..9d375798c 100644 --- a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/BarlakDialogue.kt +++ b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/BarlakDialogue.kt @@ -15,13 +15,13 @@ import org.rs09.consts.NPCs */ @Initializable -class BarlakDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ - private var pask = core.game.dialogue.FacialExpression.ASKING - private var pfr = core.game.dialogue.FacialExpression.FRIENDLY - private var pneu = core.game.dialogue.FacialExpression.NEUTRAL - private var nhap = core.game.dialogue.FacialExpression.OLD_HAPPY - private var ntalk1 = core.game.dialogue.FacialExpression.OLD_CALM_TALK1 - private var ntalk2 = core.game.dialogue.FacialExpression.OLD_CALM_TALK2 +class BarlakDialogue(player: Player? = null) : DialoguePlugin(player){ + private var pask = FacialExpression.ASKING + private var pfr = FacialExpression.FRIENDLY + private var pneu = FacialExpression.NEUTRAL + private var nhap = FacialExpression.OLD_HAPPY + private var ntalk1 = FacialExpression.OLD_CALM_TALK1 + private var ntalk2 = FacialExpression.OLD_CALM_TALK2 private var curItem = 0 @@ -164,22 +164,22 @@ class BarlakDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin } } - 150 -> player(core.game.dialogue.FacialExpression.THINKING, "What?").also { stage++ } - 151 -> npc(core.game.dialogue.FacialExpression.OLD_DISTRESSED, "I don't have any bones!").also { stage++ } + 150 -> player(FacialExpression.THINKING, "What?").also { stage++ } + 151 -> npc(FacialExpression.OLD_DISTRESSED, "I don't have any bones!").also { stage++ } 152 -> options("Then how do you stand up?", "What do you need bones for?", "Will you buy anything besides bones?", "What kind of bones do you need?", "Goodbye").also { stage++ } 153 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.THINKING, "Then how do you stand up?").also { stage = 200 } - 2 -> player(core.game.dialogue.FacialExpression.THINKING, "What do you need bones for?").also { stage = 220 } - 3 -> player(core.game.dialogue.FacialExpression.THINKING, "Will you buy anything besides bones?").also { stage = 240 } - 4 -> player(core.game.dialogue.FacialExpression.THINKING, "What kind of bones do you need?").also { stage = 260 } + 1 -> player(FacialExpression.THINKING, "Then how do you stand up?").also { stage = 200 } + 2 -> player(FacialExpression.THINKING, "What do you need bones for?").also { stage = 220 } + 3 -> player(FacialExpression.THINKING, "Will you buy anything besides bones?").also { stage = 240 } + 4 -> player(FacialExpression.THINKING, "What kind of bones do you need?").also { stage = 260 } 5 -> player(pfr, "Goodbye.").also { stage = 280 } } - 200 -> npc(core.game.dialogue.FacialExpression.OLD_CALM_TALK1, "What?").also { stage++ } - 201 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "How do you stand up if you have no bones? Shouldn't you collapse into a gelatinous blob?").also { stage++ } - 202 -> npc(core.game.dialogue.FacialExpression.OLD_LAUGH1, "Ha, ha, ha, ha, ha!").also { stage = 152 } + 200 -> npc(FacialExpression.OLD_CALM_TALK1, "What?").also { stage++ } + 201 -> playerl(FacialExpression.FRIENDLY, "How do you stand up if you have no bones? Shouldn't you collapse into a gelatinous blob?").also { stage++ } + 202 -> npc(FacialExpression.OLD_LAUGH1, "Ha, ha, ha, ha, ha!").also { stage = 152 } - 220 -> npcl(core.game.dialogue.FacialExpression.OLD_LAUGH1, "To stand up properly. Otherwise I'd collapse into a gelatinous blob! Ha, ha, ha, ha, ha! No, seriously, I need bones to use as a Construction material.").also { stage++ } + 220 -> npcl(FacialExpression.OLD_LAUGH1, "To stand up properly. Otherwise I'd collapse into a gelatinous blob! Ha, ha, ha, ha, ha! No, seriously, I need bones to use as a Construction material.").also { stage++ } 221 -> npcl(ntalk1, "We always need big bones to prop up the mine shafts and to make other temporary structures.").also { stage = 152 } 240 -> npcl(ntalk2, "Well, I've had a few people bring me some interesting giant shells. They say they came from giant snails and giant tortoises. Of course, like the bones, some shells are better than others.").also { stage++ } 241 -> npcl(ntalk1, "I'll give you 250gp for ordinary shells, but what I really need are perfect shells.").also { stage++ } @@ -237,7 +237,7 @@ class BarlakDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin return sets[curItem][3] } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return BarlakDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/BartakDialogue.kt b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/BartakDialogue.kt index 38a23edfd..3de1e2e86 100644 --- a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/BartakDialogue.kt +++ b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/BartakDialogue.kt @@ -12,29 +12,29 @@ import org.rs09.consts.NPCs */ @Initializable -class BartakDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class BartakDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_DISTRESSED,"Oh no! What's broken?").also { stage = 0 } + npc(FacialExpression.OLD_DISTRESSED,"Oh no! What's broken?").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> player(core.game.dialogue.FacialExpression.ASKING, "What? Nothing's broken?").also { stage++ } - 1 -> npc(core.game.dialogue.FacialExpression.OLD_DISTRESSED, "I'm sorry. I'm just a bit jumpy.").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.OLD_DISTRESSED, "I'm in charge of all the metalworking of Dorgesh-Kaan. It's a big responsibility!").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.OLD_DISTRESSED, "If something metal breaks I have to fix it. And lots of things are made of metal!").also { stage++ } - 4 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Don't worry, I'm sure you're up to the task!").also { stage++ } - 5 -> npc(core.game.dialogue.FacialExpression.OLD_DISTRESSED, "I hope you're right.").also { stage = 99 } + 0 -> player(FacialExpression.ASKING, "What? Nothing's broken?").also { stage++ } + 1 -> npc(FacialExpression.OLD_DISTRESSED, "I'm sorry. I'm just a bit jumpy.").also { stage++ } + 2 -> npcl(FacialExpression.OLD_DISTRESSED, "I'm in charge of all the metalworking of Dorgesh-Kaan. It's a big responsibility!").also { stage++ } + 3 -> npcl(FacialExpression.OLD_DISTRESSED, "If something metal breaks I have to fix it. And lots of things are made of metal!").also { stage++ } + 4 -> player(FacialExpression.FRIENDLY, "Don't worry, I'm sure you're up to the task!").also { stage++ } + 5 -> npc(FacialExpression.OLD_DISTRESSED, "I hope you're right.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return BartakDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/CrateGoblinDialogue.kt b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/CrateGoblinDialogue.kt index 255e41303..614c33949 100644 --- a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/CrateGoblinDialogue.kt +++ b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/CrateGoblinDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class CrateGoblinDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class CrateGoblinDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_NORMAL,"Excuse me, I need to deliver this.").also { stage = 99 } + npc(FacialExpression.OLD_NORMAL,"Excuse me, I need to deliver this.").also { stage = 99 } return true } @@ -28,7 +28,7 @@ class CrateGoblinDialogue(player: Player? = null) : core.game.dialogue.DialogueP return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return CrateGoblinDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/DartogDialogue.kt b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/DartogDialogue.kt index bbd41294b..dbf286bc9 100644 --- a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/DartogDialogue.kt +++ b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/DartogDialogue.kt @@ -13,17 +13,17 @@ import org.rs09.consts.NPCs */ @Initializable -class DartogDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class DartogDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.OLD_NORMAL,"Hello, surface-dweller.").also { stage = 0 } + npc(FacialExpression.OLD_NORMAL,"Hello, surface-dweller.").also { stage = 0 } return true } - private var fr = core.game.dialogue.FacialExpression.FRIENDLY - private var ask = core.game.dialogue.FacialExpression.ASKING - private var nor = core.game.dialogue.FacialExpression.OLD_NORMAL + private var fr = FacialExpression.FRIENDLY + private var ask = FacialExpression.ASKING + private var nor = FacialExpression.OLD_NORMAL override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage) { @@ -62,7 +62,7 @@ class DartogDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return DartogDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/DurgokDialogue.kt b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/DurgokDialogue.kt index 25f0f8e41..81d78acb9 100644 --- a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/DurgokDialogue.kt +++ b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/DurgokDialogue.kt @@ -15,11 +15,11 @@ import org.rs09.consts.NPCs */ @Initializable -class DurgokDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class DurgokDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npcl(core.game.dialogue.FacialExpression.OLD_NORMAL,"Frogburger! There's nothing like grilled frog in a bun. Do you want one? Only 10gp!").also { stage = 0 } + npcl(FacialExpression.OLD_NORMAL,"Frogburger! There's nothing like grilled frog in a bun. Do you want one? Only 10gp!").also { stage = 0 } return true } @@ -27,16 +27,16 @@ class DurgokDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin when(stage){ 0 -> options("Yes, please.", "No, thanks.").also { stage++ } 1 -> when(buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Yes please!").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 } + 1 -> player(FacialExpression.FRIENDLY, "Yes please!").also { stage = 10 } + 2 -> player(FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 } } 10 -> if (player.inventory.contains(Items.COINS_995, 10)) { player.inventory.remove(Item(Items.COINS_995, 10)) addItemOrDrop(player, Items.FROGBURGER_10962, 1) - npc(core.game.dialogue.FacialExpression.OLD_NORMAL, "There you go.").also { stage = 99 } + npc(FacialExpression.OLD_NORMAL, "There you go.").also { stage = 99 } } else { - npc(core.game.dialogue.FacialExpression.OLD_NORMAL, "I'm sorry, but you need 10gp for that.").also { stage = 99 } + npc(FacialExpression.OLD_NORMAL, "I'm sorry, but you need 10gp for that.").also { stage = 99 } } 99 -> end() @@ -44,7 +44,7 @@ class DurgokDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return DurgokDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/MistagDialogue.kt b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/MistagDialogue.kt index 5d70b2c2b..efdb1a9be 100644 --- a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/MistagDialogue.kt +++ b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/MistagDialogue.kt @@ -12,13 +12,13 @@ import core.tools.END_DIALOGUE import core.tools.START_DIALOGUE @Initializable -class MistagDialogue (player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class MistagDialogue (player: Player? = null) : DialoguePlugin(player){ + override fun newInstance(player: Player?): DialoguePlugin { return MistagDialogue(player) } override fun npc(vararg messages: String?): Component { - return npc(core.game.dialogue.FacialExpression.OLD_NORMAL,*messages) + return npc(FacialExpression.OLD_NORMAL,*messages) } override fun open(vararg args: Any?): Boolean { diff --git a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/randomChildrenDialogue.kt b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/randomChildrenDialogue.kt index 0e24c7d25..6b6a2de2f 100644 --- a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/randomChildrenDialogue.kt +++ b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/randomChildrenDialogue.kt @@ -12,14 +12,14 @@ import core.plugin.Initializable */ @Initializable -class randomChildrenDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ - var a = core.game.dialogue.FacialExpression.OLD_NORMAL - var b = core.game.dialogue.FacialExpression.FRIENDLY +class randomChildrenDialogue(player: Player? = null) : DialoguePlugin(player){ + var a = FacialExpression.OLD_NORMAL + var b = FacialExpression.FRIENDLY override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC when ((1..5).random()) { - 1 -> npc(core.game.dialogue.FacialExpression.OLD_NORMAL, "Are you a surface-dweller?").also { stage = 0 } + 1 -> npc(FacialExpression.OLD_NORMAL, "Are you a surface-dweller?").also { stage = 0 } 2 -> npcl(a, "Are you " + player.name + "? Did you help Zanik save the city?").also { stage = 10 } 3 -> npc(a, "Sorry, I'm not meant to talk to strangers.").also { stage = 99 } 4 -> npc(a, "Shh! Don't tell anyone!").also { stage = 20 } @@ -47,7 +47,7 @@ class randomChildrenDialogue(player: Player? = null) : core.game.dialogue.Dialog return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return randomChildrenDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/DukeHoracioTLTDialogue.kt b/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/DukeHoracioTLTDialogue.kt index f3c223158..93bb1f871 100644 --- a/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/DukeHoracioTLTDialogue.kt +++ b/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/DukeHoracioTLTDialogue.kt @@ -29,7 +29,7 @@ class DukeHoracioTLTDialogue(val questStage: Int) : DialogueFile() { 4 -> sendNormalDialogue( Sigmund, - core.game.dialogue.FacialExpression.ANGRY, + FacialExpression.ANGRY, "Yes your grace, but if there is any possibility that this", "is a goblin incursion then we should take that possibility", "very seriously!" @@ -38,7 +38,7 @@ class DukeHoracioTLTDialogue(val questStage: Int) : DialogueFile() { 5 -> player("I think we should at least investigate.").also { stage++ } 6 -> sendNormalDialogue( Sigmund, - core.game.dialogue.FacialExpression.WORRIED, + FacialExpression.WORRIED, "Your grace, I think you should listen to " + (if (player!!.isMale) "him" else "her") + "." ).also { stage++ } @@ -64,7 +64,7 @@ class DukeHoracioTLTDialogue(val questStage: Int) : DialogueFile() { 2 -> sendNormalDialogue( Sigmund, - core.game.dialogue.FacialExpression.WORRIED, + FacialExpression.WORRIED, "It is unknown to me, your grace. But the fact it is", "there is enough to prove the Cook's story. It must have", "been dropped by a goblin as it fled." @@ -73,14 +73,14 @@ class DukeHoracioTLTDialogue(val questStage: Int) : DialogueFile() { 3 -> npc("I've never heard of a goblin wearing something so well-", "crafted.").also { stage++ } 4 -> sendNormalDialogue( Sigmund, - core.game.dialogue.FacialExpression.ANGRY, + FacialExpression.ANGRY, "Then it must have been stolen!" ).also { stage++ } 5 -> npc("But it wasn't stolen from us. Where could it be from?").also { stage++ } 6 -> sendNormalDialogue( Sigmund, - core.game.dialogue.FacialExpression.ANGRY, + FacialExpression.ANGRY, "That doesn't matter! You said yourself that goblins", "couldn't have made that, so they must have stolen it", "from somewhere." @@ -88,14 +88,14 @@ class DukeHoracioTLTDialogue(val questStage: Int) : DialogueFile() { 7 -> sendNormalDialogue( Sigmund, - core.game.dialogue.FacialExpression.ANGRY, + FacialExpression.ANGRY, "Horrible, thieving goblins have broken into our cellar!", "We must retaliate immediately!" ).also { stage++ } 8 -> sendNormalDialogue( Sigmund, - core.game.dialogue.FacialExpression.ANGRY, + FacialExpression.ANGRY, "First we should wipe out the goblins east of the river,", "then we can march on the goblin village to the north-", "west..." @@ -124,7 +124,7 @@ class DukeHoracioTLTDialogue(val questStage: Int) : DialogueFile() { 1 -> sendNormalDialogue( Sigmund, - core.game.dialogue.FacialExpression.ANGRY, + FacialExpression.ANGRY, "What more proof do we need? Nasty, smelly goblins", "have been living under our feet all this time! We must", "crush them at once!" @@ -156,7 +156,7 @@ class DukeHoracioTLTDialogue(val questStage: Int) : DialogueFile() { 1 -> sendNormalDialogue( Sigmund, - core.game.dialogue.FacialExpression.ANGRY, + FacialExpression.ANGRY, "And I suppose you believe them, goblin lover?" ).also { stage++ } @@ -181,7 +181,7 @@ class DukeHoracioTLTDialogue(val questStage: Int) : DialogueFile() { 1 -> npc("Sigmund! Is this your doing?").also { stage++ } 2 -> sendNormalDialogue( Sigmund, - core.game.dialogue.FacialExpression.WORRIED, + FacialExpression.WORRIED, "Of...of course not! The goblins must have, um, dropped", "the silverware as they ran away." ).also { stage++ } @@ -194,7 +194,7 @@ class DukeHoracioTLTDialogue(val questStage: Int) : DialogueFile() { 4 -> sendNormalDialogue( Sigmund, - core.game.dialogue.FacialExpression.THINKING, + FacialExpression.THINKING, "But don't you see it was for the best? For goblins to be", "living under our feet like this... ugh. It doesn't matter", "how civilised they are: all sub-human species must be", diff --git a/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/HistoryOfTheGoblinRace.kt b/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/HistoryOfTheGoblinRace.kt index 16e3e2914..57c14a8f0 100644 --- a/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/HistoryOfTheGoblinRace.kt +++ b/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/HistoryOfTheGoblinRace.kt @@ -26,7 +26,7 @@ class HistoryOfTheGoblinRace : ComponentPlugin() { val qstage = player.questRepository.getQuest("Lost Tribe").getStage(player) component?.setCloseEvent { player, c -> if(qstage == 42 || qstage == 41 ) { - player.dialogueInterpreter.sendDialogues(player, core.game.dialogue.FacialExpression.THINKING, "Hey... The symbol of the 'Dorgeshuun' tribe looks just", "like the symbol on the brooch I found.") + player.dialogueInterpreter.sendDialogues(player, FacialExpression.THINKING, "Hey... The symbol of the 'Dorgeshuun' tribe looks just", "like the symbol on the brooch I found.") player.questRepository.getQuest("Lost Tribe").setStage(player, 43) } player.removeAttribute("hgr-index") diff --git a/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/KazgarDialogue.kt b/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/KazgarDialogue.kt index ab1355c83..86d056d40 100644 --- a/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/KazgarDialogue.kt +++ b/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/KazgarDialogue.kt @@ -10,8 +10,8 @@ import core.plugin.Initializable * Dialogue for Kazgar * @author Ceikry */ -class KazgarDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class KazgarDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return KazgarDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/MistagLTDialogue.kt b/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/MistagLTDialogue.kt index 0e986e528..8e01d2f77 100644 --- a/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/MistagLTDialogue.kt +++ b/Server/src/main/content/region/misthalin/dorgeshuun/quest/thelosttribe/MistagLTDialogue.kt @@ -53,6 +53,6 @@ class MistagLTDialogue(val isGreeting: Boolean, val questStage: Int) : DialogueF } override fun npc(vararg messages: String?): Component? { - return npc(core.game.dialogue.FacialExpression.OLD_NORMAL,*messages) + return npc(FacialExpression.OLD_NORMAL,*messages) } } \ No newline at end of file diff --git a/Server/src/main/content/region/misthalin/edgeville/dialogue/BrotherBordissDialogue.kt b/Server/src/main/content/region/misthalin/edgeville/dialogue/BrotherBordissDialogue.kt index 9726db1c7..1a14231ff 100644 --- a/Server/src/main/content/region/misthalin/edgeville/dialogue/BrotherBordissDialogue.kt +++ b/Server/src/main/content/region/misthalin/edgeville/dialogue/BrotherBordissDialogue.kt @@ -13,13 +13,13 @@ import org.rs09.consts.Items * Handles Boriss' dialogue * @author Ceikry */ -class BrotherBordissDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class BrotherBordissDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return BrotherBordissDialogue(player) } override fun npc(vararg messages: String?): Component { - return npc(core.game.dialogue.FacialExpression.OLD_NORMAL,*messages) + return npc(FacialExpression.OLD_NORMAL,*messages) } override fun open(vararg args: Any?): Boolean { diff --git a/Server/src/main/content/region/misthalin/lumbridge/dialogue/DukeHoracioDialogue.kt b/Server/src/main/content/region/misthalin/lumbridge/dialogue/DukeHoracioDialogue.kt index e664607be..59e3b4775 100644 --- a/Server/src/main/content/region/misthalin/lumbridge/dialogue/DukeHoracioDialogue.kt +++ b/Server/src/main/content/region/misthalin/lumbridge/dialogue/DukeHoracioDialogue.kt @@ -15,7 +15,7 @@ import core.tools.END_DIALOGUE * Core dialogue plugin for Duke Horacio, redirects to more specific DialogueFiles. * @author Ceikry */ -class DukeHoracioDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class DukeHoracioDialogue(player: Player? = null) : DialoguePlugin(player) { override fun getIds(): IntArray { return intArrayOf(741) @@ -30,7 +30,7 @@ class DukeHoracioDialogue(player: Player? = null) : core.game.dialogue.DialogueP addOption("Lost Tribe", DukeHoracioTLTDialogue(player.questRepository.getStage("Lost Tribe"))) } if (!sendChoices()) { - interpreter.sendDialogues(npc, core.game.dialogue.FacialExpression.HALF_GUILTY, "Greetings. Welcome to my castle.") + interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Greetings. Welcome to my castle.") } return true @@ -50,13 +50,13 @@ class DukeHoracioDialogue(player: Player? = null) : core.game.dialogue.DialogueP } 1 -> when (buttonId) { 1 -> { - interpreter.sendDialogues(player, core.game.dialogue.FacialExpression.HALF_GUILTY, "Have any quests for me?") + interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Have any quests for me?") stage = 20 } 2 -> { interpreter.sendDialogues( npc, - core.game.dialogue.FacialExpression.HALF_GUILTY, + FacialExpression.HALF_GUILTY, "I hear many of the local people earn money by learning a", "skill. Many people get by in life by becoming accomplished", "smiths, cooks, miners and woodcutters." @@ -80,7 +80,7 @@ class DukeHoracioDialogue(player: Player? = null) : core.game.dialogue.DialogueP return true } - override fun newInstance(player: Player): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player): DialoguePlugin { return DukeHoracioDialogue(player) } } \ No newline at end of file diff --git a/Server/src/main/content/region/misthalin/lumbridge/dialogue/JimmyTheChiselDialogue.kt b/Server/src/main/content/region/misthalin/lumbridge/dialogue/JimmyTheChiselDialogue.kt index eba170e5f..be0088503 100644 --- a/Server/src/main/content/region/misthalin/lumbridge/dialogue/JimmyTheChiselDialogue.kt +++ b/Server/src/main/content/region/misthalin/lumbridge/dialogue/JimmyTheChiselDialogue.kt @@ -13,11 +13,11 @@ import org.rs09.consts.NPCs */ @Initializable -class JimmyTheChiselDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class JimmyTheChiselDialogue(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Hello mate!").also { stage = 99 } + npc(FacialExpression.FRIENDLY,"Hello mate!").also { stage = 99 } return true } @@ -28,7 +28,7 @@ class JimmyTheChiselDialogue(player: Player? = null) : core.game.dialogue.Dialog return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return JimmyTheChiselDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/lumbridge/dialogue/LumbridgeGuideDialogue.kt b/Server/src/main/content/region/misthalin/lumbridge/dialogue/LumbridgeGuideDialogue.kt index 73344f2b6..f2f157707 100644 --- a/Server/src/main/content/region/misthalin/lumbridge/dialogue/LumbridgeGuideDialogue.kt +++ b/Server/src/main/content/region/misthalin/lumbridge/dialogue/LumbridgeGuideDialogue.kt @@ -15,8 +15,8 @@ import core.game.dialogue.Topic import core.tools.END_DIALOGUE @Initializable -class LumbridgeGuideDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class LumbridgeGuideDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return LumbridgeGuideDialogue(player) } @@ -27,7 +27,7 @@ class LumbridgeGuideDialogue(player: Player? = null) : core.game.dialogue.Dialog val cooksAssistantComplete = isQuestComplete(player, "Cook's Assistant") when (stage) { - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Greetings, adventurer. I am Phileas, the Lumbridge Guide. I am here to give information and directions to new players. Do you require any help?").also { stage++ } + 0 -> npcl(FacialExpression.FRIENDLY, "Greetings, adventurer. I am Phileas, the Lumbridge Guide. I am here to give information and directions to new players. Do you require any help?").also { stage++ } 1 -> showTopics( Topic("Where can I find a quest to go on?", 10), Topic("What monsters should I fight?", 20), @@ -48,43 +48,43 @@ class LumbridgeGuideDialogue(player: Player? = null) : core.game.dialogue.Dialog //Where can I find a quest? 10 -> { if (!cooksAssistantComplete) - npcl(core.game.dialogue.FacialExpression.HALF_THINKING, "You can try talking to the Cook in the Lumbridge Castle. I hear he is always looking for some help.") + npcl(FacialExpression.HALF_THINKING, "You can try talking to the Cook in the Lumbridge Castle. I hear he is always looking for some help.") else if (!sheepShearerComplete) - npcl(core.game.dialogue.FacialExpression.HALF_THINKING, "You can try talking to Fred the Farmer north-west of here. I hear he is always looking for some help.") + npcl(FacialExpression.HALF_THINKING, "You can try talking to Fred the Farmer north-west of here. I hear he is always looking for some help.") else - npcl(core.game.dialogue.FacialExpression.FRIENDLY, "You are such an accomplished adventurer already; you should be telling me some good quests to go on.") + npcl(FacialExpression.FRIENDLY, "You are such an accomplished adventurer already; you should be telling me some good quests to go on.") stage = END_DIALOGUE } //What monsters should I fight? 20 -> if (player.properties.currentCombatLevel >= 30) { - npcl(core.game.dialogue.FacialExpression.FRIENDLY, "You're strong enough to work out what monsters to fight for yourself now, but the tutors might help you with any questions you have about the skills; they're just south of the general store.") + npcl(FacialExpression.FRIENDLY, "You're strong enough to work out what monsters to fight for yourself now, but the tutors might help you with any questions you have about the skills; they're just south of the general store.") stage = END_DIALOGUE } else { - npcl(core.game.dialogue.FacialExpression.FRIENDLY, "There are things to kill all over the place! At your level, you might like to try wandering westwards to the Wizards' Tower or north-west to the Barbarian Village.") + npcl(FacialExpression.FRIENDLY, "There are things to kill all over the place! At your level, you might like to try wandering westwards to the Wizards' Tower or north-west to the Barbarian Village.") stage++ } - 21 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Non-player characters usually appear as yellow dots on your mini-map, although there are some that you won't be able to fight, such as myself. Watch out for monsters which are tougher").also { stage++ } - 22 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "than you. A monster's combat level is shown next to their 'Attack' option. If that level is coloured green it means the monster is weaker than you. If it is red, it means the monster is tougher than you.").also { stage++ } - 23 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Remember, you will do better if you have better armour and weapons and it's always worth carrying a bit of food to heal yourself.").also { stage = 1 } + 21 -> npcl(FacialExpression.FRIENDLY, "Non-player characters usually appear as yellow dots on your mini-map, although there are some that you won't be able to fight, such as myself. Watch out for monsters which are tougher").also { stage++ } + 22 -> npcl(FacialExpression.FRIENDLY, "than you. A monster's combat level is shown next to their 'Attack' option. If that level is coloured green it means the monster is weaker than you. If it is red, it means the monster is tougher than you.").also { stage++ } + 23 -> npcl(FacialExpression.FRIENDLY, "Remember, you will do better if you have better armour and weapons and it's always worth carrying a bit of food to heal yourself.").also { stage = 1 } //Where can I make money? - 30 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "There are many ways to make money in the game. I would suggest either killing monsters or doing a trade skill such as Smithing or Fishing.").also { stage++ } - 31 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Please don't try to get money by begging off other players. It will make you unpopular. Nobody likes a beggar. It is very irritating to have other players asking for your hard-earned cash.").also { stage = 1 } + 30 -> npcl(FacialExpression.FRIENDLY, "There are many ways to make money in the game. I would suggest either killing monsters or doing a trade skill such as Smithing or Fishing.").also { stage++ } + 31 -> npcl(FacialExpression.FRIENDLY, "Please don't try to get money by begging off other players. It will make you unpopular. Nobody likes a beggar. It is very irritating to have other players asking for your hard-earned cash.").also { stage = 1 } //I'd like to know more about security - 40 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I can tell you about password security, avoiding item scamming and in-game moderation. I can also tell you about a place called the Stronghold of Security, where you can learn more about account security and have a").also { stage++ } + 40 -> npcl(FacialExpression.FRIENDLY, "I can tell you about password security, avoiding item scamming and in-game moderation. I can also tell you about a place called the Stronghold of Security, where you can learn more about account security and have a").also { stage++ } 41 -> { player.achievementDiaryManager.finishTask(player, DiaryType.LUMBRIDGE, 0, 17) - npcl(core.game.dialogue.FacialExpression.FRIENDLY, "bit of an adventure at the same time. In fact, why don't you just head there instead? It's a lot more fun, I promise. You can find it down the hole in the middle of Barbarian Village to the north-west.") + npcl(FacialExpression.FRIENDLY, "bit of an adventure at the same time. In fact, why don't you just head there instead? It's a lot more fun, I promise. You can find it down the hole in the middle of Barbarian Village to the north-west.") stage = 1 } //Where can I find a bank? - 50 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "You'll find a bank upstairs in Lumbridge Castle - go right to the top!").also { stage = 1 } + 50 -> npcl(FacialExpression.FRIENDLY, "You'll find a bank upstairs in Lumbridge Castle - go right to the top!").also { stage = 1 } //visit pmod room - 200 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, of course.").also { stage++ } + 200 -> npcl(FacialExpression.FRIENDLY, "Yes, of course.").also { stage++ } 201 -> { end() if (player.isStaff) @@ -92,20 +92,20 @@ class LumbridgeGuideDialogue(player: Player? = null) : core.game.dialogue.Dialog } //deiron - 300 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Of course, but first let me give you a word of warning.").also { stage++ } - 301 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Should you choose to step away from the path of the ironman now, you will not have the option to return.").also { stage++ } - 302 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Now I ask you to make sure, are you sure you want to permanently remove ironman mode?").also { stage++ } + 300 -> npcl(FacialExpression.FRIENDLY, "Of course, but first let me give you a word of warning.").also { stage++ } + 301 -> npcl(FacialExpression.FRIENDLY, "Should you choose to step away from the path of the ironman now, you will not have the option to return.").also { stage++ } + 302 -> npcl(FacialExpression.FRIENDLY, "Now I ask you to make sure, are you sure you want to permanently remove ironman mode?").also { stage++ } 303 -> showTopics( - Topic(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, I'm sure.", 310), - Topic(core.game.dialogue.FacialExpression.FRIENDLY, "No, I've changed my mind.", END_DIALOGUE) + Topic(FacialExpression.FRIENDLY, "Yes, I'm sure.", 310), + Topic(FacialExpression.FRIENDLY, "No, I've changed my mind.", END_DIALOGUE) ) //yes - deiron - 310 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Very well, let me just check one thing...").also { stage++ } + 310 -> npcl(FacialExpression.FRIENDLY, "Very well, let me just check one thing...").also { stage++ } 311 -> if (player.ironmanManager.mode == IronmanMode.HARDCORE) { - npcl(core.game.dialogue.FacialExpression.WORRIED, "Oh, dear, it's just as I feared. You're a hardcore ironman! My apologies, but there's nothing I can do to help.").also { stage = END_DIALOGUE } + npcl(FacialExpression.WORRIED, "Oh, dear, it's just as I feared. You're a hardcore ironman! My apologies, but there's nothing I can do to help.").also { stage = END_DIALOGUE } } else { - npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Oh, wonderful. It appears everything is in order. Sit still for a moment...").also { stage++ } + npcl(FacialExpression.FRIENDLY, "Oh, wonderful. It appears everything is in order. Sit still for a moment...").also { stage++ } } 312 -> { sendGraphics(342, player.location) @@ -114,7 +114,7 @@ class LumbridgeGuideDialogue(player: Player? = null) : core.game.dialogue.Dialog } 313 -> { player.ironmanManager.mode = IronmanMode.NONE - npcl(core.game.dialogue.FacialExpression.HALF_ASKING, "There, I believe it is done. You should no longer be restricted from the wider world.") + npcl(FacialExpression.HALF_ASKING, "There, I believe it is done. You should no longer be restricted from the wider world.") stage = END_DIALOGUE } } diff --git a/Server/src/main/content/region/misthalin/lumbridge/diary/NedDiaryDialogue.kt b/Server/src/main/content/region/misthalin/lumbridge/diary/NedDiaryDialogue.kt index 18819c749..8f5b29448 100644 --- a/Server/src/main/content/region/misthalin/lumbridge/diary/NedDiaryDialogue.kt +++ b/Server/src/main/content/region/misthalin/lumbridge/diary/NedDiaryDialogue.kt @@ -115,7 +115,7 @@ class NedDiaryDialogue : DialogueFile() { stage = 0 } 60 -> { - AchievementDiary.grantReplacement(player, DiaryType.LUMBRIDGE, level); + AchievementDiary.grantReplacement(player, DiaryType.LUMBRIDGE, level) npc("You better be more careful this time.") stage = 0 } diff --git a/Server/src/main/content/region/misthalin/lumbridge/quest/cooksassistant/GillieGroatsDialogue.kt b/Server/src/main/content/region/misthalin/lumbridge/quest/cooksassistant/GillieGroatsDialogue.kt index 6de7e8101..a951bcaba 100644 --- a/Server/src/main/content/region/misthalin/lumbridge/quest/cooksassistant/GillieGroatsDialogue.kt +++ b/Server/src/main/content/region/misthalin/lumbridge/quest/cooksassistant/GillieGroatsDialogue.kt @@ -11,17 +11,17 @@ import core.plugin.Initializable */ @Initializable -class GillieGroatsDialogue (player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class GillieGroatsDialogue (player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { var milk = false if (args.size == 2) milk = true if (milk) { //If the player attempts to milk a dairy cow without a bucket - npc(core.game.dialogue.FacialExpression.LAUGH, "Tee hee! You've never milked a cow before, have you?") + npc(FacialExpression.LAUGH, "Tee hee! You've never milked a cow before, have you?") stage = 100 return true } - npc(core.game.dialogue.FacialExpression.HAPPY, "Hello, I'm Gillie the Milkmaid. What can I do for you?") + npc(FacialExpression.HAPPY, "Hello, I'm Gillie the Milkmaid. What can I do for you?") stage = 0 return true } @@ -32,30 +32,30 @@ class GillieGroatsDialogue (player: Player? = null) : core.game.dialogue.Dialogu //If the player talks to Gillie directly 0 -> options("Who are you?", "Can you tell me how to milk a cow?", "I'm fine, thanks.").also { stage++ } 1 -> when(buttonId) { - 1 -> npc(core.game.dialogue.FacialExpression.HAPPY, "My name's Gillie Groats. My father is a farmer and I", "milk the cows for him.").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.ASKING, "So how do you get milk from a cow then?").also { stage = 20 } - 3 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "I'm fine, thanks.").also { stage = 1000 } + 1 -> npc(FacialExpression.HAPPY, "My name's Gillie Groats. My father is a farmer and I", "milk the cows for him.").also { stage = 10 } + 2 -> player(FacialExpression.ASKING, "So how do you get milk from a cow then?").also { stage = 20 } + 3 -> player(FacialExpression.NEUTRAL, "I'm fine, thanks.").also { stage = 1000 } } //Who are you? - 10 -> player(core.game.dialogue.FacialExpression.ASKING, "Do you have any buckets of milk spare?").also { stage++ } - 11 -> npc(core.game.dialogue.FacialExpression.SUSPICIOUS, "I'm afraid not. We need all of our milk to sell to", "market, but you can milk the cow yourself if you need", "milk.").also { stage++ } - 12 -> player(core.game.dialogue.FacialExpression.HAPPY,"Thanks.").also { stage = 1000 } + 10 -> player(FacialExpression.ASKING, "Do you have any buckets of milk spare?").also { stage++ } + 11 -> npc(FacialExpression.SUSPICIOUS, "I'm afraid not. We need all of our milk to sell to", "market, but you can milk the cow yourself if you need", "milk.").also { stage++ } + 12 -> player(FacialExpression.HAPPY,"Thanks.").also { stage = 1000 } //Can you tell me how to milk a cow? - 20 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "It's very easy. First you need an empty bucket to hold", "the milk.").also { stage++ } - 21 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Then find a dairy cow to milk - you can't milk just", "any cow.").also { stage++ } - 22 -> player(core.game.dialogue.FacialExpression.ASKING, "How do I find a dairy cow?").also { stage++ } - 23 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "They are easy to spot - they are dark brown and", "white, unlike beef cows, which are light brown and white.", "We also tether them to a post to stop them wandering", "around all over the place.").also {stage++ } - 24 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "There are a couple very near, in this field.").also { stage++ } - 25 -> npc(core.game.dialogue.FacialExpression.HAPPY, "Then just milk the cow and your bucket will fill with", "tasty, nutritious milk.").also { stage = 1000 } + 20 -> npc(FacialExpression.FRIENDLY, "It's very easy. First you need an empty bucket to hold", "the milk.").also { stage++ } + 21 -> npc(FacialExpression.FRIENDLY, "Then find a dairy cow to milk - you can't milk just", "any cow.").also { stage++ } + 22 -> player(FacialExpression.ASKING, "How do I find a dairy cow?").also { stage++ } + 23 -> npc(FacialExpression.FRIENDLY, "They are easy to spot - they are dark brown and", "white, unlike beef cows, which are light brown and white.", "We also tether them to a post to stop them wandering", "around all over the place.").also {stage++ } + 24 -> npc(FacialExpression.FRIENDLY, "There are a couple very near, in this field.").also { stage++ } + 25 -> npc(FacialExpression.HAPPY, "Then just milk the cow and your bucket will fill with", "tasty, nutritious milk.").also { stage = 1000 } //Continuation of attempting to milk a dairy cow without a bucket - 100 -> player(core.game.dialogue.FacialExpression.ASKING, "Erm... No. How could you tell?").also { stage++ } - 101 -> npc(core.game.dialogue.FacialExpression.LAUGH, "Because you're spilling milk all over the floor. What a","waste ! You need something to hold the milk.").also { stage++ } - 102 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "Ah yes, I really should have guessed that one, shouldn't", "I?").also { stage++ } - 103 -> npc(core.game.dialogue.FacialExpression.LAUGH, "You're from the city, aren't you... Try it again with an","empty bucket.").also{ stage++ } - 104 -> player(core.game.dialogue.FacialExpression.NEUTRAL,"Right, I'll do that.").also { stage = 1000 } + 100 -> player(FacialExpression.ASKING, "Erm... No. How could you tell?").also { stage++ } + 101 -> npc(FacialExpression.LAUGH, "Because you're spilling milk all over the floor. What a","waste ! You need something to hold the milk.").also { stage++ } + 102 -> player(FacialExpression.NEUTRAL, "Ah yes, I really should have guessed that one, shouldn't", "I?").also { stage++ } + 103 -> npc(FacialExpression.LAUGH, "You're from the city, aren't you... Try it again with an","empty bucket.").also{ stage++ } + 104 -> player(FacialExpression.NEUTRAL,"Right, I'll do that.").also { stage = 1000 } //Dialogue Endpoint 1000 -> end() @@ -63,7 +63,7 @@ class GillieGroatsDialogue (player: Player? = null) : core.game.dialogue.Dialogu return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return GillieGroatsDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/lumbridge/quest/cooksassistant/LumbridgeCookDialogue.kt b/Server/src/main/content/region/misthalin/lumbridge/quest/cooksassistant/LumbridgeCookDialogue.kt index a6fa452b8..ff9ad0b57 100644 --- a/Server/src/main/content/region/misthalin/lumbridge/quest/cooksassistant/LumbridgeCookDialogue.kt +++ b/Server/src/main/content/region/misthalin/lumbridge/quest/cooksassistant/LumbridgeCookDialogue.kt @@ -13,7 +13,7 @@ import core.plugin.Initializable */ @Initializable -class LumbridgeCookDialogue (player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class LumbridgeCookDialogue (player: Player? = null) : DialoguePlugin(player){ //Item declaration val EMPTY_BUCKET = 1925 @@ -35,23 +35,23 @@ class LumbridgeCookDialogue (player: Player? = null) : core.game.dialogue.Dialog return true } if (player?.questRepository?.getQuest("Cook's Assistant")!!.getStage(player) <= 0) { //If the player has ot started cook's assistant - npc(core.game.dialogue.FacialExpression.SAD, "What am I to do?") + npc(FacialExpression.SAD, "What am I to do?") stage = 0 return true } else if (player?.questRepository?.getQuest("Cook's Assistant")!!.getStage(player) in 10..99) { //During the Cook's Assistant Quest if (player.getAttribute("cooks_assistant:all_submitted", false) || (player.getAttribute("cooks_assistant:milk_submitted", false) && player.getAttribute("cooks_assistant:flour_submitted", false) && player.getAttribute("cooks_assistant:egg_submitted", false))){ //If the player has handed all the ingredients to the chef but did not continue the dialogue - npc(core.game.dialogue.FacialExpression.HAPPY, "You've brought me everything I need! I am saved!", "Thank you!") + npc(FacialExpression.HAPPY, "You've brought me everything I need! I am saved!", "Thank you!") stage = 200 return true } else { //If the player has not handed all the items to the chef - npc(core.game.dialogue.FacialExpression.SAD, "How are you getting on with finding the ingredients?") + npc(FacialExpression.SAD, "How are you getting on with finding the ingredients?") gave = false //Resetting to false here to prevent dialogue skipping later stage = 100 return true } } //After completing Cook's Assistant - npc(core.game.dialogue.FacialExpression.HAPPY, "Hello friend, how is the adventuring going?") + npc(FacialExpression.HAPPY, "Hello friend, how is the adventuring going?") stage = 300 return true } @@ -72,105 +72,105 @@ class LumbridgeCookDialogue (player: Player? = null) : core.game.dialogue.Dialog when (stage) { 0 -> options("What's wrong?", "Can you make me a cake?", "You don't look very happy.", "Nice hat!").also { stage++ } 1 -> when(buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "What's wrong?").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.ASKING, "You're a cook, why don't you bake me a cake?").also { stage = 20 } - 3 -> player(core.game.dialogue.FacialExpression.NEUTRAL,"You don't look very happy.").also { stage = 30; } - 4 -> player(core.game.dialogue.FacialExpression.HAPPY, "Nice hat!").also { stage = 40 } + 1 -> player(FacialExpression.NEUTRAL, "What's wrong?").also { stage = 10 } + 2 -> player(FacialExpression.ASKING, "You're a cook, why don't you bake me a cake?").also { stage = 20 } + 3 -> player(FacialExpression.NEUTRAL,"You don't look very happy.").also { stage = 30; } + 4 -> player(FacialExpression.HAPPY, "Nice hat!").also { stage = 40 } } //What's wrong? - 10 -> npc(core.game.dialogue.FacialExpression.SCARED, "Oh dear, oh dear, oh dear, I'm in a terrible terrible", "mess! It's the Duke's birthday today, and I should be", "making him a lovely big birthday cake.").also { stage++ } - 11 -> npc(core.game.dialogue.FacialExpression.SAD, "I've forgotten to buy the ingredients. I'll never get", "them in time now. He'll sack me! What will I do? I have", "four children and a goat to look after. Would you help", "me? Please?").also { stage++ } + 10 -> npc(FacialExpression.SCARED, "Oh dear, oh dear, oh dear, I'm in a terrible terrible", "mess! It's the Duke's birthday today, and I should be", "making him a lovely big birthday cake.").also { stage++ } + 11 -> npc(FacialExpression.SAD, "I've forgotten to buy the ingredients. I'll never get", "them in time now. He'll sack me! What will I do? I have", "four children and a goat to look after. Would you help", "me? Please?").also { stage++ } 12 -> options("I'm always happy to help a cook in distress.", "I can't right now, Maybe later.").also { stage++ } 13 -> when(buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.HAPPY, "Yes, I'll help you.").also { stage = 50 } - 2 -> player(core.game.dialogue.FacialExpression.ANNOYED, "No, I don't feel like it. Maybe later.").also { stage++ } + 1 -> player(FacialExpression.HAPPY, "Yes, I'll help you.").also { stage = 50 } + 2 -> player(FacialExpression.ANNOYED, "No, I don't feel like it. Maybe later.").also { stage++ } } //I can't right now - 14 -> npc(core.game.dialogue.FacialExpression.SAD, "Fine. I always knew you Adventurer types were callous", "beasts. Go on your merry way!").also { stage = 1000 } + 14 -> npc(FacialExpression.SAD, "Fine. I always knew you Adventurer types were callous", "beasts. Go on your merry way!").also { stage = 1000 } //Can you make me a cake? - 20 -> npc(core.game.dialogue.FacialExpression.SAD, "*sniff* Don't talk to me about cakes...").also { stage++ } - 21 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "What's wrong?").also { stage = 10} + 20 -> npc(FacialExpression.SAD, "*sniff* Don't talk to me about cakes...").also { stage++ } + 21 -> player(FacialExpression.NEUTRAL, "What's wrong?").also { stage = 10} //You don't look very happy - 30 -> npc(core.game.dialogue.FacialExpression.SAD, "No, I'm not. The world is caving in around me - I am", "overcome by dark feelings of impending doom.").also { stage++ } + 30 -> npc(FacialExpression.SAD, "No, I'm not. The world is caving in around me - I am", "overcome by dark feelings of impending doom.").also { stage++ } 31 -> options("What's wrong?","I'd take the rest of the day off if I were you.").also { stage++ } 32 -> when(buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "What's wrong?").also { stage = 10} - 2 -> player(core.game.dialogue.FacialExpression.NEUTRAL,"I'd take the rest of the day off if I were you.").also { stage++ } + 1 -> player(FacialExpression.NEUTRAL, "What's wrong?").also { stage = 10} + 2 -> player(FacialExpression.NEUTRAL,"I'd take the rest of the day off if I were you.").also { stage++ } } - 33 -> npc(core.game.dialogue.FacialExpression.SAD,"No, that's the worst thing I could do. I'd get in terrible","trouble.").also { stage++ } - 34 -> player(core.game.dialogue.FacialExpression.ASKING,"Well maybe you need to take a holiday...").also { stage++ } - 35 -> npc(core.game.dialogue.FacialExpression.SAD,"That would be nice, but the Duke doesn't allow holidays","for core staff").also { stage++ } - 36 -> player(core.game.dialogue.FacialExpression.SUSPICIOUS,"Hmm, why not run away to the sea and start a new","life as a Pirate?").also { stage++ } - 37 -> npc(core.game.dialogue.FacialExpression.SAD,"My wife gets sea sick, and I have an irrational fear of","eyepatches. I don't see it working myself.").also { stage++ } - 38 -> player(core.game.dialogue.FacialExpression.NEUTRAL,"I'm afraid I've run out of ideas.").also { stage++ } - 39 -> npc(core.game.dialogue.FacialExpression.SAD,"I know I'm doomed.").also { stage = 21 } + 33 -> npc(FacialExpression.SAD,"No, that's the worst thing I could do. I'd get in terrible","trouble.").also { stage++ } + 34 -> player(FacialExpression.ASKING,"Well maybe you need to take a holiday...").also { stage++ } + 35 -> npc(FacialExpression.SAD,"That would be nice, but the Duke doesn't allow holidays","for core staff").also { stage++ } + 36 -> player(FacialExpression.SUSPICIOUS,"Hmm, why not run away to the sea and start a new","life as a Pirate?").also { stage++ } + 37 -> npc(FacialExpression.SAD,"My wife gets sea sick, and I have an irrational fear of","eyepatches. I don't see it working myself.").also { stage++ } + 38 -> player(FacialExpression.NEUTRAL,"I'm afraid I've run out of ideas.").also { stage++ } + 39 -> npc(FacialExpression.SAD,"I know I'm doomed.").also { stage = 21 } //Nice hat! - 40 -> npc(core.game.dialogue.FacialExpression.SAD, "Er, thank you. It's a pretty ordinary cook's hat, really.").also { stage++ } - 41 -> player(core.game.dialogue.FacialExpression.HAPPY, "Still, it suits you. The trousers are pretty special too.").also { stage++ } - 42 -> npc(core.game.dialogue.FacialExpression.SAD, "It's all standard-issue cook's uniform.").also { stage++ } - 43 -> player(core.game.dialogue.FacialExpression.HAPPY, "The whole hat, apron, stripy trousers ensemble. It", "works. It makes you looks like a real cook.").also { stage++ } - 44 -> npc(core.game.dialogue.FacialExpression.ANGRY, "I AM a real cook! I haven't got time to be chatting", "about culinary fashion. I'm in desperate need of help!").also { stage = 21 } + 40 -> npc(FacialExpression.SAD, "Er, thank you. It's a pretty ordinary cook's hat, really.").also { stage++ } + 41 -> player(FacialExpression.HAPPY, "Still, it suits you. The trousers are pretty special too.").also { stage++ } + 42 -> npc(FacialExpression.SAD, "It's all standard-issue cook's uniform.").also { stage++ } + 43 -> player(FacialExpression.HAPPY, "The whole hat, apron, stripy trousers ensemble. It", "works. It makes you looks like a real cook.").also { stage++ } + 44 -> npc(FacialExpression.ANGRY, "I AM a real cook! I haven't got time to be chatting", "about culinary fashion. I'm in desperate need of help!").also { stage = 21 } //Yes, I'll help you - 50 -> npc(core.game.dialogue.FacialExpression.HAPPY, "Oh thank you, thank you. I need milk, an egg and", "flour. I'd be very grateful if you can get them for me.").also{ player?.questRepository?.getQuest("Cook's Assistant")?.start(player!!); stage++ } - 51 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "So where do I find these ingredients then?").also { stage = 60 } + 50 -> npc(FacialExpression.HAPPY, "Oh thank you, thank you. I need milk, an egg and", "flour. I'd be very grateful if you can get them for me.").also{ player?.questRepository?.getQuest("Cook's Assistant")?.start(player!!); stage++ } + 51 -> player(FacialExpression.NEUTRAL, "So where do I find these ingredients then?").also { stage = 60 } //Where do I find these ingredients? 60 -> options("Where do I find some flour?","How about milk?","And eggs? Where are they found?","Actually, I know where to find this stuff.").also { stage++ } 61 -> when(buttonId) { - 1 -> npc(core.game.dialogue.FacialExpression.NEUTRAL,"There is a Mill fairly close, go North and then West.","Mill Lane Mill is just off the road to Draynor. I","usually get my flour from there.").also {stage = 70 } - 2 -> npc(core.game.dialogue.FacialExpression.NEUTRAL,"There is a cattle field on the other side of the river,","just across the road from the Groats' Farm.").also { stage = 71 } - 3 -> npc(core.game.dialogue.FacialExpression.NEUTRAL,"I normally get my eggs from the Groats' farm, on the","other side of the river.").also { stage = 73 } - 4 -> player(core.game.dialogue.FacialExpression.NEUTRAL,"Actually, I know where to find this stuff.").also { stage = 1000 } + 1 -> npc(FacialExpression.NEUTRAL,"There is a Mill fairly close, go North and then West.","Mill Lane Mill is just off the road to Draynor. I","usually get my flour from there.").also {stage = 70 } + 2 -> npc(FacialExpression.NEUTRAL,"There is a cattle field on the other side of the river,","just across the road from the Groats' Farm.").also { stage = 71 } + 3 -> npc(FacialExpression.NEUTRAL,"I normally get my eggs from the Groats' farm, on the","other side of the river.").also { stage = 73 } + 4 -> player(FacialExpression.NEUTRAL,"Actually, I know where to find this stuff.").also { stage = 1000 } } //Where do I find some flour? - 70 -> npc(core.game.dialogue.FacialExpression.SUSPICIOUS,"Talk to Millie, she'll help, she's a lovely girl and a fine","Miler. Make sure you take a pot with you for the flour","though, " + if (player.inventory.contains(EMPTY_POT, 1)) "you've got one on you already." else "there should be one on the table in here.").also { stage = 80 } + 70 -> npc(FacialExpression.SUSPICIOUS,"Talk to Millie, she'll help, she's a lovely girl and a fine","Miler. Make sure you take a pot with you for the flour","though, " + if (player.inventory.contains(EMPTY_POT, 1)) "you've got one on you already." else "there should be one on the table in here.").also { stage = 80 } //How about milk? - 71 -> npc(core.game.dialogue.FacialExpression.SUSPICIOUS,"Talk to Gillie Groats, she looks after the Dairy cows -","she'll tell you everything you need to know about","milking cows!").also { stage++ } + 71 -> npc(FacialExpression.SUSPICIOUS,"Talk to Gillie Groats, she looks after the Dairy cows -","she'll tell you everything you need to know about","milking cows!").also { stage++ } 72 -> if (player.inventory.contains(EMPTY_BUCKET , 1)) { - npc(core.game.dialogue.FacialExpression.NEUTRAL,"You'll need an empty bucket for the milk itself. I do see", "you've got a bucket with you already luckily!").also { stage = 80 } + npc(FacialExpression.NEUTRAL,"You'll need an empty bucket for the milk itself. I do see", "you've got a bucket with you already luckily!").also { stage = 80 } } else { - npc(core.game.dialogue.FacialExpression.NEUTRAL,"You'll need an empty bucket for the milk itself. The", "general store just north of the castle will sell you one", "for a couple of coins.").also { stage = 80 } + npc(FacialExpression.NEUTRAL,"You'll need an empty bucket for the milk itself. The", "general store just north of the castle will sell you one", "for a couple of coins.").also { stage = 80 } } //And Eggs? - 73 -> npc(core.game.dialogue.FacialExpression.NEUTRAL,"But any chicken should lay eggs.").also { stage = 80 } + 73 -> npc(FacialExpression.NEUTRAL,"But any chicken should lay eggs.").also { stage = 80 } //Alternative menu for "Where do I find these ingredients?" 80 -> options("Where do I find some flour?","How about milk?","And eggs? Where are they found?","I've got all the information I need. Thanks.").also { stage++ } 81 -> when(buttonId) { - 1 -> npc(core.game.dialogue.FacialExpression.NEUTRAL,"There is a Mill fairly close, go North and then West.","Mill Lane Mill is just off the road to Draynor. I","usually get my flour from there.").also {stage = 70 } - 2 -> npc(core.game.dialogue.FacialExpression.NEUTRAL,"There is a cattle field on the other side of the river,","just across the road from the Groats' Farm.").also { stage = 71 } - 3 -> npc(core.game.dialogue.FacialExpression.NEUTRAL,"I normally get my eggs from the Groats' farm, on the","other side of the river.").also { stage = 73 } - 4 -> player(core.game.dialogue.FacialExpression.NEUTRAL,"I've got all the information I need. Thanks.").also { stage = 1000 } + 1 -> npc(FacialExpression.NEUTRAL,"There is a Mill fairly close, go North and then West.","Mill Lane Mill is just off the road to Draynor. I","usually get my flour from there.").also {stage = 70 } + 2 -> npc(FacialExpression.NEUTRAL,"There is a cattle field on the other side of the river,","just across the road from the Groats' Farm.").also { stage = 71 } + 3 -> npc(FacialExpression.NEUTRAL,"I normally get my eggs from the Groats' farm, on the","other side of the river.").also { stage = 73 } + 4 -> player(FacialExpression.NEUTRAL,"I've got all the information I need. Thanks.").also { stage = 1000 } } 100 -> if (!player.getAttribute("cooks_assistant:milk_submitted", false) && player.inventory.contains(MILK, 1)) { player.setAttribute("/save:cooks_assistant:milk_submitted", true).also { - player(core.game.dialogue.FacialExpression.HAPPY, "Here's a bucket of milk.") + player(FacialExpression.HAPPY, "Here's a bucket of milk.") player.inventory.remove(Item(MILK)) gave = true stage = 100 } } else if (!player.getAttribute("cooks_assistant:flour_submitted", false) && player.inventory.contains(FLOUR, 1)) { player.setAttribute("/save:cooks_assistant:flour_submitted", true).also { - player(core.game.dialogue.FacialExpression.HAPPY, "Here's a pot of flour.") + player(FacialExpression.HAPPY, "Here's a pot of flour.") player.inventory.remove(Item(FLOUR)) gave = true stage = 100 } } else if (!player.getAttribute("cooks_assistant:egg_submitted", false) && player.inventory.contains(EGG, 1)) { player.setAttribute("/save:cooks_assistant:egg_submitted", true).also { - player(core.game.dialogue.FacialExpression.HAPPY, "Here's a fresh egg.") + player(FacialExpression.HAPPY, "Here's a fresh egg.") player.inventory.remove(Item(EGG)) gave = true stage = 100 @@ -185,16 +185,16 @@ class LumbridgeCookDialogue (player: Player? = null) : core.game.dialogue.Dialog //If the player has now handed in all the ingredients if (player.getAttribute("cooks_assistant:milk_submitted", false) && player.getAttribute("cooks_assistant:flour_submitted", false) && player.getAttribute("cooks_assistant:egg_submitted", false)) { - npc(core.game.dialogue.FacialExpression.HAPPY, "You've brought me everything I need! I am saved!", "Thank you!").also { player.setAttribute("/save:cooks_assistant:all_submitted",true); stage = 200 } + npc(FacialExpression.HAPPY, "You've brought me everything I need! I am saved!", "Thank you!").also { player.setAttribute("/save:cooks_assistant:all_submitted",true); stage = 200 } } else { - npc(core.game.dialogue.FacialExpression.WORRIED,"Thanks for the ingredients you have got so far, please get","the rest quickly. I'm running out of time! The Duke","will throw me into the streets!").also { stage = 151 } + npc(FacialExpression.WORRIED,"Thanks for the ingredients you have got so far, please get","the rest quickly. I'm running out of time! The Duke","will throw me into the streets!").also { stage = 151 } } } else { //If the player did not give an item to the Lumbridge cook //If the player also has never submitted anything before if (!player.getAttribute("cooks_assistant:submitted_some_items", false)) { - player(core.game.dialogue.FacialExpression.NEUTRAL, "I haven't gotten any of them yet, I'm still looking.").also { stage = 155 } + player(FacialExpression.NEUTRAL, "I haven't gotten any of them yet, I'm still looking.").also { stage = 155 } } else { options("I'll get right on it.", "Can you remind me how to find these things again?").also { stage = 161 } } @@ -202,7 +202,7 @@ class LumbridgeCookDialogue (player: Player? = null) : core.game.dialogue.Dialog } //If the player has submitted some ingredients but not all of them - 150 -> npc(core.game.dialogue.FacialExpression.WORRIED,"Thanks for the ingredients you have got so far, please get","the rest quickly. I'm running out of time! The Duke","will throw me into the streets!").also { stage++ } + 150 -> npc(FacialExpression.WORRIED,"Thanks for the ingredients you have got so far, please get","the rest quickly. I'm running out of time! The Duke","will throw me into the streets!").also { stage++ } //Checking what the player has left over 151 -> leftoverItems = "".also{ @@ -218,27 +218,27 @@ class LumbridgeCookDialogue (player: Player? = null) : core.game.dialogue.Dialog if (leftoverItems != ""){ sendDialogue("You still need to get:",leftoverItems).also {stage = 160} } else { - npc(core.game.dialogue.FacialExpression.HAPPY, "You've brought me everything I need! I am saved!", "Thank you!").also { player.setAttribute("/save:cooks_assistant:all_submitted",true); stage = 200 } + npc(FacialExpression.HAPPY, "You've brought me everything I need! I am saved!", "Thank you!").also { player.setAttribute("/save:cooks_assistant:all_submitted",true); stage = 200 } } } //If the player has yet to collect or hand in any of the ingredients - 155 -> npc(core.game.dialogue.FacialExpression.WORRIED,"Please get the ingredients quickly. I'm running out of","time! The Duke will throw me into the streets!").also { stage++ } + 155 -> npc(FacialExpression.WORRIED,"Please get the ingredients quickly. I'm running out of","time! The Duke will throw me into the streets!").also { stage++ } 156 -> sendDialogue("You still need to get:", "A bucket of milk. A pot of flour. An egg.").also { stage = 160 } // Menu after checking the items handed in 160 -> options("I'll get right on it.","Can you remind me how to find these things again?").also { stage++ } 161 -> when(buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.NEUTRAL,"I'll get right on it.").also { stage = 1000 } - 2 -> player(core.game.dialogue.FacialExpression.ASKING,"Can you remind me how to find these things again?").also { stage = 60 } + 1 -> player(FacialExpression.NEUTRAL,"I'll get right on it.").also { stage = 1000 } + 2 -> player(FacialExpression.ASKING,"Can you remind me how to find these things again?").also { stage = 60 } } //Final Cooks Assistant Dialogue - 200 -> player(core.game.dialogue.FacialExpression.HAPPY, "So do I get to go to the Duke's Party?").also { stage++ } - 201 -> npc(core.game.dialogue.FacialExpression.SAD, "I'm afraid not, only the big cheeses get to dine with the", "Duke.").also { stage++ } - 202 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "Well, maybe one day I'll be important enough to sit on", "the Duke's table.").also { stage ++ } - 203 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "Maybe, but I won't be holding my breath.").also { stage++ } + 200 -> player(FacialExpression.HAPPY, "So do I get to go to the Duke's Party?").also { stage++ } + 201 -> npc(FacialExpression.SAD, "I'm afraid not, only the big cheeses get to dine with the", "Duke.").also { stage++ } + 202 -> player(FacialExpression.NEUTRAL, "Well, maybe one day I'll be important enough to sit on", "the Duke's table.").also { stage ++ } + 203 -> npc(FacialExpression.NEUTRAL, "Maybe, but I won't be holding my breath.").also { stage++ } //Activate the Cook's Assistant Quest Complete Certificate 204 -> end().also { player?.questRepository?.getQuest("Cook's Assistant")?.finish(player!!) } @@ -250,30 +250,30 @@ class LumbridgeCookDialogue (player: Player? = null) : core.game.dialogue.Dialog options("I am getting strong and mighty.", "I keep on dying.", "Can I use your range?").also { stage++ } } 301 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.HAPPY, "I am getting strong and mighty. Grrr").also { stage = 310 } - 2 -> player(core.game.dialogue.FacialExpression.SAD, "I keep on dying.").also { stage = 320 } - 3 -> player(core.game.dialogue.FacialExpression.ASKING, "Can I use your range?").also { stage = 330 } + 1 -> player(FacialExpression.HAPPY, "I am getting strong and mighty. Grrr").also { stage = 310 } + 2 -> player(FacialExpression.SAD, "I keep on dying.").also { stage = 320 } + 3 -> player(FacialExpression.ASKING, "Can I use your range?").also { stage = 330 } } //I am getting strong and mighty - 310 -> npc(core.game.dialogue.FacialExpression.HAPPY,"Glad to hear it!").also { stage = 1000 } + 310 -> npc(FacialExpression.HAPPY,"Glad to hear it!").also { stage = 1000 } //I keep on dying - 320 -> npc(core.game.dialogue.FacialExpression.HAPPY, "Ah, well, at least you keep coming back to life too!").also { stage = 1000 } + 320 -> npc(FacialExpression.HAPPY, "Ah, well, at least you keep coming back to life too!").also { stage = 1000 } //Can I use your range? - 330 -> npc(core.game.dialogue.FacialExpression.HAPPY, "Go ahead! It's a very good range; it's better than most" ,"other ranges.").also { stage++ } - 331 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "It's called the Cook-o-Matic 100 and it uses a combination","of state-of-the-art temperature regulation and magic.").also { stage++ } - 332 -> player(core.game.dialogue.FacialExpression.ASKING,"Will it mean my food will burn less often?").also { stage++ } - 333 -> npc(core.game.dialogue.FacialExpression.NEUTRAL,"Well, that's what the salesman told us anyway...").also { stage++ } - 334 -> player(core.game.dialogue.FacialExpression.THINKING, "Thanks?").also { stage = 1000 } + 330 -> npc(FacialExpression.HAPPY, "Go ahead! It's a very good range; it's better than most" ,"other ranges.").also { stage++ } + 331 -> npc(FacialExpression.NEUTRAL, "It's called the Cook-o-Matic 100 and it uses a combination","of state-of-the-art temperature regulation and magic.").also { stage++ } + 332 -> player(FacialExpression.ASKING,"Will it mean my food will burn less often?").also { stage++ } + 333 -> npc(FacialExpression.NEUTRAL,"Well, that's what the salesman told us anyway...").also { stage++ } + 334 -> player(FacialExpression.THINKING, "Thanks?").also { stage = 1000 } //Conversation Endpoint 1000 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return LumbridgeCookDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/varrock/dialogue/AsyffDialogue.kt b/Server/src/main/content/region/misthalin/varrock/dialogue/AsyffDialogue.kt index d3e2d84be..0ab285bf6 100644 --- a/Server/src/main/content/region/misthalin/varrock/dialogue/AsyffDialogue.kt +++ b/Server/src/main/content/region/misthalin/varrock/dialogue/AsyffDialogue.kt @@ -12,12 +12,12 @@ import core.plugin.Initializable * @author Ceikry */ @Initializable -class AsyffDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class AsyffDialogue(player: Player? = null) : DialoguePlugin(player){ override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> player(core.game.dialogue.FacialExpression.ASKING,"Err...what are you saying exactly?").also { stage++ } - 1 -> npc(core.game.dialogue.FacialExpression.LAUGH,"I'm just saying that perhaps you would","like to peruse my selection of garments.").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.LAUGH,"Or, if that doesn't interest you, then maybe you have","something else to offer? I'm always on the look out","for interesting or unusual new materials.").also { stage++ } + 0 -> player(FacialExpression.ASKING,"Err...what are you saying exactly?").also { stage++ } + 1 -> npc(FacialExpression.LAUGH,"I'm just saying that perhaps you would","like to peruse my selection of garments.").also { stage++ } + 2 -> npc(FacialExpression.LAUGH,"Or, if that doesn't interest you, then maybe you have","something else to offer? I'm always on the look out","for interesting or unusual new materials.").also { stage++ } 3 -> options("Okay, let's see what you've got then.","Can you make clothing suitable for hunting in?","I think I might just leave the perusing for now thanks.","What sort of unusual materials did you have in mind?").also { stage++ } 4 -> when(buttonId){ 1 -> player("Okay, let's see what you've got then.").also { stage = 10 } @@ -45,12 +45,12 @@ class AsyffDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.HAPPY,"Now you look like someone who goes to","a lot of fancy dress parties.") + npc(FacialExpression.HAPPY,"Now you look like someone who goes to","a lot of fancy dress parties.") stage = 0 return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return AsyffDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/varrock/dialogue/ElsieDialogue.kt b/Server/src/main/content/region/misthalin/varrock/dialogue/ElsieDialogue.kt index ab465f138..cef36f068 100644 --- a/Server/src/main/content/region/misthalin/varrock/dialogue/ElsieDialogue.kt +++ b/Server/src/main/content/region/misthalin/varrock/dialogue/ElsieDialogue.kt @@ -15,9 +15,9 @@ import core.tools.END_DIALOGUE import core.tools.START_DIALOGUE @Initializable -class ElsieDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class ElsieDialogue(player: Player? = null) : DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ElsieDialogue(player) } @@ -26,12 +26,12 @@ class ElsieDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( if (hasTea()) { npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Ooh - that looks like a lovely cup of tea, dearie. Is it for me?" ).also { stage = 10 } } else { npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Hello dearie! What can old Elsie do for you?" ) } @@ -42,19 +42,19 @@ class ElsieDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { START_DIALOGUE -> showTopics( - Topic(core.game.dialogue.FacialExpression.ASKING, "What are you making?", 1), - Topic(core.game.dialogue.FacialExpression.ASKING, "Can you tell me a story?", 3), - Topic(core.game.dialogue.FacialExpression.ASKING, "Can you tell me how to get rich?", 5), - Topic(core.game.dialogue.FacialExpression.NEUTRAL, "I've got to go.", END_DIALOGUE) + Topic(FacialExpression.ASKING, "What are you making?", 1), + Topic(FacialExpression.ASKING, "Can you tell me a story?", 3), + Topic(FacialExpression.ASKING, "Can you tell me how to get rich?", 5), + Topic(FacialExpression.NEUTRAL, "I've got to go.", END_DIALOGUE) ) 1 -> npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "I'm knitting a new stole for Father Lawrence downstairs." ).also { stage++ } 2 -> npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "He could do with something to keep his neck warm, standing in " + "that draughty old church all day." ).also { stage = START_DIALOGUE } @@ -62,56 +62,56 @@ class ElsieDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( 3 -> { if (hasTea()) { npcl( - core.game.dialogue.FacialExpression.HALF_THINKING, + FacialExpression.HALF_THINKING, "Perhaps... Can I have that lovely cup of tea you have over there?" ).also { stage = 10 } } else { npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Maybe I could tell you a story if you'd fetch me a nice cup of tea." ).also { stage++ } } } 4 -> playerl( - core.game.dialogue.FacialExpression.ROLLING_EYES, + FacialExpression.ROLLING_EYES, "I'll think about it." ).also { stage = START_DIALOGUE } 5 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Well, dearie, I am probably not the best person to ask about money, but I think the best thing " + "would be for you to get a good trade." ).also { stage++ } 6 -> npcl( - core.game.dialogue.FacialExpression.HALF_WORRIED, + FacialExpression.HALF_WORRIED, "If you've got a good trade you can earn your way. That's what my old father would tell me." ).also { stage++ } 7 -> npcl( - core.game.dialogue.FacialExpression.HALF_WORRIED, + FacialExpression.HALF_WORRIED, "Saradomin rest his soul. I hear people try to get rich by fighting in the Wilderness north of here " + "or the Duel Arena in the south... But that's no way for honest folk to earn a living!" ).also { stage++ } 8 -> npcl( - core.game.dialogue.FacialExpression.HALF_WORRIED, + FacialExpression.HALF_WORRIED, "So get yourself a good trade, and keep working at it. There's always folks wanting to buy ore and food around here." ).also { stage++ } 9 -> playerl( - core.game.dialogue.FacialExpression.ROLLING_EYES, + FacialExpression.ROLLING_EYES, "Thanks, old woman." ).also { stage = START_DIALOGUE } 10 -> showTopics( - Topic(core.game.dialogue.FacialExpression.HAPPY, "Yes, you can have it.", 12), - Topic(core.game.dialogue.FacialExpression.ANNOYED, "No, keep your hands off my tea.", 11) + Topic(FacialExpression.HAPPY, "Yes, you can have it.", 12), + Topic(FacialExpression.ANNOYED, "No, keep your hands off my tea.", 11) ) 11 -> npcl( - core.game.dialogue.FacialExpression.SAD, + FacialExpression.SAD, "Aww. Maybe another time, then... Anyway, what can old Elsie do for you?" ).also { stage = START_DIALOGUE } @@ -119,84 +119,84 @@ class ElsieDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( .also { stage++; removeItem(player, Items.CUP_OF_TEA_712) } 13 -> npcl( - core.game.dialogue.FacialExpression.HAPPY, + FacialExpression.HAPPY, "Ahh, there's nothing like a nice cuppa tea. You know what, I'll tell you a story as a thank-you for that lovely tea..." ).also { stage++ } 14 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "A long time ago, when I was a little girl, there was a handsome young man living in Varrock..." ).also { stage++ } 15 -> npcl( - core.game.dialogue.FacialExpression.HALF_GUILTY, + FacialExpression.HALF_GUILTY, "I saw him here in the church quite often. Everyone said he was going to become a priest and " + "we girls were so sad about that..." ).also { stage++ } 16 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "But young Dissy - that was the young man's nickname - he was a wild young thing." ).also { stage++ } 17 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "One night he gathered some lads together, and after the evening prayer-meeting " + "they all put their masks on..." ).also { stage++ } 18 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Then, they snuck down to the temple in the south of the city - the evil one. " + "The next day, there was quite a hubbub..." ).also { stage++ } 19 -> npcl( - core.game.dialogue.FacialExpression.LAUGH, + FacialExpression.LAUGH, "The guards told us that someone had painted 'Saradomin pwns' on the wall of Zamorakian temple!" ).also { stage++ } 20 -> npcl( - core.game.dialogue.FacialExpression.HALF_THINKING, + FacialExpression.HALF_THINKING, "Now, we'd always been taught to keep well away from that dreadful place..." ).also { stage++ } 21 -> npcl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "But it really did us all good to see someone wasn't afraid of the scum who live at that end of town." ).also { stage++ } 22 -> npcl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Old Father Packett was furious, but Dissy just laughed it off. " + "Dissy left town after that, saying he wanted to see the world." ).also { stage++ } 23 -> npcl( - core.game.dialogue.FacialExpression.HALF_GUILTY, + FacialExpression.HALF_GUILTY, "It was such a shame, he had the most handsome... Shoulders..." ).also { stage++ } 24 -> npcl( - core.game.dialogue.FacialExpression.HAPPY, + FacialExpression.HAPPY, "One day, a young man came here looking for stories about Dissy - of course, " + "that's not his proper name, but his friends called him Dissy - and I told " + "him that one. " ).also { stage++ } 25 -> npcl( - core.game.dialogue.FacialExpression.HALF_WORRIED, + FacialExpression.HALF_WORRIED, "He said Dissy had become a really famous man and there was going to be a book about him. " + "That's good and all, but I do wish Dissy had just come back to Varrock. I did miss him so much... " ).also { stage++ } 26 -> npcl( - core.game.dialogue.FacialExpression.HAPPY, + FacialExpression.HAPPY, "Well, until I met my Freddie and we got married. But that's another story." ).also { stage++ } 27 -> playerl( - core.game.dialogue.FacialExpression.FRIENDLY, + FacialExpression.FRIENDLY, "Thank you. I'll leave you to your knitting now." ).also { stage = END_DIALOGUE } } diff --git a/Server/src/main/content/region/misthalin/varrock/dialogue/IffieDialogue.kt b/Server/src/main/content/region/misthalin/varrock/dialogue/IffieDialogue.kt index 876b66944..2ebebdf69 100644 --- a/Server/src/main/content/region/misthalin/varrock/dialogue/IffieDialogue.kt +++ b/Server/src/main/content/region/misthalin/varrock/dialogue/IffieDialogue.kt @@ -9,10 +9,10 @@ import core.plugin.Initializable * @author afaroutdude */ @Initializable -class IffieDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class IffieDialogue(player: Player? = null) : DialoguePlugin(player) { override fun open(vararg args: Any?): Boolean { npc("Sorry, dearie, if I stop to chat I'll lose count.", "Talk to my sister instead; she likes to chat.", "You'll find her upstairs in the church.") - stage = 999; + stage = 999 return true } @@ -23,7 +23,7 @@ class IffieDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin( return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return IffieDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/varrock/dialogue/ThessaliaDialogue.kt b/Server/src/main/content/region/misthalin/varrock/dialogue/ThessaliaDialogue.kt index 1a627cc8a..21772e6a8 100644 --- a/Server/src/main/content/region/misthalin/varrock/dialogue/ThessaliaDialogue.kt +++ b/Server/src/main/content/region/misthalin/varrock/dialogue/ThessaliaDialogue.kt @@ -10,7 +10,7 @@ import core.game.node.entity.player.Player import org.rs09.consts.Components @Initializable -class ThessaliaDialogue(player: Player? = null): core.game.dialogue.DialoguePlugin(player) { +class ThessaliaDialogue(player: Player? = null): DialoguePlugin(player) { override fun open(vararg args: Any): Boolean { //The trade argument is handled elsewhere @@ -25,7 +25,7 @@ class ThessaliaDialogue(player: Player? = null): core.game.dialogue.DialoguePlug } playJingle(player, 273) } else { //Has some armour equipped - interpreter.sendDialogues(548, core.game.dialogue.FacialExpression.WORRIED, "You can't try them on while wearing armour. Take", "it off and speak to me again.") + interpreter.sendDialogues(548, FacialExpression.WORRIED, "You can't try them on while wearing armour. Take", "it off and speak to me again.") stage = 52 } return true @@ -34,7 +34,7 @@ class ThessaliaDialogue(player: Player? = null): core.game.dialogue.DialoguePlug npc = args[0] as NPC //Default Talk - interpreter.sendDialogues(npc, core.game.dialogue.FacialExpression.ASKING, "Would you like to buy any fine clothes?") + interpreter.sendDialogues(npc, FacialExpression.ASKING, "Would you like to buy any fine clothes?") stage = 0 return true } @@ -47,16 +47,16 @@ class ThessaliaDialogue(player: Player? = null): core.game.dialogue.DialoguePlug } 1 -> when (buttonId) { 1 -> { - interpreter.sendDialogues(player, core.game.dialogue.FacialExpression.ASKING, "What do you have?") + interpreter.sendDialogues(player, FacialExpression.ASKING, "What do you have?") stage = 10 } 2 -> { - interpreter.sendDialogues(player, core.game.dialogue.FacialExpression.NEUTRAL, "No, thank you.") + interpreter.sendDialogues(player, FacialExpression.NEUTRAL, "No, thank you.") stage = 51 } } 10 -> { - interpreter.sendDialogues(npc, core.game.dialogue.FacialExpression.HAPPY, "I have a number of fine pieces of clothing on sale or,", "if you prefer, I can offer you an exclusive", "total clothing makeover?") + interpreter.sendDialogues(npc, FacialExpression.HAPPY, "I have a number of fine pieces of clothing on sale or,", "if you prefer, I can offer you an exclusive", "total clothing makeover?") stage++ } 11 -> { @@ -65,28 +65,28 @@ class ThessaliaDialogue(player: Player? = null): core.game.dialogue.DialoguePlug } 12 -> when (buttonId) { 1 -> { - interpreter.sendDialogues(player, core.game.dialogue.FacialExpression.THINKING, "Tell me more about this makeover.") + interpreter.sendDialogues(player, FacialExpression.THINKING, "Tell me more about this makeover.") stage = 20 } 2 -> { - interpreter.sendDialogues(player, core.game.dialogue.FacialExpression.NEUTRAL, "I'd just like to buy some clothes.") + interpreter.sendDialogues(player, FacialExpression.NEUTRAL, "I'd just like to buy some clothes.") stage = 50 } } 20 -> { - interpreter.sendDialogues(npc, core.game.dialogue.FacialExpression.HAPPY, "Certainly!") + interpreter.sendDialogues(npc, FacialExpression.HAPPY, "Certainly!") stage++ } 21 -> { - interpreter.sendDialogues(npc, core.game.dialogue.FacialExpression.HAPPY, "Here at Thessalia's fine clothing boutique, we offer a", "unique service where we will totally revamp your outfit", "to your choosing, for... wait for it...") + interpreter.sendDialogues(npc, FacialExpression.HAPPY, "Here at Thessalia's fine clothing boutique, we offer a", "unique service where we will totally revamp your outfit", "to your choosing, for... wait for it...") stage++ } 22 -> { - interpreter.sendDialogues(npc, core.game.dialogue.FacialExpression.AMAZED, "A fee of only 500 gold coins! Tired of always wearing", "the same old outfit, day in, day out? This is the service", "for you!") + interpreter.sendDialogues(npc, FacialExpression.AMAZED, "A fee of only 500 gold coins! Tired of always wearing", "the same old outfit, day in, day out? This is the service", "for you!") stage++ } 23 -> { - interpreter.sendDialogues(npc, core.game.dialogue.FacialExpression.ASKING, "So what do you say? Interested? We can change either", "your top, or your legwear for only 500 gold an item!") + interpreter.sendDialogues(npc, FacialExpression.ASKING, "So what do you say? Interested? We can change either", "your top, or your legwear for only 500 gold an item!") stage++ } 24 -> { @@ -95,19 +95,19 @@ class ThessaliaDialogue(player: Player? = null): core.game.dialogue.DialoguePlug } 25 -> when (buttonId) { 1 -> { - interpreter.sendDialogues(player, core.game.dialogue.FacialExpression.HAPPY, "I'd like to change my outfit, please.") + interpreter.sendDialogues(player, FacialExpression.HAPPY, "I'd like to change my outfit, please.") stage = 30 } 2 -> { - interpreter.sendDialogues(player, core.game.dialogue.FacialExpression.HAPPY, "I'd just like to buy some clothes.") + interpreter.sendDialogues(player, FacialExpression.HAPPY, "I'd just like to buy some clothes.") stage = 50 } } 30 -> if (player.equipment.isEmpty) { - interpreter.sendDialogues(npc, core.game.dialogue.FacialExpression.HAPPY, "Just select what style and colour you would like from", "this catalogue, and then give me the 1000 gold when", "you've picked.") + interpreter.sendDialogues(npc, FacialExpression.HAPPY, "Just select what style and colour you would like from", "this catalogue, and then give me the 1000 gold when", "you've picked.") stage++ } else { //Has some armour equipped - interpreter.sendDialogues(npc, core.game.dialogue.FacialExpression.WORRIED, "You can't try them on while wearing armour. Take", "it off and speak to me again.") + interpreter.sendDialogues(npc, FacialExpression.WORRIED, "You can't try them on while wearing armour. Take", "it off and speak to me again.") stage = 52 } 31 -> if (player.equipment.isEmpty) { @@ -120,7 +120,7 @@ class ThessaliaDialogue(player: Player? = null): core.game.dialogue.DialoguePlug } } 49 -> { - interpreter.sendDialogues(npc, core.game.dialogue.FacialExpression.FRIENDLY, "That's ok! Just come back when you do have it!") + interpreter.sendDialogues(npc, FacialExpression.FRIENDLY, "That's ok! Just come back when you do have it!") stage = 52 } 50 -> { @@ -136,7 +136,7 @@ class ThessaliaDialogue(player: Player? = null): core.game.dialogue.DialoguePlug return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ThessaliaDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/varrock/handlers/GrandExchangeShortcut.kt b/Server/src/main/content/region/misthalin/varrock/handlers/GrandExchangeShortcut.kt index 159ec8139..45994537a 100644 --- a/Server/src/main/content/region/misthalin/varrock/handlers/GrandExchangeShortcut.kt +++ b/Server/src/main/content/region/misthalin/varrock/handlers/GrandExchangeShortcut.kt @@ -62,7 +62,7 @@ class GrandExchangeShortcut : InteractionListener { lock(player, 4) val o = node as Scenery val path = SHORTCUTS[o.id]!! - ForceMovement.run(player, path[0], o.location, ForceMovement.WALK_ANIMATION, CLIMB_DOWN, direction(path[0], o.location), ForceMovement.WALKING_SPEED, ForceMovement.WALKING_SPEED, false); + ForceMovement.run(player, path[0], o.location, ForceMovement.WALK_ANIMATION, CLIMB_DOWN, direction(path[0], o.location), ForceMovement.WALKING_SPEED, ForceMovement.WALKING_SPEED, false) runCrawlPulse(player, path) return@on true } diff --git a/Server/src/main/content/region/misthalin/varrock/handlers/VarrockGuardSignpost.kt b/Server/src/main/content/region/misthalin/varrock/handlers/VarrockGuardSignpost.kt index 076b11fe3..29a4526a7 100644 --- a/Server/src/main/content/region/misthalin/varrock/handlers/VarrockGuardSignpost.kt +++ b/Server/src/main/content/region/misthalin/varrock/handlers/VarrockGuardSignpost.kt @@ -1,16 +1,17 @@ package content.region.misthalin.varrock.handlers -import core.api.* +import core.GlobalStats +import core.api.log +import core.api.registerMapZone +import core.api.sendDialogue +import core.game.interaction.IntType +import core.game.interaction.InteractionListener import core.game.interaction.Option import core.game.node.Node import core.game.node.entity.Entity import core.game.world.map.zone.MapZone import core.game.world.map.zone.ZoneBorders -import core.GlobalStats -import core.game.interaction.InteractionListener -import core.game.interaction.IntType import core.tools.Log -import core.tools.SystemLogger class VarrockGuardSignpost : InteractionListener { override fun defineListeners() { diff --git a/Server/src/main/content/region/misthalin/varrock/handlers/ZaffPlugin.kt b/Server/src/main/content/region/misthalin/varrock/handlers/ZaffPlugin.kt index 09a6f5c4e..795b33ce1 100644 --- a/Server/src/main/content/region/misthalin/varrock/handlers/ZaffPlugin.kt +++ b/Server/src/main/content/region/misthalin/varrock/handlers/ZaffPlugin.kt @@ -403,7 +403,7 @@ class ZaffPlugin : OptionHandler() { if(removeItem(player, Item(Items.COINS_995, coinage), Container.INVENTORY)){ addItem(player, Items.BATTLESTAFF_1392, amt) - ZaffPlugin.getStoreFile()[player.username.toLowerCase()] = amt + ammount + getStoreFile()[player.username.toLowerCase()] = amt + ammount } } } 2 -> { diff --git a/Server/src/main/content/region/misthalin/varrock/quest/allfiredup/AllFiredUp.kt b/Server/src/main/content/region/misthalin/varrock/quest/allfiredup/AllFiredUp.kt index f65ca24a2..f6f8d2c70 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/allfiredup/AllFiredUp.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/allfiredup/AllFiredUp.kt @@ -82,7 +82,7 @@ class AllFiredUp : Quest("All Fired Up", 157, 156, 1){ player.packetDispatch.sendItemZoomOnInterface(Items.TINDERBOX_590, 235, 277, 3 + 2) player.skills.addExperience(Skills.FIREMAKING, 5500.0) player.inventory.add(Item(995,20000)) - content.minigame.allfiredup.AFUBeacon.resetAllBeacons(player) + AFUBeacon.resetAllBeacons(player) setVarbit(player, 1283, 0) player.questRepository.syncronizeTab(player) } diff --git a/Server/src/main/content/region/misthalin/varrock/quest/allfiredup/BlazeSharpeyeDialogue.kt b/Server/src/main/content/region/misthalin/varrock/quest/allfiredup/BlazeSharpeyeDialogue.kt index 329fee8e9..cca4c4c2f 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/allfiredup/BlazeSharpeyeDialogue.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/allfiredup/BlazeSharpeyeDialogue.kt @@ -7,8 +7,8 @@ import core.game.node.entity.player.Player import core.plugin.Initializable @Initializable -class BlazeSharpeyeDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class BlazeSharpeyeDialogue(player: Player? = null) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return BlazeSharpeyeDialogue(player) } @@ -46,7 +46,7 @@ class BlazeSharpeyeDialogue(player: Player? = null) : core.game.dialogue.Dialogu 110 -> npc("I need you to light a couple of beacons for me to make","sure we can see the glow from the flames over the","horizon.").also { stage++ } 111 -> npc("So! First of all, you'll need to know how to light a beacon.").also { stage++ } 112 -> npc("Our technique is super-secret, but quite effective. All","you do is put twenty logs of the same type on a","beacon and...").also { stage++ } - 113 -> npc(core.game.dialogue.FacialExpression.AMAZED,"SET IT ON FIRE WITH A TINDERBOX").also { stage++ } + 113 -> npc(FacialExpression.AMAZED,"SET IT ON FIRE WITH A TINDERBOX").also { stage++ } 114 -> player("You really enjoy your job, don't you?").also { stage++ } 115 -> npc("Yes. Yes I do. Now, why don't you go over there and","try lighting that beacon. Show us what you've got.").also { stage++; player.questRepository.getQuest("All Fired Up").setStage(player,20) } 116 -> options("Does it matter what type of log I use?","Okay.").also { stage++ } diff --git a/Server/src/main/content/region/misthalin/varrock/quest/allfiredup/SquireFyreDialogue.kt b/Server/src/main/content/region/misthalin/varrock/quest/allfiredup/SquireFyreDialogue.kt index bacb683b1..ca33ddff3 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/allfiredup/SquireFyreDialogue.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/allfiredup/SquireFyreDialogue.kt @@ -8,8 +8,8 @@ import content.minigame.allfiredup.BeaconState import core.api.* @Initializable -class SquireFyreDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class SquireFyreDialogue(player: Player? = null) : DialoguePlugin(player){ + override fun newInstance(player: Player?): DialoguePlugin { return SquireFyreDialogue(player) } diff --git a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/AvanDialogue.kt b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/AvanDialogue.kt index d35687166..6b8c402a8 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/AvanDialogue.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/AvanDialogue.kt @@ -9,12 +9,12 @@ import core.plugin.Initializable import org.rs09.consts.Items @Initializable -class AvanDialogue (player: Player? = null): core.game.dialogue.DialoguePlugin(player) { +class AvanDialogue (player: Player? = null): DialoguePlugin(player) { val CREST_PIECE_AVAN: Item = Item(779) - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { - return AvanDialogue(player); + override fun newInstance(player: Player?): DialoguePlugin { + return AvanDialogue(player) } override fun open(vararg args: Any?): Boolean { @@ -121,7 +121,7 @@ class AvanDialogue (player: Player? = null): core.game.dialogue.DialoguePlugin(p } else{ player("I have the ring and necklace right here.") - stage = 300; + stage = 300 } 201 -> npc("Well, I won't entrust you with my piece of the crest " , "until you have brought me a necklace of perfect gold " , diff --git a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/BootDialogue.kt b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/BootDialogue.kt index 20113cdae..8a29de6e1 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/BootDialogue.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/BootDialogue.kt @@ -8,8 +8,8 @@ import core.plugin.Initializable @Initializable -class BootDialogue (player: Player? = null): core.game.dialogue.DialoguePlugin(player){ - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class BootDialogue (player: Player? = null): DialoguePlugin(player){ + override fun newInstance(player: Player?): DialoguePlugin { return BootDialogue(player) } @@ -18,11 +18,11 @@ class BootDialogue (player: Player? = null): core.game.dialogue.DialoguePlugin(p val qstage = player?.questRepository?.getStage("Family Crest") ?: -1 if(qstage < 14 || qstage > 14){ - npc(core.game.dialogue.FacialExpression.OLD_NORMAL,"Hello tall person.") + npc(FacialExpression.OLD_NORMAL,"Hello tall person.") stage = 1 } else{ - npc(core.game.dialogue.FacialExpression.OLD_NORMAL,"Hello tall person.") + npc(FacialExpression.OLD_NORMAL,"Hello tall person.") stage = 2 } @@ -38,7 +38,8 @@ class BootDialogue (player: Player? = null): core.game.dialogue.DialoguePlugin(p 10 ->when(buttonId){ 1-> player("Hello short person.").also { stage = 1000 } - 2 -> npc(core.game.dialogue.FacialExpression.OLD_ANGRY1,"I'm called Boot, because when I was very young, ", + 2 -> npc( + FacialExpression.OLD_ANGRY1,"I'm called Boot, because when I was very young, ", "I used to sleep, in a large boot.").also{stage++} } @@ -46,23 +47,25 @@ class BootDialogue (player: Player? = null): core.game.dialogue.DialoguePlugin(p 11 -> player("Yeah, great, I didn't want your life story.").also { stage = 1000} 20 -> when (buttonId){ - 1 -> npc(core.game.dialogue.FacialExpression.OLD_DEFAULT,"High quality gold eh? Hmmm... " , + 1 -> npc( + FacialExpression.OLD_DEFAULT,"High quality gold eh? Hmmm... " , "Well, the very best quality gold that I know of " , "can be found in an underground ruin near Witchaven.").also{stage++} 2-> player("Hello short person.").also { stage = 1000 } - 3 -> npc(core.game.dialogue.FacialExpression.OLD_ANGRY1,"I'm called Boot, because when I was very young, ", + 3 -> npc( + FacialExpression.OLD_ANGRY1,"I'm called Boot, because when I was very young, ", "I used to sleep, in a large boot.").also{stage = 11} } 21 -> npc("I don't believe it's exactly easy to get to though...").also { - stage = 1000; + stage = 1000 player.questRepository.getQuest("Family Crest").setStage(player, 15) } 1000 -> end() } - return true; + return true } override fun getIds(): IntArray { diff --git a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/CalebDialogue.kt b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/CalebDialogue.kt index 963668177..e25e5e60c 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/CalebDialogue.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/CalebDialogue.kt @@ -10,11 +10,11 @@ import org.rs09.consts.Items @Initializable -class CalebDialogue (player: Player? = null): core.game.dialogue.DialoguePlugin(player) { +class CalebDialogue (player: Player? = null): DialoguePlugin(player) { val CREST_PIECE: Item = Item(780) - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return CalebDialogue(player) } @@ -141,7 +141,7 @@ class CalebDialogue (player: Player? = null): core.game.dialogue.DialoguePlugin( 301 -> sendDialogue("You exchange the fish for Caleb's piece of the crest.").also{stage++}.also{ player.inventory.remove(Item(315),Item(329), Item(361), Item(365), Item(373)) player.inventory.add(CREST_PIECE) - player.questRepository.getQuest("Family Crest").setStage(player, 12); + player.questRepository.getQuest("Family Crest").setStage(player, 12) } 302 -> options("Uh... what happened to the rest of it?" , "Thank you very much!").also{stage++} @@ -189,12 +189,12 @@ class CalebDialogue (player: Player? = null): core.game.dialogue.DialoguePlugin( 403 -> if(player.inventory.containItems(CREST_PIECE.id, 782) || player.bank.containItems(CREST_PIECE.id, 782)) { npc("Then why are you wasting your time here?") - stage = 1000; - } + stage = 1000 + } else{ player("I have lost the fragment that you gave me...") - stage++; - } + stage++ + } 404 -> npc("I have some good news for you then. " , "One of my customers found this on their travels " , "and recognised it as mine and returned it to me here.").also{stage++} diff --git a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/ChronozonCaveZone.kt b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/ChronozonCaveZone.kt index a7720b9a2..a7b458247 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/ChronozonCaveZone.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/ChronozonCaveZone.kt @@ -44,7 +44,7 @@ class ChronozonCaveZone: MapZone("FC ChronozoneZone", true), Plugin { 5 ).contains(chronozon) ) { - chronozon.setPlayer(e); + chronozon.setPlayer(e) chronozon.isRespawn = false chronozon.init() } diff --git a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/ChronozonNPC.kt b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/ChronozonNPC.kt index dfd84009d..594e93210 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/ChronozonNPC.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/ChronozonNPC.kt @@ -98,7 +98,7 @@ class ChronozonNPC(id: Int, location: Location?) : AbstractNPC(667, Location(308 } fun setPlayer(player: Player){ - m_targetPlayer = player; + m_targetPlayer = player } } diff --git a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/DimintheisDialogue.kt b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/DimintheisDialogue.kt index 18dcf61ac..746f1ebfd 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/DimintheisDialogue.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/DimintheisDialogue.kt @@ -27,7 +27,7 @@ class DimintheisDialogue(player: Player? = null): core.game.dialogue.DialoguePlu if (questStage == 20 && inInventory(player, Items.FAMILY_CREST_782)) { player("I have retrieved your crest.").also{ stage = 5000 } - return true; + return true } val hasGauntlets = hasAnItem(player, Items.COOKING_GAUNTLETS_775, Items.GOLDSMITH_GAUNTLETS_776, Items.CHAOS_GAUNTLETS_777, Items.FAMILY_GAUNTLETS_778).container != null @@ -179,7 +179,7 @@ class DimintheisDialogue(player: Player? = null): core.game.dialogue.DialoguePlu 1000 -> end() } - return true; + return true } override fun getIds(): IntArray { diff --git a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/JohnathonDialogue.kt b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/JohnathonDialogue.kt index 80dbfae90..8942d0ab8 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/JohnathonDialogue.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/JohnathonDialogue.kt @@ -10,9 +10,9 @@ import core.plugin.Initializable import org.rs09.consts.Items @Initializable -class JohnathonDialogue(player: Player? = null): core.game.dialogue.DialoguePlugin(player) { +class JohnathonDialogue(player: Player? = null): DialoguePlugin(player) { val CREST_PIECE: Item = Item(781) - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return JohnathonDialogue(player) } @@ -28,7 +28,7 @@ class JohnathonDialogue(player: Player? = null): core.game.dialogue.DialoguePlug if(qstage < 16){ npc("I don't feel so well... maybe we can talk later") - stage = 1000; + stage = 1000 } else{ when(qstage){ @@ -53,7 +53,7 @@ class JohnathonDialogue(player: Player? = null): core.game.dialogue.DialoguePlug "too much... My head... " , "will not... stop spinning...").also { stage++ } 4 -> sendDialogue("Sweat is pouring down Jonathons' face.").also { stage = 1000 - player.questRepository.getQuest("Family Crest").setStage(player, 17); + player.questRepository.getQuest("Family Crest").setStage(player, 17) } 100 -> npc("Ooooh... thank you... Wow! " , diff --git a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectGoldSmeltingHandler.kt b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectGoldSmeltingHandler.kt index 4e66dd5e5..cec2f6520 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectGoldSmeltingHandler.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectGoldSmeltingHandler.kt @@ -2,7 +2,7 @@ package content.region.misthalin.varrock.quest.familycrest import core.api.addItem -import core.api.animate; +import core.api.animate import core.api.removeItem import core.game.interaction.NodeUsageEvent import core.game.interaction.UseWithHandler @@ -19,7 +19,7 @@ import core.game.world.GameWorld.Pulser class PerfectGoldSmeltingHandler : UseWithHandler(Items.PERFECT_GOLD_ORE_446){ - private val furnaceIDs: IntArray = FurnaceOptionPlugin.SmeltUseWithHandler.furnaceIDS; + private val furnaceIDs: IntArray = FurnaceOptionPlugin.SmeltUseWithHandler.furnaceIDS override fun newInstance(arg: Any?): Plugin { for(furnace in furnaceIDs){ diff --git a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectJewelryHandler.kt b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectJewelryHandler.kt index 49843aaec..2cba709b5 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectJewelryHandler.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectJewelryHandler.kt @@ -8,9 +8,9 @@ import core.plugin.Initializable @Initializable -class PerfectJewelryHandler (player: Player? = null): core.game.dialogue.DialoguePlugin(player){ +class PerfectJewelryHandler (player: Player? = null): DialoguePlugin(player){ - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return PerfectJewelryHandler(player) } @@ -18,7 +18,7 @@ class PerfectJewelryHandler (player: Player? = null): core.game.dialogue.Dialogu println(player.name) if(player.inventory.containItems(2365, 1603)){ options("Craft perfect ruby ring", "Craft perfect ruby necklace") - stage = 1; + stage = 1 } return true } @@ -36,7 +36,7 @@ class PerfectJewelryHandler (player: Player? = null): core.game.dialogue.Dialogu } else{ sendDialogue("You do not have everything to make this item.") - stage = 1000; + stage = 1000 } 2-> if(player.inventory.containItems(2365, 1603) && player.inventory.containItems(1597)){ @@ -47,7 +47,7 @@ class PerfectJewelryHandler (player: Player? = null): core.game.dialogue.Dialogu } else{ sendDialogue("You do not have everything to make this item.") - stage = 1000; + stage = 1000 } } @@ -58,7 +58,7 @@ class PerfectJewelryHandler (player: Player? = null): core.game.dialogue.Dialogu } override fun getIds(): IntArray { - return intArrayOf(core.game.dialogue.DialogueInterpreter.getDialogueKey("perfect-jewelry")) + return intArrayOf(DialogueInterpreter.getDialogueKey("perfect-jewelry")) } } diff --git a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectJewelryOnUseHandler.kt b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectJewelryOnUseHandler.kt index 65cac212f..4d258b5db 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectJewelryOnUseHandler.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectJewelryOnUseHandler.kt @@ -19,7 +19,7 @@ class PerfectJewelryOnUseHandler : UseWithHandler(Items.PERFECT_GOLD_BAR_2365){ override fun handle(event: NodeUsageEvent?): Boolean { event ?: return false - event.player.dialogueInterpreter.open("perfect-jewelry"); + event.player.dialogueInterpreter.open("perfect-jewelry") return true } diff --git a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/WitchavenLeverInteraction.kt b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/WitchavenLeverInteraction.kt index 8dcf831a1..d0b7f8541 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/WitchavenLeverInteraction.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/WitchavenLeverInteraction.kt @@ -8,7 +8,7 @@ import core.game.world.map.RegionManager import core.game.world.update.flag.context.Animation import core.net.packet.out.ClearScenery import core.net.packet.out.ConstructScenery -import core.net.packet.out.UpdateAreaPosition; +import core.net.packet.out.UpdateAreaPosition import core.game.interaction.InteractionListener import core.game.interaction.IntType @@ -26,7 +26,7 @@ fun doDoor(player: Player, scenery: Scenery) { ForceMovement.WALK_ANIMATION, ForceMovement.WALK_ANIMATION, direction, - 8); + 8) } diff --git a/Server/src/main/content/region/morytania/canifis/dialogue/AgilityBossDialogue.kt b/Server/src/main/content/region/morytania/canifis/dialogue/AgilityBossDialogue.kt index 6dea465eb..5b476b620 100644 --- a/Server/src/main/content/region/morytania/canifis/dialogue/AgilityBossDialogue.kt +++ b/Server/src/main/content/region/morytania/canifis/dialogue/AgilityBossDialogue.kt @@ -11,34 +11,34 @@ import core.plugin.Initializable */ @Initializable -class AgilityBossDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class AgilityBossDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC if(player.equipment.contains(4202,1)) { - player(core.game.dialogue.FacialExpression.ASKING,"How do I use the agility course?").also { stage = 0 } + player(FacialExpression.ASKING,"How do I use the agility course?").also { stage = 0 } } else { - npc(core.game.dialogue.FacialExpression.CHILD_SUSPICIOUS,"Grrr - you don't belong in here, human!").also { stage = 99 } + npc(FacialExpression.CHILD_SUSPICIOUS,"Grrr - you don't belong in here, human!").also { stage = 99 } } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.CHILD_NORMAL,"I'll throw you a stick, which you need to", + 0 -> npc(FacialExpression.CHILD_NORMAL,"I'll throw you a stick, which you need to", "fetch as quickly as possible, ", "from the area beyond the pipes.").also { stage++ } - 1 -> npc(core.game.dialogue.FacialExpression.CHILD_NORMAL,"Be wary of the deathslide - you must hang by your teeth,", + 1 -> npc(FacialExpression.CHILD_NORMAL,"Be wary of the deathslide - you must hang by your teeth,", "and if your strength is not up to the job you will", "fall into a pit of spikes. Also, I would advise not", "carrying too much extra weight.").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.CHILD_NORMAL,"Bring the stick back to the werewolf waiting at", + 2 -> npc(FacialExpression.CHILD_NORMAL,"Bring the stick back to the werewolf waiting at", "the end of the death slide to get your agility bonus.").also { stage++ } - 3 ->npc(core.game.dialogue.FacialExpression.CHILD_NORMAL,"I will throw your stick as soon as you jump onto the", + 3 ->npc(FacialExpression.CHILD_NORMAL,"I will throw your stick as soon as you jump onto the", "first stone.").also { stage = 99 } 99 -> end() @@ -46,7 +46,7 @@ class AgilityBossDialogue(player: Player? = null) : core.game.dialogue.DialogueP return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return AgilityBossDialogue(player) } diff --git a/Server/src/main/content/region/morytania/dialogue/AfflictedDialogue.kt b/Server/src/main/content/region/morytania/dialogue/AfflictedDialogue.kt index c1d9648fc..0f3cfd062 100644 --- a/Server/src/main/content/region/morytania/dialogue/AfflictedDialogue.kt +++ b/Server/src/main/content/region/morytania/dialogue/AfflictedDialogue.kt @@ -13,13 +13,13 @@ import core.tools.RandomFunction */ @Initializable -class AfflictedDialogue : core.game.dialogue.DialoguePlugin { +class AfflictedDialogue : DialoguePlugin { private val chats = arrayOf("ughugh", "knows'is", "knows'is", "nots", "pirsl", "wot's", "zurgle", "gurghl", "mee's", "seysyi", "sfriess", "says") override fun open(vararg args: Any): Boolean { npc = args[0] as NPC chats.shuffle() - interpreter.sendDialogues( npc, core.game.dialogue.FacialExpression.ASKING, chats.copyOfRange(0, RandomFunction.random(1, 6)).contentToString() + interpreter.sendDialogues( npc, FacialExpression.ASKING, chats.copyOfRange(0, RandomFunction.random(1, 6)).contentToString() .replace("[", "").replace("]", "").replace(",", "")) return true } @@ -36,7 +36,7 @@ class AfflictedDialogue : core.game.dialogue.DialoguePlugin { return true } - override fun newInstance(player: Player): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player): DialoguePlugin { return AfflictedDialogue(player) } } \ No newline at end of file diff --git a/Server/src/main/content/region/morytania/quest/naturespirit/NSDrezelDialogue.kt b/Server/src/main/content/region/morytania/quest/naturespirit/NSDrezelDialogue.kt index d28cefa25..c49a78527 100644 --- a/Server/src/main/content/region/morytania/quest/naturespirit/NSDrezelDialogue.kt +++ b/Server/src/main/content/region/morytania/quest/naturespirit/NSDrezelDialogue.kt @@ -21,31 +21,31 @@ class NSDrezelDialogue : DialogueFile() { when(stage){ 0 -> options("Sorry, not interested...", "Well, what is it, I may be able to help?").also { stage++ } 1 -> when(buttonID){ - 1 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Sorry, not interested.").also { stage = END_DIALOGUE } - 2 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Well, what is it, I may be able to help?").also { stage++ } + 1 -> playerl(FacialExpression.NEUTRAL, "Sorry, not interested.").also { stage = END_DIALOGUE } + 2 -> playerl(FacialExpression.FRIENDLY, "Well, what is it, I may be able to help?").also { stage++ } } - 2 -> npcl(core.game.dialogue.FacialExpression.HALF_THINKING, "There's a man called Filliman who lives in Mort Myre, I wonder if you could look for him? The swamps of Mort Myre are dangerous though, they're infested with Ghasts!").also { stage++ } + 2 -> npcl(FacialExpression.HALF_THINKING, "There's a man called Filliman who lives in Mort Myre, I wonder if you could look for him? The swamps of Mort Myre are dangerous though, they're infested with Ghasts!").also { stage++ } 3 -> options("Who is this Filliman?", "Where's Mort Myre?", "What's a Ghast?", "Yes, I'll go and look for him.", "Sorry, I don't think I can help.").also { stage++ } 4 -> when(buttonID){ - 1 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Filliman Tarlock is his full name and he's a Druid. He lives in Mort Myre much like a hermit, but there's many a traveller who he's helped.").also { stage-- } - 2 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Mort Myre is a decayed and dangerous swamp to the south. It was once a beautiful forest but has since become filled with vile emanations from within Morytania.").also { stage = 6 } - 3 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "A Ghast is a poor soul who died in Mort Myre. They're undead of a special class, they're untouchable as far as I'm aware!").also { stage = 5 } - 4 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, I'll go and look for him.").also { stage = 10 } - 5 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Sorry, I don't think I can help.").also { stage = END_DIALOGUE } + 1 -> npcl(FacialExpression.NEUTRAL, "Filliman Tarlock is his full name and he's a Druid. He lives in Mort Myre much like a hermit, but there's many a traveller who he's helped.").also { stage-- } + 2 -> npcl(FacialExpression.NEUTRAL, "Mort Myre is a decayed and dangerous swamp to the south. It was once a beautiful forest but has since become filled with vile emanations from within Morytania.").also { stage = 6 } + 3 -> npcl(FacialExpression.NEUTRAL, "A Ghast is a poor soul who died in Mort Myre. They're undead of a special class, they're untouchable as far as I'm aware!").also { stage = 5 } + 4 -> playerl(FacialExpression.FRIENDLY, "Yes, I'll go and look for him.").also { stage = 10 } + 5 -> playerl(FacialExpression.NEUTRAL, "Sorry, I don't think I can help.").also { stage = END_DIALOGUE } } - 5 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Filliman knew how to tackle them, but I've not heard from him in a long time. Ghasts, when they attack, will devour any food you have. If you have no food, they'll draw their nourishment from you!").also { stage = 3 } - 6 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, " We put a fence around it to stop unwary travellers going in. Anyone who dies in the swamp is forever cursed to haunt it as a Ghast. Ghasts attack travellers, turning food to rotten filth.").also { stage = 3 } + 5 -> npcl(FacialExpression.NEUTRAL, "Filliman knew how to tackle them, but I've not heard from him in a long time. Ghasts, when they attack, will devour any food you have. If you have no food, they'll draw their nourishment from you!").also { stage = 3 } + 6 -> npcl(FacialExpression.NEUTRAL, " We put a fence around it to stop unwary travellers going in. Anyone who dies in the swamp is forever cursed to haunt it as a Ghast. Ghasts attack travellers, turning food to rotten filth.").also { stage = 3 } - 10 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "That's great, but it is very dangerous. Are you sure you want to do this?").also { stage++ } + 10 -> npcl(FacialExpression.NEUTRAL, "That's great, but it is very dangerous. Are you sure you want to do this?").also { stage++ } 11 -> options("Yes, I'm sure.", "Sorry, I don't think I can help.").also { stage++ } 12 -> when(buttonID){ - 1 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, I'm sure.").also { stage = 20 } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Sorry, I don't think I can help.").also { stage = END_DIALOGUE } + 1 -> playerl(FacialExpression.FRIENDLY, "Yes, I'm sure.").also { stage = 20 } + 2 -> playerl(FacialExpression.NEUTRAL, "Sorry, I don't think I can help.").also { stage = END_DIALOGUE } } - 20 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "That's great! Many Thanks! Now then, please be aware of the Ghasts, you cannot attack them, only Filliman knew how to take them on.").also { stage++ } - 21 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Just run from them if you can. If you start to get lost, try to make your way back to the temple.").also { stage++ } + 20 -> npcl(FacialExpression.NEUTRAL, "That's great! Many Thanks! Now then, please be aware of the Ghasts, you cannot attack them, only Filliman knew how to take them on.").also { stage++ } + 21 -> npcl(FacialExpression.NEUTRAL, "Just run from them if you can. If you start to get lost, try to make your way back to the temple.").also { stage++ } 22 -> { sendDoubleItemDialogue(player!!, Items.MEAT_PIE_2327, Items.APPLE_PIE_2323, "The cleric hands you some food.") if(questStage == 0){ @@ -55,44 +55,44 @@ class NSDrezelDialogue : DialogueFile() { } stage++ } - 23 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Please take this food to Filliman, he'll probably appreciate a bit of cooked food. Now, he's never revealed where he lives in the swamps but I guess he'd be to the south, search for him won't you?").also { stage++ } - 24 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "I'll do my very best, don't worry, if he's in there and he's still alive I'll definitely find him.").also { stage = END_DIALOGUE; player!!.questRepository.getQuest("Nature Spirit").start(player!!) } + 23 -> npcl(FacialExpression.NEUTRAL, "Please take this food to Filliman, he'll probably appreciate a bit of cooked food. Now, he's never revealed where he lives in the swamps but I guess he'd be to the south, search for him won't you?").also { stage++ } + 24 -> playerl(FacialExpression.FRIENDLY, "I'll do my very best, don't worry, if he's in there and he's still alive I'll definitely find him.").also { stage = END_DIALOGUE; player!!.questRepository.getQuest("Nature Spirit").start(player!!) } } } else if(questStage == 15) { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.HALF_GUILTY, "I've found Filliman and you should prepare for some sad news.").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "You mean... he's dead?").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Well, er sort of. I got to his camp and I encountered a spirit of some kind. I don't think it was a Ghast, it tried to communicate with me, but made no sense, it was all 'ooooh' this and 'oooh' that.").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Hmmm, that's very interesting, I seem to remember Father Aereck in Lumbridge and his predecessor Father Urhney having a similar issue. Though this is probably not related to your problem.").also { stage++ } - 4 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, " I will pray that it wasn't the spirit of my friend Filliman, but some lost soul who needs some help. Please do let me know how you get on with it.").also { stage = END_DIALOGUE } + 0 -> playerl(FacialExpression.HALF_GUILTY, "I've found Filliman and you should prepare for some sad news.").also { stage++ } + 1 -> npcl(FacialExpression.HALF_GUILTY, "You mean... he's dead?").also { stage++ } + 2 -> playerl(FacialExpression.NEUTRAL, "Well, er sort of. I got to his camp and I encountered a spirit of some kind. I don't think it was a Ghast, it tried to communicate with me, but made no sense, it was all 'ooooh' this and 'oooh' that.").also { stage++ } + 3 -> npcl(FacialExpression.NEUTRAL, "Hmmm, that's very interesting, I seem to remember Father Aereck in Lumbridge and his predecessor Father Urhney having a similar issue. Though this is probably not related to your problem.").also { stage++ } + 4 -> npcl(FacialExpression.NEUTRAL, " I will pray that it wasn't the spirit of my friend Filliman, but some lost soul who needs some help. Please do let me know how you get on with it.").also { stage = END_DIALOGUE } } } else if(questStage == 35){ when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Hello again! I'm helping Filliman, he plans to become a nature spirit. I have a spell to cast but first I need to be blessed. Can you bless me?").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "But you haven't sneezed!").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "You're so funny! But can you bless me?").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Very well my friend, prepare yourself for the blessings of Saradomin. Here we go!").also { stage++ } + 0 -> playerl(FacialExpression.FRIENDLY, "Hello again! I'm helping Filliman, he plans to become a nature spirit. I have a spell to cast but first I need to be blessed. Can you bless me?").also { stage++ } + 1 -> npcl(FacialExpression.NEUTRAL, "But you haven't sneezed!").also { stage++ } + 2 -> playerl(FacialExpression.FRIENDLY, "You're so funny! But can you bless me?").also { stage++ } + 3 -> npcl(FacialExpression.NEUTRAL, "Very well my friend, prepare yourself for the blessings of Saradomin. Here we go!").also { stage++ } 4 -> { end() - player!!.lock(); + player!!.lock() submitIndividualPulse(player!!, BlessingPulse(npc!!, player!!)) } } } else if(questStage == 40){ - npcl(core.game.dialogue.FacialExpression.NEUTRAL, "There you go my friend, you're now blessed. It's funny, now I look at you, there seems to be something of the faith about you. Anyway, good luck with your quest!").also { stage = END_DIALOGUE; player!!.questRepository.getQuest("Nature Spirit").setStage(player!!, 45) } + npcl(FacialExpression.NEUTRAL, "There you go my friend, you're now blessed. It's funny, now I look at you, there seems to be something of the faith about you. Anyway, good luck with your quest!").also { stage = END_DIALOGUE; player!!.questRepository.getQuest("Nature Spirit").setStage(player!!, 45) } } else { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Hello, friend, how goes your quest with Filliman?").also { stage++ } - 1 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Still working at it.").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Well enough! Do let me know when something develops!").also { stage = END_DIALOGUE } + 0 -> npcl(FacialExpression.NEUTRAL, "Hello, friend, how goes your quest with Filliman?").also { stage++ } + 1 -> playerl(FacialExpression.NEUTRAL, "Still working at it.").also { stage++ } + 2 -> npcl(FacialExpression.NEUTRAL, "Well enough! Do let me know when something develops!").also { stage = END_DIALOGUE } } } } diff --git a/Server/src/main/content/region/morytania/quest/naturespirit/NSTarlockDialogue.kt b/Server/src/main/content/region/morytania/quest/naturespirit/NSTarlockDialogue.kt index e9332bd8e..cfdd8ea17 100644 --- a/Server/src/main/content/region/morytania/quest/naturespirit/NSTarlockDialogue.kt +++ b/Server/src/main/content/region/morytania/quest/naturespirit/NSTarlockDialogue.kt @@ -16,10 +16,10 @@ import org.rs09.consts.NPCs import core.tools.END_DIALOGUE @Initializable -class NSTarlockDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class NSTarlockDialogue(player: Player? = null) : DialoguePlugin(player) { var questStage = 0 - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return NSTarlockDialogue(player) } @@ -29,29 +29,29 @@ class NSTarlockDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu questStage = quest.getStage(player) if(questStage > 10 && !inEquipment(player, Items.GHOSTSPEAK_AMULET_552)){ - npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "OooOOOOOOoooOoOOoOOOo") + npcl(FacialExpression.HALF_GUILTY, "OooOOOOOOoooOoOOoOOOo") setQuest(15) return false } when(questStage){ 10, 15 -> sendDialogue("A shifting apparition appears in front of you.").also { stage = 1000 } - 20 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Oh, hello there, do you still think I'm dead? It's hard to see how I could be dead when I'm still in the world. I can see everything quite clearly. And nothing of what you say reflects the truth.") - 25 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Oh, hello... Sorry, you've caught me at a bad time, it's just that I've had a sign you see and I need to find my journal.").also { stage = 7 } - 30 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Thanks for the journal, I've been reading it. It looks like I came to a violent and bitter end but that's not really important. I just have to figure out what I am going to do now?").also { stage = 14 } - 35 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Hello there, have you been blessed yet?").also { stage = 60 } + 20 -> npcl(FacialExpression.HALF_GUILTY, "Oh, hello there, do you still think I'm dead? It's hard to see how I could be dead when I'm still in the world. I can see everything quite clearly. And nothing of what you say reflects the truth.") + 25 -> npcl(FacialExpression.HALF_GUILTY, "Oh, hello... Sorry, you've caught me at a bad time, it's just that I've had a sign you see and I need to find my journal.").also { stage = 7 } + 30 -> npcl(FacialExpression.HALF_GUILTY, "Thanks for the journal, I've been reading it. It looks like I came to a violent and bitter end but that's not really important. I just have to figure out what I am going to do now?").also { stage = 14 } + 35 -> npcl(FacialExpression.NEUTRAL, "Hello there, have you been blessed yet?").also { stage = 60 } 45 -> { if(inInventory(player, Items.MORT_MYRE_FUNGUS_2970)){ - npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Did you manage to get something from nature?").also { stage = 80 } + npcl(FacialExpression.NEUTRAL, "Did you manage to get something from nature?").also { stage = 80 } } else { playerl( - core.game.dialogue.FacialExpression.NEUTRAL, + FacialExpression.NEUTRAL, "Hello, I've been blessed but I don't know what to do now." ).also { stage = 70 } } } - 50 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, " Hello again! I don't suppose you've found out what the other components of the Nature spell are have you?").also { stage = 90 } - else -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, ".......").also { stage = END_DIALOGUE } + 50 -> npcl(FacialExpression.NEUTRAL, " Hello again! I don't suppose you've found out what the other components of the Nature spell are have you?").also { stage = 90 } + else -> npcl(FacialExpression.NEUTRAL, ".......").also { stage = END_DIALOGUE } } return true } @@ -61,103 +61,103 @@ class NSTarlockDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu 0 -> if(inInventory(player, Items.MIRROR_2966)){ sendDialogue("You use the mirror on the spirit","of the dead Filliman Tarlock.").also { stage++ } } else { - playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Yes, I do think you're dead and I'll prove it somehow.").also { stage = 1002 } + playerl(FacialExpression.NEUTRAL, "Yes, I do think you're dead and I'll prove it somehow.").also { stage = 1002 } } - 1 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Here take a look at this, perhaps you can see that you're utterly transparent now!").also { stage++ } + 1 -> playerl(FacialExpression.NEUTRAL, "Here take a look at this, perhaps you can see that you're utterly transparent now!").also { stage++ } 2 -> sendDialogue("The spirit of Filliman reaches forwards and takes the mirror.").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Well, that is the most peculiar thing I've ever experienced. Strange how well it reflects the stagnant swamp behind me, but there is nothing of my own visage apparent.").also { stage++ } - 4 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "That's because you're dead! Dead as a door nail... Deader in fact... You bear a remarkable resemblance to wormbait! Err... No offence...").also { stage++ } - 5 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "I think you might be right my friend, though I still feel very much alive. It is strange how I still come to be here and yet I've not turned into a Ghast.").also { stage++ } - 6 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, " It must be a sign... Yes a sign... I must try to find out what it means. Now, where did I put my journal?").also { stage++ } + 3 -> npcl(FacialExpression.HALF_GUILTY, "Well, that is the most peculiar thing I've ever experienced. Strange how well it reflects the stagnant swamp behind me, but there is nothing of my own visage apparent.").also { stage++ } + 4 -> playerl(FacialExpression.NEUTRAL, "That's because you're dead! Dead as a door nail... Deader in fact... You bear a remarkable resemblance to wormbait! Err... No offence...").also { stage++ } + 5 -> npcl(FacialExpression.HALF_GUILTY, "I think you might be right my friend, though I still feel very much alive. It is strange how I still come to be here and yet I've not turned into a Ghast.").also { stage++ } + 6 -> npcl(FacialExpression.HALF_GUILTY, " It must be a sign... Yes a sign... I must try to find out what it means. Now, where did I put my journal?").also { stage++ } 7 -> if(!inInventory(player, Items.JOURNAL_2967)){ - playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Where did you put it?").also { stage++; setQuest(25) } + playerl(FacialExpression.NEUTRAL, "Where did you put it?").also { stage++; setQuest(25) } } else sendDialogue("You give the journal to Filliman Tarlock").also { removeItem(player, Items.JOURNAL_2967, Container.INVENTORY); stage = 10; setQuest(30) } //no journal - 8 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Well, if I knew that, I wouldn't still be looking for it. However, I do remember something about a knot? Perhaps I was meant to tie a knot or something?").also { stage = END_DIALOGUE } + 8 -> npcl(FacialExpression.HALF_GUILTY, "Well, if I knew that, I wouldn't still be looking for it. However, I do remember something about a knot? Perhaps I was meant to tie a knot or something?").also { stage = END_DIALOGUE } //has journal - 10 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Here, I found this, maybe you can use it?").also { stage++ } - 11 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "My journal! That should help to collect my thoughts.").also { stage++ } + 10 -> playerl(FacialExpression.NEUTRAL, "Here, I found this, maybe you can use it?").also { stage++ } + 11 -> npcl(FacialExpression.FRIENDLY, "My journal! That should help to collect my thoughts.").also { stage++ } 12 -> sendDialogue("~ The spirit starts leafing through the journal. ~", "~ He seems quite distant as he regards the pages. ~", "~ After some time the druid faces you again. ~").also {stage++} - 13 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "It's all coming back to me now. It looks like I came to a violent and bitter end but that's not important now. I just have to figure out what I am going to do now?").also { stage++ } + 13 -> npcl(FacialExpression.HALF_GUILTY, "It's all coming back to me now. It looks like I came to a violent and bitter end but that's not important now. I just have to figure out what I am going to do now?").also { stage++ } 14 -> options("Being dead, what options do you think you have?", "So, what's your plan?", "Well, good luck with that.", "How can I help?", "Ok thanks.").also { stage++ } 15 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Being dead, what options do you think you have? I'm not trying to be rude or anything, but it's not like you have many options is it? I mean, it's either up or down for you isn't it?").also { stage = 20 } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "So, what's your plan?").also { stage = 30 } - 3 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Well, good luck with that.").also { stage = 40 } - 4 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "How can I help?").also { stage = 50 } - 5 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Ok thanks.").also { stage = END_DIALOGUE } + 1 -> playerl(FacialExpression.NEUTRAL, "Being dead, what options do you think you have? I'm not trying to be rude or anything, but it's not like you have many options is it? I mean, it's either up or down for you isn't it?").also { stage = 20 } + 2 -> playerl(FacialExpression.NEUTRAL, "So, what's your plan?").also { stage = 30 } + 3 -> playerl(FacialExpression.NEUTRAL, "Well, good luck with that.").also { stage = 40 } + 4 -> playerl(FacialExpression.NEUTRAL, "How can I help?").also { stage = 50 } + 5 -> playerl(FacialExpression.NEUTRAL, "Ok thanks.").also { stage = END_DIALOGUE } } //Being dead, what options - 20 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Hmm, well you're a poetic one aren't you. Your material world logic stands you in good stead... If you're standing in the material world...").also { stage = 14 } + 20 -> npcl(FacialExpression.HALF_GUILTY, "Hmm, well you're a poetic one aren't you. Your material world logic stands you in good stead... If you're standing in the material world...").also { stage = 14 } //what's your plan? - 30 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "In my former incarnation I was Filliman Tarlock, a great druid of some power. I spent many years in this place, which was once a forest and I would wish to protect it as a nature spirit.").also { stage = 14 } + 30 -> npcl(FacialExpression.HALF_GUILTY, "In my former incarnation I was Filliman Tarlock, a great druid of some power. I spent many years in this place, which was once a forest and I would wish to protect it as a nature spirit.").also { stage = 14 } //good luck with that - 40 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Won't you help me to become a nature spirit? I could really use your help!").also { stage = 14 } + 40 -> npcl(FacialExpression.HALF_GUILTY, "Won't you help me to become a nature spirit? I could really use your help!").also { stage = 14 } //How can I help? - 50 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Will you help me to become a nature spirit? The directions for becoming one are a bit vague, I need three things but I know how to get one of them. Perhaps you can help collect the rest?").also { stage++ } - 51 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "I might be interested, what's involved?").also { stage++ } - 52 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Well, the book says, that I need, and I quote:- 'Something with faith', 'something from nature' and the 'spirit-to-become' freely given'. Hmm, I know how to get something from nature.").also { stage++ } - 53 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Well, that does seem a bit vague.").also { stage++ } - 54 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Hmm, it does and I could understand if you didn't want to help. However, if you could perhaps at least get the item from nature, that would be a start. Perhaps we can figure out the rest as we go along.").also { stage++ } + 50 -> npcl(FacialExpression.HALF_GUILTY, "Will you help me to become a nature spirit? The directions for becoming one are a bit vague, I need three things but I know how to get one of them. Perhaps you can help collect the rest?").also { stage++ } + 51 -> playerl(FacialExpression.NEUTRAL, "I might be interested, what's involved?").also { stage++ } + 52 -> npcl(FacialExpression.HALF_GUILTY, "Well, the book says, that I need, and I quote:- 'Something with faith', 'something from nature' and the 'spirit-to-become' freely given'. Hmm, I know how to get something from nature.").also { stage++ } + 53 -> playerl(FacialExpression.NEUTRAL, "Well, that does seem a bit vague.").also { stage++ } + 54 -> npcl(FacialExpression.HALF_GUILTY, "Hmm, it does and I could understand if you didn't want to help. However, if you could perhaps at least get the item from nature, that would be a start. Perhaps we can figure out the rest as we go along.").also { stage++ } 55 -> sendDialogue(*splitLines("The druid produces a small sheet of papyrus with some writing on it.")).also { addItemOrDrop(player, Items.DRUIDIC_SPELL_2968); setQuest(35); stage++ } - 56 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "This spell needs to be cast in the swamp after you have been blessed. I'm afraid you'll need to go to the temple to the North and ask a member of the clergy to bless you.").also { stage++ } - 57 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Blessed, what does that do?").also { stage++ } - 58 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "It is required if you're to cast this druid spell. Once you've cast the spell, you should find something from nature. Bring it back to me and then we'll try to figure out the other things we need.").also { stage = END_DIALOGUE } + 56 -> npcl(FacialExpression.NEUTRAL, "This spell needs to be cast in the swamp after you have been blessed. I'm afraid you'll need to go to the temple to the North and ask a member of the clergy to bless you.").also { stage++ } + 57 -> playerl(FacialExpression.NEUTRAL, "Blessed, what does that do?").also { stage++ } + 58 -> npcl(FacialExpression.NEUTRAL, "It is required if you're to cast this druid spell. Once you've cast the spell, you should find something from nature. Bring it back to me and then we'll try to figure out the other things we need.").also { stage = END_DIALOGUE } //have you been blessed yet - 60 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "No, not yet.").also { stage++ } - 61 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Well, hurry up!").also { stage++ } + 60 -> playerl(FacialExpression.NEUTRAL, "No, not yet.").also { stage++ } + 61 -> npcl(FacialExpression.NEUTRAL, "Well, hurry up!").also { stage++ } 62 -> if(inInventory(player, Items.DRUIDIC_SPELL_2968) || inBank(player, Items.DRUIDIC_SPELL_2968)) end() - else playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Could I have another bloom scroll please?").also { stage++ } - 63 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Sure, but please look after this one.").also { stage++ } + else playerl(FacialExpression.NEUTRAL, "Could I have another bloom scroll please?").also { stage++ } + 63 -> npcl(FacialExpression.NEUTRAL, "Sure, but please look after this one.").also { stage++ } 64 -> sendDialogue("The spirit of Filliman Tarlock gives you another bloom spell.").also { addItemOrDrop(player, Items.DRUIDIC_SPELL_2968); stage = END_DIALOGUE } //I've been blessed - 70 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Well, you need to bring 'something from nature', 'something with faith' and 'something of the spirit-to- become freely given.'").also { stage++ } - 71 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Yeah, but what does that mean?").also { stage++ } - 72 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Hmm, it is a conundrum, however, if you use that spell I gave you, you should be able to get from nature. Once you have that, we may be puzzle the rest out.").also { stage++ } + 70 -> npcl(FacialExpression.NEUTRAL, "Well, you need to bring 'something from nature', 'something with faith' and 'something of the spirit-to- become freely given.'").also { stage++ } + 71 -> playerl(FacialExpression.NEUTRAL, "Yeah, but what does that mean?").also { stage++ } + 72 -> npcl(FacialExpression.NEUTRAL, "Hmm, it is a conundrum, however, if you use that spell I gave you, you should be able to get from nature. Once you have that, we may be puzzle the rest out.").also { stage++ } 73 -> if(!inInventory(player, Items.DRUIDIC_SPELL_2968) && !inBank(player, Items.DRUIDIC_SPELL_2968)){ - playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Could I have another bloom scroll please?").also { stage++ } + playerl(FacialExpression.NEUTRAL, "Could I have another bloom scroll please?").also { stage++ } } else end() - 74 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Sure, but please look after this one.").also { stage++ } + 74 -> npcl(FacialExpression.NEUTRAL, "Sure, but please look after this one.").also { stage++ } 75 -> sendDialogue("The spirit of Filliman Tarlock gives you","another bloom spell.").also { addItem(player, Items.DRUIDIC_SPELL_2968); stage = END_DIALOGUE } //has fungus 80 -> sendDialogue("You show the fungus to Filliman.").also { stage++ } - 81 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Yes, I have a fungus here that I picked.").also { stage++ } - 82 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Wonderful, the mushroom represents 'something from nature'. Now we need to work out what the other components of the spell are!").also { stage = 90; setQuest(50) } + 81 -> playerl(FacialExpression.NEUTRAL, "Yes, I have a fungus here that I picked.").also { stage++ } + 82 -> npcl(FacialExpression.NEUTRAL, "Wonderful, the mushroom represents 'something from nature'. Now we need to work out what the other components of the spell are!").also { stage = 90; setQuest(50) } //pre-spell options 90 -> options("What are the things that are needed?", "What should I do when I have those things?", "I think I've solved the puzzle!", "Could I have another bloom scroll please?", "Ok, thanks.").also { stage++ } 91 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "What are the things that are needed?").also { stage = 100 } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "What should I do when I have those things?").also { stage = 110 } - 3 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "I think I've solved the puzzle!").also { stage = 120 } - 4 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Can I have another bloom scroll please?").also { stage = 130 } - 5 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Ok, thanks.").also { stage = END_DIALOGUE } + 1 -> playerl(FacialExpression.NEUTRAL, "What are the things that are needed?").also { stage = 100 } + 2 -> playerl(FacialExpression.NEUTRAL, "What should I do when I have those things?").also { stage = 110 } + 3 -> playerl(FacialExpression.FRIENDLY, "I think I've solved the puzzle!").also { stage = 120 } + 4 -> playerl(FacialExpression.FRIENDLY, "Can I have another bloom scroll please?").also { stage = 130 } + 5 -> playerl(FacialExpression.NEUTRAL, "Ok, thanks.").also { stage = END_DIALOGUE } } //What things are needed? - 100 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "The three things are: 'Something with faith', 'something from nature' and 'something of the spirit-to-become freely given'.").also { stage++ } - 101 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, " Ok, and 'something from nature' is the mushroom from the bloom spell you gave me?").also { stage++ } - 102 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, that's correct, that seems right to me. The other things we need are 'something with faith' and 'something of the spirit-to-become freely given.").also { stage++ } - 103 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Do you have any ideas what those things are?").also { stage++ } - 104 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "I'm sorry my friend, but I do not.").also { stage = 90 } + 100 -> npcl(FacialExpression.NEUTRAL, "The three things are: 'Something with faith', 'something from nature' and 'something of the spirit-to-become freely given'.").also { stage++ } + 101 -> playerl(FacialExpression.FRIENDLY, " Ok, and 'something from nature' is the mushroom from the bloom spell you gave me?").also { stage++ } + 102 -> npcl(FacialExpression.FRIENDLY, "Yes, that's correct, that seems right to me. The other things we need are 'something with faith' and 'something of the spirit-to-become freely given.").also { stage++ } + 103 -> playerl(FacialExpression.NEUTRAL, "Do you have any ideas what those things are?").also { stage++ } + 104 -> npcl(FacialExpression.HALF_GUILTY, "I'm sorry my friend, but I do not.").also { stage = 90 } //What should I do when I have them? - 110 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "It says,.. 'to arrange upon three rocks around the spirit-to-become...'. Then I must cast a spell. As you can see, I've already placed the rocks.").also { stage++ } - 111 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Can we just place the components on any rock?").also { stage++ } - 112 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Well, the only thing the journal says is that 'something with faith stands south of the spirit-to-become', but I'm so confused now I don't really know what that means.").also { stage = 90 } + 110 -> npcl(FacialExpression.NEUTRAL, "It says,.. 'to arrange upon three rocks around the spirit-to-become...'. Then I must cast a spell. As you can see, I've already placed the rocks.").also { stage++ } + 111 -> playerl(FacialExpression.NEUTRAL, "Can we just place the components on any rock?").also { stage++ } + 112 -> npcl(FacialExpression.NEUTRAL, "Well, the only thing the journal says is that 'something with faith stands south of the spirit-to-become', but I'm so confused now I don't really know what that means.").also { stage = 90 } //I think I've solved the puzzle! - 120 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Oh really.. Have you placed all the items on the stones? Ok, well, let's try!").also { stage++ } + 120 -> npcl(FacialExpression.NEUTRAL, "Oh really.. Have you placed all the items on the stones? Ok, well, let's try!").also { stage++ } 121 -> sendDialogue("~ The druid attempts to cast a spell. ~").also { stage++ } 122 -> { animate(npc, 812) @@ -180,49 +180,49 @@ class NSTarlockDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu } }) } else { - npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Hmm, something still doesn't seem right. I think we need something more before we can continue.") + npcl(FacialExpression.NEUTRAL, "Hmm, something still doesn't seem right. I think we need something more before we can continue.") } stage = END_DIALOGUE } 130 -> if(inInventory(player, Items.DRUIDIC_SPELL_2968) || inBank(player, Items.DRUIDIC_SPELL_2968)){ - npcl(core.game.dialogue.FacialExpression.NEUTRAL, "No, you've already got one!").also { stage = END_DIALOGUE } + npcl(FacialExpression.NEUTRAL, "No, you've already got one!").also { stage = END_DIALOGUE } } else { - npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Sure, but look after this one.") + npcl(FacialExpression.NEUTRAL, "Sure, but look after this one.") addItem(player, Items.DRUIDIC_SPELL_2968) stage = END_DIALOGUE } //Initial dialogue - 1000 -> playerl(core.game.dialogue.FacialExpression.HALF_ASKING, "Hello?").also { stage++ } + 1000 -> playerl(FacialExpression.HALF_ASKING, "Hello?").also { stage++ } 1001 -> if(inEquipment(player, Items.GHOSTSPEAK_AMULET_552)){ - npcl(core.game.dialogue.FacialExpression.EXTREMELY_SHOCKED, "Oh, I understand you! At last, someone who doesn't just mumble. I understand what you're saying!").also { stage++ } - } else npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "OooOOoOOoOOOOo.") + npcl(FacialExpression.EXTREMELY_SHOCKED, "Oh, I understand you! At last, someone who doesn't just mumble. I understand what you're saying!").also { stage++ } + } else npcl(FacialExpression.HALF_GUILTY, "OooOOoOOoOOOOo.") 1002 -> options("I'm wearing an amulet of ghost speak!","How long have you been a ghost?", "What's it like being a ghost?", "Ok, thanks.").also { stage++ } 1003 -> when(buttonId){ - 1 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "I'm wearing an amulet of ghost speak!").also { stage = 1010; setQuest(20) } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "How long have you been a ghost?").also { stage = 1020; setQuest(20) } - 3 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "What's it like being a ghost?").also { stage = 1030; setQuest(20) } - 4 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Ok, thanks.").also { stage = END_DIALOGUE } + 1 -> playerl(FacialExpression.NEUTRAL, "I'm wearing an amulet of ghost speak!").also { stage = 1010; setQuest(20) } + 2 -> playerl(FacialExpression.NEUTRAL, "How long have you been a ghost?").also { stage = 1020; setQuest(20) } + 3 -> playerl(FacialExpression.NEUTRAL, "What's it like being a ghost?").also { stage = 1030; setQuest(20) } + 4 -> playerl(FacialExpression.NEUTRAL, "Ok, thanks.").also { stage = END_DIALOGUE } } - 1010 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Why you poor fellow, have you passed away and you want to send a message back to a loved one?").also { stage++ } - 1011 -> playerl(core.game.dialogue.FacialExpression.HALF_THINKING, "Err.. Not exactly...").also { stage++ } - 1012 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "You have come to haunt my dreams until I pass on your message to a dearly loved one. I understand. Pray, tell me who would you like me to pass a message on to?").also { stage++ } - 1013 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Ermm, you don't understand... It's just that...").also { stage++ } - 1014 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Yes!").also { stage++ } - 1015 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Well please don't be upset or anything... But you're the ghost!").also { stage++ } - 1016 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Don't be silly now! That in no way reflects the truth!").also { stage = 1002 } + 1010 -> npcl(FacialExpression.HALF_GUILTY, "Why you poor fellow, have you passed away and you want to send a message back to a loved one?").also { stage++ } + 1011 -> playerl(FacialExpression.HALF_THINKING, "Err.. Not exactly...").also { stage++ } + 1012 -> npcl(FacialExpression.HALF_GUILTY, "You have come to haunt my dreams until I pass on your message to a dearly loved one. I understand. Pray, tell me who would you like me to pass a message on to?").also { stage++ } + 1013 -> playerl(FacialExpression.NEUTRAL, "Ermm, you don't understand... It's just that...").also { stage++ } + 1014 -> npcl(FacialExpression.HALF_GUILTY, "Yes!").also { stage++ } + 1015 -> playerl(FacialExpression.NEUTRAL, "Well please don't be upset or anything... But you're the ghost!").also { stage++ } + 1016 -> npcl(FacialExpression.HALF_GUILTY, "Don't be silly now! That in no way reflects the truth!").also { stage = 1002 } - 1020 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "What?! Don't be preposterous! I'm not a ghost! How could you say something like that?").also { stage++ } - 1021 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "But it's true, you're a ghost... well, at least that is to say, you're sort of not alive anymore.").also { stage++ } - 1022 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Don't be silly, I can see you. I can see that tree. If I were dead, I wouldn't be able to see anything. What you say just doesn't reflect the truth. You'll have to try harder to put one over on me!").also { stage = 1002 } + 1020 -> npcl(FacialExpression.HALF_GUILTY, "What?! Don't be preposterous! I'm not a ghost! How could you say something like that?").also { stage++ } + 1021 -> playerl(FacialExpression.NEUTRAL, "But it's true, you're a ghost... well, at least that is to say, you're sort of not alive anymore.").also { stage++ } + 1022 -> npcl(FacialExpression.HALF_GUILTY, "Don't be silly, I can see you. I can see that tree. If I were dead, I wouldn't be able to see anything. What you say just doesn't reflect the truth. You'll have to try harder to put one over on me!").also { stage = 1002 } - 1030 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "Oh, it's quite.... Oh... Trying to catch me out were you! Anyone can clearly see that I am not a ghost!").also { stage++ } - 1031 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "But you are a ghost, look at yourself! I can see straight through you! You're as dead as this swamp! Err... No offence or anything...").also { stage++ } - 1032 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "No I won't take offence because I'm not dead and I'm afraid you'll have to come up with some pretty conclusive proof before I believe it. What a strange dream this is.").also { stage = 1002 } + 1030 -> npcl(FacialExpression.HALF_GUILTY, "Oh, it's quite.... Oh... Trying to catch me out were you! Anyone can clearly see that I am not a ghost!").also { stage++ } + 1031 -> playerl(FacialExpression.NEUTRAL, "But you are a ghost, look at yourself! I can see straight through you! You're as dead as this swamp! Err... No offence or anything...").also { stage++ } + 1032 -> npcl(FacialExpression.HALF_GUILTY, "No I won't take offence because I'm not dead and I'm afraid you'll have to come up with some pretty conclusive proof before I believe it. What a strange dream this is.").also { stage = 1002 } } diff --git a/Server/src/main/content/region/morytania/quest/naturespirit/NatureSpiritDialogue.kt b/Server/src/main/content/region/morytania/quest/naturespirit/NatureSpiritDialogue.kt index 7361405a9..fe4913223 100644 --- a/Server/src/main/content/region/morytania/quest/naturespirit/NatureSpiritDialogue.kt +++ b/Server/src/main/content/region/morytania/quest/naturespirit/NatureSpiritDialogue.kt @@ -14,10 +14,10 @@ import org.rs09.consts.NPCs import core.tools.END_DIALOGUE @Initializable -class NatureSpiritDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class NatureSpiritDialogue(player: Player? = null) : DialoguePlugin(player){ val questStage = player?.questRepository?.getStage("Nature Spirit") ?: 0 - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return NatureSpiritDialogue(player) } @@ -25,43 +25,43 @@ class NatureSpiritDialogue(player: Player? = null) : core.game.dialogue.Dialogue npc = args[0] as NPC when(questStage){ - 60 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Hmm, good, the transformation is complete. Now, my friend, in return for your assistance, I will help you to kill the Ghasts. First bring to me a silver sickle so that I can bless it for you.").also { return true } - 65 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Have you brought me a silver sickle?").also { stage = 100; return true } - 70 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Now you can go forth and make the swamp bloom. Collect nature's bounty to fill a druids pouch. So armed will the Ghasts be bound to you until, you flee or they are defeated.").also { stage = 200 } - 75 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Hello again, my friend. Have you defeated three ghasts as I asked you?").also { stage = 300 } - else -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Welcome to my grotto, friend. Enjoy your visit.").also { stage = END_DIALOGUE } + 60 -> npcl(FacialExpression.NEUTRAL, "Hmm, good, the transformation is complete. Now, my friend, in return for your assistance, I will help you to kill the Ghasts. First bring to me a silver sickle so that I can bless it for you.").also { return true } + 65 -> npcl(FacialExpression.NEUTRAL, "Have you brought me a silver sickle?").also { stage = 100; return true } + 70 -> npcl(FacialExpression.NEUTRAL, "Now you can go forth and make the swamp bloom. Collect nature's bounty to fill a druids pouch. So armed will the Ghasts be bound to you until, you flee or they are defeated.").also { stage = 200 } + 75 -> npcl(FacialExpression.NEUTRAL, "Hello again, my friend. Have you defeated three ghasts as I asked you?").also { stage = 300 } + else -> npcl(FacialExpression.FRIENDLY, "Welcome to my grotto, friend. Enjoy your visit.").also { stage = END_DIALOGUE } } return true } override fun handle(componentID: Int, buttonID: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL,"A silver sickle? What's that?").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "The sickle is the symbol and weapon of the Druid, you need to construct one of silver so that I can bless it, with its powers you will be able to defeat the Ghasts of Mort Myre.").also { stage++; setQuest(65) } + 0 -> playerl(FacialExpression.NEUTRAL,"A silver sickle? What's that?").also { stage++ } + 1 -> npcl(FacialExpression.NEUTRAL, "The sickle is the symbol and weapon of the Druid, you need to construct one of silver so that I can bless it, with its powers you will be able to defeat the Ghasts of Mort Myre.").also { stage++; setQuest(65) } 2 -> options("Where would I get a silver sickle?", "What will you do to the silver sickle?", "How can a blessed sickle help me to defeat the Ghasts?", "Ok, thanks.").also { stage++ } 3 -> when(buttonID){ - 1 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Where would I get a silver sickle?").also { stage = 10 } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "What will you do to the silver sickle?").also { stage = 20 } - 3 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "How can a blessed sickle help me to defeat the Ghasts?").also { stage = 30 } - 4 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Ok, thanks.").also { stage = END_DIALOGUE } + 1 -> playerl(FacialExpression.NEUTRAL, "Where would I get a silver sickle?").also { stage = 10 } + 2 -> playerl(FacialExpression.NEUTRAL, "What will you do to the silver sickle?").also { stage = 20 } + 3 -> playerl(FacialExpression.NEUTRAL, "How can a blessed sickle help me to defeat the Ghasts?").also { stage = 30 } + 4 -> playerl(FacialExpression.NEUTRAL, "Ok, thanks.").also { stage = END_DIALOGUE } } //where sickle - 10 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "You could make one yourself if you're artisan enough. I've heard of a distant sandy place where you can buy the mould that you require, it's similar in many respects to the creating of a holy symbol.").also { stage = 2 } + 10 -> npcl(FacialExpression.NEUTRAL, "You could make one yourself if you're artisan enough. I've heard of a distant sandy place where you can buy the mould that you require, it's similar in many respects to the creating of a holy symbol.").also { stage = 2 } //What you gonna do to my sickle bro - 20 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Why, I will give it my blessings so that the very swamp in which you stand will blossom and bloom!").also { stage = 2 } //pompous git + 20 -> npcl(FacialExpression.NEUTRAL, "Why, I will give it my blessings so that the very swamp in which you stand will blossom and bloom!").also { stage = 2 } //pompous git //bruh how does a silver sickle help me tho - 30 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "My blessings will entice nature to bloom in Mort Myre! And then with nature's harvest you can fill a druids pouch and release the Ghasts from their torment.").also { stage = 2 } //this dude kinda weird + 30 -> npcl(FacialExpression.NEUTRAL, "My blessings will entice nature to bloom in Mort Myre! And then with nature's harvest you can fill a druids pouch and release the Ghasts from their torment.").also { stage = 2 } //this dude kinda weird //have you brought me a sickle yet bro 100 -> if(inInventory(player, Items.SILVER_SICKLE_2961)){ - playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, here it is. What are you going to do with it?").also { stage = 110 } + playerl(FacialExpression.FRIENDLY, "Yes, here it is. What are you going to do with it?").also { stage = 110 } } else { - playerl(core.game.dialogue.FacialExpression.NEUTRAL, "No sorry, not yet!").also { stage++ } + playerl(FacialExpression.NEUTRAL, "No sorry, not yet!").also { stage++ } } - 101 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Well, come to me when you have it.").also { stage = 2 } + 101 -> npcl(FacialExpression.NEUTRAL, "Well, come to me when you have it.").also { stage = 2 } /** * This dialogue drags on so much man this quest has been like 95% dialogue. @@ -69,7 +69,7 @@ class NatureSpiritDialogue(player: Player? = null) : core.game.dialogue.Dialogue */ //yeah bro I got it - 110 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "My friend, I will bless it for you and you will then be able to accomplish great things. Now then, I must cast the enchantment. You can bless a new sickle by dipping it in the holy water of the grotto.").also { stage++ } + 110 -> npcl(FacialExpression.NEUTRAL, "My friend, I will bless it for you and you will then be able to accomplish great things. Now then, I must cast the enchantment. You can bless a new sickle by dipping it in the holy water of the grotto.").also { stage++ } 111 -> sendDialogue("- The Nature Spirit casts a spell on the player. -").also { stage++ } /** @@ -78,42 +78,42 @@ class NatureSpiritDialogue(player: Player? = null) : core.game.dialogue.Dialogue 112 -> end().also { lock(player, 10); submitWorldPulse(SickleBlessPulse(player, npc)) } //go kill some ghasts bro - 200 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Go forth into Mort Myre and slay three Ghasts. You'll be releasing their souls from Mort Myre.").also { stage++ } + 200 -> npcl(FacialExpression.NEUTRAL, "Go forth into Mort Myre and slay three Ghasts. You'll be releasing their souls from Mort Myre.").also { stage++ } 201 -> sendItemDialogue(player, Items.DRUID_POUCH_2957, "The nature spirit gives you an empty pouch.").also { stage++; setQuest(75) } - 202 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "You'll need this in order to collect together nature's bounty. It will bind the Ghast to you until you flee or it is defeated.").also { stage = END_DIALOGUE } + 202 -> npcl(FacialExpression.NEUTRAL, "You'll need this in order to collect together nature's bounty. It will bind the Ghast to you until you flee or it is defeated.").also { stage = END_DIALOGUE } //Have you killed the ghasts yet bro 300 -> if(NSUtils.getGhastKC(player) >= 3){ - playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Yes, I've killed all three and their spirits have been released!").also { stage = 350 } + playerl(FacialExpression.NEUTRAL, "Yes, I've killed all three and their spirits have been released!").also { stage = 350 } } else { - playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Not yet.").also { stage++ } + playerl(FacialExpression.NEUTRAL, "Not yet.").also { stage++ } } //nah bro - 301 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Well, when you do, please come to me and I'll reward you!").also { stage++ } + 301 -> npcl(FacialExpression.NEUTRAL, "Well, when you do, please come to me and I'll reward you!").also { stage++ } 302 -> options("How do I get to attack the Ghasts?", "What's this pouch for?", "What can I do with this sickle?", "I've lost my sickle.", "Ok, thanks.").also { stage++ } 303 -> when(buttonID){ - 1 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "How do I get to attack the Ghasts?").also { stage = 310 } - 2 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "What's this pouch for?").also { stage = 320 } - 3 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "What can I do with this sickle?").also { stage = 330 } - 4 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "I've lost my sickle.").also { stage = 340 } - 5 -> playerl(core.game.dialogue.FacialExpression.NEUTRAL, "Ok, thanks.").also { stage = END_DIALOGUE } + 1 -> playerl(FacialExpression.NEUTRAL, "How do I get to attack the Ghasts?").also { stage = 310 } + 2 -> playerl(FacialExpression.NEUTRAL, "What's this pouch for?").also { stage = 320 } + 3 -> playerl(FacialExpression.NEUTRAL, "What can I do with this sickle?").also { stage = 330 } + 4 -> playerl(FacialExpression.NEUTRAL, "I've lost my sickle.").also { stage = 340 } + 5 -> playerl(FacialExpression.NEUTRAL, "Ok, thanks.").also { stage = END_DIALOGUE } } //How do I attack duh ghosty bois - 310 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Go forth and with the sickle make the swamp bloom. Collect natures bounty to fill a druids pouch. So armed will the Ghasts be bound to you until, you flee or they are defeated.").also { stage = 302 } + 310 -> npcl(FacialExpression.NEUTRAL, "Go forth and with the sickle make the swamp bloom. Collect natures bounty to fill a druids pouch. So armed will the Ghasts be bound to you until, you flee or they are defeated.").also { stage = 302 } //What's dis funny pouch for? - 320 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "It is for collecting natures bounty, once it contains the blossomed items of the swamp, it will make the Ghasts appear and you can then attack them.").also { stage = 302 } + 320 -> npcl(FacialExpression.NEUTRAL, "It is for collecting natures bounty, once it contains the blossomed items of the swamp, it will make the Ghasts appear and you can then attack them.").also { stage = 302 } //What can I do wif da sickle m8 - 330 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "You may use it wisely within the area of Mort Myre to affect natures balance and bring forth a bounty of natures harvest. Once collected into the druid pouch will the Ghast be apparent.").also { stage = 302 } + 330 -> npcl(FacialExpression.NEUTRAL, "You may use it wisely within the area of Mort Myre to affect natures balance and bring forth a bounty of natures harvest. Once collected into the druid pouch will the Ghast be apparent.").also { stage = 302 } //oi I lost it bruv - 340 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "If you should lose the blessed sickle, simply bring another to my altar of nature and refresh it in the grotto waters.").also { stage = 302 } + 340 -> npcl(FacialExpression.NEUTRAL, "If you should lose the blessed sickle, simply bring another to my altar of nature and refresh it in the grotto waters.").also { stage = 302 } //killed all dem buggers bruv - 350 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Many thanks my friend, you have completed your quest!").also { stage++ } + 350 -> npcl(FacialExpression.NEUTRAL, "Many thanks my friend, you have completed your quest!").also { stage++ } 351 -> end().also { player.questRepository.getQuest("Nature Spirit").finish(player) } } diff --git a/Server/src/main/content/region/tirranwn/dialogue/ArvelDialogue.kt b/Server/src/main/content/region/tirranwn/dialogue/ArvelDialogue.kt index e0636e6db..221c75a57 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/ArvelDialogue.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/ArvelDialogue.kt @@ -13,31 +13,31 @@ import org.rs09.consts.NPCs */ @Initializable -class ArvelDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ArvelDialogue(player: Player? = null) : DialoguePlugin(player){ fun gender (male : String = "hero", female : String = "heroine") = if (player.isMale) male else female override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Good day traveller. You are far from home, what brings you here?").also { stage = 0 } + npcl(FacialExpression.FRIENDLY,"Good day traveller. You are far from home, what brings you here?").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "I am a wandering " + gender() + ". I come here in search of adventure.").also { stage++ } - 1 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Sounds ghastly, I just want to live in peace.").also { stage++ } - 2 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Unfortunately without people like me, peace doesn't last for long.").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "True, but then again most adventurers cause as much trouble as they put right.").also { stage++ } - 4 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "You've got a point there... Hmm...").also { stage++ } - 5 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Well, good day traveller. And always do the right thing.").also { stage = 99 } + 0 -> playerl(FacialExpression.FRIENDLY, "I am a wandering " + gender() + ". I come here in search of adventure.").also { stage++ } + 1 -> npc(FacialExpression.FRIENDLY, "Sounds ghastly, I just want to live in peace.").also { stage++ } + 2 -> playerl(FacialExpression.FRIENDLY, "Unfortunately without people like me, peace doesn't last for long.").also { stage++ } + 3 -> npcl(FacialExpression.FRIENDLY, "True, but then again most adventurers cause as much trouble as they put right.").also { stage++ } + 4 -> player(FacialExpression.FRIENDLY, "You've got a point there... Hmm...").also { stage++ } + 5 -> npc(FacialExpression.FRIENDLY, "Well, good day traveller. And always do the right thing.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ArvelDialogue(player) } diff --git a/Server/src/main/content/region/tirranwn/dialogue/DalldavDialogue.kt b/Server/src/main/content/region/tirranwn/dialogue/DalldavDialogue.kt index 06c42f7cf..1b89b65c9 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/DalldavDialogue.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/DalldavDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class DalldavDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class DalldavDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Can I help you at all?").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"Can I help you at all?").also { stage = 0 } return true } @@ -24,21 +24,21 @@ class DalldavDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi when(stage){ 0 -> options("Yes please. What are you selling?", "Why do you sell this stuff?", "No thanks.").also { stage++ } 1 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Yes please. What are you selling?").also { stage = 10 } - 2 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Why do you sell this stuff? The Crystal Bow is so much better.").also { stage = 20 } - 3 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 } + 1 -> player(FacialExpression.FRIENDLY, "Yes please. What are you selling?").also { stage = 10 } + 2 -> playerl(FacialExpression.FRIENDLY, "Why do you sell this stuff? The Crystal Bow is so much better.").also { stage = 20 } + 3 -> player(FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 } } 10 -> end().also { npc.openShop(player) } - 20 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "We keep all these old toys to train our children with, but if people will part with coins for them, then they are theirs!").also { stage = 99 } + 20 -> npcl(FacialExpression.FRIENDLY, "We keep all these old toys to train our children with, but if people will part with coins for them, then they are theirs!").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return DalldavDialogue(player) } diff --git a/Server/src/main/content/region/tirranwn/dialogue/ElfTrackerDialogue.kt b/Server/src/main/content/region/tirranwn/dialogue/ElfTrackerDialogue.kt index 41960ad14..640b94ce4 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/ElfTrackerDialogue.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/ElfTrackerDialogue.kt @@ -13,7 +13,7 @@ import org.rs09.consts.NPCs */ @Initializable -class ElfTrackerDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class ElfTrackerDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC @@ -22,9 +22,9 @@ class ElfTrackerDialogue(player: Player? = null) : core.game.dialogue.DialoguePl //temporary booly boi var tracksFound = false if (!tracksFound) { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Hello.").also { stage = 0 } + player(FacialExpression.FRIENDLY, "Hello.").also { stage = 0 } } else { - playerl(core.game.dialogue.FacialExpression.NEUTRAL, "I've found tracks leading off to the west. But they trail off into the trees. Beyond that I am unable to follow.").also { stage = 30} + playerl(FacialExpression.NEUTRAL, "I've found tracks leading off to the west. But they trail off into the trees. Beyond that I am unable to follow.").also { stage = 30} } return true @@ -32,54 +32,54 @@ class ElfTrackerDialogue(player: Player? = null) : core.game.dialogue.DialoguePl override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npc(core.game.dialogue.FacialExpression.SUSPICIOUS, "Human! You must be one of Tyras's men...").also { stage++ } - 1 -> playerl(core.game.dialogue.FacialExpression.HALF_GUILTY, "No, I'm " + player.name + "! Lord Iorwerth said you might be able to help me.").also { stage++ } - 2 -> npc(core.game.dialogue.FacialExpression.SUSPICIOUS, "And you have something to prove this?").also { stage++ } + 0 -> npc(FacialExpression.SUSPICIOUS, "Human! You must be one of Tyras's men...").also { stage++ } + 1 -> playerl(FacialExpression.HALF_GUILTY, "No, I'm " + player.name + "! Lord Iorwerth said you might be able to help me.").also { stage++ } + 2 -> npc(FacialExpression.SUSPICIOUS, "And you have something to prove this?").also { stage++ } 3 -> { //todo check quest stages whenever it's added if (player.inventory.contains(Items.CRYSTAL_PENDANT_3208, 1) || player.equipment.contains(Items.CRYSTAL_PENDANT_3208, 1)) { sendDialogue("You show the tracker the crystal pendant.").also { stage = 20 } } else { - player(core.game.dialogue.FacialExpression.HALF_GUILTY, "Well... Err... No.").also { stage = 10 } + player(FacialExpression.HALF_GUILTY, "Well... Err... No.").also { stage = 10 } } } - 10 -> npcl(core.game.dialogue.FacialExpression.ANNOYED, "As I was saying... I have no time for brigands or outlaws.").also { stage = 99 } + 10 -> npcl(FacialExpression.ANNOYED, "As I was saying... I have no time for brigands or outlaws.").also { stage = 99 } - 20 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "That is Lord Iorwerth's pendant. He must have a lot of faith in you. Now, what is it I can help you with?").also { stage ++ } - 21 -> playerl(core.game.dialogue.FacialExpression.ASKING, "I need to find Tyras and kill him. Do you know where his camp is?").also { stage++ } - 22 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Well this was his old camp. After the battle a few days ago they moved. We're yet to find them again.").also { stage++ } - 23 -> player(core.game.dialogue.FacialExpression.ASKING, "Can I help at all?").also { stage++ } - 24 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "As it goes I'm not actually tracking them at the moment. I'm currently trying to trace our renegade brethen instead. This here is the best lead we've found so far.").also { stage++ } - 25 -> player(core.game.dialogue.FacialExpression.HALF_ASKING, "What is?").also { stage++ } - 26 -> npc(core.game.dialogue.FacialExpression.THINKING, "Ahh I guess you can't see it with those human eyes.").also { stage++ } - 27 -> npcl(core.game.dialogue.FacialExpression.THINKING, "I tell you what. Now that you're here I may as well give you a hand. I'll search here on the east side. You check out the west end of the camp.").also { stage++ } - 28 -> npc(core.game.dialogue.FacialExpression.THINKING, "Come and tell me if you find anything.").also { stage = 99 } + 20 -> npcl(FacialExpression.FRIENDLY, "That is Lord Iorwerth's pendant. He must have a lot of faith in you. Now, what is it I can help you with?").also { stage ++ } + 21 -> playerl(FacialExpression.ASKING, "I need to find Tyras and kill him. Do you know where his camp is?").also { stage++ } + 22 -> npcl(FacialExpression.FRIENDLY, "Well this was his old camp. After the battle a few days ago they moved. We're yet to find them again.").also { stage++ } + 23 -> player(FacialExpression.ASKING, "Can I help at all?").also { stage++ } + 24 -> npcl(FacialExpression.FRIENDLY, "As it goes I'm not actually tracking them at the moment. I'm currently trying to trace our renegade brethen instead. This here is the best lead we've found so far.").also { stage++ } + 25 -> player(FacialExpression.HALF_ASKING, "What is?").also { stage++ } + 26 -> npc(FacialExpression.THINKING, "Ahh I guess you can't see it with those human eyes.").also { stage++ } + 27 -> npcl(FacialExpression.THINKING, "I tell you what. Now that you're here I may as well give you a hand. I'll search here on the east side. You check out the west end of the camp.").also { stage++ } + 28 -> npc(FacialExpression.THINKING, "Come and tell me if you find anything.").also { stage = 99 } //todo after finding the tracks - 30 -> npcl(core.game.dialogue.FacialExpression.THINKING, "These forests aren't always as dense as you'd think. If you look closer, you might see ways that you can get through. With that in mind, why don't you give it another go?").also { stage++ } - 31 -> player(core.game.dialogue.FacialExpression.ANNOYED, "Thanks... I'll see what I can find.").also { stage = 99 } + 30 -> npcl(FacialExpression.THINKING, "These forests aren't always as dense as you'd think. If you look closer, you might see ways that you can get through. With that in mind, why don't you give it another go?").also { stage++ } + 31 -> player(FacialExpression.ANNOYED, "Thanks... I'll see what I can find.").also { stage = 99 } //todo after searching past the dense forest - 40 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Hello.").also { stage++ } - 41 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "How goes the hunt for that bandit camp?").also { stage++ } + 40 -> player(FacialExpression.FRIENDLY, "Hello.").also { stage++ } + 41 -> npc(FacialExpression.FRIENDLY, "How goes the hunt for that bandit camp?").also { stage++ } 42 -> { //todo (If the camp has not been found) //temporary booly bois var campFound = false if (!campFound) { - player(core.game.dialogue.FacialExpression.FRIENDLY, "Getting there.").also { stage = 99 } + player(FacialExpression.FRIENDLY, "Getting there.").also { stage = 99 } } else { - player(core.game.dialogue.FacialExpression.NEUTRAL, "I found it a short distance west of here.").also { stage++ } + player(FacialExpression.NEUTRAL, "I found it a short distance west of here.").also { stage++ } } } - 43 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I'm sure Lord Iorwerth will be pleased to hear that. You should let him know.").also { stage = 99 } + 43 -> npcl(FacialExpression.FRIENDLY, "I'm sure Lord Iorwerth will be pleased to hear that. You should let him know.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return ElfTrackerDialogue(player) } diff --git a/Server/src/main/content/region/tirranwn/dialogue/EoinDialogue.kt b/Server/src/main/content/region/tirranwn/dialogue/EoinDialogue.kt index 585ca84dd..a8bfbe949 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/EoinDialogue.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/EoinDialogue.kt @@ -12,24 +12,24 @@ import org.rs09.consts.NPCs */ @Initializable -class EoinDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class EoinDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Sorry, I cannot stop or Iona will catch me, we are playing tag!").also { stage = 99 } + 0 -> npcl(FacialExpression.FRIENDLY, "Sorry, I cannot stop or Iona will catch me, we are playing tag!").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return EoinDialogue(player) } diff --git a/Server/src/main/content/region/tirranwn/dialogue/EudavGethinDialogue.kt b/Server/src/main/content/region/tirranwn/dialogue/EudavGethinDialogue.kt index abd137377..1d2c93a3e 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/EudavGethinDialogue.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/EudavGethinDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class EudavGethinDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class EudavGethinDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Can I help you at all?").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"Can I help you at all?").also { stage = 0 } return true } @@ -26,7 +26,7 @@ class EudavGethinDialogue(player: Player? = null) : core.game.dialogue.DialogueP 1 -> when(buttonId) { 1 -> end().also { npc.openShop(player) } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 } + 2 -> player(FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 } } 99 -> end() @@ -34,7 +34,7 @@ class EudavGethinDialogue(player: Player? = null) : core.game.dialogue.DialogueP return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return EudavGethinDialogue(player) } diff --git a/Server/src/main/content/region/tirranwn/dialogue/GoreuDialogue.kt b/Server/src/main/content/region/tirranwn/dialogue/GoreuDialogue.kt index 62387565f..3152265e1 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/GoreuDialogue.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/GoreuDialogue.kt @@ -12,27 +12,27 @@ import org.rs09.consts.NPCs */ @Initializable -class GoreuDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class GoreuDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Good day, can I help you?").also { stage++ } - 1 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "No thanks I'm just watching the world go by.").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Well I can think of no better place to do it, it is beautiful here is it not?").also { stage++ } - 3 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Indeed it is.").also { stage = 99 } + 0 -> npcl(FacialExpression.FRIENDLY, "Good day, can I help you?").also { stage++ } + 1 -> playerl(FacialExpression.FRIENDLY, "No thanks I'm just watching the world go by.").also { stage++ } + 2 -> npcl(FacialExpression.FRIENDLY, "Well I can think of no better place to do it, it is beautiful here is it not?").also { stage++ } + 3 -> playerl(FacialExpression.FRIENDLY, "Indeed it is.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return GoreuDialogue(player) } diff --git a/Server/src/main/content/region/tirranwn/dialogue/IlfeenDialogue.kt b/Server/src/main/content/region/tirranwn/dialogue/IlfeenDialogue.kt index 991531649..7f5f121d0 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/IlfeenDialogue.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/IlfeenDialogue.kt @@ -14,7 +14,7 @@ import org.rs09.consts.NPCs */ @Initializable -class IlfeenDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class IlfeenDialogue(player: Player? = null) : DialoguePlugin(player){ //temp var var queststage = 0 @@ -23,52 +23,52 @@ class IlfeenDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin npc = args[0] as NPC //todo choose dialogue tree based off of quest stage when(queststage) { - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Good day, what are you doing all the way out here?").also { stage = 0 } - 1 -> playerl(core.game.dialogue.FacialExpression.ASKING, "There is something I meant to ask you about. Do you remember Oaknock? He was a gnome inventor.").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Hello again. Are you still offering to chant seeds?").also { stage = 20 } + 0 -> npcl(FacialExpression.FRIENDLY,"Good day, what are you doing all the way out here?").also { stage = 0 } + 1 -> playerl(FacialExpression.ASKING, "There is something I meant to ask you about. Do you remember Oaknock? He was a gnome inventor.").also { stage = 10 } + 2 -> player(FacialExpression.FRIENDLY, "Hello again. Are you still offering to chant seeds?").also { stage = 20 } } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "I'm just wandering, it's a lovely day for a walk in the woods.").also { stage++ } - 1 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "It is that.").also { stage++ } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Well I shouldn't keep you, see you later.").also { stage++ } - 3 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Bye.").also { stage = 99 } + 0 -> playerl(FacialExpression.FRIENDLY, "I'm just wandering, it's a lovely day for a walk in the woods.").also { stage++ } + 1 -> npc(FacialExpression.FRIENDLY, "It is that.").also { stage++ } + 2 -> player(FacialExpression.FRIENDLY, "Well I shouldn't keep you, see you later.").also { stage++ } + 3 -> npc(FacialExpression.FRIENDLY, "Bye.").also { stage = 99 } - 10 -> npcl(core.game.dialogue.FacialExpression.HAPPY, "Of course! I remember him from when I was living in the eastern lands. He was just a budding engineer then. I rather liked the young gnome: he was rather loud, but he had a good soul.").also { stage++ } - 11 -> npcl(core.game.dialogue.FacialExpression.HAPPY, "He was very interested in elven magic. Last time we spoke, not too long ago, he was very interested in illusion magic and how to dispel it. I gave him some advice and a few pieces of equipment to help him.").also { stage++ } - 12 -> playerl(core.game.dialogue.FacialExpression.THINKING, "I think Oaknock died of old age a few hundred years ago now.").also { stage++ } - 13 -> npcl(core.game.dialogue.FacialExpression.HALF_GUILTY, "I keep forgetting, a hundred years is a long time for you.").also { stage++ } - 14 -> player(core.game.dialogue.FacialExpression.ASKING, "Did you ever give him a seed?").also { stage++ } - 15 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Of course. It grew into a saw. I hope he found it useful.").also { stage++ } - 16 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "I think he did! Thanks.").also { stage++ } + 10 -> npcl(FacialExpression.HAPPY, "Of course! I remember him from when I was living in the eastern lands. He was just a budding engineer then. I rather liked the young gnome: he was rather loud, but he had a good soul.").also { stage++ } + 11 -> npcl(FacialExpression.HAPPY, "He was very interested in elven magic. Last time we spoke, not too long ago, he was very interested in illusion magic and how to dispel it. I gave him some advice and a few pieces of equipment to help him.").also { stage++ } + 12 -> playerl(FacialExpression.THINKING, "I think Oaknock died of old age a few hundred years ago now.").also { stage++ } + 13 -> npcl(FacialExpression.HALF_GUILTY, "I keep forgetting, a hundred years is a long time for you.").also { stage++ } + 14 -> player(FacialExpression.ASKING, "Did you ever give him a seed?").also { stage++ } + 15 -> npcl(FacialExpression.FRIENDLY, "Of course. It grew into a saw. I hope he found it useful.").also { stage++ } + 16 -> player(FacialExpression.FRIENDLY, "I think he did! Thanks.").also { stage++ } 17 -> sendDialogue("Ilfeen smiles serenely.").also { stage = 99 } - 20 -> npcl(core.game.dialogue.FacialExpression.ASKING, "I am, but you’ll need your own seed. I can also chant your shield or bow back to full charges if you have it with you. Would you like me to enchant anything?").also { stage++ } - 21 -> npcl(core.game.dialogue.FacialExpression.ASKING, "Or I could give you a book about crystal singing?").also { stage++ } + 20 -> npcl(FacialExpression.ASKING, "I am, but you’ll need your own seed. I can also chant your shield or bow back to full charges if you have it with you. Would you like me to enchant anything?").also { stage++ } + 21 -> npcl(FacialExpression.ASKING, "Or I could give you a book about crystal singing?").also { stage++ } 22 -> options ("Enchant something.", "Crystal singing book.", "Nothing, thanks.").also { stage++ } 23 -> when (buttonId) { //1 -> todo opens interface for enchanting - 2 -> player(core.game.dialogue.FacialExpression.ASKING, "Could I have the book, please?").also { stage = 40 } - 3 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Well, good luck.").also { stage = 43 } + 2 -> player(FacialExpression.ASKING, "Could I have the book, please?").also { stage = 40 } + 3 -> npc(FacialExpression.FRIENDLY, "Well, good luck.").also { stage = 43 } } 40 -> { addItemOrDrop(player, Items.CRYSTAL_OF_SEREN_4313, 1) sendDialogue("Ilfeen hands you a book.").also { stage++ } } - 41 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Thanks, I'll read all about it.").also { stage++ } - 42 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Well, good luck.").also { stage++ } - 43 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Goodbye, Ilfeen.").also { stage = 99 } + 41 -> player(FacialExpression.FRIENDLY, "Thanks, I'll read all about it.").also { stage++ } + 42 -> npc(FacialExpression.FRIENDLY, "Well, good luck.").also { stage++ } + 43 -> player(FacialExpression.FRIENDLY, "Goodbye, Ilfeen.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return IlfeenDialogue(player) } diff --git a/Server/src/main/content/region/tirranwn/dialogue/IonaDialouge.kt b/Server/src/main/content/region/tirranwn/dialogue/IonaDialouge.kt index 861613954..9ab6bdc25 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/IonaDialouge.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/IonaDialouge.kt @@ -12,24 +12,24 @@ import org.rs09.consts.NPCs */ @Initializable -class IonaDialouge(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class IonaDialouge(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I can never catch Eoin, he is just too fast, I am always 'It'.").also { stage = 99 } + 0 -> npcl(FacialExpression.FRIENDLY, "I can never catch Eoin, he is just too fast, I am always 'It'.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return IonaDialouge(player) } diff --git a/Server/src/main/content/region/tirranwn/dialogue/KelynDialogue.kt b/Server/src/main/content/region/tirranwn/dialogue/KelynDialogue.kt index 6081e6a8c..5b19b0be4 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/KelynDialogue.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/KelynDialogue.kt @@ -12,28 +12,28 @@ import org.rs09.consts.NPCs */ @Initializable -class KelynDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class KelynDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello.").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Huh... Oh sorry, you made me jump. I was miles away, day dreaming.").also { stage++ } - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "About what may I ask?").also { stage++ } - 2 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I was thinking about the crystal spires of Prifddinas.").also { stage++ } - 3 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "It must be beautiful, I've only seen the city walls.").also { stage++ } - 4 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "I have never seen it, all I know are the stories. I hope that changes one day.").also { stage = 99 } + 0 -> npcl(FacialExpression.FRIENDLY, "Huh... Oh sorry, you made me jump. I was miles away, day dreaming.").also { stage++ } + 1 -> player(FacialExpression.FRIENDLY, "About what may I ask?").also { stage++ } + 2 -> npcl(FacialExpression.FRIENDLY, "I was thinking about the crystal spires of Prifddinas.").also { stage++ } + 3 -> player(FacialExpression.FRIENDLY, "It must be beautiful, I've only seen the city walls.").also { stage++ } + 4 -> npcl(FacialExpression.FRIENDLY, "I have never seen it, all I know are the stories. I hope that changes one day.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return KelynDialogue(player) } diff --git a/Server/src/main/content/region/tirranwn/dialogue/MawrthDialogue.kt b/Server/src/main/content/region/tirranwn/dialogue/MawrthDialogue.kt index 0584c99be..db5e0f9d3 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/MawrthDialogue.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/MawrthDialogue.kt @@ -12,29 +12,29 @@ import org.rs09.consts.NPCs */ @Initializable -class MawrthDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class MawrthDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npcl(core.game.dialogue.FacialExpression.FRIENDLY,"Those children are nothing but trouble - if I did not watch them all the time, Seren knows what trouble they would get in to!").also { stage = 0 } + npcl(FacialExpression.FRIENDLY,"Those children are nothing but trouble - if I did not watch them all the time, Seren knows what trouble they would get in to!").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "They look old enough to look after themselves.").also { stage++ } - 1 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "They are only 34 and 38, far too young to be left unsupervised.").also { stage++ } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Only!?! How old does that make you?").also { stage++ } - 3 -> npcl(core.game.dialogue.FacialExpression.FRIENDLY, "Has no one told you it is rude to ask a lady her age?").also { stage++ } - 4 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Sorry, I wasn't thinking. Anyway... I'd better stop distracting you.").also { stage++ } - 5 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Okay, See you some other time.").also { stage = 99 } + 0 -> player(FacialExpression.FRIENDLY, "They look old enough to look after themselves.").also { stage++ } + 1 -> npcl(FacialExpression.FRIENDLY, "They are only 34 and 38, far too young to be left unsupervised.").also { stage++ } + 2 -> player(FacialExpression.FRIENDLY, "Only!?! How old does that make you?").also { stage++ } + 3 -> npcl(FacialExpression.FRIENDLY, "Has no one told you it is rude to ask a lady her age?").also { stage++ } + 4 -> playerl(FacialExpression.FRIENDLY, "Sorry, I wasn't thinking. Anyway... I'd better stop distracting you.").also { stage++ } + 5 -> npc(FacialExpression.FRIENDLY, "Okay, See you some other time.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return MawrthDialogue(player) } diff --git a/Server/src/main/content/region/tirranwn/dialogue/OronwenDialogue.kt b/Server/src/main/content/region/tirranwn/dialogue/OronwenDialogue.kt index 9c52f04c4..11729482f 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/OronwenDialogue.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/OronwenDialogue.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class OronwenDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class OronwenDialogue(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"Hello, can I help?").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"Hello, can I help?").also { stage = 0 } return true } @@ -25,8 +25,8 @@ class OronwenDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi 0 -> options("Yes please. What are you selling?", "No thanks.").also { stage++ } 1 -> when(buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Yes please. What are you selling?").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 } + 1 -> player(FacialExpression.FRIENDLY, "Yes please. What are you selling?").also { stage = 10 } + 2 -> player(FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 } } 10 -> end().also { npc.openShop(player) } @@ -36,7 +36,7 @@ class OronwenDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return OronwenDialogue(player) } diff --git a/Server/src/main/content/region/tirranwn/dialogue/TyrasGuard.kt b/Server/src/main/content/region/tirranwn/dialogue/TyrasGuard.kt index 409963af6..076a7eb21 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/TyrasGuard.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/TyrasGuard.kt @@ -12,11 +12,11 @@ import org.rs09.consts.NPCs */ @Initializable -class TyrasGuard(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class TyrasGuard(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npc(core.game.dialogue.FacialExpression.FRIENDLY,"What is it?").also { stage = 0 } + npc(FacialExpression.FRIENDLY,"What is it?").also { stage = 0 } return true } @@ -24,30 +24,30 @@ class TyrasGuard(player: Player? = null) : core.game.dialogue.DialoguePlugin(pla when(stage){ 0 -> options("What's going on around here?", "Do you know what's south of here?", "I'll leave you alone.").also { stage++ } 1 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.ASKING, "What's going on around here?").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.ASKING, "Do you know what's south of here?").also { stage = 20 } - 3 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "I'll leave you alone.").also { stage = 99 } + 1 -> player(FacialExpression.ASKING, "What's going on around here?").also { stage = 10 } + 2 -> player(FacialExpression.ASKING, "Do you know what's south of here?").also { stage = 20 } + 3 -> player(FacialExpression.NEUTRAL, "I'll leave you alone.").also { stage = 99 } } - 10 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Sorry, I shouldn't give out sensitive information to civilians. You should go to General Hining, in the camp along the road.").also { stage++ } + 10 -> npcl(FacialExpression.NEUTRAL, "Sorry, I shouldn't give out sensitive information to civilians. You should go to General Hining, in the camp along the road.").also { stage++ } 11 -> options("Do you know what's south of here?", "Okay, thanks.").also { stage++ } 12 -> when (buttonId) { - 1 -> player(core.game.dialogue.FacialExpression.ASKING, "Do you know what's south of here?").also { stage = 20 } - 2 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "Ok, thanks.").also { stage = 99 } + 1 -> player(FacialExpression.ASKING, "Do you know what's south of here?").also { stage = 20 } + 2 -> player(FacialExpression.NEUTRAL, "Ok, thanks.").also { stage = 99 } } - 20 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "No. We sent a scouting party in that direction, when we first established our camp. Some of the men got lost in the swamps. Eventually we listed them as dead.").also { stage++ } - 21 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Then suddenly they returned, with a wild gleam in their eyes, raving about gods and snakes and all kinds of madness.").also { stage++ } - 22 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "We had to drive them out, in case their condition infected the rest of the troops. Their wives will be given a full widow pension when we return home.").also { stage++ } - 23 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "General Hining concluded that, whatever is down there, it's not affiliated with any of the elf factions, and it should be left alone.").also { stage++ } - 24 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Thank you.").also { stage = 0 } + 20 -> npcl(FacialExpression.NEUTRAL, "No. We sent a scouting party in that direction, when we first established our camp. Some of the men got lost in the swamps. Eventually we listed them as dead.").also { stage++ } + 21 -> npcl(FacialExpression.NEUTRAL, "Then suddenly they returned, with a wild gleam in their eyes, raving about gods and snakes and all kinds of madness.").also { stage++ } + 22 -> npcl(FacialExpression.NEUTRAL, "We had to drive them out, in case their condition infected the rest of the troops. Their wives will be given a full widow pension when we return home.").also { stage++ } + 23 -> npcl(FacialExpression.NEUTRAL, "General Hining concluded that, whatever is down there, it's not affiliated with any of the elf factions, and it should be left alone.").also { stage++ } + 24 -> player(FacialExpression.FRIENDLY, "Thank you.").also { stage = 0 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return TyrasGuard(player) } diff --git a/Server/src/main/content/region/tirranwn/dialogue/TyrasGuardTent.kt b/Server/src/main/content/region/tirranwn/dialogue/TyrasGuardTent.kt index 5fcf504e6..35f8ab51f 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/TyrasGuardTent.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/TyrasGuardTent.kt @@ -12,24 +12,24 @@ import org.rs09.consts.NPCs */ @Initializable -class TyrasGuardTent(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){ +class TyrasGuardTent(player: Player? = null) : DialoguePlugin(player){ override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello").also { stage = 0 } + player(FacialExpression.FRIENDLY,"Hello").also { stage = 0 } return true } override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ - 0 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL,"Sorry, can't stop to talk. You should go to General Hining if you need something.").also { stage = 99 } + 0 -> npcl(FacialExpression.NEUTRAL,"Sorry, can't stop to talk. You should go to General Hining if you need something.").also { stage = 99 } 99 -> end() } return true } - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return TyrasGuardTent(player) } diff --git a/Server/src/main/content/region/wilderness/handlers/CorpAreaController.kt b/Server/src/main/content/region/wilderness/handlers/CorpAreaController.kt index 07bfce351..265a60c9b 100644 --- a/Server/src/main/content/region/wilderness/handlers/CorpAreaController.kt +++ b/Server/src/main/content/region/wilderness/handlers/CorpAreaController.kt @@ -2,7 +2,7 @@ package content.region.wilderness.handlers import core.api.* import core.game.node.entity.Entity -import core.game.node.entity.npc.NPC; +import core.game.node.entity.npc.NPC import core.game.node.entity.player.Player import content.global.skill.summoning.familiar.Familiar import core.game.world.map.zone.ZoneBorders diff --git a/Server/src/main/core/ServerConstants.kt b/Server/src/main/core/ServerConstants.kt index 016f7d352..53bd6c9a2 100644 --- a/Server/src/main/core/ServerConstants.kt +++ b/Server/src/main/core/ServerConstants.kt @@ -47,7 +47,7 @@ class ServerConstants { var PLAYER_SAVE_PATH: String? = null @JvmField - var PLAYER_ATTRIBUTE_PATH = "ish"; + var PLAYER_ATTRIBUTE_PATH = "ish" //path to the various config files, such as npc_spawns.json var CONFIG_PATH: String? = null diff --git a/Server/src/main/core/api/ContentAPI.kt b/Server/src/main/core/api/ContentAPI.kt index 8d7131340..5c5bfa13e 100644 --- a/Server/src/main/core/api/ContentAPI.kt +++ b/Server/src/main/core/api/ContentAPI.kt @@ -20,7 +20,7 @@ import core.game.node.entity.player.link.TeleportManager import core.game.node.entity.player.link.audio.Audio import core.game.node.entity.player.link.emote.Emotes import core.game.node.entity.player.link.quest.QuestRepository -import core.game.node.entity.player.link.prayer.PrayerType; +import core.game.node.entity.player.link.prayer.PrayerType import core.game.node.entity.skill.Skills import content.data.skill.SkillingTool import content.global.skill.slayer.Tasks @@ -1439,7 +1439,7 @@ fun visualize(entity: Entity, anim: A, gfx: G) { * @param pulse the Pulse object to submit */ fun submitWorldPulse(pulse: Pulse) { - GameWorld.Pulser.submit(pulse) + Pulser.submit(pulse) } /** @@ -1928,7 +1928,7 @@ fun runcs2 (player: Player, scriptId: Int, vararg arguments: Any) { fun sendItemSelect (player: Player, vararg options: String, keepAlive: Boolean = false, callback: (slot: Int, optionIndex: Int) -> Unit) { player.interfaceManager.openSingleTab(Component(12)) val scriptArgs = arrayOf ((12 shl 16) + 18, 93, 4, 7, 0, -1, "", "", "", "", "", "", "", "", "") - for (i in 0 until kotlin.math.min(9, options.size)) + for (i in 0 until min(9, options.size)) scriptArgs[6 + i] = options[i] runcs2(player, 150, *scriptArgs) val settings = IfaceSettingsBuilder() @@ -1941,8 +1941,8 @@ fun sendItemSelect (player: Player, vararg options: String, keepAlive: Boolean = fun announceIfRare(player: Player, item: Item) { if (item.definition.getConfiguration(ItemConfigParser.RARE_ITEM, false)) { - sendNews("${player.username} has just received: ${item.amount} x ${item.name}."); - GlobalKillCounter.incrementRareDrop(player, item); + sendNews("${player.username} has just received: ${item.amount} x ${item.name}.") + GlobalKillCounter.incrementRareDrop(player, item) } } diff --git a/Server/src/main/core/api/EquipmentSlot.kt b/Server/src/main/core/api/EquipmentSlot.kt index b0812cb23..0b09e3751 100644 --- a/Server/src/main/core/api/EquipmentSlot.kt +++ b/Server/src/main/core/api/EquipmentSlot.kt @@ -27,7 +27,7 @@ enum class EquipmentSlot { slotMap["chest"] = CHEST; slotMap["body"] = CHEST; slotMap["torso"] = CHEST slotMap["shield"] = SHIELD; slotMap["off"] = SHIELD slotMap["legs"] = LEGS; slotMap["leg"] = LEGS - slotMap["hands"] = HANDS; slotMap["hand"] = HANDS; slotMap["brace"] = HANDS; slotMap["bracelet"] = HANDS; + slotMap["hands"] = HANDS; slotMap["hand"] = HANDS; slotMap["brace"] = HANDS; slotMap["bracelet"] = HANDS slotMap["feet"] = FEET slotMap["ring"] = RING slotMap["ammo"] = AMMO; slotMap["ammunition"] = AMMO diff --git a/Server/src/main/core/api/regionspec/RegionSpecification.kt b/Server/src/main/core/api/regionspec/RegionSpecification.kt index 78dde9ce4..863c98024 100644 --- a/Server/src/main/core/api/regionspec/RegionSpecification.kt +++ b/Server/src/main/core/api/regionspec/RegionSpecification.kt @@ -3,7 +3,6 @@ package core.api.regionspec import core.api.regionspec.contracts.* import core.game.world.map.Region import core.game.world.map.RegionChunk -import core.game.world.map.RegionPlane import core.game.world.map.build.DynamicRegion class RegionSpecification(val regionContract: RegionSpecContract = EmptyRegionContract(), vararg val chunkContracts: ChunkSpecContract = arrayOf(EmptyChunkContract())) { diff --git a/Server/src/main/core/api/regionspec/contracts/UseExistingRegionContract.kt b/Server/src/main/core/api/regionspec/contracts/UseExistingRegionContract.kt index d6a30a3f7..24e4bded4 100644 --- a/Server/src/main/core/api/regionspec/contracts/UseExistingRegionContract.kt +++ b/Server/src/main/core/api/regionspec/contracts/UseExistingRegionContract.kt @@ -4,6 +4,6 @@ import core.game.world.map.build.DynamicRegion class UseExistingRegionContract(val region: DynamicRegion) : RegionSpecContract { override fun instantiateRegion(): DynamicRegion { - return region; + return region } } \ No newline at end of file diff --git a/Server/src/main/core/game/bots/AIRepository.kt b/Server/src/main/core/game/bots/AIRepository.kt index 83f5e4ae2..3faef5166 100644 --- a/Server/src/main/core/game/bots/AIRepository.kt +++ b/Server/src/main/core/game/bots/AIRepository.kt @@ -45,8 +45,8 @@ class AIRepository { @JvmStatic fun clearAllBots() { PulseRepository.toList().forEach { (_, it) -> - it.stop(); - it.botScript.bot.clear(); + it.stop() + it.botScript.bot.clear() AIPlayer.deregister((it.botScript.bot as AIPlayer).uid) } } diff --git a/Server/src/main/core/game/bots/ScriptAPI.kt b/Server/src/main/core/game/bots/ScriptAPI.kt index 2a66caf46..85ac568c1 100644 --- a/Server/src/main/core/game/bots/ScriptAPI.kt +++ b/Server/src/main/core/game/bots/ScriptAPI.kt @@ -192,7 +192,7 @@ class ScriptAPI(private val bot: Player) { return false if (acceptedPredicate != null) { - return acceptedPredicate(e) && !Pathfinder.find(bot, e).isMoveNear; + return acceptedPredicate(e) && !Pathfinder.find(bot, e).isMoveNear } else { val name = e?.name return (acceptedNames?.stream()?.anyMatch({ s -> s.equals(name, true) }) ?: true && !Pathfinder.find(bot, e).isMoveNear) diff --git a/Server/src/main/core/game/dialogue/DialogueBuilder.kt b/Server/src/main/core/game/dialogue/DialogueBuilder.kt index ca685b22c..f479b0e0d 100644 --- a/Server/src/main/core/game/dialogue/DialogueBuilder.kt +++ b/Server/src/main/core/game/dialogue/DialogueBuilder.kt @@ -2,12 +2,12 @@ package core.game.dialogue import core.game.node.entity.player.Player import core.tools.END_DIALOGUE -abstract class DialogueBuilderFile : core.game.dialogue.DialogueFile() { - var data: ArrayList = ArrayList() +abstract class DialogueBuilderFile : DialogueFile() { + var data: ArrayList = ArrayList() //var stages: ArrayList = ArrayList() - abstract fun create(b: core.game.dialogue.DialogueBuilder) + abstract fun create(b: DialogueBuilder) init { - create(core.game.dialogue.DialogueBuilder(this)) + create(DialogueBuilder(this)) } override fun handle(componentID: Int, buttonID: Int) { for((i, clause) in data.iterator().withIndex()) { @@ -23,46 +23,46 @@ abstract class DialogueBuilderFile : core.game.dialogue.DialogueFile() { } interface DialogueNode { - fun handle(df: core.game.dialogue.DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int + fun handle(df: DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int } -class NpcLNode(val value: String): core.game.dialogue.DialogueNode { - override fun handle(df: core.game.dialogue.DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { +class NpcLNode(val value: String): DialogueNode { + override fun handle(df: DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { df.npcl(value) return stage + 1 } } -class NpcNode(val values: Array): core.game.dialogue.DialogueNode { - override fun handle(df: core.game.dialogue.DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { +class NpcNode(val values: Array): DialogueNode { + override fun handle(df: DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { df.npc(*values) return stage + 1 } } -class PlayerLNode(val value: String): core.game.dialogue.DialogueNode { - override fun handle(df: core.game.dialogue.DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { +class PlayerLNode(val value: String): DialogueNode { + override fun handle(df: DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { df.playerl(value) return stage + 1 } } -class ClosureNode(val f: (Player) -> Int): core.game.dialogue.DialogueNode { - override fun handle(df: core.game.dialogue.DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { +class ClosureNode(val f: (Player) -> Int): DialogueNode { + override fun handle(df: DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { return f(df.player!!) } } class OptionEntry(val text: String, val nextStage: Int, val predicate: (Player) -> Boolean = { _ -> true }) {} -class OptionsNode(var options: ArrayList): core.game.dialogue.DialogueNode { +class OptionsNode(var options: ArrayList): DialogueNode { fun optionNames(player: Player): Array { return options.asSequence().filter({ it.predicate(player) }).map({ it.text }).toList().toTypedArray() } - override fun handle(df: core.game.dialogue.DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { + override fun handle(df: DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { val tmp: Array = optionNames(df.player!!) if(tmp.size > 1) { df.options(*tmp) return stage + 1 } else if(tmp.size == 1) { - val tmp: List = options.asSequence().filter({ it.predicate(df.player!!) }).toList() + val tmp: List = options.asSequence().filter({ it.predicate(df.player!!) }).toList() df.stage = tmp[0].nextStage df.handle(componentID, 0) return df.stage @@ -71,17 +71,17 @@ class OptionsNode(var options: ArrayList): core. } } } -class OptionsDispatchNode(var options: ArrayList): core.game.dialogue.DialogueNode { - override fun handle(df: core.game.dialogue.DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { - val tmp: List = options.asSequence().filter({ it.predicate(df.player!!) }).toList() +class OptionsDispatchNode(var options: ArrayList): DialogueNode { + override fun handle(df: DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { + val tmp: List = options.asSequence().filter({ it.predicate(df.player!!) }).toList() df.stage = tmp[buttonID-1].nextStage df.handle(componentID, 0) return df.stage } } -class DialogueClause(val predicate: (player: Player) -> Boolean, val nodes: ArrayList) { - fun handle(df: core.game.dialogue.DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { +class DialogueClause(val predicate: (player: Player) -> Boolean, val nodes: ArrayList) { + fun handle(df: DialogueFile, componentID: Int, buttonID: Int, stage: Int): Int { if(stage < nodes.size) { return nodes[stage].handle(df, componentID, buttonID, stage) } else { @@ -90,59 +90,59 @@ class DialogueClause(val predicate: (player: Player) -> Boolean, val nodes: Arra } } -class DialogueOptionsBuilder(var target: core.game.dialogue.DialogueBuilderFile, val clauseIndex: Int, var options: ArrayList) { - fun option(value: String): core.game.dialogue.DialogueBuilder { - options.add(core.game.dialogue.OptionEntry(value, target.data[clauseIndex].nodes.size)) - return core.game.dialogue.DialogueBuilder(target, clauseIndex) +class DialogueOptionsBuilder(var target: DialogueBuilderFile, val clauseIndex: Int, var options: ArrayList) { + fun option(value: String): DialogueBuilder { + options.add(OptionEntry(value, target.data[clauseIndex].nodes.size)) + return DialogueBuilder(target, clauseIndex) } - fun optionIf(value: String, predicate: (Player) -> Boolean): core.game.dialogue.DialogueBuilder { - options.add(core.game.dialogue.OptionEntry(value, target.data[clauseIndex].nodes.size, predicate)) - return core.game.dialogue.DialogueBuilder(target, clauseIndex) + fun optionIf(value: String, predicate: (Player) -> Boolean): DialogueBuilder { + options.add(OptionEntry(value, target.data[clauseIndex].nodes.size, predicate)) + return DialogueBuilder(target, clauseIndex) } } -class DialogueBuilder(var target: core.game.dialogue.DialogueBuilderFile, var clauseIndex: Int = -1) { - fun onPredicate(predicate: (player: Player) -> Boolean): core.game.dialogue.DialogueBuilder { - target.data.add(core.game.dialogue.DialogueClause(predicate, ArrayList())) +class DialogueBuilder(var target: DialogueBuilderFile, var clauseIndex: Int = -1) { + fun onPredicate(predicate: (player: Player) -> Boolean): DialogueBuilder { + target.data.add(DialogueClause(predicate, ArrayList())) clauseIndex = target.data.size - 1 return this } - fun onQuestStages(name: String, vararg stages: Int): core.game.dialogue.DialogueBuilder { + fun onQuestStages(name: String, vararg stages: Int): DialogueBuilder { return onPredicate() { player -> val questStage = player.questRepository.getStage(name) return@onPredicate stages.contains(questStage) } } - fun playerl(value: String): core.game.dialogue.DialogueBuilder { - target.data[clauseIndex].nodes.add(core.game.dialogue.PlayerLNode(value)) + fun playerl(value: String): DialogueBuilder { + target.data[clauseIndex].nodes.add(PlayerLNode(value)) return this } - fun npcl(value: String): core.game.dialogue.DialogueBuilder { - target.data[clauseIndex].nodes.add(core.game.dialogue.NpcLNode(value)) + fun npcl(value: String): DialogueBuilder { + target.data[clauseIndex].nodes.add(NpcLNode(value)) return this } - fun npc(vararg values: String): core.game.dialogue.DialogueBuilder { - target.data[clauseIndex].nodes.add(core.game.dialogue.NpcNode(values as Array)) + fun npc(vararg values: String): DialogueBuilder { + target.data[clauseIndex].nodes.add(NpcNode(values as Array)) return this } fun endWith(f: (Player) -> Unit) { - target.data[clauseIndex].nodes.add(core.game.dialogue.ClosureNode({ player -> + target.data[clauseIndex].nodes.add(ClosureNode({ player -> f(player) return@ClosureNode END_DIALOGUE })) } fun end() { - target.data[clauseIndex].nodes.add(core.game.dialogue.ClosureNode({ _ -> + target.data[clauseIndex].nodes.add(ClosureNode({ _ -> return@ClosureNode END_DIALOGUE })) } - fun options(): core.game.dialogue.DialogueOptionsBuilder { - var options: ArrayList = ArrayList() - val node = core.game.dialogue.OptionsNode(options) - val dispatchNode = core.game.dialogue.OptionsDispatchNode(options) + fun options(): DialogueOptionsBuilder { + var options: ArrayList = ArrayList() + val node = OptionsNode(options) + val dispatchNode = OptionsDispatchNode(options) target.data[clauseIndex].nodes.add(node) target.data[clauseIndex].nodes.add(dispatchNode) - return core.game.dialogue.DialogueOptionsBuilder(target, clauseIndex, options) + return DialogueOptionsBuilder(target, clauseIndex, options) } } diff --git a/Server/src/main/core/game/dialogue/DialogueFile.kt b/Server/src/main/core/game/dialogue/DialogueFile.kt index f81911e31..3ddf241b4 100644 --- a/Server/src/main/core/game/dialogue/DialogueFile.kt +++ b/Server/src/main/core/game/dialogue/DialogueFile.kt @@ -10,13 +10,13 @@ import core.tools.START_DIALOGUE abstract class DialogueFile { var player: Player? = null var npc: NPC? = null - var interpreter: core.game.dialogue.DialogueInterpreter? = null + var interpreter: DialogueInterpreter? = null open var stage = START_DIALOGUE - var dialoguePlugin: core.game.dialogue.DialoguePlugin? = null + var dialoguePlugin: DialoguePlugin? = null abstract fun handle(componentID: Int, buttonID: Int) - fun load(player: Player, npc: NPC?, interpreter: core.game.dialogue.DialogueInterpreter): DialogueFile { + fun load(player: Player, npc: NPC?, interpreter: DialogueInterpreter): DialogueFile { this.player = player this.npc = npc this.interpreter = interpreter @@ -29,7 +29,7 @@ abstract class DialogueFile { if (npc != null) { return interpreter!!.sendDialogues( npc, - if (npc!!.id > 8591) core.game.dialogue.FacialExpression.OLD_NORMAL else core.game.dialogue.FacialExpression.FRIENDLY, + if (npc!!.id > 8591) FacialExpression.OLD_NORMAL else FacialExpression.FRIENDLY, *messages ) } @@ -37,10 +37,10 @@ abstract class DialogueFile { } open fun npc(id: Int, vararg messages: String?): Component? { - return interpreter!!.sendDialogues(id, core.game.dialogue.FacialExpression.FRIENDLY, *messages) + return interpreter!!.sendDialogues(id, FacialExpression.FRIENDLY, *messages) } - open fun npc(expression: core.game.dialogue.FacialExpression?, vararg messages: String?): Component? { + open fun npc(expression: FacialExpression?, vararg messages: String?): Component? { return if (npc == null) { interpreter!!.sendDialogues(0, expression, *messages) } else interpreter!!.sendDialogues(npc, expression, *messages) @@ -50,7 +50,7 @@ abstract class DialogueFile { return interpreter!!.sendDialogues(player, null, *messages) } - open fun player(expression: core.game.dialogue.FacialExpression?, vararg messages: String?): Component? { + open fun player(expression: FacialExpression?, vararg messages: String?): Component? { return interpreter!!.sendDialogues(player, expression, *messages) } @@ -59,7 +59,7 @@ abstract class DialogueFile { * @param expr the FacialExpression to use, located in the FacialExpression enum. * @param msg the message for the NPC to say */ - open fun npcl(expr: core.game.dialogue.FacialExpression?, msg: String?): Component? { + open fun npcl(expr: FacialExpression?, msg: String?): Component? { return npc(expr, *splitLines(msg!!)) } @@ -72,7 +72,7 @@ abstract class DialogueFile { * @param expr the FacialExpression to use, located in the FacialExpression enum. * @param msg the message for the player to say */ - open fun playerl(expr: core.game.dialogue.FacialExpression?, msg: String?): Component? { + open fun playerl(expr: FacialExpression?, msg: String?): Component? { return player(expr, *splitLines(msg!!)) } @@ -84,7 +84,7 @@ abstract class DialogueFile { if(interpreter != null) interpreter!!.close() } - open fun sendNormalDialogue(entity: Entity?, expression: core.game.dialogue.FacialExpression?, vararg messages: String?) { + open fun sendNormalDialogue(entity: Entity?, expression: FacialExpression?, vararg messages: String?) { interpreter!!.sendDialogues(entity, expression, *messages) } diff --git a/Server/src/main/core/game/dialogue/DialogueTopic.kt b/Server/src/main/core/game/dialogue/DialogueTopic.kt index 5f7cff79c..d2abedd49 100644 --- a/Server/src/main/core/game/dialogue/DialogueTopic.kt +++ b/Server/src/main/core/game/dialogue/DialogueTopic.kt @@ -4,9 +4,9 @@ package core.game.dialogue * Topic/IfTopic system backported from my personal project * @author Ceikry */ -open class Topic(val expr: core.game.dialogue.FacialExpression, val text: String, val toStage: T, val skipPlayer: Boolean = false) { - constructor(text: String, toStage: T, skipPlayer: Boolean = false) : this(core.game.dialogue.FacialExpression.ASKING, text, toStage, skipPlayer) +open class Topic(val expr: FacialExpression, val text: String, val toStage: T, val skipPlayer: Boolean = false) { + constructor(text: String, toStage: T, skipPlayer: Boolean = false) : this(FacialExpression.ASKING, text, toStage, skipPlayer) } -class IfTopic(expr: core.game.dialogue.FacialExpression, text: String, toStage: T, val showCondition: Boolean, skipPlayer: Boolean = false) : Topic(expr, text, toStage, skipPlayer) { - constructor(text: String, toStage: T, showCondition: Boolean, skipPlayer: Boolean = false) : this(core.game.dialogue.FacialExpression.ASKING, text, toStage, showCondition, skipPlayer) +class IfTopic(expr: FacialExpression, text: String, toStage: T, val showCondition: Boolean, skipPlayer: Boolean = false) : Topic(expr, text, toStage, skipPlayer) { + constructor(text: String, toStage: T, showCondition: Boolean, skipPlayer: Boolean = false) : this(FacialExpression.ASKING, text, toStage, showCondition, skipPlayer) } \ No newline at end of file diff --git a/Server/src/main/core/game/dialogue/EmptyPlugin.kt b/Server/src/main/core/game/dialogue/EmptyPlugin.kt index 572fd63e6..79857654e 100644 --- a/Server/src/main/core/game/dialogue/EmptyPlugin.kt +++ b/Server/src/main/core/game/dialogue/EmptyPlugin.kt @@ -4,8 +4,8 @@ import core.game.node.entity.npc.NPC import core.game.node.entity.player.Player import core.tools.START_DIALOGUE -class EmptyPlugin(player: Player? = null,val file: DialogueFile?) : core.game.dialogue.DialoguePlugin(player) { - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { +class EmptyPlugin(player: Player? = null,val file: DialogueFile?) : DialoguePlugin(player) { + override fun newInstance(player: Player?): DialoguePlugin { return EmptyPlugin(player,null) } diff --git a/Server/src/main/core/game/ge/GrandExchange.kt b/Server/src/main/core/game/ge/GrandExchange.kt index 1998822ee..4e8745731 100644 --- a/Server/src/main/core/game/ge/GrandExchange.kt +++ b/Server/src/main/core/game/ge/GrandExchange.kt @@ -320,7 +320,7 @@ class GrandExchange : StartupListener, Commands { private fun canUpdatePriceIndex(seller: GrandExchangeOffer, buyer: GrandExchangeOffer): Boolean { if(seller.playerUID == buyer.playerUID) return false - if(!ServerConstants.BOTS_INFLUENCE_PRICE_INDEX && (seller.isBot || buyer.isBot)) return false; + if(!ServerConstants.BOTS_INFLUENCE_PRICE_INDEX && (seller.isBot || buyer.isBot)) return false return true } diff --git a/Server/src/main/core/game/interaction/Script.kt b/Server/src/main/core/game/interaction/Script.kt index d266c1e34..895011970 100644 --- a/Server/src/main/core/game/interaction/Script.kt +++ b/Server/src/main/core/game/interaction/Script.kt @@ -1,9 +1,7 @@ package core.game.interaction import core.game.node.Node -import core.game.node.entity.Entity import core.game.node.entity.player.Player -import core.game.world.GameWorld typealias UseWithExecutor = (Player, Node, Node, Int) -> Boolean typealias InteractExecutor = (Player, Node, Int) -> Boolean diff --git a/Server/src/main/core/game/node/entity/combat/CombatSwingHandler.kt b/Server/src/main/core/game/node/entity/combat/CombatSwingHandler.kt index cb002d4c5..525bfbd99 100644 --- a/Server/src/main/core/game/node/entity/combat/CombatSwingHandler.kt +++ b/Server/src/main/core/game/node/entity/combat/CombatSwingHandler.kt @@ -439,7 +439,7 @@ abstract class CombatSwingHandler(var type: CombatStyle?) { if (!(state.targets.size == 1 && state.targets[0] == state)) { for (s in state.targets) { if (s != null && s != state) { - adjustBattleState(entity, victim, s); + adjustBattleState(entity, victim, s) } } } @@ -651,7 +651,7 @@ abstract class CombatSwingHandler(var type: CombatStyle?) { for(x2 in 0 until victim!!.size()) { for(y2 in 0 until victim!!.size()) { val dst = victim!!.location.transform(x2, y2, 0) - val path = Pathfinder.PROJECTILE.find(src, 1, dst, 1, 1, 0, 0, 0, false, RegionManager::getClippingFlag) + val path = PROJECTILE.find(src, 1, dst, 1, 1, 0, 0, 0, false, RegionManager::getClippingFlag) if(path.isSuccessful && (!checkClose || path.points.size <= 1)) { return true } diff --git a/Server/src/main/core/game/node/entity/combat/MagicSwingHandler.kt b/Server/src/main/core/game/node/entity/combat/MagicSwingHandler.kt index 41f422b6f..c7d850781 100644 --- a/Server/src/main/core/game/node/entity/combat/MagicSwingHandler.kt +++ b/Server/src/main/core/game/node/entity/combat/MagicSwingHandler.kt @@ -154,7 +154,7 @@ open class MagicSwingHandler (vararg flags: SwingHandlerFlag) if (entity is Player && !flags.contains(SwingHandlerFlag.IGNORE_PRAYER_BOOSTS_ACCURACY)) { prayer += entity.prayer.getSkillBonus(Skills.MAGIC) } - val additional = getSetMultiplier(entity, Skills.MAGIC); + val additional = getSetMultiplier(entity, Skills.MAGIC) val effective = floor(level * prayer * additional + spellBonus) val bonus = if (!flags.contains(SwingHandlerFlag.IGNORE_STAT_BOOSTS_ACCURACY)) diff --git a/Server/src/main/core/game/node/entity/combat/MeleeSwingHandler.kt b/Server/src/main/core/game/node/entity/combat/MeleeSwingHandler.kt index dc27df980..d755c269d 100644 --- a/Server/src/main/core/game/node/entity/combat/MeleeSwingHandler.kt +++ b/Server/src/main/core/game/node/entity/combat/MeleeSwingHandler.kt @@ -137,7 +137,7 @@ open class MeleeSwingHandler (vararg flags: SwingHandlerFlag) if(entity is Player && SkillcapePerks.isActive(SkillcapePerks.PRECISION_STRIKES, entity)){ //Attack skillcape perk effectiveAttackLevel += 6 } - effectiveAttackLevel *= getSetMultiplier(entity, Skills.ATTACK); + effectiveAttackLevel *= getSetMultiplier(entity, Skills.ATTACK) effectiveAttackLevel = floor(effectiveAttackLevel) if (!flags.contains(SwingHandlerFlag.IGNORE_STAT_BOOSTS_ACCURACY)) diff --git a/Server/src/main/core/game/node/entity/combat/RangeSwingHandler.kt b/Server/src/main/core/game/node/entity/combat/RangeSwingHandler.kt index 50f54ce04..325dd3f78 100644 --- a/Server/src/main/core/game/node/entity/combat/RangeSwingHandler.kt +++ b/Server/src/main/core/game/node/entity/combat/RangeSwingHandler.kt @@ -47,7 +47,7 @@ open class RangeSwingHandler (vararg flags: SwingHandlerFlag) distance += 2 } if (entity is Player) { - val rw = RangeWeapon.get(entity.getEquipment().getNew(EquipmentContainer.SLOT_WEAPON).getId()); + val rw = RangeWeapon.get(entity.getEquipment().getNew(EquipmentContainer.SLOT_WEAPON).getId()) if(rw != null && (rw.weaponType == WeaponType.DOUBLE_SHOT || rw.weaponType == WeaponType.DEGRADING)) { // Dark bow and crystal bow have a 10-square range, independent of whether longrange stance is used distance = 10 diff --git a/Server/src/main/core/game/node/entity/player/info/login/PlayerSaver.kt b/Server/src/main/core/game/node/entity/player/info/login/PlayerSaver.kt index 29b97f4cd..49cf921a3 100644 --- a/Server/src/main/core/game/node/entity/player/info/login/PlayerSaver.kt +++ b/Server/src/main/core/game/node/entity/player/info/login/PlayerSaver.kt @@ -102,7 +102,7 @@ class PlayerSaver (val player: Player){ for(key in player.gameAttributes.savedAttributes){ val value = player.gameAttributes.attributes[key] value ?: continue - val isExpirable = player.gameAttributes.keyExpirations.containsKey(key); + val isExpirable = player.gameAttributes.keyExpirations.containsKey(key) val attr = JSONObject() val type = when(value){ is Int -> "int" diff --git a/Server/src/main/core/game/shops/Shops.kt b/Server/src/main/core/game/shops/Shops.kt index bbd2b56f1..230f5e0b3 100644 --- a/Server/src/main/core/game/shops/Shops.kt +++ b/Server/src/main/core/game/shops/Shops.kt @@ -198,7 +198,7 @@ class Shops : StartupListener, TickListener, InteractionListener, InterfaceListe .enableOptions(0 until 9) .build() player.packetDispatch.sendIfaceSettings(settings, 0, 621, 0, 28) - player.packetDispatch.sendRunScript(150, "IviiiIsssssssss", "", "", "", "", "Sell X", "Sell 10", "Sell 5", "Sell 1", "Value", -1, 0, 7, 4, 93, 621 shl 16); + player.packetDispatch.sendRunScript(150, "IviiiIsssssssss", "", "", "", "", "Sell X", "Sell 10", "Sell 5", "Sell 1", "Value", -1, 0, 7, 4, 93, 621 shl 16) return@onOpen true } diff --git a/Server/src/main/core/game/system/command/MapDumpCommand.kt b/Server/src/main/core/game/system/command/MapDumpCommand.kt index 25fed543b..2743af899 100644 --- a/Server/src/main/core/game/system/command/MapDumpCommand.kt +++ b/Server/src/main/core/game/system/command/MapDumpCommand.kt @@ -50,7 +50,7 @@ class MapDumpCommand : CommandPlugin() { LocationObjectMap[value] = locations } } - return; + return } private fun findObj(player: Player?, args: List?) { @@ -76,7 +76,7 @@ class MapDumpCommand : CommandPlugin() { } } - return; + return } } } \ No newline at end of file diff --git a/Server/src/main/core/game/system/command/oldsys/VisualCommand.kt b/Server/src/main/core/game/system/command/oldsys/VisualCommand.kt index 7688d9820..458ac38e1 100644 --- a/Server/src/main/core/game/system/command/oldsys/VisualCommand.kt +++ b/Server/src/main/core/game/system/command/oldsys/VisualCommand.kt @@ -496,6 +496,6 @@ class VisualCommand : CommandPlugin() { return true }*/ } - return false; + return false } } diff --git a/Server/src/main/core/game/system/command/rottenpotato/RPUseWithPlayerDialogue.kt b/Server/src/main/core/game/system/command/rottenpotato/RPUseWithPlayerDialogue.kt index 8b0ae8fd0..f79fdfcd9 100644 --- a/Server/src/main/core/game/system/command/rottenpotato/RPUseWithPlayerDialogue.kt +++ b/Server/src/main/core/game/system/command/rottenpotato/RPUseWithPlayerDialogue.kt @@ -10,11 +10,11 @@ import core.plugin.Initializable * Rotten Potato -> Player interaction dialogue * @author Ceikry */ -class RPUseWithPlayerDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { +class RPUseWithPlayerDialogue(player: Player? = null) : DialoguePlugin(player) { var other: Player? = null val ID = 38575796 - override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin { + override fun newInstance(player: Player?): DialoguePlugin { return RPUseWithPlayerDialogue(player) } diff --git a/Server/src/main/core/game/system/command/rottenpotato/RottenPotatoOptionHandler.kt b/Server/src/main/core/game/system/command/rottenpotato/RottenPotatoOptionHandler.kt index d47a9cffa..3d825cac4 100644 --- a/Server/src/main/core/game/system/command/rottenpotato/RottenPotatoOptionHandler.kt +++ b/Server/src/main/core/game/system/command/rottenpotato/RottenPotatoOptionHandler.kt @@ -24,7 +24,7 @@ class RottenPotatoOptionHandler : OptionHandler() { for(option in ROTTEN_POTATO_OPTIONS) { ItemDefinition.forId(Items.ROTTEN_POTATO_5733).handlers["option:${option.toLowerCase()}"] = this } - return this; + return this } override fun handle(player: Player?, node: Node?, option: String?): Boolean { diff --git a/Server/src/main/core/game/system/command/sets/FunCommandSet.kt b/Server/src/main/core/game/system/command/sets/FunCommandSet.kt index 214512b43..42170e356 100644 --- a/Server/src/main/core/game/system/command/sets/FunCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/FunCommandSet.kt @@ -146,7 +146,7 @@ class FunCommandSet : CommandSet(Privilege.ADMIN) { */ define("dumpappearance", Privilege.MODERATOR){ player, _ -> val json = JSONObject() - PlayerSaver(player).saveAppearance(json); + PlayerSaver(player).saveAppearance(json) val equipJson = PlayerSaver(player).saveContainer(player.equipment) json["equipment"] = equipJson val jsonString = json.toJSONString() diff --git a/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt b/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt index 6c48e0362..752429b6d 100644 --- a/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/MiscCommandSet.kt @@ -596,7 +596,7 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){ } define("rules", Privilege.STANDARD, "", "Shows the rules."){ player, _ -> - RulesAndInfo.setBaseRulesAndInfo(player); + RulesAndInfo.setBaseRulesAndInfo(player) player.packetDispatch.sendInterfaceConfig(384, 17, true) openInterface(player, 384) } diff --git a/Server/src/main/core/game/system/command/sets/ModelViewerCommandSet.kt b/Server/src/main/core/game/system/command/sets/ModelViewerCommandSet.kt index bdef8ed1f..0d9074356 100644 --- a/Server/src/main/core/game/system/command/sets/ModelViewerCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/ModelViewerCommandSet.kt @@ -19,9 +19,9 @@ class ModelViewerCommandSet : CommandSet(Privilege.ADMIN) { const val ATTRIBUTE_YAW = "modelYaw" private fun display(player: Player, pageNum: Int, buttonID: Int) : Boolean { - BookInterface.clearBookLines(player, BookInterface.FANCY_BOOK_2_27, BookInterface.FANCY_BOOK_2_27_LINE_IDS); - BookInterface.clearButtons(player, BookInterface.FANCY_BOOK_2_27, BookInterface.FANCY_BOOK_2_27_BUTTON_IDS); - BookInterface.setTitle(player, BookInterface.FANCY_BOOK_2_27, BookInterface.FANCY_BOOK_2_27_LINE_IDS, TITLE); + BookInterface.clearBookLines(player, BookInterface.FANCY_BOOK_2_27, BookInterface.FANCY_BOOK_2_27_LINE_IDS) + BookInterface.clearButtons(player, BookInterface.FANCY_BOOK_2_27, BookInterface.FANCY_BOOK_2_27_BUTTON_IDS) + BookInterface.setTitle(player, BookInterface.FANCY_BOOK_2_27, BookInterface.FANCY_BOOK_2_27_LINE_IDS, TITLE) // Custom button interfaces for model book // These are non-standard. No pages are "turned" here. diff --git a/Server/src/main/core/game/system/config/ShopParser.kt b/Server/src/main/core/game/system/config/ShopParser.kt index f896e53ee..1546e3733 100644 --- a/Server/src/main/core/game/system/config/ShopParser.kt +++ b/Server/src/main/core/game/system/config/ShopParser.kt @@ -19,8 +19,8 @@ class ShopParser{ fun openUid(player: Player,uid: Int): Boolean { /* val shop = UID_SHOPS[uid] ?: return false; shop.open(player);*/ - return true; - } + return true +} } fun load(){ diff --git a/Server/src/main/core/game/system/timer/impl/SkillRestore.kt b/Server/src/main/core/game/system/timer/impl/SkillRestore.kt index 81c7e434c..f79fa09c8 100644 --- a/Server/src/main/core/game/system/timer/impl/SkillRestore.kt +++ b/Server/src/main/core/game/system/timer/impl/SkillRestore.kt @@ -9,7 +9,7 @@ import core.game.node.entity.skill.Skills import core.game.system.timer.* import core.game.event.* -import org.rs09.consts.Items; +import org.rs09.consts.Items class SkillRestore : RSTimer (1, "skillrestore", isAuto = true, isSoft = true) { val ticksSinceLastRestore = IntArray (25) @@ -28,7 +28,7 @@ class SkillRestore : RSTimer (1, "skillrestore", isAuto = true, isSoft = true) { val current = getDynLevel (entity, i) if (current != max) - skills.updateLevel (i, if (current < max) 1 else -1, max); + skills.updateLevel (i, if (current < max) 1 else -1, max) } ticksSinceLastRestore[i] = 0 } diff --git a/Server/src/main/core/game/system/timer/impl/Skulled.kt b/Server/src/main/core/game/system/timer/impl/Skulled.kt index 9723a4287..fee4474ab 100644 --- a/Server/src/main/core/game/system/timer/impl/Skulled.kt +++ b/Server/src/main/core/game/system/timer/impl/Skulled.kt @@ -1,10 +1,10 @@ package core.game.system.timer.impl -import core.api.* -import core.game.system.timer.* import core.game.node.entity.Entity import core.game.node.entity.player.Player -import org.json.simple.* +import core.game.system.timer.PersistTimer +import core.game.system.timer.RSTimer +import core.game.system.timer.TimerFlag class Skulled : PersistTimer (1, "skulled", flags = arrayOf(TimerFlag.ClearOnDeath)) { override fun onRegister (entity: Entity) { diff --git a/Server/src/main/core/game/system/timer/impl/Teleblock.kt b/Server/src/main/core/game/system/timer/impl/Teleblock.kt index 2a472f188..47f33a8d4 100644 --- a/Server/src/main/core/game/system/timer/impl/Teleblock.kt +++ b/Server/src/main/core/game/system/timer/impl/Teleblock.kt @@ -1,10 +1,11 @@ package core.game.system.timer.impl -import core.game.system.timer.* -import core.api.* +import core.api.sendMessage import core.game.node.entity.Entity import core.game.node.entity.player.Player -import org.json.simple.* +import core.game.system.timer.PersistTimer +import core.game.system.timer.RSTimer +import core.game.system.timer.TimerFlag class Teleblock : PersistTimer (1, "teleblock", flags = arrayOf(TimerFlag.ClearOnDeath)) { override fun run (entity: Entity) : Boolean { diff --git a/Server/src/main/core/game/world/DeadlockDetector.kt b/Server/src/main/core/game/world/DeadlockDetector.kt index 36d571e3d..f64d97ec6 100644 --- a/Server/src/main/core/game/world/DeadlockDetector.kt +++ b/Server/src/main/core/game/world/DeadlockDetector.kt @@ -7,7 +7,7 @@ import java.lang.management.ManagementFactory class DeadlockDetector : Runnable { override fun run() { - val mbean = ManagementFactory.getThreadMXBean(); + val mbean = ManagementFactory.getThreadMXBean() val deadLockedThreads = mbean.findDeadlockedThreads() diff --git a/Server/src/main/core/game/world/map/path/SmartPathfinder.kt b/Server/src/main/core/game/world/map/path/SmartPathfinder.kt index a8f6ec219..2dcae4a9c 100644 --- a/Server/src/main/core/game/world/map/path/SmartPathfinder.kt +++ b/Server/src/main/core/game/world/map/path/SmartPathfinder.kt @@ -289,7 +289,7 @@ internal constructor() : Pathfinder() { var queue = PriorityQueue(4096, UIntAsPointComparator(end)) queue.add(((curX.toUInt()) shl 8) or (curY.toUInt())) while(!foundPath && !queue.isEmpty()) { - val point = queue.poll(); + val point = queue.poll() val curCost = ((point and 0xff0000u) shr 16).toInt() curX = ((point and 0x0000ff00u) shr 8).toInt() curY = (point and 0x000000ffu).toInt() @@ -324,7 +324,7 @@ internal constructor() : Pathfinder() { if(0 <= newSceneX && newSceneX < 104 && 0 <= newSceneY && newSceneY < 104 && via[newSceneX][newSceneY] == 0) { if(dir.canMoveFrom(z, absX, absY, clipMaskSupplier)) { val diagonalPenalty = Math.abs(dir.stepX) + Math.abs(dir.stepY) - 1 - val flag = flagForDirection(dir); + val flag = flagForDirection(dir) check(newSceneX, newSceneY, flag, newCost, diagonalPenalty) if(via[newSceneX][newSceneY] == flag) { queue.add(((newCost + diagonalPenalty).toUInt() shl 16) or (newSceneX.toUInt() shl 8) or newSceneY.toUInt()) diff --git a/Server/src/main/core/game/world/repository/DisconnectionQueue.kt b/Server/src/main/core/game/world/repository/DisconnectionQueue.kt index 58d9fdd22..b1fcf12ea 100644 --- a/Server/src/main/core/game/world/repository/DisconnectionQueue.kt +++ b/Server/src/main/core/game/world/repository/DisconnectionQueue.kt @@ -113,7 +113,7 @@ class DisconnectionQueue { fun add(player: Player, clear: Boolean = false) { if(queue[player.name] != null) return queue[player.name] = DisconnectionEntry(player, clear) - log(this::class.java, Log.INFO, "Queueing ${player.name} for disconnection."); + log(this::class.java, Log.INFO, "Queueing ${player.name} for disconnection.") } operator fun contains(name: String?): Boolean { diff --git a/Server/src/main/core/game/world/repository/Repository.kt b/Server/src/main/core/game/world/repository/Repository.kt index 0d2e73fbc..575bcb0f2 100644 --- a/Server/src/main/core/game/world/repository/Repository.kt +++ b/Server/src/main/core/game/world/repository/Repository.kt @@ -143,7 +143,7 @@ object Repository { val oldPl = players[i] players.remove(oldPl) oldPl.clear() - break; + break } } } diff --git a/Server/src/main/core/game/world/update/flag/EFlagProvider.kt b/Server/src/main/core/game/world/update/flag/EFlagProvider.kt index 4c11308b9..8f9094590 100644 --- a/Server/src/main/core/game/world/update/flag/EFlagProvider.kt +++ b/Server/src/main/core/game/world/update/flag/EFlagProvider.kt @@ -11,8 +11,8 @@ enum class EFlagType { NPC; companion object { @JvmStatic fun of (e: Entity) : EFlagType { - if (e is core.game.node.entity.player.Player) return EFlagType.Player - else return EFlagType.NPC + if (e is core.game.node.entity.player.Player) return Player + else return NPC } } } diff --git a/Server/src/main/core/game/worldevents/holiday/easter/EasterBunnyDialogueFile.kt b/Server/src/main/core/game/worldevents/holiday/easter/EasterBunnyDialogueFile.kt index 27969e6e8..d8b1d98cb 100644 --- a/Server/src/main/core/game/worldevents/holiday/easter/EasterBunnyDialogueFile.kt +++ b/Server/src/main/core/game/worldevents/holiday/easter/EasterBunnyDialogueFile.kt @@ -16,12 +16,12 @@ class EasterBunnyDialogueFile(val NEED_BASKET : Boolean) : DialogueFile() { if(NEED_BASKET){ when(stage++){ 0 -> npc("Hello, adventurer! Thank goodness you're here!") - 1 -> player(core.game.dialogue.FacialExpression.THINKING,"Thanks goodness I'M here?") + 1 -> player(FacialExpression.THINKING,"Thanks goodness I'M here?") 2 -> npc("Yes, yes, I need your help, you see!") 3 -> npc("I have lost ALL of my eggs. What a terrible thing.") 4 -> npc("Us easter bunnies rely on EGGS to live.") 5 -> npc("Take this basket, please, and do me a kindness.") - 6 -> player(core.game.dialogue.FacialExpression.THINKING,"What kindness might that be?") + 6 -> player(FacialExpression.THINKING,"What kindness might that be?") 7 -> npc("I need you to try and gather up as many of my","lost eggs as you can.") 8 -> npc("Please, for me? I will reward you for your time.") 9 -> player("Fine, I suppose I will.") @@ -39,8 +39,8 @@ class EasterBunnyDialogueFile(val NEED_BASKET : Boolean) : DialogueFile() { when (stage) { 0 -> options("Ask about rewards", "Ask about egg location").also { stage++ } 1 -> when (buttonID) { - 1 -> player(core.game.dialogue.FacialExpression.THINKING, "What kind of rewards can I claim?").also { stage = 10 } - 2 -> player(core.game.dialogue.FacialExpression.THINKING, "Where were some eggs last seen?").also { stage = 20 } + 1 -> player(FacialExpression.THINKING, "What kind of rewards can I claim?").also { stage = 10 } + 2 -> player(FacialExpression.THINKING, "Where were some eggs last seen?").also { stage = 20 } } 10 -> { diff --git a/Server/src/main/core/net/packet/in/Decoders530.kt b/Server/src/main/core/net/packet/in/Decoders530.kt index 70fcc6e89..6181f25dd 100644 --- a/Server/src/main/core/net/packet/in/Decoders530.kt +++ b/Server/src/main/core/net/packet/in/Decoders530.kt @@ -755,7 +755,7 @@ enum class Decoders530(val opcode: Int) { val showGroundDeco = (prefs shr 5) and 1 == 1 val selectiveRoofs = (prefs shr 4) and 1 == 1 val allLayersVisible = (prefs shr 3) and 1 == 1 - val brightness = prefs and 0x7; + val brightness = prefs and 0x7 //added in the above so that we don't have to figure it out later, not doing more //because we currently have genuinely no use for this information. return Packet.PlayerPrefsUpdate(player, prefs) diff --git a/Server/src/main/core/net/packet/in/Login.kt b/Server/src/main/core/net/packet/in/Login.kt index 02f89076b..df243d9d6 100644 --- a/Server/src/main/core/net/packet/in/Login.kt +++ b/Server/src/main/core/net/packet/in/Login.kt @@ -130,7 +130,7 @@ object Login { fun proceedWith(session: IoSession, details: PlayerDetails, opcode: Int) { if (Repository.uid_map.contains(details.uid)) { session.write(AuthResponse.AlreadyOnline) - return; + return } details.session = session details.info.translate(UIDInfo(details.ipAddress, "DEPRECATED", "DEPRECATED", "DEPRECATED")) diff --git a/Server/src/main/core/plugin/ClassScanner.kt b/Server/src/main/core/plugin/ClassScanner.kt index 857e46f7d..30bea7201 100644 --- a/Server/src/main/core/plugin/ClassScanner.kt +++ b/Server/src/main/core/plugin/ClassScanner.kt @@ -150,7 +150,7 @@ object ClassScanner { definePlugin(clazz) } } catch (t: Throwable) { - log(this::class.java, Log.ERR, "Failed to load plugin ${p.name}."); + log(this::class.java, Log.ERR, "Failed to load plugin ${p.name}.") if (t is NoSuchMethodException && p.superclass.simpleName == core.game.dialogue.DialoguePlugin::class.simpleName) { log(this::class.java, Log.ERR, diff --git a/Server/src/test/kotlin/TestUtils.kt b/Server/src/test/kotlin/TestUtils.kt index 9d7b750bf..b8d8d45cd 100644 --- a/Server/src/test/kotlin/TestUtils.kt +++ b/Server/src/test/kotlin/TestUtils.kt @@ -49,7 +49,7 @@ object TestUtils { val p = MockPlayer(name, isBot) p.ironmanManager.mode = ironman p.details.accountInfo.uid = uidCounter++ - p.setPlaying(true); + p.setPlaying(true) p.playerFlags.lastSceneGraph = p.location ?: ServerConstants.HOME_LOCATION Repository.addPlayer(p) //Update sequence has a separate list of players for some reason... diff --git a/Server/src/test/kotlin/core/PathfinderTests.kt b/Server/src/test/kotlin/core/PathfinderTests.kt index 1b701d133..f38eecb68 100644 --- a/Server/src/test/kotlin/core/PathfinderTests.kt +++ b/Server/src/test/kotlin/core/PathfinderTests.kt @@ -108,7 +108,7 @@ class PathfinderTests { npc.init() GameWorld.Pulser.submit(object : MovementPulse(p, npc) { override fun pulse(): Boolean { - return true; + return true } }) TestUtils.advanceTicks(10, false) @@ -124,7 +124,7 @@ class PathfinderTests { npc.init() GameWorld.Pulser.submit(object : MovementPulse(p, npc) { override fun pulse(): Boolean { - return true; + return true } }) TestUtils.advanceTicks(10, false) @@ -141,7 +141,7 @@ class PathfinderTests { npc.init() GameWorld.Pulser.submit(object : MovementPulse(p, npc, DestinationFlag.ENTITY) { override fun pulse(): Boolean { - return true; + return true } }) TestUtils.advanceTicks(10, false) diff --git a/Server/src/test/kotlin/core/auth/DevelopmentAuthenticatorTests.kt b/Server/src/test/kotlin/core/auth/DevelopmentAuthenticatorTests.kt index 05e8051af..e14efb11e 100644 --- a/Server/src/test/kotlin/core/auth/DevelopmentAuthenticatorTests.kt +++ b/Server/src/test/kotlin/core/auth/DevelopmentAuthenticatorTests.kt @@ -1,11 +1,8 @@ package core.auth +import core.storage.InMemoryStorageProvider import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test -import core.auth.DevelopmentAuthenticator -import core.auth.AuthResponse -import core.auth.UserAccountInfo -import core.storage.InMemoryStorageProvider class DevelopmentAuthenticatorTests { private val authProvider = DevelopmentAuthenticator()