Implement penguin egg acquisition
This commit is contained in:
@@ -106567,16 +106567,17 @@
|
||||
"id": "12480"
|
||||
},
|
||||
{
|
||||
"examine": "(Baby) Can't fly and can barely walk, but adorable nonetheless. (adult) Emperor of all he surveys.",
|
||||
"examine": "Can't fly and can barely walk, but adorable nonetheless.",
|
||||
"durability": null,
|
||||
"name": "Baby penguin",
|
||||
"archery_ticket_price": "0",
|
||||
"id": "12481"
|
||||
},
|
||||
{
|
||||
"examine": "I can hatch this in an Incubator.",
|
||||
"examine": "I can hatch this in an incubator.",
|
||||
"durability": null,
|
||||
"name": "Penguin egg",
|
||||
"tradeable": "false",
|
||||
"archery_ticket_price": "0",
|
||||
"id": "12483"
|
||||
},
|
||||
@@ -108972,14 +108973,14 @@
|
||||
"id": "12761"
|
||||
},
|
||||
{
|
||||
"examine": "(Baby) Can't fly and can barely walk, but adorable nonetheless. (adult) Emperor of all he surveys.",
|
||||
"examine": "Can't fly and can barely walk, but adorable nonetheless.",
|
||||
"durability": null,
|
||||
"name": "Baby penguin",
|
||||
"archery_ticket_price": "0",
|
||||
"id": "12763"
|
||||
},
|
||||
{
|
||||
"examine": "(Baby) Can't fly and can barely walk, but adorable nonetheless. (adult) Emperor of all he surveys.",
|
||||
"examine": "Can't fly and can barely walk, but adorable nonetheless.",
|
||||
"durability": null,
|
||||
"name": "Baby penguin",
|
||||
"archery_ticket_price": "0",
|
||||
@@ -132095,5 +132096,20 @@
|
||||
"archery_ticket_price": "0",
|
||||
"id": "14658",
|
||||
"equipment_slot": "0"
|
||||
},
|
||||
{
|
||||
"examine": "Emperor of all he surveys.",
|
||||
"name": "Penguin",
|
||||
"id": "12482"
|
||||
},
|
||||
{
|
||||
"examine": "Emperor of all he surveys.",
|
||||
"name": "Penguin",
|
||||
"id": "12762"
|
||||
},
|
||||
{
|
||||
"examine": "Emperor of all he surveys.",
|
||||
"name": "Penguin",
|
||||
"id": "12764"
|
||||
}
|
||||
]
|
||||
@@ -10909,7 +10909,7 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "6891",
|
||||
"loc_data": "{2598,3272,0,0,0}-"
|
||||
"loc_data": "{2598,3272,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "6893",
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package content.region.kandarin.ardougne.dialogue
|
||||
|
||||
import core.api.addItem
|
||||
import core.api.getDynLevel
|
||||
import core.api.hasAnItem
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.dialogue.Topic
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.plugin.Initializable
|
||||
import core.tools.END_DIALOGUE
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class PenguinKeeperDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.PENGUIN_KEEPER_6891)
|
||||
}
|
||||
|
||||
companion object{
|
||||
const val YES = 20
|
||||
const val NO = 40
|
||||
const val FULL = 50
|
||||
}
|
||||
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
when(stage){
|
||||
0 -> playerl(FacialExpression.FRIENDLY, "Hello there. How are the penguins doing today?").also { stage++ }
|
||||
1 -> npcl(FacialExpression.FRIENDLY, "They are doing fine, thanks.").also{
|
||||
if (getDynLevel(player, Skills.SUMMONING) < 30 || hasAnItem(player, Items.PENGUIN_EGG_12483).exists())
|
||||
stage = END_DIALOGUE
|
||||
else
|
||||
stage++
|
||||
}
|
||||
2 -> npcl(FacialExpression.HALF_ASKING,"Actually, you might be able to help me with something - if you are interested.").also { stage++ }
|
||||
3 -> playerl(FacialExpression.ASKING, "What do you mean?").also { stage++ }
|
||||
4 -> npcl(FacialExpression.NEUTRAL, "Well, you see, the penguins have been laying so many eggs recently that we can't afford to raise them all ourselves.").also { stage++ }
|
||||
5 -> npcl(FacialExpression.ASKING, " You seem to know a bit about raising animals - would you like to raise a penguin for us? ").also { stage++ }
|
||||
6 -> showTopics(
|
||||
Topic("Yes, of course.", YES),
|
||||
Topic("No thanks.", NO)
|
||||
)
|
||||
|
||||
YES -> npcl(FacialExpression.HAPPY, "Wonderful!").also {
|
||||
if (addItem(player, Items.PENGUIN_EGG_12483))
|
||||
stage++
|
||||
else
|
||||
stage = FULL
|
||||
}
|
||||
YES + 1 -> npcl(FacialExpression.HAPPY, "Here you go - this egg will hatch into a baby penguin.").also { stage++ }
|
||||
YES + 2 -> npcl(FacialExpression.HAPPY, "They eat raw fish and aren't particularly fussy about anything, so it won't be any trouble to raise.").also { stage++ }
|
||||
YES + 3 -> playerl(FacialExpression.HAPPY, "Okay, thank you very much.").also { stage = END_DIALOGUE }
|
||||
|
||||
NO -> npcl(FacialExpression.NEUTRAL, " Fair enough. The offer still stands if you change your mind. ").also { stage = END_DIALOGUE }
|
||||
|
||||
FULL -> npcl(FacialExpression.SAD, "You don't have inventory space though.").also { stage = END_DIALOGUE }
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user