Skip to content

Instantly share code, notes, and snippets.

@Jire
Created August 11, 2017 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jire/9c0df21f28f9aa8356027d7e6e1d8ec7 to your computer and use it in GitHub Desktop.
Save Jire/9c0df21f28f9aa8356027d7e6e1d8ec7 to your computer and use it in GitHub Desktop.
Example of Eden's dialogues with macros"
package plugin.activity.theinferno
import modules.dialogue.NPCDialogue
import modules.dialogue.Stages
import ps.eden.server.plugin.InitializablePlugin
/**
* @author Jire
*/
@InitializablePlugin
class TzHaarKetKehDialogue : NPCDialogue(107690) {
override fun Stages.define() {
1 npc "Yes. JalYt-Ket-Xo-${player.username}?"
2 options "What is this place?" - "What happened here?" - "Can I go down there?" - "Nevermind"
3 {
when (buttonID) {
1 -> { player("What is this place?"); 4 }
2 -> { player("What happened here?"); 8 }
3 -> { player("Can I go down there?"); 25 }
else -> { player("Nevermind."); END_STAGE }
}
}
4 npc "This is our birthing pool. TzHaar are born form eggs" - "incubated in this large pool here."
5 player "Something doesn't seem right... There's a large opening." - 1
6 npc "We went too far... way too far, we need the memories." - "JalYt would not understand."
7 player "Please help me to understand then."
8 npc """We TzHaar have special ability. When incubated in lava,
a hatched TzHaar retains knowledge and memories of",
ancestors who returned to the lava."""
9 npc "Not all memories though, those about earliest ancestors" - "were not being retained. We experiment."
10 npc """We increased the depth at which the eggs are
incubated. Over time this worked, newly hatched Tzhaar
had more memories of lost history!"""
11 player "That sounds fantastic though, uncovering the past to" - "determine where your species originated?"
12 npc "Yes, but you JalYt do not understand, we kept pushing" - "it. We wanted answers, but too deep we went."
13 npc """Eventually the pool collapsed into a sink hole, huge
inferno there. This was a big ancient incubation chamber."""
14 npc """We hatched eggs in there and it was not a good
decision. They were so different, bigger, stronger and
fought each other for dominance."""
15 npc """Instead of knowledge, we now have a prison of
dangerous TzHaar creatures... and they're not under
our control."""
16 npc """One grew incredibly strong, powerful, he controls those
creatures in the prison and TzKal-Zuk, as we call him
is hungry."""
17 npc "Hungry for memories, memories beyond the Inferno," - "which only TzHaar on surface can provide."
18 player "Do you know what he's planning? What are you doing?"
19 npc """We can only guess one day he will want to scale up
onto the surface himself. We are keeping him at bay by
offering sacrifices for him to feast on."""
20 player "Is there no way to take him out?"
21 {
if (player.getAttribute("sacrificed-fire-cape", false))
npc("We hoped you, with your fancy JalYt weaponry would",
"be our best hope. You proved your commitment by",
"sacrificing your fire cape.")
else npc("We hoped you, with your fancy JalYt weaponry would",
"be our best hope.")
START_STAGE
}
22 {
if (player.getAttribute("sacrificed-fire-cape", false)) {
npc("You can head into The Inferno anytime. We trust you",
"to help us JalYt-Ket-Xo-${player.username}.")
23
} else {
npc("In order to enter The Inferno, you must",
"sacrifice a Fire cape to gain heat-resistant",
"properties.")
24
}
}
23 player "I'll do my best." - START_STAGE
24 options "<u>Permanently</u> sacrifice your Fire cape" - "Cancel"
25 {
if (buttonID == 1) {
if (player.inventory.remove(6570) || player.equipment.remove(6570)) {
player.setAttribute("/save:sacrificed-fire-cape", true)
player.dialogueInterpreter.sendItemMessage(6570, "You sacrifice your Fire cape in order",
"to gain heat-resistant properties.")
26
} else {
npc("You do not have a Fire cape to sacrifice, JalYt.")
START_STAGE
}
} else end()
}
26 npc "Congratulations JalYt." - "You now have access to The Inferno." - START_STAGE
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment