Skip to content

wip adding shilo npc dialogue and shops etc#950

Open
MrSlayerGod wants to merge 9 commits into
GregHib:mainfrom
MrSlayerGod:main
Open

wip adding shilo npc dialogue and shops etc#950
MrSlayerGod wants to merge 9 commits into
GregHib:mainfrom
MrSlayerGod:main

Conversation

@MrSlayerGod

Copy link
Copy Markdown
Contributor

complete dialogue
Fernahei

WIP dialogue
Yohnus

npc<Quiz>(
"yohnus_shilo_village",
"Sorry but the blacksmiths is closed. But I can let you use the furnace at the cost of 20 gold pieces."
)

@GregHib GregHib Jul 3, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably go to the choice dialogue here or the dialogue should be something different?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the (Continues above.) means it'll show the choice dialogue

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what needs to change and what needs to move then thanks ?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull out the other dialogue into a method:

suspend fun Player.furnace() {
npc<Neutral>("Sorry but the blacksmiths is closed. But I can let you use the furnace at the cost of 20 gold pieces.")
            choice {
                option<Neutral>("Use Furnace - 20 Gold") {
                    inventory.transaction {
                        remove("coins", 20)
                    }
                    when (inventory.transaction.error) {
                        TransactionError.None -> {
                            this["yohnus_paid"] = true
                            npc<Happy>("Thanks Bwana! Enjoy the facilities!")
                        }
                        else -> npc<Neutral>("Sorry, you don't have enough coins.")
                    }
                }
                option<Neutral>("No thanks!") {
                    player<Neutral>("No thanks!")
                    npc<Neutral>("Very well Bwana, have a nice day.")
                }
            }
}

And call that here with

talkWith(NPCs.findBySpawn(Tile(2857, 2963), "yohnus_shilo_village")
furnace()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants