mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Implemented Sea Slug quest
This commit is contained in:
parent
4480618748
commit
67b6855370
25 changed files with 1244 additions and 135 deletions
|
|
@ -241,7 +241,7 @@
|
|||
},
|
||||
{
|
||||
"item_id": "954",
|
||||
"loc_data": "{1,2094,3152,0,150}-"
|
||||
"loc_data": "{1,2094,3152,0,150}-{1,2785,3279,0,150}-{1,2786,3287,0,150}-{1,2786,3286,0,150}-"
|
||||
},
|
||||
{
|
||||
"item_id": "960",
|
||||
|
|
@ -339,6 +339,14 @@
|
|||
"item_id": "1422",
|
||||
"loc_data": "{1,3320,3137,0,150}-"
|
||||
},
|
||||
{
|
||||
"item_id": "1467",
|
||||
"loc_data": "{1,2784,3289,0,0}-"
|
||||
},
|
||||
{
|
||||
"item_id": "1469",
|
||||
"loc_data": "{1,2766,3277,0,100}-{1,2766,3289,0,100}-"
|
||||
},
|
||||
{
|
||||
"item_id": "1510",
|
||||
"loc_data": "{1,2576,3334,0,100}-"
|
||||
|
|
|
|||
|
|
@ -10473,6 +10473,11 @@
|
|||
"range_level": "1",
|
||||
"attack_level": "22"
|
||||
},
|
||||
{
|
||||
"examine": "A rather nasty looking crustacean.",
|
||||
"name": "Sea slug",
|
||||
"id": "1006"
|
||||
},
|
||||
{
|
||||
"examine": "A servant of Zamorak.",
|
||||
"combat_style": "2",
|
||||
|
|
|
|||
|
|
@ -925,7 +925,7 @@
|
|||
},
|
||||
{
|
||||
"npc_id": "316",
|
||||
"loc_data": "{3086,3227,0,0,1}-{3085,3230,0,0,0}-{2986,3176,0,0,4}-{2996,3157,0,0,1}-"
|
||||
"loc_data": "{3086,3227,0,0,1}-{3085,3230,0,0,0}-{2986,3176,0,0,4}-{2996,3157,0,0,1}-{2790,3273,0,0,1}-{2790,3276,0,0,6}-{2794,3283,0,0,6}-{2795,3279,0,0,3}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "322",
|
||||
|
|
@ -1995,14 +1995,42 @@
|
|||
"npc_id": "694",
|
||||
"loc_data": "{2659,3431,0,0,3}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "695",
|
||||
"loc_data": "{2765,3276,0,1,3}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "696",
|
||||
"loc_data": "{2716,3303,0,1,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "697",
|
||||
"loc_data": "{2766,3288,1,0,6}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "698",
|
||||
"loc_data": "{2799,3320,0,1,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "700",
|
||||
"loc_data": "{2716,3303,0,1,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "701",
|
||||
"loc_data": "{2793,3321,0,1,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "702",
|
||||
"loc_data": "{2774,3273,0,1,0}-{2775,3284,0,1,0}-{2781,3290,1,1,0}-{2785,3284,1,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "703",
|
||||
"loc_data": "{2770,3284,0,1,0}-{2794,3279,0,1,0}-{2768,3285,1,1,0}-{2784,3277,1,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "704",
|
||||
"loc_data": "{2778,3291,0,1,0}-{2773,3282,1,1,0}-{2787,3280,1,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "705",
|
||||
"loc_data": "{3208,3252,0,0,6}-"
|
||||
|
|
@ -2635,6 +2663,10 @@
|
|||
"npc_id": "1005",
|
||||
"loc_data": "{3057,3905,0,1,3}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1006",
|
||||
"loc_data": "{2763,3284,0,1,0}-{2768,3274,0,1,0}-{2768,3288,0,1,0}-{2770,3277,0,1,0}-{2770,3290,0,1,0}-{2771,3279,0,1,0}-{2774,3291,0,1,0}-{2778,3285,0,1,0}-{2781,3278,0,1,0}-{2781,3285,0,1,0}-{2783,3275,0,1,0}-{2784,3279,0,1,0}-{2785,3276,0,1,0}-{2785,3287,0,1,0}-{2788,3274,0,1,0}-{2793,3275,0,1,0}-{2793,3280,0,1,0}-{2768,3282,1,1,0}-{2770,3282,1,1,0}-{2773,3291,1,1,0}-{2780,3283,1,1,0}-{2780,3290,1,1,0}-{2783,3286,1,1,0}-{2784,3279,1,1,0}-{2785,3282,1,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1010",
|
||||
"loc_data": "{2629,2979,0,1,0}-"
|
||||
|
|
@ -7995,6 +8027,10 @@
|
|||
"npc_id": "4856",
|
||||
"loc_data": "{2732,3292,0,1,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "4871",
|
||||
"loc_data": "{2782,3276,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "4872",
|
||||
"loc_data": "{2740,3310,0,0,0}-"
|
||||
|
|
@ -8019,6 +8055,10 @@
|
|||
"npc_id": "4887",
|
||||
"loc_data": "{2738,3303,0,1,1}-{2723,3274,0,1,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "4891",
|
||||
"loc_data": "{2768,3286,0,1,0}-{2777,3278,0,1,0}-{2783,3289,0,1,0}-{2784,3277,0,1,0}-{2768,3289,1,1,0}-{2780,3288,1,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "4895",
|
||||
"loc_data": "{2718,3302,0,1,1}-"
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class CookingRewrite : InteractionListener {
|
|||
}
|
||||
|
||||
companion object {
|
||||
val COOKING_OBJs = intArrayOf(24313,21302, 13528, 13529, 13533, 13531, 13536, 13539, 13542, 2728, 2729, 2730, 2731, 2732, 2859, 3038, 3039, 3769, 3775, 4265, 4266, 5249, 5499, 5631, 5632, 5981, 9682, 10433, 11404, 11405, 11406, 12102, 12796, 13337, 13881, 14169, 14919, 15156, 20000, 20001, 21620, 21792, 22713, 22714, 23046, 24283, 24284, 25155, 25156, 25465, 25730, 27297, 29139, 30017, 32099, 33500, 34495, 34546, 36973, 37597, 37629, 37726, 114, 4172, 5275, 8750, 16893, 22154, 34410, 34565, 114, 9085, 9086, 9087, 12269, 15398, 25440, 25441, 2724, 2725, 2726, 4618, 4650, 5165, 6093, 6094, 6095, 6096, 8712, 9374, 9439, 9440, 9441, 10824, 17640, 17641, 17642, 17643, 18039, 21795, 24285, 24329, 27251, 33498, 35449, 36815, 36816, 37426, 40110, 10377)
|
||||
val COOKING_OBJs = intArrayOf(24313,21302, 13528, 13529, 13533, 13531, 13536, 13539, 13542, 2728, 2729, 2730, 2731, 2732, 2859, 3038, 3039, 3769, 3775, 4265, 4266, 5249, 5499, 5631, 5632, 5981, 9682, 10433, 11404, 11405, 11406, 12102, 12796, 13337, 13881, 14169, 14919, 15156, 20000, 20001, 21620, 21792, 22713, 22714, 23046, 24283, 24284, 25155, 25156, 25465, 25730, 27297, 29139, 30017, 32099, 33500, 34495, 34546, 36973, 37597, 37629, 37726, 114, 4172, 5275, 8750, 16893, 22154, 34410, 34565, 114, 9085, 9086, 9087, 12269, 15398, 25440, 25441, 2724, 2725, 2726, 4618, 4650, 5165, 6093, 6094, 6095, 6096, 8712, 9374, 9439, 9440, 9441, 10824, 17640, 17641, 17642, 17643, 18039, 18170, 21795, 24285, 24329, 27251, 33498, 35449, 36815, 36816, 37426, 40110, 10377)
|
||||
|
||||
@JvmStatic
|
||||
fun cook(player: Player, `object`: Scenery?, initial: Int, product: Int, amount: Int) {
|
||||
|
|
|
|||
|
|
@ -66,6 +66,12 @@ class LightSourceLighter : UseWithHandler(590,36,38){
|
|||
|
||||
lightSource ?: return false
|
||||
|
||||
// For Sea Slug Quest - No lighting of any torch on the fishing platform.
|
||||
if(event.player.location.isInRegion(11059)) {
|
||||
event.player.sendMessage("Your tinderbox is damp from the sea crossing. It won't work here.")
|
||||
return true
|
||||
}
|
||||
|
||||
if(!light(event.player,used,lightSource)){
|
||||
event.player.sendMessage("You need a Firemaking level of at least ${lightSource.levelRequired} to light this.")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
package content.region.kandarin.witchhaven.dialogue
|
||||
|
||||
import content.region.kandarin.witchhaven.quest.seaslug.BaileyDialogueFile
|
||||
import core.api.*
|
||||
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 org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class BaileyDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun newInstance(player: Player): DialoguePlugin {
|
||||
return BaileyDialogue(player)
|
||||
}
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
openDialogue(player!!, BaileyDialogueFile(), npc)
|
||||
return true
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.BAILEY_695)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,41 +1,29 @@
|
|||
package content.region.kandarin.witchhaven.dialogue
|
||||
|
||||
import content.region.kandarin.witchhaven.quest.seaslug.CarolineDialogueFile
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
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.game.node.entity.skill.Skills
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
/**
|
||||
* @author qmqz
|
||||
*/
|
||||
|
||||
@Initializable
|
||||
class CarolineDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
|
||||
override fun open(vararg args: Any?): Boolean {
|
||||
npc = args[0] as NPC
|
||||
player(FacialExpression.FRIENDLY,"Hello again.").also { stage = 0 }
|
||||
return true
|
||||
}
|
||||
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
when(stage){
|
||||
0 -> npc(FacialExpression.FRIENDLY, "Hello traveller, how are you?").also { stage++ }
|
||||
1 -> player(FacialExpression.FRIENDLY, "Not bad thanks, yourself?").also { stage++ }
|
||||
2 -> npcl(FacialExpression.FRIENDLY, "I'm good. Busy as always looking after Kent and Kennith but no complaints.").also { stage = 99 }
|
||||
|
||||
99 -> end()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
override fun newInstance(player: Player): DialoguePlugin {
|
||||
return CarolineDialogue(player)
|
||||
}
|
||||
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
// Fallback to default. Always the start of Sea Slug
|
||||
openDialogue(player!!, CarolineDialogueFile(), npc)
|
||||
return true
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.CAROLINE_696)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
package content.region.kandarin.witchhaven.dialogue
|
||||
|
||||
import content.region.kandarin.witchhaven.quest.seaslug.HolgartDialogueFile
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.npc.NPC
|
||||
|
|
@ -7,37 +9,18 @@ import core.game.node.entity.player.Player
|
|||
import core.plugin.Initializable
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
/**
|
||||
* @author qmqz
|
||||
*/
|
||||
|
||||
@Initializable
|
||||
class HolgartDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
fun gender (male : String = "sir", female : String = "madam") = if (player.isMale) male else female
|
||||
|
||||
override fun open(vararg args: Any?): Boolean {
|
||||
npc = args[0] as NPC
|
||||
player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 }
|
||||
return true
|
||||
}
|
||||
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
when(stage){
|
||||
0 -> npc(FacialExpression.FRIENDLY, "Well hello " + gender() + ", beautiful day isn't it?").also { stage++ }
|
||||
1 -> player(FacialExpression.FRIENDLY, "Not bad I suppose.").also { stage++ }
|
||||
2 -> npc(FacialExpression.FRIENDLY, "Just smell that sea air... beautiful.").also { stage++ }
|
||||
3 -> player(FacialExpression.FRIENDLY, "Hmm... lovely...").also { stage = 99 }
|
||||
|
||||
99 -> end()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
override fun newInstance(player: Player): DialoguePlugin {
|
||||
return HolgartDialogue(player)
|
||||
}
|
||||
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
// Fallback to default. Always the start of Sea Slug
|
||||
openDialogue(player!!, HolgartDialogueFile(), npc)
|
||||
return true
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.HOLGART_4866)
|
||||
return intArrayOf(NPCs.HOLGART_700)
|
||||
// return intArrayOf(NPCs.HOLGART_4866)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
package content.region.kandarin.witchhaven.dialogue
|
||||
|
||||
import content.region.kandarin.witchhaven.quest.seaslug.HolgartIslandDialogueFile
|
||||
import core.api.*
|
||||
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 org.rs09.consts.NPCs
|
||||
|
||||
// This is to handle when Holgart is on the fishing platform.
|
||||
@Initializable
|
||||
class HolgartIslandDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun newInstance(player: Player): DialoguePlugin {
|
||||
return HolgartIslandDialogue(player)
|
||||
}
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
// Fallback to default. Always the start of Sea Slug
|
||||
openDialogue(player!!, HolgartIslandDialogueFile(), npc)
|
||||
return true
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.HOLGART_698)
|
||||
// return intArrayOf(NPCs.HOLGART_4866)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package content.region.kandarin.witchhaven.dialogue
|
||||
|
||||
import content.region.kandarin.witchhaven.quest.seaslug.HolgartPlatformDialogueFile
|
||||
import core.api.*
|
||||
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 org.rs09.consts.NPCs
|
||||
|
||||
// This is to handle when Holgart is on the fishing platform.
|
||||
@Initializable
|
||||
class HolgartPlatformDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun newInstance(player: Player): DialoguePlugin {
|
||||
return HolgartPlatformDialogue(player)
|
||||
}
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
// Fallback to default. Always the start of Sea Slug
|
||||
openDialogue(player!!, HolgartPlatformDialogueFile(), npc)
|
||||
return true
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.HOLGART_699, NPCs.FISHERMAN_4871)
|
||||
// return intArrayOf(NPCs.HOLGART_4866)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package content.region.kandarin.witchhaven.dialogue
|
||||
|
||||
import content.region.kandarin.witchhaven.quest.seaslug.KennithDialogueFile
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.interaction.IntType
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.world.map.Location
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class KennithDialogue : InteractionListener {
|
||||
|
||||
override fun defineListeners() {
|
||||
on(NPCs.KENNITH_4864, IntType.NPC, "talk-to"){ player, npc ->
|
||||
openDialogue(player, KennithDialogueFile(), npc)
|
||||
return@on true
|
||||
}
|
||||
}
|
||||
|
||||
// Because Kennith is behind the counter
|
||||
override fun defineDestinationOverrides() {
|
||||
setDest(IntType.NPC, intArrayOf(NPCs.KENNITH_4864),"talk-to"){ _, _ ->
|
||||
return@setDest Location.create(2765, 3286, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// INSTEAD OF THIS as Kennith is unreachable.
|
||||
//@Initializable
|
||||
//class KennithDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
// override fun newInstance(player: Player): DialoguePlugin {
|
||||
// return KennithDialogue(player)
|
||||
// }
|
||||
// override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
// // Fallback to default. Always the start of Sea Slug
|
||||
// openDialogue(player!!, KennithDialogueFile(), npc)
|
||||
// return true
|
||||
// }
|
||||
// override fun getIds(): IntArray {
|
||||
// // Base is CAROLINE_697 (Should be named KENNITH_697)
|
||||
// return intArrayOf(NPCs.CAROLINE_697, NPCs.KENNITH_4864)
|
||||
// }
|
||||
//}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package content.region.kandarin.witchhaven.dialogue
|
||||
|
||||
import content.region.kandarin.witchhaven.quest.seaslug.KentDialogueFile
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.node.entity.player.Player
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class KentDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun newInstance(player: Player): DialoguePlugin {
|
||||
return KentDialogue(player)
|
||||
}
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
// Fallback to default. Always the start of Sea Slug
|
||||
openDialogue(player!!, KentDialogueFile(), npc)
|
||||
return true
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
// Base is CAROLINE_697 (Should be named KENNITH_697)
|
||||
return intArrayOf(NPCs.KENT_701)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package content.region.kandarin.witchhaven.dialogue
|
||||
|
||||
import core.api.openDialogue
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class WitchavenVillagerDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun newInstance(player: Player): DialoguePlugin {
|
||||
return WitchavenVillagerDialogue(player)
|
||||
}
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
// Fallback to default. Always the start of Sea Slug
|
||||
openDialogue(player!!, WitchavenVillagerDialogueFile(), npc)
|
||||
return true
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.WITCHAVEN_VILLAGER_4883, NPCs.WITCHAVEN_VILLAGER_4884,
|
||||
NPCs.WITCHAVEN_VILLAGER_4885, NPCs.WITCHAVEN_VILLAGER_4886,
|
||||
NPCs.WITCHAVEN_VILLAGER_4887, NPCs.WITCHAVEN_VILLAGER_4888)
|
||||
}
|
||||
}
|
||||
|
||||
class WitchavenVillagerDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
b.onPredicate { _ -> true }
|
||||
.player(FacialExpression.FRIENDLY, "Hello there.")
|
||||
.branch { player ->
|
||||
return@branch (0 .. 4).random()
|
||||
}.let { branch ->
|
||||
branch.onValue(0)
|
||||
.npcl("What have you got to be so cheerful about?")
|
||||
.playerl("Well, it's another nice day.")
|
||||
.npcl("Ha! Try worrying about how you feed a family with no job. Then tell me how nice the day is!")
|
||||
.playerl("Okay, I guess I've caught you at a bad time. Goodbye.")
|
||||
.end()
|
||||
|
||||
branch.onValue(1)
|
||||
.npcl("Hmm? Oh, hello there.")
|
||||
.playerl("Are you okay? You seem a bit preoccupied.")
|
||||
.npcl("It's nothing stranger. No need to concern yourself.")
|
||||
.end()
|
||||
|
||||
branch.onValue(2)
|
||||
.npcl("Spare a coin mister?")
|
||||
.playerl("What do you need it for?")
|
||||
.npcl("For a poor unemployed fisherman what needs to eat.")
|
||||
.playerl("Why don't you just fish for some food?")
|
||||
.npcl("Err... Goodbye mister.")
|
||||
.end()
|
||||
|
||||
branch.onValue(3)
|
||||
.npcl("Can you believe they did this to us?")
|
||||
.playerl("Wha...")
|
||||
.npcl("I mean, what did they think would happen?")
|
||||
.playerl("Who...")
|
||||
.npcl("Building that whacking great Fishing Platform just off the coast.")
|
||||
.playerl("Fish...")
|
||||
.npcl("Dratted thing stole all of our trade.")
|
||||
.playerl("Excuse...")
|
||||
.npcl("I'm sorry, I'm too angry to speak right now. Goodbye")
|
||||
.end()
|
||||
|
||||
branch.onValue(4)
|
||||
.npcl("With our nets and gear we're faring,")
|
||||
.npcl("On the wild and wasteful ocean,")
|
||||
.npcl("It's there on the deep that we harvest and reap our bread,")
|
||||
.npcl("As we hunt the bonny shoals of herring.")
|
||||
.playerl("That's a lovely song.")
|
||||
.npcl("Aye lad, and sing it every day we did.")
|
||||
.npcl("'Till the Fishing Platform came and ruined everything.")
|
||||
.playerl("Oh, I'm sorry.")
|
||||
.npcl("No need lad, it not be your fault.")
|
||||
.end()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
package content.region.kandarin.witchhaven.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 org.rs09.consts.NPCs
|
||||
|
||||
/**
|
||||
* @author qmqz
|
||||
*/
|
||||
|
||||
@Initializable
|
||||
class WitchhavenVillageDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
|
||||
private val conversations = arrayOf (0, 7, 11, 19, 24)
|
||||
|
||||
override fun open(vararg args: Any?): Boolean {
|
||||
npc = args[0] as NPC
|
||||
player(FacialExpression.FRIENDLY, "Hello there.").also { stage = conversations.random() }
|
||||
return true
|
||||
}
|
||||
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
when(stage){
|
||||
|
||||
0 -> sendDialogue("Their eyes are staring vacantly into space.").also { stage++ }
|
||||
1 -> npc(FacialExpression.NEUTRAL, "Ye mariners all, as ye pass by,").also { stage++ }
|
||||
2 -> npc(FacialExpression.NEUTRAL, "Come in and drink if you are dry,").also { stage++ }
|
||||
3 -> npc(FacialExpression.NEUTRAL, "Come spend, me lads, your money brisk,").also { stage++ }
|
||||
4 -> npc(FacialExpression.NEUTRAL, "And pop your nose in a jug of this.").also { stage++ }
|
||||
5 -> player(FacialExpression.NEUTRAL, "You're not fooling anyone you know.").also { stage++ }
|
||||
6 -> npc(FacialExpression.NEUTRAL, "We fooled you easily enough.").also { stage = 99 }
|
||||
|
||||
7 -> sendDialogue("Their eyes are staring vacantly into space.").also { stage++ }
|
||||
8 -> npc(FacialExpression.NEUTRAL, "Free. She is free...").also { stage++ }
|
||||
9 -> player(FacialExpression.NEUTRAL, "What?").also { stage++ }
|
||||
10 -> npc(FacialExpression.NEUTRAL, "The mother is free.").also { stage = 99 }
|
||||
|
||||
11 -> sendDialogue("Their eyes are staring vacantly into space.").also { stage++ }
|
||||
12 -> npc(FacialExpression.NEUTRAL, "You! You did it!").also { stage++ }
|
||||
13 -> player(FacialExpression.NEUTRAL, "I didn't mean to!").also { stage++ }
|
||||
14 -> npc(FacialExpression.NEUTRAL, "You killed him!").also { stage++ }
|
||||
15 -> player(FacialExpression.NEUTRAL, "It was an accide... Killed who?").also { stage++ }
|
||||
16 -> npc(FacialExpression.NEUTRAL, "Our Prince, you killed our Prince.").also { stage++ }
|
||||
17 -> player(FacialExpression.NEUTRAL, "Oh that, yes I did.").also { stage++ }
|
||||
18 -> npc(FacialExpression.NEUTRAL, "Leave us alone.").also { stage = 99 }
|
||||
|
||||
19 -> sendDialogue("Their eyes are staring vacantly into space.").also { stage++ }
|
||||
20 -> npc(FacialExpression.NEUTRAL, "Soon now... So soon...").also { stage++ }
|
||||
21 -> npc(FacialExpression.NEUTRAL, "The stars are almost right.").also { stage++ }
|
||||
22 -> player(FacialExpression.NEUTRAL, "For what?").also { stage++ }
|
||||
23 -> npc(FacialExpression.NEUTRAL, ". . .").also { stage = 99 }
|
||||
|
||||
24 -> sendDialogue("Their eyes are staring vacantly into space.").also { stage++ }
|
||||
25 -> npc(FacialExpression.NEUTRAL, "Ahh, our saviour.").also { stage++ }
|
||||
26 -> player(FacialExpression.NEUTRAL, "Please don't remind me.").also { stage++ }
|
||||
27 -> npc(FacialExpression.NEUTRAL, "Do not worry, soon your regret will be gone.").also { stage++ }
|
||||
28 -> player(FacialExpression.NEUTRAL, "If you think you will get to me...").also { stage++ }
|
||||
29 -> npc(FacialExpression.NEUTRAL, "All in good time.").also { stage = 99 }
|
||||
|
||||
|
||||
99 -> end()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return WitchhavenVillageDialogue(player)
|
||||
}
|
||||
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.WITCHAVEN_VILLAGER_4883, NPCs.WITCHAVEN_VILLAGER_4884,
|
||||
NPCs.WITCHAVEN_VILLAGER_4885, NPCs.WITCHAVEN_VILLAGER_4886,
|
||||
NPCs.WITCHAVEN_VILLAGER_4887, NPCs.WITCHAVEN_VILLAGER_4888)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package content.region.kandarin.witchhaven.quest.seaslug
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.world.map.Location
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class BaileyDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
b.onQuestStages(SeaSlug.questName, 0,1,2,3,4)
|
||||
.playerl(FacialExpression.FRIENDLY, "Hello there.")
|
||||
.npcl(FacialExpression.SCARED, "What? Who are you? Come inside quickly!")
|
||||
.npcl(FacialExpression.SCARED, "What are you doing here?")
|
||||
.playerl("I'm trying to find out what happened to a boy named Kennith.")
|
||||
.npcl("Oh you mean Kent's son. He's around somewhere, probably hiding if he knows what's good for him.")
|
||||
.playerl(FacialExpression.THINKING, "Hiding from what? What's got you so frightened?")
|
||||
.npcl("Haven't you seen all those things out there?")
|
||||
.playerl(FacialExpression.THINKING, "The sea slugs?")
|
||||
.npcl(FacialExpression.SUSPICIOUS, "It all began about a week ago. We pulled up a haul of deep sea flatfish. Mixed in with them we found these slug things, but thought nothing of it.")
|
||||
.npcl(FacialExpression.SUSPICIOUS, "Not long after that my friends began to change, now they spend all day pulling in hauls of fish, only to throw back the fish and keep those nasty sea slugs.")
|
||||
.npcl(FacialExpression.SUSPICIOUS, "What am I supposed to do with those? I haven't figured out how to kill one yet. If I put them near the stove they squirm and jump away.")
|
||||
.playerl(FacialExpression.THINKING, "I doubt they would taste too good.")
|
||||
.npcl(FacialExpression.ANGRY, "This is no time for humour.")
|
||||
.playerl("I'm sorry, I didn't mean to upset you.")
|
||||
.npcl(FacialExpression.SCARED, "That's okay. I just can't shake the feeling that this is the start of something... Terrible.")
|
||||
.end()
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 5)
|
||||
.playerl("Hello.")
|
||||
.npcl(FacialExpression.EXTREMELY_SHOCKED, "Oh, thank the gods it's you. They've all gone mad I tell you, one of the fishermen tried to throw me into the sea!")
|
||||
.playerl("They're all being controlled by the sea slugs.")
|
||||
.npcl("I figured as much.")
|
||||
.playerl("I need to get Kennith off this platform, but I can't get past the fishermen.")
|
||||
.npcl("The sea slugs are scared of heat... I figured that out when I tried to cook them.")
|
||||
.npcl("Here.")
|
||||
.betweenStage { _, player, _, _ ->
|
||||
addItemOrDrop(player, Items.UNLIT_TORCH_596)
|
||||
}
|
||||
.iteml(Items.UNLIT_TORCH_596, "Bailey gives you a torch.")
|
||||
.npcl("I doubt the fishermen will come near you if you can get this torch lit. The only problem is all the wood and flint are damp... I can't light a thing!")
|
||||
.endWith() { df, player ->
|
||||
if(getQuestStage(player, SeaSlug.questName) == 5) {
|
||||
setQuestStage(player, SeaSlug.questName, 6)
|
||||
}
|
||||
}
|
||||
|
||||
// We aren't going to give you a spare torch. Go get an unlit torch somewhere else.
|
||||
b.onQuestStages(SeaSlug.questName, 6,7,8)
|
||||
.playerl("Hello.")
|
||||
.npcl("Oh, thank the gods it's you. They've all gone mad I tell you, one of the fishermen tried to throw me into the sea!")
|
||||
.playerl("They're all being controlled by the sea slugs.")
|
||||
.npcl("I figured as much.")
|
||||
.playerl("I need to get Kennith off this platform, but I can't get past the fishermen.")
|
||||
.npcl("The sea slugs are scared of heat... I figured that out when I tried to cook them.")
|
||||
.npcl("I doubt the fishermen will come near you if you can get this torch lit. The only problem is all the wood and flint are damp... I can't light a thing!")
|
||||
.end()
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 9,10,100)
|
||||
.playerl("I've managed to light the torch.")
|
||||
.npcl("Well done traveller, you'd better get Kennith out of here soon. The fishermen are becoming stranger by the minute, and they keep pulling up those blasted sea slugs.")
|
||||
.playerl("Don't worry I'm working on it.")
|
||||
.npcl("Just be sure to watch your back. The fishermen seem to have taken notice of you.")
|
||||
.end()
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package content.region.kandarin.witchhaven.quest.seaslug
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.skill.Skills
|
||||
|
||||
class CarolineDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
b.onQuestStages(SeaSlug.questName, 0)
|
||||
.playerl(FacialExpression.FRIENDLY, "Hello there.")
|
||||
.npcl(FacialExpression.SAD, "Is there any chance you could help me?")
|
||||
.playerl(FacialExpression.THINKING, "What's wrong?")
|
||||
.npcl("It's my husband, he works on a fishing platform. Once a month he takes our son, Kennith, out with him.")
|
||||
.npcl(FacialExpression.THINKING, "They usually write to me regularly, but I've heard nothing all week. It's very strange.")
|
||||
.playerl("Maybe the post was lost!")
|
||||
.npcl(FacialExpression.THINKING, "Maybe, but no-one's heard from the other fishermen on the platform. Their families are becoming quite concerned.")
|
||||
.branch { player ->
|
||||
return@branch if (hasLevelStat(player, Skills.FIREMAKING, 30)) { 1 } else { 0 }
|
||||
}.let { branch ->
|
||||
branch.onValue(0)
|
||||
.npcl("However, I don't think you are ready to visit the platform.")
|
||||
.line("You need Level 30 Firemaking to start the Sea Slug quest.")
|
||||
.end()
|
||||
return@let branch.onValue(1)
|
||||
}
|
||||
.npcl(FacialExpression.HALF_THINKING, "Is there any chance you could visit the platform and find out what's going on?")
|
||||
.options().let { optionBuilder ->
|
||||
optionBuilder.option_playerl("I suppose so, how do I get there?")
|
||||
.npcl("That's very good of you @name. My friend Holgart will take you there.")
|
||||
.playerl("Ok, I'll go and see if they're ok.")
|
||||
.npcl("I'll reward you for your time. It'll give me peace of mind to know Kennith and my husband, Kent, are safe.")
|
||||
.endWith() { df, player ->
|
||||
if(getQuestStage(player, SeaSlug.questName) == 0) {
|
||||
setQuestStage(player, SeaSlug.questName, 1)
|
||||
}
|
||||
}
|
||||
optionBuilder.option_playerl("I'm sorry, I'm too busy.")
|
||||
.npcl(FacialExpression.SAD, "That's a shame.")
|
||||
.playerl("Bye.")
|
||||
.npcl("Bye.")
|
||||
.end()
|
||||
}
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 1,2,3,4,5,6,7,8,9,10)
|
||||
.playerl("Hello Caroline.")
|
||||
.npcl("Brave @name, have you any news about my son and his father?")
|
||||
.playerl("I'm working on it now Caroline.")
|
||||
.npcl("Please bring them back safe and sound.")
|
||||
.playerl("I'll do my best.")
|
||||
.end()
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 11)
|
||||
.playerl("Hello.")
|
||||
.npcl("Brave @name, you've returned!")
|
||||
.npcl("Kennith told me about the strange goings-on at the platform. I had no idea it was so serious.")
|
||||
.npcl("I could have lost my son and my husband if it wasn't for you.")
|
||||
.playerl("We found Kent stranded on an island.")
|
||||
.npcl("Yes. Holgart told me and sent a rescue party out. Kent's back home now, resting with Kennith. I don't think he'll be doing any fishing for a while.")
|
||||
.npcl("Here, take these Oyster pearls as a reward. They're worth quite a bit and can be used to make lethal crossbow bolts.")
|
||||
.playerl(FacialExpression.FRIENDLY, "Thanks!")
|
||||
.npcl(FacialExpression.FRIENDLY, "Thank you. Take care of yourself @name.")
|
||||
.endWith() { df, player ->
|
||||
if(getQuestStage(player, SeaSlug.questName) == 11) {
|
||||
finishQuest(player, SeaSlug.questName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package content.region.kandarin.witchhaven.quest.seaslug
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.*
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class FishermanDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun newInstance(player: Player): DialoguePlugin {
|
||||
return FishermanDialogue(player)
|
||||
}
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
// Fallback to default. Always the start of Sea Slug
|
||||
openDialogue(player!!, FishermanDialogueFile(), npc)
|
||||
return true
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.FISHERMAN_702, NPCs.FISHERMAN_703, NPCs.FISHERMAN_704)
|
||||
}
|
||||
}
|
||||
|
||||
class FishermanDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
b.onPredicate { _ -> true }
|
||||
.player(FacialExpression.FRIENDLY, "Hello there.")
|
||||
.line("Their eyes are staring vacantly into space.")
|
||||
.branch { player ->
|
||||
return@branch (1 .. 1).random()
|
||||
}.let { branch ->
|
||||
branch.onValue(0)
|
||||
.npc(FacialExpression.AMAZED, "Ye mariners all, as ye pass by,")
|
||||
.npc(FacialExpression.AMAZED, "Come in and drink if you are dry,")
|
||||
.npc(FacialExpression.AMAZED, "Come spend, me lads, your money brisk,")
|
||||
.npc(FacialExpression.AMAZED, "And pop your nose in a jug of this.")
|
||||
.player("You're not fooling anyone you know.")
|
||||
.npc(FacialExpression.AMAZED, "We fooled you easily enough.")
|
||||
.end()
|
||||
|
||||
branch.onValue(1)
|
||||
.npcl(FacialExpression.AMAZED,"You are not part of our family...")
|
||||
.playerl("Umm. Not last time I checked.")
|
||||
.npcl(FacialExpression.AMAZED,"Soon you will be... Soon you will...")
|
||||
.end()
|
||||
|
||||
branch.onValue(2)
|
||||
.npcl(FacialExpression.AMAZED,"Keep away human... Leave or face the deep blue...")
|
||||
.playerl("Pardon?")
|
||||
.npcl(FacialExpression.AMAZED,"You will all end up in the blue... Deep deep under the blue...")
|
||||
.end()
|
||||
|
||||
branch.onValue(3)
|
||||
.npcl(FacialExpression.AMAZED,"Lost to us.. She is Lost to us...")
|
||||
.playerl("Who is lost?")
|
||||
.npcl(FacialExpression.AMAZED,"Trapped by the light... Lost and trapped...")
|
||||
.playerl("Ermm... So you don't want to tell me then?")
|
||||
.npcl(FacialExpression.AMAZED,"Trapped... In stone and darkness...")
|
||||
.end()
|
||||
|
||||
branch.onValue(4)
|
||||
.npcl(FacialExpression.AMAZED,"Must find family...")
|
||||
.playerl("What?")
|
||||
.npcl(FacialExpression.AMAZED,"Soon we will all be together...")
|
||||
.playerl("Are you ok?")
|
||||
.npcl(FacialExpression.AMAZED,"Must find family... They are all under the blue... Deep deep under the blue...")
|
||||
.playerl("Ermm... I'll leave you to it then.")
|
||||
.end()
|
||||
|
||||
branch.onValue(5)
|
||||
.npcl(FacialExpression.AMAZED,"Free of the deep blue we are...")
|
||||
.npcl(FacialExpression.AMAZED,"We must find...")
|
||||
.playerl("Yes?")
|
||||
.npcl(FacialExpression.AMAZED,"a new home...")
|
||||
.npcl(FacialExpression.AMAZED,"We must leave this place...")
|
||||
.playerl("Where will you go?")
|
||||
.npcl(FacialExpression.AMAZED,"Away.. Away to her...")
|
||||
.playerl("Riiight.")
|
||||
.end()
|
||||
|
||||
branch.onValue(6)
|
||||
.npcl(FacialExpression.AMAZED,"Below the deep, deep blue she waits...")
|
||||
.playerl("Who waits?")
|
||||
.npcl(FacialExpression.AMAZED,"They came to her with fire and faith...")
|
||||
.playerl("Who? Who came to who?")
|
||||
.npcl(FacialExpression.AMAZED,"Too many... Too many...")
|
||||
.playerl("Too many what? Make sense!")
|
||||
.npcl(FacialExpression.AMAZED,"Locked away for all eternity...")
|
||||
.playerl("You'd better start making sense Sonny Jim or I'll...")
|
||||
.npcl(FacialExpression.AMAZED,"Free... Soon to be free...")
|
||||
.end()
|
||||
|
||||
branch.onValue(7)
|
||||
.npcl(FacialExpression.AMAZED,"Must escape the blue.. Deep deep blue")
|
||||
.playerl("Pardon?")
|
||||
.npcl(FacialExpression.AMAZED,"Family... Under the blue... Must escape the blue...")
|
||||
.end()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
package content.region.kandarin.witchhaven.quest.seaslug
|
||||
|
||||
import content.region.asgarnia.falador.quest.recruitmentdrive.RecruitmentDrive
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.world.map.Location
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Components
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class HolgartDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
b.onQuestStages(SeaSlug.questName, 0)
|
||||
.playerl(FacialExpression.FRIENDLY, "Hello.")
|
||||
.npcl(FacialExpression.FRIENDLY, "Well hello @g[m'lad,m'laddy]. Beautiful day isn't it?")
|
||||
.playerl("Not bad I suppose.")
|
||||
.npcl("Just smell that sea air... beautiful.")
|
||||
.playerl(FacialExpression.THINKING, "Hmm... lovely...")
|
||||
.end()
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 1)
|
||||
.npcl(FacialExpression.FRIENDLY, "Hello, m'hearty.")
|
||||
.playerl("I would like a ride on your boat to the fishing platform.")
|
||||
.npcl(FacialExpression.SAD, "I'm afraid it isn't sea worthy, it's full of holes. To fill the holes I'll need some swamp paste.")
|
||||
.playerl(FacialExpression.THINKING, "Swamp paste?")
|
||||
.npcl("Yes, swamp tar mixed with flour and heated over a fire.")
|
||||
.branch { player ->
|
||||
return@branch if (inInventory(player, Items.SWAMP_PASTE_1941)) { 1 } else { 0 }
|
||||
}.let { branch ->
|
||||
branch.onValue(0)
|
||||
.playerl("Where can I find swamp tar?")
|
||||
.npcl("Unfortunately the only supply of swamp tar is in the swamps below Lumbridge. It's too far for an old man like me to travel.")
|
||||
.npcl("If you make me some swamp paste I'll give you a ride in my boat.")
|
||||
.playerl("I'll see what I can do.")
|
||||
.endWith() { df, player ->
|
||||
if(getQuestStage(player, SeaSlug.questName) == 1) {
|
||||
setQuestStage(player, SeaSlug.questName, 2)
|
||||
}
|
||||
}
|
||||
branch.onValue(1)
|
||||
.npcl("In fact, unless me nose be mistaken, you've got some in yer pack.")
|
||||
.playerl("Oh yes, I forgot about that stuff. Can you use it?")
|
||||
.npcl("Aye @g[lad,lass]. That be perfect.")
|
||||
.betweenStage { _, player, _, _ ->
|
||||
removeItem(player, Items.SWAMP_PASTE_1941)
|
||||
}
|
||||
.iteml(Items.SWAMP_PASTE_1941, "You give Holgart the swamp paste.")
|
||||
// Cutscene
|
||||
.endWith() { df, player ->
|
||||
if(getQuestStage(player, SeaSlug.questName) == 1) {
|
||||
setQuestStage(player, SeaSlug.questName, 3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 2)
|
||||
.playerl(FacialExpression.FRIENDLY, "Hello.")
|
||||
.npcl("Hello, m'hearty. Did you manage to make some swamp paste?")
|
||||
.branch { player ->
|
||||
return@branch if (inInventory(player, Items.SWAMP_PASTE_1941)) { 1 } else { 0 }
|
||||
}.let { branch ->
|
||||
branch.onValue(0)
|
||||
.playerl("I'm afraid not.")
|
||||
.npcl("It's simply swamp tar mixed with flour heated over a fire. Unfortunately the only supply of swamp tar is in the swamps below Lumbridge.")
|
||||
.npcl("I can't fix my row boat without it.")
|
||||
.playerl("Ok, I'll try to find some.")
|
||||
.end()
|
||||
branch.onValue(1)
|
||||
.playerl("Yes, I have some here.")
|
||||
.betweenStage { _, player, _, _ ->
|
||||
removeItem(player, Items.SWAMP_PASTE_1941)
|
||||
}
|
||||
.iteml(Items.SWAMP_PASTE_1941, "You give Holgart the swamp paste.")
|
||||
// Cutscene
|
||||
.endWith() { df, player ->
|
||||
if(getQuestStage(player, SeaSlug.questName) == 2) {
|
||||
setQuestStage(player, SeaSlug.questName, 3)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 3,4,5,6,7,8,9,10,11,100)
|
||||
.playerl(FacialExpression.FRIENDLY, "Hello, Holgart.")
|
||||
.npcl("Hello again land lover. There's some strange goings on, on that platform, I tell you.")
|
||||
.options().let { optionBuilder ->
|
||||
optionBuilder.option("Will you take me there?")
|
||||
.playerl(FacialExpression.THINKING, "Will you take me there?")
|
||||
.npcl("Of course m'hearty. If that's what you want.")
|
||||
.endWith() { df, player ->
|
||||
SeaSlugListeners.seaslugBoatTravel(player, 0)
|
||||
}
|
||||
|
||||
optionBuilder.option_playerl("I'm keeping away from there.")
|
||||
.npcl("Fair enough m'hearty.")
|
||||
.end()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package content.region.kandarin.witchhaven.quest.seaslug
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.world.map.Location
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class HolgartIslandDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
b.onQuestStages(SeaSlug.questName, 0,1,2,3,5,6,7,8,9,10,11,100)
|
||||
.playerl("We'd better get back to the platform so we can see what's going on.")
|
||||
.npcl(FacialExpression.SUSPICIOUS, "You're right. It all sounds pretty creepy.")
|
||||
.endWith() { df, player ->
|
||||
SeaSlugListeners.seaslugBoatTravel(player, 3)
|
||||
}
|
||||
b.onQuestStages(SeaSlug.questName, 4)
|
||||
.playerl("Where are we?")
|
||||
.npc("Someway off mainland still. You'd better see if me old", "matey's okay.")
|
||||
.end()
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package content.region.kandarin.witchhaven.quest.seaslug
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.FacialExpression
|
||||
|
||||
class HolgartPlatformDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
b.onQuestStages(SeaSlug.questName, 0,1,2,3,5,6,7,8,9,10,100)
|
||||
.playerl(FacialExpression.FRIENDLY, "Hey, Holgart.")
|
||||
.npcl("Have you had enough of this place yet? It's really starting to scare me.")
|
||||
.options().let { optionBuilder ->
|
||||
optionBuilder.option_playerl("Okay, let's go back.")
|
||||
.endWith() { df, player ->
|
||||
SeaSlugListeners.seaslugBoatTravel(player, 1)
|
||||
}
|
||||
optionBuilder.option_playerl("No, I'm going to stay a while.")
|
||||
.npcl("Okay... you're the boss.")
|
||||
.end()
|
||||
}
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 4)
|
||||
.playerl("Holgart, something strange is going on here.")
|
||||
.npcl("You're telling me, none of the sailors seem to remember who I am.")
|
||||
.playerl("Apparently Kennith's father left for help a couple of days ago.")
|
||||
.npcl("That's a worry, no-one's heard from him on shore. Come on, we'd better go look for him.")
|
||||
.endWith() { df, player ->
|
||||
SeaSlugListeners.seaslugBoatTravel(player, 2)
|
||||
}
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 11)
|
||||
.playerl("Did you get the kid back to shore?")
|
||||
.npcl("Yes, he's safe and sound with his parents. Your turn to return to land now adventurer.")
|
||||
.playerl("Looking forward to it.")
|
||||
.endWith() { df, player ->
|
||||
SeaSlugListeners.seaslugBoatTravel(player, 1)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package content.region.kandarin.witchhaven.quest.seaslug
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.world.map.Location
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class KennithDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
b.onQuestStages(SeaSlug.questName, 0,1,2,3)
|
||||
.playerl(FacialExpression.THINKING, "Are you okay young one?")
|
||||
.npcl(FacialExpression.CHILD_SAD, "No, I want daddy!")
|
||||
.playerl("Where is your father?")
|
||||
.npcl(FacialExpression.CHILD_SAD, "He went to get help days ago.")
|
||||
.npcl(FacialExpression.CHILD_SAD, "The nasty fishermen tried to throw me and daddy into the sea. So he told me to hide here.")
|
||||
.playerl("That's good advice, you stay here and I'll go try and find your father.")
|
||||
.endWith() { df, player ->
|
||||
if(getQuestStage(player, SeaSlug.questName) == 3) {
|
||||
setQuestStage(player, SeaSlug.questName, 4)
|
||||
}
|
||||
}
|
||||
b.onQuestStages(SeaSlug.questName, 4,5,6)
|
||||
.playerl(FacialExpression.THINKING, "Are you okay?")
|
||||
.npcl(FacialExpression.CHILD_SAD, "I want to see daddy!")
|
||||
.playerl("I'm working on it.")
|
||||
.end()
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 7)
|
||||
.playerl("Hello Kennith, are you okay?")
|
||||
.npcl(FacialExpression.CHILD_SAD, "No, I want my daddy.")
|
||||
.playerl("You'll be able to see him soon. First we need to get you back to land, come with me to the boat.")
|
||||
.npcl(FacialExpression.CHILD_SHOCKED, "No!")
|
||||
.playerl("What, why not?")
|
||||
.npcl(FacialExpression.CHILD_SHOCKED, "I'm scared of those nasty sea slugs. I won't go near them.")
|
||||
.playerl("Okay, you wait here and I'll go figure another way to get you out.")
|
||||
.endWith() { df, player ->
|
||||
if(getQuestStage(player, SeaSlug.questName) == 7) {
|
||||
setQuestStage(player, SeaSlug.questName, 8)
|
||||
}
|
||||
}
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 8)
|
||||
// This stage is unfortunately left out. You can't interact with Kennith authentically.
|
||||
.end()
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 9)
|
||||
.playerl("Kennith, I've made an opening in the wall. You can come out through there.")
|
||||
.npcl(FacialExpression.CHILD_THINKING, "Are there any sea slugs on the other side?")
|
||||
.playerl("Not one.")
|
||||
.npcl(FacialExpression.CHILD_THINKING, "How will I get downstairs?")
|
||||
.playerl("I'll figure that out in a moment.")
|
||||
.npcl(FacialExpression.CHILD_NORMAL, "Ok, when you have I'll come out.")
|
||||
.endWith() { df, player ->
|
||||
if(getQuestStage(player, SeaSlug.questName) == 9) {
|
||||
setQuestStage(player, SeaSlug.questName, 10)
|
||||
}
|
||||
}
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 10)
|
||||
// This stage is also unfortunately left out. You can't interact with Kennith authentically.
|
||||
.end()
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 11,100)
|
||||
// Kennith is varp swapped out, so is no longer here.
|
||||
.end()
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package content.region.kandarin.witchhaven.quest.seaslug
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.world.map.Location
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class KentDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
b.onQuestStages(SeaSlug.questName, 0,1,2,3,4,5,6)
|
||||
.npcl("Oh thank Saradomin! I thought I'd be left out here forever.")
|
||||
.playerl("Your wife sent me out to find you and your boy. Kennith's fine by the way, he's on the platform.")
|
||||
.npcl("I knew the row boat wasn't sea worthy. I couldn't risk bringing him along but you must get him off that platform.")
|
||||
.playerl("What's going on here?")
|
||||
.npcl("Five days ago we pulled in a huge catch. As well as fish we caught small slug like creatures, hundreds of them.")
|
||||
.npcl("That's when the fishermen began to act strange.")
|
||||
.npcl("It was the sea slugs, they attack themselves to your body and somehow take over the mind of the carrier.")
|
||||
.npcl("I told Kennith to hide until I returned but I was washed up here.")
|
||||
.npcl("Please go back and get my boy, you can send help for me later.")
|
||||
.npcl(FacialExpression.EXTREMELY_SHOCKED, "@name wait!")
|
||||
.betweenStage { _, player, _, _ ->
|
||||
visualize(npc!!, 4807, 790)
|
||||
sendMessage(player, "*slooop*")
|
||||
sendMessage(player, "He pulls a sea slug from under your top.")
|
||||
}
|
||||
.npcl("A few more minutes and that thing would have full control of your body.")
|
||||
.playerl(FacialExpression.EXTREMELY_SHOCKED, "Yuck! Thanks Kent.")
|
||||
.endWith() { df, player ->
|
||||
if(getQuestStage(player, SeaSlug.questName) == 4) {
|
||||
setQuestStage(player, SeaSlug.questName, 5)
|
||||
}
|
||||
}
|
||||
|
||||
b.onQuestStages(SeaSlug.questName, 5,6,7,8,9,10,11,100)
|
||||
.playerl("Hello.")
|
||||
.npcl("Oh my, I must get back to shore.")
|
||||
.end()
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
package content.region.kandarin.witchhaven.quest.seaslug
|
||||
|
||||
import content.region.morytania.quest.creatureoffenkenstrain.CreatureOfFenkenstrain
|
||||
import core.api.*
|
||||
import core.game.node.entity.player.link.quest.Quest
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
|
||||
/**
|
||||
* Sea Slug Quest
|
||||
*
|
||||
* Note that the varp 159 controls the quest AND some environments:
|
||||
* The BADLY_REPAIRED_WALL_18381 disappears after varp 159 is set to 9
|
||||
* KENNITH_4864 disappears after varp 159 is set to 11
|
||||
* KENNITH_4865 (but ID 4864) appears after varp 159 is set to 11
|
||||
*
|
||||
* https://www.youtube.com/watch?v=lf83SACuIDw (This is amazing)
|
||||
* https://www.youtube.com/watch?v=VnghpKbUqKw
|
||||
* https://www.youtube.com/watch?v=thHuATlGYag
|
||||
* https://www.youtube.com/watch?v=VR91Rbyuou4 (This has many other unvisited paths)
|
||||
*/
|
||||
@Initializable
|
||||
class SeaSlug : Quest("Sea Slug", 109, 108, 1,159, 0, 1, 12) {
|
||||
|
||||
companion object {
|
||||
const val questName = "Sea Slug"
|
||||
const val questVarp = 159
|
||||
}
|
||||
override fun drawJournal(player: Player, stage: Int) {
|
||||
super.drawJournal(player, stage)
|
||||
var line = 12
|
||||
var stage = getStage(player)
|
||||
|
||||
var started = getQuestStage(player, questName) > 0
|
||||
|
||||
if (!started) {
|
||||
line(player, "I can start this quest by speaking to !!Caroline?? who is !!East??", line++, false)
|
||||
line(player, "!!of Ardougne??.", line++, false)
|
||||
line++
|
||||
line(player, "Requirements:", line++, false)
|
||||
// I think this is an old line. I saw it being the other line for 30 Firemaking reqs.
|
||||
line(player, "You'll need level 30 !!Firemaking??", line++, hasLevelStat(player, Skills.FIREMAKING, 30))
|
||||
// line(player, "!!Level 30 Firemaking??", line++, hasLevelStat(player, Skills.FIREMAKING, 30))
|
||||
} else {
|
||||
line(player, "I have spoken to Caroline and agreed to help", line++, true)
|
||||
line++
|
||||
|
||||
if (stage >= 3) {
|
||||
line(player, "I gave Holgart the Swamp Paste and his boat is now ready", line++, true)
|
||||
line(player, "to take me to the Fishing Platform", line++, true)
|
||||
} else if (stage >= 2) {
|
||||
// authentic from https://www.youtube.com/watch?v=VnghpKbUqKw
|
||||
line(player, "I've spoken to !!Holgart?? but his boat is broken", line++, false)
|
||||
line(player, "He needs me to bring him some !!Swamp Paste??", line++, false)
|
||||
line++
|
||||
line(player, "I can make !!Swamp Paste?? by mixing !!Swamp Tar?? with !!Flour?? and", line++, false)
|
||||
line(player, "then heating the mixture on a !!Fire??", line++, false)
|
||||
line(player, "I can find !!Swamp Tar?? in the !!Swamp South of Lumbridge??", line++, false)
|
||||
line++
|
||||
line(player, "I need to get to the !!Fishing Platform?? and find out what's", line++, false)
|
||||
line(player, "happened to Kent and Kennith", line++, false)
|
||||
} else if (stage >= 1) {
|
||||
// derived
|
||||
line(player, "I need to speak to !!Holgart??.", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 5) {
|
||||
line++
|
||||
line(player, "I've found Kennith, he's hiding behind some boxes.", line++, true)
|
||||
line++
|
||||
line(player, "I've found Kent on a small island", line++, true)
|
||||
} else if (stage >= 4) {
|
||||
line++
|
||||
line(player, "I've found Kennith, he's hiding behind some boxes.", line++, true)
|
||||
line++
|
||||
line(player, "I need to find !!Kent??", line++, false)
|
||||
} else if (stage >= 3) {
|
||||
line++
|
||||
line(player, "I need to find !!Kent?? and !!Kennith??", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 9) {
|
||||
line++
|
||||
line(player, "!!Kent?? has asked me to help !!Kennith?? escape", line++, true)
|
||||
} else if (stage >= 5) {
|
||||
line++
|
||||
line(player, "!!Kent?? has asked me to help !!Kennith?? escape", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 9) {
|
||||
line(player, "After speaking to Bailey, I found that Sea Slugs are", line++, true)
|
||||
line(player, "afraid of heat.", line++, true)
|
||||
line(player, "I should find a way of lighting this damp torch.", line++, true)
|
||||
} else if (stage >= 6) {
|
||||
line(player, "After speaking to !!Bailey??, I found that Sea Slugs are", line++, false)
|
||||
line(player, "afraid of heat.", line++, false)
|
||||
line(player, "I should find a way of lighting this damp torch.", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 8) {
|
||||
// Disappears
|
||||
} else if (stage >= 7) {
|
||||
// Derived
|
||||
line(player, "I should talk to !!Kennith??", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 9) {
|
||||
line(player, "I've created an opening to let Kennith escape", line++, true)
|
||||
} else if (stage >= 8) {
|
||||
// Derived
|
||||
line(player, "I need to find a way to get !!Kennith?? out", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 10) {
|
||||
line++
|
||||
line(player, "Kennith can't get downstairs without some help", line++, true)
|
||||
} else if (stage >= 9) {
|
||||
// Derived
|
||||
line++
|
||||
line(player, "I should talk to !!Kennith?? again", line++, false)
|
||||
}
|
||||
|
||||
|
||||
if (stage >= 11) {
|
||||
line++
|
||||
line(player, "I've used the Crane to lower Kennith into the boat", line++, true)
|
||||
} else if (stage >= 10) {
|
||||
line++
|
||||
line(player, "!!Kennith?? won't go near the !!Sea Slugs??", line++, false)
|
||||
line(player, "I need to find another way to get him out", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 100) {
|
||||
line++
|
||||
line(player, "I've spoken to Caroline and she thanked me for", line++, true)
|
||||
line(player, "rescuing her family from the Sea Slugs", line++, true)
|
||||
} else if (stage >= 11) {
|
||||
line++
|
||||
line(player, "I need to take the boat back to shore and talk to !!Caroline??", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 100) {
|
||||
line++
|
||||
line(player,"<col=FF0000>QUEST COMPLETE!</col>", line)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun reset(player: Player) {
|
||||
// removeAttribute(player, attributeTalkedToHolgart)
|
||||
}
|
||||
|
||||
override fun finish(player: Player) {
|
||||
var ln = 10
|
||||
super.finish(player)
|
||||
player.packetDispatch.sendString("You have completed Sea Slug!", 277, 4)
|
||||
player.packetDispatch.sendItemZoomOnInterface(Items.SEA_SLUG_1466,230,277,5)
|
||||
|
||||
drawReward(player, "1 Quest Point", ln++)
|
||||
drawReward(player, "7175 Fishing XP", ln++)
|
||||
drawReward(player, "Oyster pearls", ln++)
|
||||
|
||||
rewardXP(player, Skills.FISHING, 7175.0)
|
||||
addItemOrDrop(player, Items.OYSTER_PEARLS_413)
|
||||
}
|
||||
|
||||
override fun setStage(player: Player, stage: Int) {
|
||||
super.setStage(player, stage)
|
||||
this.updateVarps(player)
|
||||
}
|
||||
|
||||
override fun updateVarps(player: Player) {
|
||||
// The quest stages are perfectly aligned with the varp since the varp controls npcs and sceneries
|
||||
if (getQuestStage(player, questName) >= 12) {
|
||||
setVarp(player, questVarp, 12, true) // Except for stage 100 which is varp set to 12 obviously.
|
||||
} else {
|
||||
setVarp(player, questVarp, getQuestStage(player, questName), true)
|
||||
}
|
||||
}
|
||||
|
||||
override fun newInstance(`object`: Any?): Quest {
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
package content.region.kandarin.witchhaven.quest.seaslug
|
||||
|
||||
import core.api.*
|
||||
import core.game.global.action.ClimbActionHandler
|
||||
import core.game.interaction.IntType
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.interaction.QueueStrength
|
||||
import core.game.node.entity.combat.ImpactHandler
|
||||
import core.game.node.entity.combat.ImpactHandler.HitsplatType
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.world.map.Location
|
||||
import org.rs09.consts.Components
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
import org.rs09.consts.Scenery
|
||||
|
||||
class SeaSlugListeners : InteractionListener {
|
||||
|
||||
companion object {
|
||||
|
||||
// The boat travels are animated nicely for you by un-hiding child 10 - 13
|
||||
val BOAT_TRAVEL_CHILD = arrayOf(10, 11, 12, 13)
|
||||
val BOAT_TRAVEL_TICKS = arrayOf(5, 9, 8, 7)
|
||||
val BOAT_TRAVEL_DESTINATION = arrayOf(
|
||||
Location(2782, 3273), // From LAND to PLATFORM
|
||||
Location(2721, 3304), // From PLATFORM to LAND
|
||||
Location(2800, 3320), // From PLATFORM to ISLAND
|
||||
Location(2782, 3273), // From ISLAND to PLATFORM
|
||||
)
|
||||
val BOAT_TRAVEL_DIALOGUE = arrayOf(
|
||||
"You arrive at the fishing platform.", // From LAND to PLATFORM
|
||||
"The boat arrives at Witchaven.", // From PLATFORM to LAND
|
||||
"You arrive on a small island.", // From PLATFORM to ISLAND
|
||||
"You arrive at the fishing platform.", // From ISLAND to PLATFORM
|
||||
)
|
||||
|
||||
fun seaslugBoatTravel(player: Player, travelIndex: Int) {
|
||||
if (travelIndex == 0) {
|
||||
// Prevent bringing lit torches.
|
||||
while(removeItem(player, Items.LIT_TORCH_594)) {
|
||||
sendMessage(player, "Your torch goes out on the crossing.")
|
||||
addItemOrDrop(player, Items.UNLIT_TORCH_596)
|
||||
}
|
||||
}
|
||||
queueScript(player, 0, QueueStrength.SOFT) { stage: Int ->
|
||||
when(stage){
|
||||
0 -> {
|
||||
closeOverlay(player)
|
||||
openOverlay(player, Components.FADE_TO_BLACK_120)
|
||||
lock(player, 2)
|
||||
return@queueScript delayScript(player, 1)
|
||||
}
|
||||
1 -> {
|
||||
teleport(player, BOAT_TRAVEL_DESTINATION[travelIndex])
|
||||
openOverlay(player, Components.SEASLUG_BOAT_TRAVEL_461)
|
||||
setComponentVisibility(player, Components.SEASLUG_BOAT_TRAVEL_461, BOAT_TRAVEL_CHILD[travelIndex], false)
|
||||
lock(player, BOAT_TRAVEL_TICKS[travelIndex])
|
||||
return@queueScript delayScript(player, BOAT_TRAVEL_TICKS[travelIndex])
|
||||
}
|
||||
2 -> {
|
||||
sendDialogue(player, BOAT_TRAVEL_DIALOGUE[travelIndex])
|
||||
player.interfaceManager.closeOverlay()
|
||||
openOverlay(player, Components.FADE_FROM_BLACK_170)
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
}
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
override fun defineListeners() {
|
||||
// https://www.youtube.com/watch?v=VR91Rbyuou4
|
||||
// Your tinderbox is damp from the sea crossing. It won't light here.
|
||||
// Your torch goes out on the crossing.
|
||||
|
||||
onUseWith(IntType.ITEM, Items.SWAMP_TAR_1939, Items.POT_OF_FLOUR_1933){ player, used, with ->
|
||||
if(removeItem(player, used) && removeItem(player, with)) {
|
||||
sendMessage(player, "You mix the flour with the swamp tar.")
|
||||
sendMessage(player, "It mixes into a paste.")
|
||||
addItemOrDrop(player, Items.EMPTY_POT_1931)
|
||||
addItemOrDrop(player, Items.RAW_SWAMP_PASTE_1940)
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
// You can only cook it using firewood.
|
||||
// sendMessage(player, "You can't cook that in a range.")
|
||||
onUseWith(SCENERY, Items.RAW_SWAMP_PASTE_1940, Scenery.FIRE_2732) { player, used, with ->
|
||||
if(removeItem(player, used)) {
|
||||
sendMessage(player, "You warm the paste over the fire. It thickens into a sticky goo.")
|
||||
addItemOrDrop(player, Items.SWAMP_PASTE_1941)
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
|
||||
on(Scenery.LADDER_18324, IntType.SCENERY, "climb-up") { player, _ ->
|
||||
if (getQuestStage(player, SeaSlug.questName) in 5..6) {
|
||||
if (getQuestStage(player, SeaSlug.questName) == 6 && inInventory(player, Items.LIT_TORCH_594)) {
|
||||
setQuestStage(player, SeaSlug.questName, 7)
|
||||
ClimbActionHandler.climb(player, ClimbActionHandler.CLIMB_UP, Location(2784, 3285, 1))
|
||||
} else {
|
||||
animate(player, 4785)
|
||||
sendMessage(player, "You attempt to climb up the ladder.")
|
||||
sendMessage(player, "The fisherman approach you...")
|
||||
sendMessage(player, "and smack you on the head with a fishing rod!")
|
||||
sendMessage(player, "Ouch!")
|
||||
sendChat(player, "Ouch!")
|
||||
player.impactHandler.manualHit(player, 4, ImpactHandler.HitsplatType.NORMAL)
|
||||
}
|
||||
} else {
|
||||
ClimbActionHandler.climb(player, ClimbActionHandler.CLIMB_UP, Location(2784, 3285, 1))
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
on(Scenery.LADDER_18325, IntType.SCENERY, "climb-down") { player, _ ->
|
||||
ClimbActionHandler.climb(player, ClimbActionHandler.CLIMB_DOWN, Location(2784, 3287, 0))
|
||||
return@on true
|
||||
}
|
||||
|
||||
on(Scenery.BADLY_REPAIRED_WALL_18381, IntType.SCENERY, "kick") { player, _ ->
|
||||
if(getQuestStage(player, SeaSlug.questName) == 8) {
|
||||
animate(player, 4804)
|
||||
sendMessage(player, "You kick the loose panel.")
|
||||
sendMessage(player, "The wood is rotted and crumbles away...")
|
||||
sendMessage(player, "... leaving an opening big enough for Kennith to climb through.")
|
||||
setQuestStage(player, SeaSlug.questName, 9)
|
||||
} else {
|
||||
// https://youtu.be/OM-akv7oIZ0 2:41
|
||||
sendMessage(player, "You kick the loose panel...")
|
||||
sendMessage(player, "... but nothing interesting happens.")
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
|
||||
on(Scenery.CRANE_18327, IntType.SCENERY, "rotate") { player, node ->
|
||||
if(getQuestStage(player, SeaSlug.questName) == 10) {
|
||||
// This is supposed to be a cutscene, but goddamn do I hate programming cutscenes.
|
||||
lock(player, 6)
|
||||
player.dialogueInterpreter.sendPlainMessage(true, "Kennith scrambles through the broken wall...")
|
||||
replaceScenery(node as core.game.node.scenery.Scenery, Scenery.CRANE_18326, 6)
|
||||
animateScenery(node as core.game.node.scenery.Scenery, 4798)
|
||||
setQuestStage(player, SeaSlug.questName, 11)
|
||||
queueScript(player, 6, QueueStrength.SOFT) { stage: Int ->
|
||||
sendDialogue(player, "Down below, you see Holgart collect the boy from the crane and lead him away to safety.")
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
} else {
|
||||
sendMessage(player, "You rotate the crane around.")
|
||||
animateScenery(node as core.game.node.scenery.Scenery, 4796)
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
|
||||
onUseWith(IntType.ITEM, Items.DAMP_STICKS_1467, Items.BROKEN_GLASS_1469){ player, used, with ->
|
||||
if(removeItem(player, used)) {
|
||||
visualize(player, 4809, 791)
|
||||
addItemOrDrop(player, Items.DRY_STICKS_1468)
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
onUseWith(IntType.ITEM, Items.DRY_STICKS_1468, Items.UNLIT_TORCH_596){ player, bolt, tip ->
|
||||
addItemOrDrop(player, Items.LIT_TORCH_594)
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
on(Items.DRY_STICKS_1468, ITEM, "rub-together") { player, _ ->
|
||||
sendMessage(player, "You rub together the dry sticks and the sticks catch alight.")
|
||||
if(removeItem(player, Items.UNLIT_TORCH_596)) {
|
||||
sendMessage(player, "You place the smouldering twigs to your torch.")
|
||||
sendMessage(player, "Your torch lights.")
|
||||
addItemOrDrop(player, Items.LIT_TORCH_594)
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
|
||||
|
||||
on(NPCs.SEA_SLUG_1006, IntType.NPC, "take") { player, _ ->
|
||||
sendMessage(player, "You pick up the sea slug.")
|
||||
sendMessage(player, "It sinks its teeth deep into your hand.")
|
||||
sendMessage(player, "You drop the sea slug.")
|
||||
sendChat(player, "Ouch!")
|
||||
impact(player, 3, HitsplatType.NORMAL)
|
||||
return@on true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -90,6 +90,9 @@ public enum FacialExpression {
|
|||
//9855-9857 are like disgusted? does it just repeat after this?
|
||||
|
||||
//Child Chathead?
|
||||
CHILD_ANGRY(7168),
|
||||
CHILD_SIDE_EYE(7169),
|
||||
CHILD_THINKING_2(7170),
|
||||
CHILD_EVIL_LAUGH(7171),
|
||||
CHILD_FRIENDLY(7172),
|
||||
CHILD_NORMAL(7173),
|
||||
|
|
@ -98,8 +101,8 @@ public enum FacialExpression {
|
|||
CHILD_THINKING(7176),
|
||||
CHILD_SAD(7177),
|
||||
CHILD_GUILTY(7178),
|
||||
CHILD_SUSPICIOUS(7179); //TODO: More?
|
||||
|
||||
CHILD_SUSPICIOUS(7179),
|
||||
CHILD_SHOCKED(7180); //TODO: More?
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue