mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Fixed unnoting of ore by Ordan
Corrected Ordan's and Jorzik's dialogue and faces
This commit is contained in:
parent
fd5998453d
commit
e7fa5b576d
4 changed files with 52 additions and 56 deletions
|
|
@ -24735,6 +24735,16 @@
|
||||||
"range_level": "1",
|
"range_level": "1",
|
||||||
"attack_level": "1"
|
"attack_level": "1"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"examine": "He smells of rock dust.",
|
||||||
|
"name": "Ordan",
|
||||||
|
"id": "2564"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"examine": "He buys stuff.",
|
||||||
|
"name": "Jorzik",
|
||||||
|
"id": "2565"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"death_animation": "836",
|
"death_animation": "836",
|
||||||
"name": "Market Guard",
|
"name": "Market Guard",
|
||||||
|
|
|
||||||
|
|
@ -4875,6 +4875,14 @@
|
||||||
"npc_id": "2549",
|
"npc_id": "2549",
|
||||||
"loc_data": "{3364,3001,0,0,6}"
|
"loc_data": "{3364,3001,0,0,6}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"npc_id": "2564",
|
||||||
|
"loc_data": "{1936,4966,0,0,4}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"npc_id": "2565",
|
||||||
|
"loc_data": "{1939,4968,0,1,0}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "2568",
|
"npc_id": "2568",
|
||||||
"loc_data": "{2729,3495,0,0,6}-{2724,3495,0,0,6}-{2728,3495,0,0,6}-{2721,3495,0,0,6}"
|
"loc_data": "{2729,3495,0,0,6}-{2724,3495,0,0,6}-{2728,3495,0,0,6}-{2721,3495,0,0,6}"
|
||||||
|
|
@ -10523,14 +10531,6 @@
|
||||||
"npc_id": "2159",
|
"npc_id": "2159",
|
||||||
"loc_data": "{2885,10196,0,1,0}"
|
"loc_data": "{2885,10196,0,1,0}"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"npc_id": "2565",
|
|
||||||
"loc_data": "{1937,4972,0,1,0}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"npc_id": "2564",
|
|
||||||
"loc_data": "{1935,4964,0,0,4}"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"npc_id": "2321",
|
"npc_id": "2321",
|
||||||
"loc_data": "{2918,10194,0,0,3}"
|
"loc_data": "{2918,10194,0,0,3}"
|
||||||
|
|
|
||||||
|
|
@ -1,52 +1,46 @@
|
||||||
package content.region.misc.keldagrim.dialogue
|
package content.region.misc.keldagrim.dialogue
|
||||||
|
|
||||||
import core.game.dialogue.DialoguePlugin
|
import core.game.dialogue.DialoguePlugin
|
||||||
import core.game.node.entity.npc.NPC
|
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.plugin.Initializable
|
import core.plugin.Initializable
|
||||||
import core.api.*
|
import core.game.dialogue.FacialExpression
|
||||||
|
import core.game.dialogue.Topic
|
||||||
import core.tools.END_DIALOGUE
|
import core.tools.END_DIALOGUE
|
||||||
|
import core.tools.START_DIALOGUE
|
||||||
|
import org.rs09.consts.NPCs
|
||||||
|
|
||||||
const val JORZIK = 2565
|
/**
|
||||||
|
* Jorzik dialogue.
|
||||||
/**Just some silly little dialogue for Jorzik hehe
|
* @author phil lips
|
||||||
* @author phil lips*/
|
*/
|
||||||
|
|
||||||
@Initializable
|
@Initializable
|
||||||
class JorzikDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
|
class JorzikDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
override fun open(vararg args: Any?): Boolean {
|
|
||||||
npc = args[0] as NPC
|
|
||||||
npc("Do you want to trade?")
|
|
||||||
stage = 0
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||||
when(stage){
|
when(stage){
|
||||||
0 -> options("What are you selling?","No, thanks").also { stage = 10 }
|
START_DIALOGUE -> npc(FacialExpression.OLD_DEFAULT,"Do you want to trade?").also { stage++ }
|
||||||
10 -> when(buttonId){
|
1 -> showTopics(
|
||||||
1 -> sendPlayerDialogue(player,"What are you selling?").also { stage = 15 }
|
Topic(FacialExpression.FRIENDLY,"What are you selling?",2),
|
||||||
2 -> sendPlayerDialogue(player,"No, thanks.").also {stage = 50}
|
Topic(FacialExpression.FRIENDLY,"No, thanks.", 5)
|
||||||
}
|
)
|
||||||
15 -> sendNPCDialogue(player, JORZIK,"The finest smiths from all over Gielinor come here to work, and I buy the fruit of their craft. Armour made from the strongest metals!").also { stage = 20 }
|
2 -> npcl(FacialExpression.OLD_DEFAULT,"The finest smiths from all over Gielinor come here to work, and I buy the fruit of their craft. Armour made from the strongest metals!").also { stage++ }
|
||||||
20 -> options("Lets have a look, then.","No, thanks").also { stage = 30 }
|
3 -> showTopics(
|
||||||
30 -> when(buttonId){
|
Topic(FacialExpression.FRIENDLY,"Let's have a look, then.",4),
|
||||||
1 -> sendPlayerDialogue(player,"Let's have a look, then.").also { stage = 40 }
|
Topic(FacialExpression.FRIENDLY,"No, thanks.", 5)
|
||||||
2 -> sendPlayerDialogue(player,"No, thanks.").also {stage = 50}
|
)
|
||||||
}
|
4 -> end().also { npc.openShop(player) }
|
||||||
40 -> end().also { npc.openShop(player) }
|
5 -> npcl(FacialExpression.OLD_DEFAULT,"You just don't appreciate the beauty of fine metalwork.").also { stage = END_DIALOGUE }
|
||||||
50 ->sendNPCDialogue(player, JORZIK,"You just don't appreciate the beauty of fine metalwork.").also { stage = END_DIALOGUE }
|
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
|
override fun newInstance(player: Player?): DialoguePlugin {
|
||||||
return JorzikDialogue(player)
|
return JorzikDialogue(player)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getIds(): IntArray {
|
override fun getIds(): IntArray {
|
||||||
return intArrayOf(JORZIK)
|
return intArrayOf(NPCs.JORZIK_2565)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,37 +1,29 @@
|
||||||
package content.region.misc.keldagrim.dialogue
|
package content.region.misc.keldagrim.dialogue
|
||||||
|
|
||||||
import core.game.node.entity.npc.NPC
|
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.plugin.Initializable
|
import core.plugin.Initializable
|
||||||
import core.api.*
|
import core.api.*
|
||||||
|
import core.game.dialogue.FacialExpression
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
import org.rs09.consts.NPCs
|
import org.rs09.consts.NPCs
|
||||||
import core.game.interaction.InteractionListener
|
import core.game.interaction.InteractionListener
|
||||||
import core.game.interaction.IntType
|
import core.game.interaction.IntType
|
||||||
import core.tools.END_DIALOGUE
|
import core.tools.END_DIALOGUE
|
||||||
|
import core.tools.START_DIALOGUE
|
||||||
|
|
||||||
/**It's just some simple Ordan dialogue
|
/**
|
||||||
* don't look at the unnoting code if you care
|
* Ordan dialogue and unnoting.
|
||||||
* about your braincells
|
* @author phil lips
|
||||||
* @author phil lips*/
|
*/
|
||||||
|
|
||||||
const val ORDAN = 2564
|
|
||||||
|
|
||||||
@Initializable
|
@Initializable
|
||||||
class OrdanDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
|
class OrdanDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
|
||||||
|
|
||||||
override fun open(vararg args: Any?): Boolean {
|
|
||||||
npc = args[0] as NPC
|
|
||||||
sendPlayerDialogue(player,"Can you un-note any of my items?")
|
|
||||||
stage = 0
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||||
when(stage){
|
when(stage){
|
||||||
0 -> sendNPCDialogue(player, ORDAN,"I can un-note Tin, Copper, Iron, Coal, and Mithril.").also { stage++ }
|
START_DIALOGUE-> playerl(FacialExpression.FRIENDLY, "Can you un-note any of my items?").also { stage++ }
|
||||||
1 -> sendNPCDialogue(player, ORDAN,"I can even un-note Adamantite and Runite, but you're gonna need deep pocktes for that.").also { stage = END_DIALOGUE }
|
1 -> npcl(FacialExpression.OLD_DEFAULT,"I can un-note Tin, Copper, Iron, Coal, and Mithril.").also { stage++ }
|
||||||
|
2 -> npcl(FacialExpression.OLD_DEFAULT,"I can even un-note Adamantite and Runite, but you're gonna need deep pocktes for that.").also { stage = END_DIALOGUE }
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
@ -41,7 +33,7 @@ class OrdanDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getIds(): IntArray {
|
override fun getIds(): IntArray {
|
||||||
return intArrayOf(ORDAN)
|
return intArrayOf(NPCs.ORDAN_2564)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**This is for unnoting ores from Ordan, yeah I know being able to unnote Addy and Rune isn't authentic
|
/**This is for unnoting ores from Ordan, yeah I know being able to unnote Addy and Rune isn't authentic
|
||||||
|
|
@ -74,7 +66,7 @@ class OrdanDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(
|
||||||
Items.RUNITE_ORE_452 to 1000
|
Items.RUNITE_ORE_452 to 1000
|
||||||
)
|
)
|
||||||
override fun defineListeners() {
|
override fun defineListeners() {
|
||||||
onUseWith(IntType.NPC, NPCs.ORDAN_2564,*notedOre){ player, _, noteType ->
|
onUseWith(IntType.NPC, notedOre, NPCs.ORDAN_2564){ player, noteType, _ ->
|
||||||
val noteAmount = amountInInventory(player, noteType.id)
|
val noteAmount = amountInInventory(player, noteType.id)
|
||||||
val noteName = noteType.name
|
val noteName = noteType.name
|
||||||
var unNoteAmount = 0
|
var unNoteAmount = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue