From c0f23136607375035d0468ba0a981d06fc90b589 Mon Sep 17 00:00:00 2001 From: aka MrSlayerGod <31116755+MrSlayerGod@users.noreply.github.com> Date: Tue, 14 Apr 2026 12:43:18 +0100 Subject: [PATCH 1/2] wip adding shilo npc dialogue and shops etc --- .../area/karamja/shilo_village/Fernahei.kt | 26 ++++++++ .../area/karamja/shilo_village/Yohnus.kt | 65 +++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 game/src/main/kotlin/content/area/karamja/shilo_village/Fernahei.kt create mode 100644 game/src/main/kotlin/content/area/karamja/shilo_village/Yohnus.kt diff --git a/game/src/main/kotlin/content/area/karamja/shilo_village/Fernahei.kt b/game/src/main/kotlin/content/area/karamja/shilo_village/Fernahei.kt new file mode 100644 index 0000000000..bcb1a99770 --- /dev/null +++ b/game/src/main/kotlin/content/area/karamja/shilo_village/Fernahei.kt @@ -0,0 +1,26 @@ +package content.area.karamja.shilo_village + +import content.entity.npc.shop.openShop +import content.entity.player.dialogue.Happy +import content.entity.player.dialogue.Neutral +import content.entity.player.dialogue.type.choice +import content.entity.player.dialogue.type.npc +import world.gregs.voidps.engine.Script + + +class Fernahei : Script { + + init { + npcOperate("Talk-to", "fernahei_shilo_village") { + npc("Welcome to Fernahei's Fishing Shop Bwana! Would you like to see my items?") + choice { + option("Yes please!") { + openShop("fernaheis_fishing_hut") + } + option("No, but thanks for the offer.") { + npc("That's fine and thanks for your interest.") + } + } + } + } +} \ No newline at end of file diff --git a/game/src/main/kotlin/content/area/karamja/shilo_village/Yohnus.kt b/game/src/main/kotlin/content/area/karamja/shilo_village/Yohnus.kt new file mode 100644 index 0000000000..7ea3a1d3f0 --- /dev/null +++ b/game/src/main/kotlin/content/area/karamja/shilo_village/Yohnus.kt @@ -0,0 +1,65 @@ +package content.area.karamja.shilo_village + +import content.entity.obj.door.enterDoor +import content.entity.player.dialogue.Happy +import content.entity.player.dialogue.Neutral +import content.entity.player.dialogue.Quiz +import content.entity.player.dialogue.type.choice +import content.entity.player.dialogue.type.npc +import content.entity.player.dialogue.type.player +import world.gregs.voidps.engine.Script +import world.gregs.voidps.engine.inv.inventory +import world.gregs.voidps.engine.inv.transact.TransactionError +import world.gregs.voidps.engine.inv.transact.operation.RemoveItem.remove + +class Yohnus : Script { + + init { + + npcOperate("Talk-to", "yohnus_shilo_village") { + npc("Sorry but the blacksmiths is closed. But I can let you use the furnace at the cost of 20 gold pieces.") + choice { + option("Use Furnace - 20 Gold") { + inventory.transaction { + remove("coins", 20) + } + when (inventory.transaction.error) { + TransactionError.None -> { + npc("Thanks Bwana! Enjoy the facilities!") + } + else -> npc("Sorry, you don't have enough coins.") + } + } + option("No thanks!") { + player("No thanks!") + npc("Very well Bwana, have a nice day.") + } + } + } + objectOperate("Open", "blacksmiths_door_closed") { (target) -> + if (tile.y >= target.tile.y) { + enterDoor(target) + return@objectOperate + } + if (!inventory.contains("coins", 20)) { + npc( + "yohnus_shilo_village", + "Sorry but the blacksmiths is closed. But I can let you use the furnace at the cost of 20 gold pieces." + ) + return@objectOperate + } + inventory.transaction { + remove("coins", 20) + } + when (inventory.transaction.error) { + TransactionError.None -> { + npc("yohnus_shilo_village", "Thanks Bwana! Enjoy the facilities!") + enterDoor(target) + } + else -> { + npc("yohnus_shilo_village", "Sorry, you don't have enough coins.") + } + } + } + } +} \ No newline at end of file From 6b88cbd92e940230c57de7e8c56a696984732250 Mon Sep 17 00:00:00 2001 From: aka MrSlayerGod <31116755+MrSlayerGod@users.noreply.github.com> Date: Wed, 29 Apr 2026 13:14:11 +0100 Subject: [PATCH 2/2] updated dialogues --- .../content/area/karamja/shilo_village/Fernahei.kt | 11 +++++++++++ .../content/area/karamja/shilo_village/Yohnus.kt | 3 +-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/game/src/main/kotlin/content/area/karamja/shilo_village/Fernahei.kt b/game/src/main/kotlin/content/area/karamja/shilo_village/Fernahei.kt index bcb1a99770..26e3c0326e 100644 --- a/game/src/main/kotlin/content/area/karamja/shilo_village/Fernahei.kt +++ b/game/src/main/kotlin/content/area/karamja/shilo_village/Fernahei.kt @@ -3,9 +3,12 @@ package content.area.karamja.shilo_village import content.entity.npc.shop.openShop import content.entity.player.dialogue.Happy import content.entity.player.dialogue.Neutral +import content.entity.player.dialogue.Shifty import content.entity.player.dialogue.type.choice import content.entity.player.dialogue.type.npc import world.gregs.voidps.engine.Script +import world.gregs.voidps.engine.entity.character.player.equip.equipped +import world.gregs.voidps.network.login.protocol.visual.update.player.EquipSlot class Fernahei : Script { @@ -21,6 +24,14 @@ class Fernahei : Script { npc("That's fine and thanks for your interest.") } } + npcOperate("Trade", "fernahei_shilo_village") { + val amulet = equipped(EquipSlot.Amulet) + if (amulet.id == "monkeyspeak_amulet") { + openShop("dagas_scimitar_smithy") + } else { + npc("Ook! Ah Uh Ah! Ook Ook! Ah!") + } + } } } } \ No newline at end of file diff --git a/game/src/main/kotlin/content/area/karamja/shilo_village/Yohnus.kt b/game/src/main/kotlin/content/area/karamja/shilo_village/Yohnus.kt index 7ea3a1d3f0..ee3c33ff81 100644 --- a/game/src/main/kotlin/content/area/karamja/shilo_village/Yohnus.kt +++ b/game/src/main/kotlin/content/area/karamja/shilo_village/Yohnus.kt @@ -15,7 +15,6 @@ import world.gregs.voidps.engine.inv.transact.operation.RemoveItem.remove class Yohnus : Script { init { - npcOperate("Talk-to", "yohnus_shilo_village") { npc("Sorry but the blacksmiths is closed. But I can let you use the furnace at the cost of 20 gold pieces.") choice { @@ -37,7 +36,7 @@ class Yohnus : Script { } } objectOperate("Open", "blacksmiths_door_closed") { (target) -> - if (tile.y >= target.tile.y) { + if (tile.y > target.tile.y) { enterDoor(target) return@objectOperate }