Merge branch 'jatizso-audit-add-dialogues' into 'master'

Jatizso audit add dialogues

See merge request 2009scape/2009scape!122
This commit is contained in:
Ceikry
2021-07-09 03:06:43 +00:00
11 changed files with 312 additions and 790 deletions
-746
View File
@@ -46283,752 +46283,6 @@
}
]
},
{
"default": [
{
"minAmount": "1",
"weight": "100.0",
"id": "532",
"maxAmount": "1"
}
],
"charm": [
{
"minAmount": "1",
"weight": "100.0",
"id": "12158",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "12159",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "12160",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "12163",
"maxAmount": "1"
}
],
"ids": "",
"description": "moved ID's to runt",
"main": [
{
"minAmount": "1",
"weight": "25.0",
"id": "1145",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "1181",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "3122",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1161",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1119",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1141",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "1341",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "1357",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1347",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "830",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1345",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1343",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1339",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "807",
"maxAmount": "1"
},
{
"minAmount": "10",
"weight": "50.0",
"id": "557",
"maxAmount": "60"
},
{
"minAmount": "4",
"weight": "25.0",
"id": "561",
"maxAmount": "10"
},
{
"minAmount": "3",
"weight": "5.0",
"id": "563",
"maxAmount": "3"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "199",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "201",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "203",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "205",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "209",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "207",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "215",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "213",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "2485",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "217",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5321",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5311",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5100",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5323",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5105",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5293",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5296",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5292",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5294",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5297",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5299",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5280",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5281",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5104",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "5295",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "5303",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "5302",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "995",
"maxAmount": "1"
},
{
"minAmount": "10",
"weight": "50.0",
"id": "402",
"maxAmount": "10"
},
{
"minAmount": "10",
"weight": "50.0",
"id": "1760",
"maxAmount": "41"
},
{
"minAmount": "3",
"weight": "25.0",
"id": "354",
"maxAmount": "3"
},
{
"minAmount": "3",
"weight": "25.0",
"id": "454",
"maxAmount": "3"
},
{
"minAmount": "2",
"weight": "5.0",
"id": "384",
"maxAmount": "8"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "10976",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "10977",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "31",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "0",
"maxAmount": "1"
}
]
},
{
"default": [
{
"minAmount": "1",
"weight": "100.0",
"id": "532",
"maxAmount": "1"
}
],
"charm": [
{
"minAmount": "1",
"weight": "100.0",
"id": "12158",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "12159",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "12160",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "12163",
"maxAmount": "1"
}
],
"ids": "",
"description": "moved ID's to runt",
"main": [
{
"minAmount": "1",
"weight": "50.0",
"id": "1341",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "1339",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "1141",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "1343",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "1181",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1347",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1357",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1345",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "3122",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1161",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1145",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1121",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1119",
"maxAmount": "1"
},
{
"minAmount": "8",
"weight": "50.0",
"id": "557",
"maxAmount": "60"
},
{
"minAmount": "5",
"weight": "25.0",
"id": "561",
"maxAmount": "7"
},
{
"minAmount": "2",
"weight": "25.0",
"id": "563",
"maxAmount": "2"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5291",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5292",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5293",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5294",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5281",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5296",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5297",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5311",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5105",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5298",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5299",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5301",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5302",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5303",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5100",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5323",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5321",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5280",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5104",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "5295",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "12176",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "199",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "201",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "203",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "205",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "207",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "209",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "211",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "213",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "215",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "2485",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "217",
"maxAmount": "1"
},
{
"minAmount": "35",
"weight": "50.0",
"id": "995",
"maxAmount": "300"
},
{
"minAmount": "2",
"weight": "5.0",
"id": "384",
"maxAmount": "8"
},
{
"minAmount": "13",
"weight": "5.0",
"id": "454",
"maxAmount": "13"
},
{
"minAmount": "4",
"weight": "50.0",
"id": "402",
"maxAmount": "10"
},
{
"minAmount": "10",
"weight": "50.0",
"id": "1760",
"maxAmount": "41"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "10976",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "10977",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "31",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "0",
"maxAmount": "1"
}
]
},
{
"default": [
{
+12
View File
@@ -10651,6 +10651,10 @@
"npc_id": "5497",
"loc_data": "{2376,10198,0,1,0}-{2384,10202,0,1,0}-{2390,10207,0,1,0}-{2385,10193,0,1,0}-{2419,10192,0,1,0}-{2412,10200,0,1,0}"
},
{
"npc_id": "5498",
"loc_data": "{2412,3818,0,1,0}-{2412,3801,0,1,0}-{2392,3802,0,1,0}"
},
{
"npc_id": "5474",
"loc_data": "{2390,10216,0,1,0}-{2417,10228,0,1,0}-{2385,10227,0,1,0}"
@@ -10662,5 +10666,13 @@
{
"npc_id": "5473",
"loc_data": "{2377,10212,0,1,0}-{2392,10226,0,1,0}-{2407,10228,0,1,0}-{2406,10214,0,1,0}-{2420,10214,0,1,0}"
},
{
"npc_id": "5491",
"loc_data": "{2387,3800,0,0,3}-{2411,3795,0,0,6}-{2417,3825,0,0,1}"
},
{
"npc_id": "5492",
"loc_data": "{2387,3797,0,0,3}-{2414,3825,0,0,1}-{2414,3795,0,0,6}"
}
]
@@ -1,5 +1,6 @@
package rs09.game.content.dialogue
import api.DialUtils.splitLines
import core.game.component.Component
import core.game.content.dialogue.DialogueInterpreter
import core.game.content.dialogue.DialoguePlugin
@@ -56,6 +57,24 @@ abstract class DialogueFile {
return interpreter!!.sendDialogues(player, expression, *messages)
}
/**
* Use the automatic linesplitting feature in DialUtils to produce npc dialogues
* @param expr the FacialExpression to use, located in the FacialExpression enum.
* @param msg the message for the NPC to say
*/
open fun npcl(expr: FacialExpression?, msg: String?): Component? {
return npc(expr, *splitLines(msg!!))
}
/**
* Use the automatic linesplitting feature in DialUtils to produce player dialogues
* @param expr the FacialExpression to use, located in the FacialExpression enum.
* @param msg the message for the player to say
*/
open fun playerl(expr: FacialExpression?, msg: String?): Component? {
return player(expr, *splitLines(msg!!))
}
fun end(){
if(interpreter != null) interpreter!!.close()
}
@@ -1,41 +0,0 @@
package rs09.game.content.dialogue
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.plugin.Initializable
/**
* Dialogue for Lensa on Jaitizso
* @author qmqz
*/
@Initializable
class LensaDialogue(player: Player? = null) : DialoguePlugin(player){
fun gender (male : String = "brother", female : String = "sister") = if (player.isMale) male else female
override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC
player(FacialExpression.FRIENDLY,"Hello.")
stage = 0
return true
}
//should say [Fremennik name] after gender, but this is not yet implemented
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
0 -> npc(FacialExpression.FURIOUS,"My apologies " + gender() + "!", "I have not time to tarry here with you!").also { stage++ }
1 -> player(FacialExpression.AFRAID,"That's okay, I didn't really want anything.").also { stage = 99 }
99 -> end()
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return LensaDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(5494)
}
}
@@ -0,0 +1,58 @@
package rs09.game.content.dialogue.area.jatizso
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.NPCs
import rs09.tools.END_DIALOGUE
@Initializable
class CitizenDialogue(player: Player? = null) : DialoguePlugin(player) {
val stages = intArrayOf(0, 100, 200, 300)
override fun newInstance(player: Player?): DialoguePlugin {
return CitizenDialogue(player)
}
override fun open(vararg args: Any?): Boolean {
stage = stages.random()
handle(0,0)
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
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(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(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(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
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.LENSA_5494, NPCs.SASSILIK_5496, NPCs.FREYGERD_5493)
}
}
@@ -0,0 +1,31 @@
package rs09.game.content.dialogue.area.jatizso
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.NPCs
import rs09.tools.END_DIALOGUE
@Initializable
class EricDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun newInstance(player: Player?): DialoguePlugin {
return EricDialogue(player)
}
override fun open(vararg args: Any?): Boolean {
npcl(FacialExpression.HALF_GUILTY, "Spare us a few coppers mister")
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
playerl(FacialExpression.ANGRY, "NO!")
stage = END_DIALOGUE
return true
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.ERIC_5499)
}
}
@@ -0,0 +1,34 @@
package rs09.game.content.dialogue.area.jatizso
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.NPCs
import rs09.tools.END_DIALOGUE
@Initializable
class GruvaPatrullDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun newInstance(player: Player?): DialoguePlugin {
return GruvaPatrullDialogue(player)
}
override fun open(vararg args: Any?): Boolean {
npcl(FacialExpression.FRIENDLY,"Ho! Outerlander.")
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
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
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.GRUVA_PATRULL_5500)
}
}
@@ -0,0 +1,32 @@
package rs09.game.content.dialogue.area.jatizso
import api.DialUtils
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import org.rs09.consts.NPCs
import rs09.game.content.dialogue.DialogueFile
import rs09.tools.END_DIALOGUE
class LeftieRightieDialogue() : DialogueFile() {
val rightie = NPCs.GUARD_5491
val leftie = NPC(NPCs.GUARD_5492)
override fun handle(componentID: Int, buttonID: Int) {
when(stage){
0 -> npcl(FacialExpression.NEUTRAL, "Are you all right? Leftie?").also { stage++ }
1 -> npc2("No, I'm on the left.").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(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(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(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, FacialExpression.NEUTRAL, *DialUtils.splitLines(messages))
}
}
@@ -0,0 +1,62 @@
package rs09.game.content.dialogue.area.jatizso
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.NPCs
import rs09.game.content.dialogue.DialogueFile
import rs09.tools.END_DIALOGUE
@Initializable
class MinerDialogue(player: Player? = null) : DialoguePlugin(player) {
val stages = intArrayOf(0, 100, 200, 300, 400, 500)
override fun newInstance(player: Player?): DialoguePlugin {
return MinerDialogue(player)
}
override fun open(vararg args: Any?): Boolean {
stage = stages.random()
handle(0,0)
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
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(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(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(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(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(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
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.MINER_5497, NPCs.MINER_5498)
}
}
@@ -0,0 +1,52 @@
package rs09.game.content.dialogue.area.jatizso
import core.game.content.dialogue.DialoguePlugin
import core.game.content.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 rs09.game.interaction.InteractionListener
import rs09.game.interaction.InteractionListeners
import rs09.tools.END_DIALOGUE
@Initializable
class TowerGuardDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun newInstance(player: Player?): DialoguePlugin {
return TowerGuardDialogue(player)
}
override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC
playerl(FacialExpression.HALF_ASKING, "What are you doing here?")
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
0 -> npc(FacialExpression.NEUTRAL, "I'M ON SHOUTING DUTY!").also { stage++ }
1 -> playerl(FacialExpression.HALF_THINKING, "No need to shout.").also { stage++ }
2 -> npc(FacialExpression.NEUTRAL, "I'M SORRY I'VE BEEN SHOUTING","INSULTS SO LONG I CAN'T HELP IT!").also { stage++ }
3 -> playerl(FacialExpression.HALF_THINKING, "Who are you insulting?").also { stage++ }
4 -> npc(FacialExpression.NEUTRAL, "THE TOWER IN NEITIZNOT.","THEY SHOUT INSULTS BACK.").also { stage++ }
5 -> playerl(FacialExpression.ASKING, "Err, why?" ).also { stage++ }
6 -> npc(FacialExpression.NEUTRAL, "THE KING TELLS US TO.").also { stage++ }
7 -> playerl(FacialExpression.HALF_THINKING, "Your King is a strange person.").also { stage++ }
8 -> options("Can I watch? I'm curious.", "Oh well, I'd better get going.").also { stage++ }
9 -> when(buttonId){
1 -> playerl(FacialExpression.ASKING, "Can I watch? I'm curious.").also { stage++ }
2 -> npcl(FacialExpression.HALF_THINKING, "Oh well, I'd better get going.").also { stage = END_DIALOGUE }
}
10 -> npcl(FacialExpression.NEUTRAL, "IF YOU LIKE!").also {
stage = END_DIALOGUE
InteractionListeners.run(NPCs.GUARD_5489, InteractionListener.NPC, "watch-shouting", player, npc)
}
}
return true
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.GUARD_5489)
}
}
@@ -1,6 +1,7 @@
package rs09.game.interaction.region
import api.ContentAPI
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.link.audio.Audio
import core.game.system.task.Pulse
import core.game.world.map.Direction
@@ -8,6 +9,7 @@ import core.game.world.map.Location
import core.game.world.map.zone.ZoneBorders
import org.rs09.consts.NPCs
import rs09.game.camerautils.PlayerCamera
import rs09.game.content.dialogue.area.jatizso.LeftieRightieDialogue
import rs09.game.interaction.InteractionListener
class JatizsoListeners : InteractionListener() {
@@ -16,6 +18,7 @@ class JatizsoListeners : InteractionListener() {
val WEST_GATE_ZONE = ZoneBorders(2386,3797,2390,3801)
val SOUTH_GAE_ZONE = ZoneBorders(2411,3795,2414,3799)
val BELL = 21394
val GUARDS = intArrayOf(NPCs.GUARD_5491, NPCs.GUARD_5492)
val LINES = arrayOf(
arrayOf(
"YOU WOULDN'T KNOW HOW TO FIGHT A TROLL IF IT CAME UP AND BIT YER ARM OFF",
@@ -73,9 +76,10 @@ class JatizsoListeners : InteractionListener() {
}
on(NPCs.GUARD_5489, NPC, "watch-shouting"){player, node ->
val local = ContentAPI.findLocalNPC(player, node.id)
ContentAPI.lock(player, 200)
ContentAPI.face(node.asNpc(), Location.create(2371, 3801, 2))
node.asNpc().isRespawn = false
ContentAPI.face(local!!, Location.create(2371, 3801, 2))
local.asNpc().isRespawn = false
ContentAPI.submitIndividualPulse(player, object : Pulse(4){
var id = node.id
var counter = 0
@@ -101,7 +105,7 @@ class JatizsoListeners : InteractionListener() {
override fun stop() {
ContentAPI.unlock(player)
other?.isRespawn = true
node.asNpc().isRespawn = true
local.asNpc().isRespawn = true
super.stop()
}
@@ -122,6 +126,11 @@ class JatizsoListeners : InteractionListener() {
return@on true
}
on(GUARDS, NPC, "talk-to"){player, node ->
player.dialogueInterpreter.open(LeftieRightieDialogue(), NPC(NPCs.GUARD_5491))
return@on true
}
setDest(NPC, NPCs.MAGNUS_GRAM_5488){_ ->
return@setDest Location.create(2416, 3801, 0)
}