Added Hring Hring dialogue
Corrected stock levels in Hring Hring's shop
This commit is contained in:
@@ -1842,7 +1842,7 @@
|
|||||||
"general_store": "false",
|
"general_store": "false",
|
||||||
"id": "216",
|
"id": "216",
|
||||||
"title": "Ore Store",
|
"title": "Ore Store",
|
||||||
"stock": "{436,20,100}-{438,10,100}-{440,10,100}-{442,5,100}-{453,10,100}-{444,5,100}-{447,0,100}-{449,0,100}"
|
"stock": "{436,10,100}-{438,10,100}-{440,0,100}-{442,0,100}-{453,0,100}-{444,0,100}-{447,0,100}-{449,0,100}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npcs": "596",
|
"npcs": "596",
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package content.region.fremennik.jatizso.dialogue
|
||||||
|
|
||||||
|
import core.api.openNpcShop
|
||||||
|
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
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class HringHringDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
override fun newInstance(player: Player?): DialoguePlugin {
|
||||||
|
return HringHringDialogue(player)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun open(vararg args: Any?): Boolean {
|
||||||
|
npc = args[0] as NPC
|
||||||
|
npcl(
|
||||||
|
FacialExpression.FRIENDLY,
|
||||||
|
" Oh, hello again. Want some ore?"
|
||||||
|
).also { stage = START_DIALOGUE }
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||||
|
when (stage) {
|
||||||
|
0 -> options("I'll have a look.", "Not right now.").also { stage++ }
|
||||||
|
1 -> when (buttonId) {
|
||||||
|
1 -> playerl(
|
||||||
|
FacialExpression.FRIENDLY,
|
||||||
|
"I'll have a look."
|
||||||
|
).also { stage++ }
|
||||||
|
|
||||||
|
2 -> playerl(
|
||||||
|
FacialExpression.FRIENDLY,
|
||||||
|
"Not right now."
|
||||||
|
).also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
|
||||||
|
2 -> {
|
||||||
|
openNpcShop(player, NPCs.HRING_HRING_5483)
|
||||||
|
end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray {
|
||||||
|
return intArrayOf(NPCs.HRING_HRING_5483)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user