mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Added the two NPCs above the furnace in Falador
This commit is contained in:
parent
9989ee9905
commit
264f78eb11
3 changed files with 33 additions and 60 deletions
|
|
@ -5907,6 +5907,14 @@
|
|||
"npc_id": "3234",
|
||||
"loc_data": "{3011,3383,0,1,0}"
|
||||
},
|
||||
{
|
||||
"npc_id": "3235",
|
||||
"loc_data": "{2970,3369,1,1,6}"
|
||||
},
|
||||
{
|
||||
"npc_id": "3236",
|
||||
"loc_data": "{2973,3369,1,1,6}"
|
||||
},
|
||||
{
|
||||
"npc_id": "3237",
|
||||
"loc_data": "{2984,3435,0,0,0}"
|
||||
|
|
|
|||
|
|
@ -2,54 +2,31 @@ package content.region.asgarnia.falador.dialogue
|
|||
|
||||
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
|
||||
import core.tools.END_DIALOGUE
|
||||
import core.tools.START_DIALOGUE
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
/**
|
||||
* @author qmqz
|
||||
* https://youtu.be/DwQgAQqaXos
|
||||
*/
|
||||
|
||||
@Initializable
|
||||
class ApprenticeWorkmanDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||
|
||||
override fun open(vararg args: Any?): Boolean {
|
||||
npc = args[0] as NPC
|
||||
player(FacialExpression.FRIENDLY,"Hiya.").also { stage = 0 }
|
||||
return true
|
||||
}
|
||||
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
when (stage) {
|
||||
0 -> {
|
||||
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(FacialExpression.ASKING, "Varrock?").also { stage++ }
|
||||
}
|
||||
|
||||
2 -> {
|
||||
npc(FacialExpression.FRIENDLY, "Yeah, the Council's had it redecorated.").also { stage++ }
|
||||
}
|
||||
|
||||
3 -> {
|
||||
npc(3236, "Oi - stop gabbing and get that chair finished!").also { stage++ }
|
||||
}
|
||||
|
||||
4 -> {
|
||||
npc(FacialExpression.FRIENDLY, "You'd better let me get on with my work.").also { stage++ }
|
||||
}
|
||||
|
||||
5 -> {
|
||||
player(FacialExpression.FRIENDLY, "Ok, bye.").also { stage = 99 }
|
||||
}
|
||||
|
||||
99 -> end()
|
||||
START_DIALOGUE -> player(FacialExpression.FRIENDLY, "Hiya.").also { stage++ }
|
||||
1 -> npc(FacialExpression.SAD, "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++ }
|
||||
2 -> player(FacialExpression.ASKING, "Varrock?").also { stage++ }
|
||||
3 -> npc(FacialExpression.ROLLING_EYES, "Yeah, the Council's had it redecorated.").also { stage++ }
|
||||
4 -> npc(3236, "Oi - stop gabbing and get that chair finished!").also { stage++ } // ANNOYED
|
||||
5 -> npc(FacialExpression.SAD, "You'd better let me get on with my work.").also { stage++ }
|
||||
6 -> player(FacialExpression.NEUTRAL, "Ok, bye.").also { stage = END_DIALOGUE }
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,36 +5,24 @@ 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.WORKMAN_3236
|
||||
import core.tools.END_DIALOGUE
|
||||
import core.tools.START_DIALOGUE
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
/**
|
||||
* @author qmqz
|
||||
* https://youtu.be/DwQgAQqaXos
|
||||
*/
|
||||
|
||||
@Initializable
|
||||
class WorkmanDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||
|
||||
override fun open(vararg args: Any?): Boolean {
|
||||
npc = args[0] as NPC
|
||||
player(FacialExpression.FRIENDLY,"Hiya.").also { stage = 0 }
|
||||
return true
|
||||
}
|
||||
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
when (stage) {
|
||||
0 -> {
|
||||
npc(FacialExpression.ASKING, "What do you want? I've got work to do!").also { stage++ }
|
||||
}
|
||||
|
||||
1 -> {
|
||||
player(FacialExpression.ASKING, "Can you teach me anything?").also { stage++ }
|
||||
}
|
||||
|
||||
2 -> {
|
||||
npcl(FacialExpression.ANNOYED, "No - I've got one lousy apprentice already, and that's quite enough hassle! Go away!").also { stage = 99 }
|
||||
}
|
||||
|
||||
99 -> end()
|
||||
START_DIALOGUE -> player(FacialExpression.FRIENDLY, "Hiya.").also { stage++ }
|
||||
1 -> npc(FacialExpression.ANNOYED, "What do you want? I've got work to do!").also { stage++ }
|
||||
2 -> player(FacialExpression.ASKING, "Can you teach me anything?").also { stage++ }
|
||||
3 -> npcl(FacialExpression.ANNOYED, "No - I've got one lousy apprentice already, and that's quite enough hassle! Go away!").also { stage = END_DIALOGUE }
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
@ -44,6 +32,6 @@ class WorkmanDialogue(player: Player? = null) : DialoguePlugin(player){
|
|||
}
|
||||
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(WORKMAN_3236)
|
||||
return intArrayOf(NPCs.WORKMAN_3236)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue