Fight Arena bug fixes

Added access to fightslave conversation through the prison wall
Added drop for Khazard guards and General Khazard
Added face location for each npc
Added missing dialogues for each npc
Corrected the quest complete interface
Corrected quest journal text
Fixed barman who didn't sell Khali Brew after completing quest
Fixed center doors to arena (player no longer gets stuck in cutscene) and corrected walking through the door
Fixed small head in dialogues for General Khazard
Increased the time of dissapearing for Ogre, Scoprion and Bouncer 144 -> 300 ticks
Lazy guard falls asleep and leaves the keys after being given khali brew
Can get replacement keys if lost
Sped up the camera movement for the bouncer and scorpion cutscene
The sequence of entering the cell after the fight with the ogre has been sped up
This commit is contained in:
szumaster
2023-06-09 14:11:36 +00:00
committed by Ryan
parent bd12800cca
commit 33064660cf
32 changed files with 916 additions and 799 deletions
+1 -1
View File
@@ -59066,7 +59066,7 @@
} }
], ],
"charm": [], "charm": [],
"ids": "1904,6368,6367,912,913,914,255,256,27,34,35,689,690,691,3814,3816,4402,4403", "ids": "1904,6368,6367,912,913,914,253,254,255,256,258,27,34,35,689,690,691,3814,3816,4402,4403",
"description": "", "description": "",
"main": [ "main": [
{ {
+1 -1
View File
@@ -757,7 +757,7 @@
}, },
{ {
"npc_id": "267", "npc_id": "267",
"loc_data": "{2601,3168,0,0,3}" "loc_data": "{2601,3168,0,1,3}"
}, },
{ {
"npc_id": "268", "npc_id": "268",
@@ -6,6 +6,7 @@ import core.game.node.entity.player.Player
import core.game.node.entity.player.link.quest.Quest import core.game.node.entity.player.link.quest.Quest
import core.game.node.entity.skill.Skills import core.game.node.entity.skill.Skills
import core.plugin.Initializable import core.plugin.Initializable
import org.rs09.consts.Items
import org.rs09.consts.Items.COINS_995 import org.rs09.consts.Items.COINS_995
@Initializable @Initializable
@@ -20,47 +21,42 @@ class FightArena : Quest("Fight Arena", 61, 60, 2, 17, 0, 1, 14) {
line(player, "I can start this quest by speaking to !!Lady Servil?? just", line++) line(player, "I can start this quest by speaking to !!Lady Servil?? just", line++)
line(player, "!!North-West?? of the !!Khazard Port??.", line++) line(player, "!!North-West?? of the !!Khazard Port??.", line++)
line += 1 line += 1
line(player, "I must be able to defeat a !!level 137?? enemy.", line++) line(player, "I must be able to defeat a !!level 137?? enemy.", line++, player.properties.combatLevel >= 89)
line++ line++
} }
if (stage >= 10) { if (stage >= 10) {
line(player, "I encountered a distraught Lady Servil,", line++, stage > 10) line += 1
line(player, "who said that her son and husband", line++, stage > 10) line(player, "I encountered a distraught Lady Servil, who said that her son and", line++, stage > 10)
line(player, "had been kidnapped by the evil General Khazard,", line++, stage > 10) line(player, "husband had been kidnapped by the evil General Khazard,", line++, stage > 10)
line(player, "and were being forced to fight in his fight arena.", line++, stage > 10) line(player, "and were being forced to fight in his fight arena.", line++, stage > 10)
line += 1 line += 1
line(player, "I headed to the arena to try and find Lady Servil's son and husband.", line++, stage > 10) line(player, "I headed to the arena to try and find Lady Servil's son and husband.", line++, stage > 10)
line++ line++
} }
if (stage >= 20) { if (stage >= 20) {
line(player, "I found some Khazard armour in the armoury, on", line++, stage > 20) line(player, "I found some Khazard armour in the armoury, on the north-east edge of", line++, stage > 20)
line(player, "the north-east edge of town.", line++, stage > 20) line(player, "town. I used it to disguise myself as a guard so I could look around", line++, stage > 20)
line(player, "I used it to disguise myself as a guard so I could look around", line++, stage > 20)
line++ line++
} }
if (stage >= 35) { if (stage >= 35) {
line(player, "I found Lady Servil's son,", line++, stage > 40) line(player, "I found Lady Servil's son, Jeremy Servil, in one of the prison cells.", line++, stage > 40)
line(player, "Jeremy Servil, in one of the prison cells.", line++, stage > 40) line(player, "He told me that a bald, fat, lazy guard", line++, stage > 40)
line(player, "He told me that a bald, fat, lazy guard with a goatee", line++, stage > 40) line(player, "with a goatee was in charge of the keys.", line++, stage > 40)
line(player, "was in charge of the keys.", line++, stage > 40)
line++ line++
} }
if (stage >= 50) { if (stage >= 50) {
line(player, "I found the guard Jeremy mentioned.", line++, stage > 55) line(player, "I found the guard Jeremy mentioned. He said that he'd like a drink,", line++, stage > 55)
line(player, "He said that he'd like a drink,", line++, stage > 55)
line(player, "but too much Khali brew would make him fall asleep.", line++, stage > 55) line(player, "but too much Khali brew would make him fall asleep.", line++, stage > 55)
line++ line++
} }
if (stage >= 60) { if (stage >= 60) {
line(player, "I plied the lazy guard", line++, stage > 67) line(player, "I plied the lazy guard with some Khali brew and he passed out.", line++, stage > 67)
line(player, "with some Khali brew and he passed out.", line++, stage > 67)
line(player, "I was able to get his keys.", line++, stage > 67) line(player, "I was able to get his keys.", line++, stage > 67)
line++ line++
} }
if (stage >= 68) { if (stage >= 68) {
line(player, "I found and freed Jeremy, who told me that", line++, stage > 69) line(player, "I found and freed Jeremy, who told me that his father", line++, stage > 69)
line(player, "his father had been taken to fight in the Fight Arena.", line++, stage > 69) line(player, "had been taken to fight in the Fight Arena. We went there to save him.", line++, stage > 69)
line(player, "We went there to save him.", line++, stage > 69)
line++ line++
} }
if (stage >= 71) { if (stage >= 71) {
@@ -69,8 +65,7 @@ class FightArena : Quest("Fight Arena", 61, 60, 2, 17, 0, 1, 14) {
line++ line++
} }
if (stage >= 88) { if (stage >= 88) {
line(player, "I was led to the fight arena", line++, stage > 88) line(player, "I was led to the fight arena and forced to fight a colossal scorpion,", line++, stage > 88)
line(player, "and forced to fight a colossal scorpion,", line++, stage > 89)
line(player, "followed by Khazard's monstrous pet dog called Bouncer.", line++, stage > 90) line(player, "followed by Khazard's monstrous pet dog called Bouncer.", line++, stage > 90)
line++ line++
} }
@@ -82,10 +77,11 @@ class FightArena : Quest("Fight Arena", 61, 60, 2, 17, 0, 1, 14) {
if (stage >= 99) { if (stage >= 99) {
line(player, "I escaped from the arena and returned to Lady Servil", line++, stage == 100) line(player, "I escaped from the arena and returned to Lady Servil", line++, stage == 100)
line(player, "She thanked me profusely and rewarded me for my help.", line++, stage == 100) line(player, "She thanked me profusely and rewarded me for my help.", line++, stage == 100)
line++
} }
if (stage == 100) { if (stage == 100) {
line++ line++
line(player, "!!QUEST COMPLETE??", line, true) line(player, "!!QUEST COMPLETE??", line)
} }
} }
@@ -94,12 +90,12 @@ class FightArena : Quest("Fight Arena", 61, 60, 2, 17, 0, 1, 14) {
player ?: return player ?: return
var ln = 10 var ln = 10
player.packetDispatch.sendItemZoomOnInterface(COINS_995, 230, 277, 5) player.packetDispatch.sendItemZoomOnInterface(Items.COINS_995, 230, 277, 5)
drawReward(player, "2 Quest Point", ln++) drawReward(player, "2 Quest Point", ln++)
drawReward(player, "1000 gold coins", ln++)
drawReward(player, "12,175 Attack XP", ln++) drawReward(player, "12,175 Attack XP", ln++)
drawReward(player, "2,175 Thieving XP", ln++) drawReward(player, "2,175 Thieving XP", ln++)
drawReward(player, "1000 gold coins", ln)
rewardXP(player, Skills.ATTACK, 12175.0) rewardXP(player, Skills.ATTACK, 12175.0)
rewardXP(player, Skills.THIEVING, 2175.0) rewardXP(player, Skills.THIEVING, 2175.0)
@@ -1,5 +1,7 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena
import content.region.kandarin.ardougne.quest.arena.dialogue.*
import content.region.kandarin.ardougne.quest.arena.npc.GeneralNPC
import core.api.* import core.api.*
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
@@ -15,27 +17,34 @@ import org.rs09.consts.Scenery
class FightArenaListeners : InteractionListener { class FightArenaListeners : InteractionListener {
companion object { companion object {
const val GENERAL = 258 const val GENERAL = NPCs.GENERAL_KHAZARD_258
const val BARMAN = 259 const val BARMAN = NPCs.KHAZARD_BARMAN_259
const val KELVIN = 260 const val KELVIN = NPCs.KELVIN_260
const val JOE = 261 const val JOE = NPCs.JOE_261
const val FIGHTSLAVE = 262 const val FIGHTSLAVE = NPCs.FIGHTSLAVE_262
const val HENGARD = 263 const val HENGARD = NPCs.HENGRAD_263
const val LADY = 264 const val JEREMY_A = NPCs.JEREMY_SERVIL_265
const val JEREMY = 265 const val JEREMY_B = NPCs.JEREMY_SERVIL_266
const val JEREMYRESCUE = 266 const val JUSTIN = NPCs.JUSTIN_SERVIL_267
const val JUSTIN = 267
const val OTHERPRISONDOORS = Scenery.PRISON_DOOR_79 const val CELL_DOOR_1 = Scenery.PRISON_DOOR_79
const val JEREMYPRISONDOOR = Scenery.PRISON_DOOR_80 const val CELL_DOOR_2 = Scenery.PRISON_DOOR_80
const val MAINDOORS = Scenery.DOOR_81 const val MAIN_DOOR = Scenery.DOOR_81
const val CENTERDOOR = Scenery.DOOR_82 const val CENTER_DOOR = Scenery.DOOR_82
const val LAZYGUARD = Scenery.A_LAZY_KHAZARD_GUARD_41494
const val FULL_ARMOR_STAND = Scenery.A_SUIT_OF_ARMOUR_41490 const val A_LAZY_GUARD_1 = Scenery.A_LAZY_KHAZARD_GUARD_41494
const val A_LAZY_GUARD_2 = Scenery.A_LAZY_KHAZARD_GUARD_41496
const val A_LAZY_GUARD_3 = Scenery.A_LAZY_KHAZARD_GUARD_41497
val FULL_ARMOR_STAND = Scenery.A_SUIT_OF_ARMOUR_41490
val FULL_ARMOR_STAND_1 = getScenery(2619, 3196, 0)
val ONLY_ARMOR_STAND = Scenery.A_SUIT_OF_ARMOUR_41506
val ONLY_HELM_STAND = Scenery.A_SUIT_OF_ARMOUR_41507
val EMPTY_STAND = Scenery.A_SUIT_OF_ARMOUR_41508
private const val HELMET = Items.KHAZARD_HELMET_74 private const val HELMET = Items.KHAZARD_HELMET_74
private const val ARMOUR = Items.KHAZARD_ARMOUR_75 private const val ARMOR = Items.KHAZARD_ARMOUR_75
private const val CELLKEY = Items.KHAZARD_CELL_KEYS_76 private const val CELL_KEY = Items.KHAZARD_CELL_KEYS_76
val Jeremy = NPC(NPCs.JEREMY_SERVIL_265, Location.create(2616,3167,0)) val Jeremy = NPC(NPCs.JEREMY_SERVIL_265, Location.create(2616,3167,0))
val General = GeneralNPC(NPCs.GENERAL_KHAZARD_258, Location.create(2605,3156,0)) val General = GeneralNPC(NPCs.GENERAL_KHAZARD_258, Location.create(2605,3156,0))
@@ -61,23 +70,27 @@ class FightArenaListeners : InteractionListener {
return@on true return@on true
} }
on(JEREMY_A, IntType.NPC, "talk-to") { player, npc ->
openDialogue(player, JeremyServilADialogue(), npc)
return@on true
}
on(JEREMY_B, IntType.NPC, "talk-to") { player, npc ->
openDialogue(player, JeremyServilBDialogue(), npc)
return@on true
}
on(HENGARD, IntType.NPC, "talk-to") { player, npc -> on(HENGARD, IntType.NPC, "talk-to") { player, npc ->
openDialogue(player, HengradDialogue(), npc) openDialogue(player, HengradDialogue(), npc)
return@on true return@on true
} }
on(LADY, IntType.NPC, "talk-to") { player, npc -> on(A_LAZY_GUARD_1, SCENERY, "talk-to") { player, node ->
openDialogue(player, LadyServilDialogue(), npc) openDialogue(player, ALazyGuardDialogue(), node)
return@on true return@on true
} }
on(A_LAZY_GUARD_3, SCENERY, "talk-to") { player, node ->
on(JEREMY, NPC, "talk-to") { player, npc -> openDialogue(player, ALazyGuardDialogue(), node)
openDialogue(player, JeremyServilDialogue(), npc)
return@on true
}
on(JEREMYRESCUE, IntType.NPC, "talk-to") { player, npc ->
openDialogue(player, JeremyServilRescuedDialogue(), npc)
return@on true return@on true
} }
@@ -86,36 +99,42 @@ class FightArenaListeners : InteractionListener {
return@on true return@on true
} }
on(LAZYGUARD, SCENERY, "talk-to") { player, node -> on(FULL_ARMOR_STAND, IntType.SCENERY, "borrow") { player, _ ->
openDialogue(player, KhazardGuardDialogue(), node) if (player.questRepository.getStage("Fight Arena") >= 10 && !inEquipmentOrInventory(player, HELMET) && !inEquipmentOrInventory(player, ARMOR) && freeSlots(player) >= 2) {
replaceScenery(FULL_ARMOR_STAND_1!!.asScenery(), EMPTY_STAND, 10,location(2619, 3196, 0))
sendMessage(player, "You borrow the suit of armour. It looks like it's just your size.")
addItem(player, ARMOR, 1)
addItem(player, HELMET, 1)
} else if (!inEquipmentOrInventory(player, ARMOR) && freeSlots(player) >= 1){
replaceScenery(FULL_ARMOR_STAND_1!!.asScenery(), ONLY_HELM_STAND, 10,location(2619, 3196, 0))
addItem(player, ARMOR, 1)
sendMessage(player, "You borrow the suit of helmet. It looks like it's just your size.")
} else if (!inEquipmentOrInventory(player, HELMET) && freeSlots(player) >= 1){
replaceScenery(FULL_ARMOR_STAND_1!!.asScenery(), ONLY_ARMOR_STAND, 10,location(2619, 3196, 0))
addItem(player, HELMET, 1)
sendMessage(player, "You could borrow this suit of armour if you had space in your inventory.")
} else if (freeSlots(player) == 0) {
sendMessage(player, "You could borrow this suit of armour if you had space in your inventory.")
} else {
sendMessage(player, "Nothing interesting happens.")
}
return@on true return@on true
} }
on(FULL_ARMOR_STAND, IntType.SCENERY, "borrow") { player, _ -> on(A_LAZY_GUARD_2, IntType.SCENERY, "steal-keys") { player, _ ->
if (player.questRepository.getStage("Fight Arena") == 10 && player.inventory.containItems(HELMET) && player.inventory.containItems(ARMOUR)) { player.faceLocation(location(2618, 3144, 0))
sendMessage(player, "Nothing interesting happens.") setVarbit(player,5627,3, true)
return@on false animate(player, 2286)
} else if (player.questRepository.getStage("Fight Arena") == 10 && player.equipment.containItems(HELMET) || player.bank.containItems(HELMET) || player.equipment.containItems(ARMOUR) || player.bank.containItems(ARMOUR)) { addItemOrDrop(player, CELL_KEY)
sendMessage(player, "Nothing interesting happens.") sendMessage(player, "You pick up the keys from the table.")
return@on false return@on true
} else if (player.questRepository.getStage("Fight Arena") == 10 && player.inventory.containItems(ARMOUR) || player.inventory.containItems(HELMET)) {
sendMessage(player, "Nothing interesting happens.")
return@on false
} else if (player.questRepository.getStage("Fight Arena") == 10 && player.inventory.isFull) {
sendMessage(player, "You could borrow this suit of armour if you had space in your inventory.")
return@on false
} else {
sendMessage(player, "You borrow the suit of armour. It looks like it's just your size.")
addItem(player, HELMET, 1)
addItem(player, ARMOUR, 1)
}
} }
on(MAINDOORS, IntType.SCENERY, "open") { player, maingate -> on(MAIN_DOOR, IntType.SCENERY, "open") { player, maingate ->
when (player.location.y) { when (player.location.y) {
3171 -> DoorActionHandler.handleAutowalkDoor(player, maingate.asScenery()) 3171 -> DoorActionHandler.handleAutowalkDoor(player, maingate.asScenery())
3172 -> { 3172 -> {
if (allInEquipment(player, HELMET, ARMOUR)) { if (allInEquipment(player, HELMET, ARMOR)) {
openDialogue(player, EastDoorSupportDialogue()) openDialogue(player, EastDoorSupportDialogue())
} else { } else {
sendPlayerDialogue(player, "This door appears to be locked.") sendPlayerDialogue(player, "This door appears to be locked.")
@@ -126,7 +145,7 @@ class FightArenaListeners : InteractionListener {
when (player.location.x) { when (player.location.x) {
2585 -> DoorActionHandler.handleAutowalkDoor(player, maingate.asScenery()) 2585 -> DoorActionHandler.handleAutowalkDoor(player, maingate.asScenery())
2584 -> { 2584 -> {
if (allInEquipment(player, HELMET, ARMOUR)) { if (allInEquipment(player, HELMET, ARMOR)) {
openDialogue(player, WestDoorSupportDialogue()) openDialogue(player, WestDoorSupportDialogue())
} else { } else {
sendPlayerDialogue(player, "This door appears to be locked.") sendPlayerDialogue(player, "This door appears to be locked.")
@@ -137,52 +156,45 @@ class FightArenaListeners : InteractionListener {
return@on true return@on true
} }
onUseWith(IntType.SCENERY, CELLKEY, JEREMYPRISONDOOR) { player, _, _ -> onUseWith(IntType.SCENERY, CELL_KEY, CELL_DOOR_2) { player, _, _ ->
if (player.inventory.containsAtLeastOneItem(CELLKEY) && player.questRepository.getStage("Fight Arena") in 68..89) { openDialogue(player, JeremyServilADialogue())
openDialogue(player, JeremyServilDialogue())
} else {
sendMessage(player, "The cell gate is securely locked.")
return@onUseWith false
}
return@onUseWith true return@onUseWith true
} }
onUseWith(IntType.SCENERY, CELLKEY, OTHERPRISONDOORS) { player, _, _ -> onUseWith(IntType.SCENERY, CELL_KEY, CELL_DOOR_1) { player, _, _ ->
if (player.inventory.containsAtLeastOneItem(CELLKEY) && player.questRepository.getStage("Fight Arena") in 68..72) { if (player.questRepository.getStage("Fight Arena") >= 68){
sendPlayerDialogue(player, "I don't want to attract too much attention by freeing all the prisoners. I need to find Jeremy and he's not in this cell.") sendDialogue(player, "I don't want to attract too much attention by freeing all the prisoners. I need to find Jeremy and he's not in this cell.")
} else { } else {
sendMessage(player, "The cell gate is securely locked.") sendMessage(player, "The cell gate is securely locked.")
} }
return@onUseWith false return@onUseWith false
} }
on(OTHERPRISONDOORS, IntType.SCENERY, "open") { player, _ -> on(CELL_DOOR_1, IntType.SCENERY, "open") { player, _ ->
sendMessage(player, "the cell gate is securely locked.") sendMessage(player, "the cell gate is securely locked.")
return@on false return@on false
} }
on(JEREMYPRISONDOOR, IntType.SCENERY, "open") { player, _ -> on(CELL_DOOR_2, IntType.SCENERY, "open") { player, _ ->
sendMessage(player, "the cell gate is securely locked.") sendMessage(player, "the cell gate is securely locked.")
return@on false return@on false
} }
on(CENTERDOOR, IntType.SCENERY, "open") { player, centerdoor -> on(CENTER_DOOR, IntType.SCENERY, "open") { player, node ->
if (player.questRepository.getStage("Fight Arena") >= 91) { if (player.questRepository.getStage("Fight Arena") >= 91) {
DoorActionHandler.handleAutowalkDoor(player, centerdoor.asScenery()) DoorActionHandler.handleAutowalkDoor(player, node.asScenery())
return@on true
} else if (player.questRepository.getStage("Fight Arena") < 91) { } else if (player.questRepository.getStage("Fight Arena") < 91) {
sendNPCDialogue(player, 255, "And where do you think you're going? Only General Khazard decides who fights in the arena. Get out of here.", FacialExpression.ANNOYED) sendNPCDialogue(player, NPCs.KHAZARD_GUARD_255, "And where do you think you're going? Only General Khazard decides who fights in the arena. Get out of here.", FacialExpression.ANNOYED)
return@on false
} else { } else {
sendMessage(player, "The gate is locked.") sendMessage(player, "The gate is locked.")
return@on false
} }
return@on true
} }
} }
override fun defineDestinationOverrides() { override fun defineDestinationOverrides() {
setDest(IntType.NPC, intArrayOf(JEREMY), "talk-to") { _, _ -> setDest(IntType.NPC, intArrayOf(JEREMY_A), "talk-to") { _, _ ->
return@setDest Location.create(2617, 3167, 0) return@setDest Location.create(2617, 3167, 0)
} }
@@ -190,8 +202,14 @@ class FightArenaListeners : InteractionListener {
return@setDest Location.create(2566, 3142, 0) return@setDest Location.create(2566, 3142, 0)
} }
setDest(IntType.NPC, intArrayOf(FIGHTSLAVE), "talk-to") { _, _ -> setDest(IntType.NPC, intArrayOf(FIGHTSLAVE), "talk-to") { player, _ ->
return@setDest Location.create(2617, 3162, 0).transform(0, 1, 0) if (inBorders(player, 2585, 3139, 2605, 3148)) {
return@setDest Location.create(2595, 3141, 0)
} else if (inBorders(player, 2616, 3162, 2617, 3165)) {
return@setDest Location.create(2617, 3163, 0)
} else {
return@setDest Location.create(2617, 3159, 0)
}
} }
setDest(IntType.NPC, intArrayOf(KELVIN), "talk-to") { _, _ -> setDest(IntType.NPC, intArrayOf(KELVIN), "talk-to") { _, _ ->
@@ -206,19 +224,38 @@ class FightArenaListeners : InteractionListener {
return@setDest Location.create(2600, 3142, 0) return@setDest Location.create(2600, 3142, 0)
} }
setDest(IntType.SCENERY, intArrayOf(CENTER_DOOR), "open") { player, _ ->
if (inBorders(player, 2604, 3152, 2607, 3155)) {
return@setDest Location.create(2605, 3153, 0)
} else {
return@setDest Location.create(2607, 3151, 0)
}
}
setDest(IntType.SCENERY, intArrayOf(A_LAZY_GUARD_2), "steal-keys") { _, _ ->
return@setDest Location.create(2619, 3143, 0)
}
} }
class EastDoorSupportDialogue : DialogueFile() { class EastDoorSupportDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
npc = NPC(NPCs.KHAZARD_GUARD_257) npc = NPC(NPCs.KHAZARD_GUARD_257)
when (stage) { when (stage) {
0 -> player!!.faceLocation(location(2617, 3170, 0)).also { playerl(FacialExpression.NEUTRAL, "This door appears to be locked.") }.also { stage++ } 0 -> {
1 -> player!!.faceLocation(location(2603, 3155, 0)).also { npcl(FacialExpression.NEUTRAL, "Nice observation guard. You could have just asked to be let in like a normal person.") }.also { stage++ } face(player!!, location(2617, 3170, 0))
playerl(FacialExpression.NEUTRAL, "This door appears to be locked.").also { stage++ }
}
1 -> {
face(player!!, location(2603, 3155, 0))
npcl(FacialExpression.NEUTRAL, "Nice observation guard. You could have just asked to be let in like a normal person.").also { stage++ }
}
2 -> { 2 -> {
end() end()
lock(player!!, 2)
setQuestStage(player!!, FightArena.FightArenaQuest, 20) setQuestStage(player!!, FightArena.FightArenaQuest, 20)
DoorActionHandler.handleAutowalkDoor(player, getScenery(2617, 3172, 0)).also { player!!.unlock() } DoorActionHandler.handleAutowalkDoor(player, getScenery(2617, 3172, 0))
} }
} }
} }
@@ -227,15 +264,20 @@ class FightArenaListeners : InteractionListener {
class WestDoorSupportDialogue : DialogueFile() { class WestDoorSupportDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
npc = NPC(NPCs.KHAZARD_GUARD_257) npc = NPC(NPCs.KHAZARD_GUARD_257)
when (stage) { when (stage) {
0 -> player!!.faceLocation(location(2585, 3141, 0)).also { playerl(FacialExpression.NEUTRAL, "This door appears to be locked.") }.also { stage++ } 0 -> {
1 -> player!!.faceLocation(location(2603, 3155, 0)).also { npcl(FacialExpression.NEUTRAL, "Nice observation guard. You could have just asked to be let in like a normal person.") }.also { stage++ } face(player!!, location(2585, 3141, 0))
playerl(FacialExpression.NEUTRAL, "This door appears to be locked.").also { stage++ }
}
1 -> {
face(player!!, location(2603, 3155, 0))
npcl(FacialExpression.NEUTRAL, "Nice observation guard. You could have just asked to be let in like a normal person.").also { stage++ }
}
2 -> { 2 -> {
end() end()
lock(player!!, 2)
setQuestStage(player!!, FightArena.FightArenaQuest, 20) setQuestStage(player!!, FightArena.FightArenaQuest, 20)
DoorActionHandler.handleAutowalkDoor(player, getScenery(2584, 3141, 0)).also { player!!.unlock() } DoorActionHandler.handleAutowalkDoor(player, getScenery(2584, 3141, 0))
} }
} }
} }
@@ -1,100 +0,0 @@
package content.region.kandarin.ardougne.quest.arena
import content.region.kandarin.ardougne.quest.arena.FightArenaListeners.Companion.General
import core.api.*
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.game.world.map.RegionManager
import core.tools.END_DIALOGUE
import org.rs09.consts.Items
import org.rs09.consts.NPCs.GENERAL_KHAZARD_258
class GeneralKhazardDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
val questName = "Fight Arena"
val questStage = questStage(player!!, questName)
npc = NPC(GENERAL_KHAZARD_258)
when {
(questStage == 71) -> {
when (stage) {
0 -> if (!anyInEquipment(player!!, Items.KHAZARD_HELMET_74, Items.KHAZARD_ARMOUR_75)) {
sendPlayerDialogue(player!!, "General Khazard?").also { stage = 2 }
} else {
sendNPCDialogue(player!!, 258, "Who dares enter my home? You? A feeble traveller?").also { stage = 6 }
}
2 -> npcl(FacialExpression.FRIENDLY, "What do you want guard? I'm a busy man.").also { stage = 3 }
3 -> playerl(FacialExpression.FRIENDLY, "Of course sir.").also { stage = 4 }
4 -> npcl(FacialExpression.FRIENDLY, "In the last two hundred years, I have survived all horrors imaginable. Now it is my turn to cover this land in darkness. One day you shall see, all will quake on hearing my name.").also { stage = 5 }
5 -> npcl(FacialExpression.FRIENDLY, "Now leave me.").also { stage = END_DIALOGUE }
6 -> playerl(FacialExpression.ASKING, "Feeble?!").also { stage = 7 }
7 -> npcl(FacialExpression.ANGRY, "Get out! Whoever let you in shall be severely punished for this.").also { stage = END_DIALOGUE }
}
}
(questStage == 72) -> {
when (stage) {
0 -> lockInteractions(player!!, 2).also { sendNPCDialogue(player!!, 267,"You saved my life and my son's, I am eternally in your debt brave traveller.") }.also{ player!!.faceLocation(location(2601,3168,0)) }.also{ stage = 1 }
1 -> npcl(FacialExpression.EVIL_LAUGH, "Haha, well done, well done that was rather entertaining. I am the great General Khazard, and the two men you just 'saved' are my property.").also { stage = 2 }
2 -> playerl(FacialExpression.ANGRY, "They belong to nobody.").also { player!!.faceLocation(npc!!.location) }.also { stage = 3 }
3 -> npcl(FacialExpression.FRIENDLY, "Well, I suppose we could find some arrangement for their freedom... hmmm?").also { stage = 4 }
4 -> playerl(FacialExpression.ASKING, "What do you mean?").also { stage = 5 }
5 -> npcl(FacialExpression.FRIENDLY, "I'll let them go, but you must stay and fight for me. You'll make me double the gold if you manage to last a few fights.").also { stage = 6 }
6 -> npcl(FacialExpression.ANGRY_WITH_SMILE, "Guards! Take " + (if (player!!.isMale) "him" else "her") + " to the cells.").also { stage = 7 }
7 -> {
end()
setAttribute(player!!, "spawn-scorpion", true)
HengradCutscene(player!!).start()
}
}
}
(questStage <= 87) -> {
when (stage) {
0 -> npcl(FacialExpression.ANGRY, "How dare you speak to me, you are a slave of this arena now.").also { stage = END_DIALOGUE }
}
}
(questStage == 88) -> {
when (stage) {
0 -> {
end()
HengradCutscene(player!!).start()
setAttribute(player!!, "spawn-scorpion", true)
}
}
}
(questStage == 89) -> {
when (stage) {
0 -> lockInteractions(player!!, 2).also{ npcl(FacialExpression.ANNOYED, "Not bad, not bad at all. I think you need a tougher challenge. Time for my puppy. Guards! Guards! Bring on Bouncer!") }.also { player!!.faceLocation(npc!!.location) }.also { stage = 1 }
1 -> sendDialogue(player!!, "From above you hear a voice..... 'Ladies and gentlemen! Today's second round of battle is between the outsider and Bouncer.'").also { stage = 2 }
2 -> {
end()
setAttribute(player!!, "spawn-bouncer", true)
BouncerCutscene(player!!).start()
}
}
}
(questStage == 91) -> {
when (stage) {
0 -> lockInteractions(player!!,4).also { npcl(FacialExpression.SAD, "Nooooo! Bouncer! How dare you? You've taken the life of my old friend. Now you'll suffer traveller, prepare to meet your maker.") }.also { player!!.faceLocation(npc!!.location) }.also { stage = 1 }
1 -> playerl(FacialExpression.ANNOYED, "You agreed to let the Servils go if I stayed to fight.").also { stage = 2 }
2 -> npcl(FacialExpression.ANGRY_WITH_SMILE, "Indeed. I obviously underestimated you, although you still pale in comparsion to the might of General Khazard.").also { stage = 3 }
3 -> npcl(FacialExpression.NEUTRAL, "You shall see that I am not cowardlly enough to make false promises. They may go.").also { stage = 4 }
4 -> npcl(FacialExpression.EVIL_LAUGH, "You however have coused me much trouble today. You must remain here so that I may at least have the pleasure of killing you myself.").also { stage = 5 }
5 -> {
end()
setQuestStage(player!!, FightArena.FightArenaQuest, 97)
RegionManager.getNpc(player!!.location, GENERAL_KHAZARD_258, 15)
General.attack(player!!)
}
}
}
}
}
}
@@ -1,51 +0,0 @@
package content.region.kandarin.ardougne.quest.arena
import core.api.location
import core.api.lockInteractions
import core.api.questStage
import core.api.setQuestStage
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import org.rs09.consts.NPCs
class HengradDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
val questName = "Fight Arena"
val questStage = questStage(player!!, questName)
npc = NPC(NPCs.HENGRAD_263)
when (questStage) {
72 -> {
when (stage) {
0 -> npcl(FacialExpression.AFRAID, "Are you ok stranger?").also{ lockInteractions(player!!,3) }.also { player!!.faceLocation(location(2597, 3143, 0)) }.also { stage++ }
1 -> playerl(FacialExpression.FRIENDLY, "I'm fine thanks.").also { stage++ }
2 -> npcl(FacialExpression.ASKING, " So Khazard got his hand on you too?").also { stage++ }
3 -> playerl(FacialExpression.HALF_WORRIED, " I'm afraid so.").also { stage++ }
4 -> npcl(FacialExpression.FRIENDLY, " If you're lucky you may last as long as me.").also { stage++ }
5 -> playerl(FacialExpression.ASKING, " How long have you been here?").also { stage++ }
6 -> npcl(FacialExpression.FRIENDLY, " I've been in Khazard's prisons ever since I can remember. I was a child when his men kidnapped me. My whole life as been spent killing and fighting, all in the hope that, one day, I might escape.").also { stage++ }
7 -> playerl(FacialExpression.FRIENDLY, "Don't give up.").also { stage++ }
8 -> npcl(FacialExpression.FRIENDLY, "Thanks friend.").also { stage++ }
9 -> npcl(FacialExpression.SILENT, "Wait... Shhh, the guard is coming. Looks like you'll be going into the arena. Good luck, friend.").also { stage++ }
10 -> {
end()
ScorpionCutscene(player!!).start()
setQuestStage(player!!, FightArena.FightArenaQuest, 88)
}
}
}
88 -> {
when (stage) {
0 -> {
end()
ScorpionCutscene(player!!).start()
}
}
}
}
}
}
@@ -1,54 +0,0 @@
package content.region.kandarin.ardougne.quest.arena
import content.region.kandarin.ardougne.quest.arena.FightArena.Companion.FightArenaQuest
import content.region.kandarin.ardougne.quest.arena.FightArenaListeners.Companion.Jeremy
import core.api.questStage
import core.api.setAttribute
import core.api.setQuestStage
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.tools.END_DIALOGUE
class JeremyServilDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
val questName = "Fight Arena"
val questStage = questStage(player!!, questName)
npc = Jeremy
when {
(questStage == 20) -> {
when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Hello").also { npc!!.faceLocation(player!!.location) }.also { player!!.faceLocation(npc!!.location) }.also { stage++ }
1 -> npcl(FacialExpression.AFRAID, "Please " + (if (player!!.isMale) "Sir" else "Madam") + ", don't hurt me.").also { stage++ }
2 -> playerl(FacialExpression.SILENT, "Sshh. This uniform is a disguise. I'm here to help. Where do they keep the keys?").also { stage++ }
3 -> npcl(FacialExpression.FRIENDLY, "The guard always keeps hold of them.").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "Don't lose heart, I'll be back.").also { stage = END_DIALOGUE }.also { setQuestStage(player!!, FightArenaQuest, 40) }
}
}
(questStage in 89 downTo 68) -> {
when (stage) {
0 -> playerl(FacialExpression.NEUTRAL, "Jeremy look, I have the keys.").also { npc!!.faceLocation(player!!.location) }.also { player!!.faceLocation(npc!!.location) }.also { stage++ }
1 -> npcl(FacialExpression.NEUTRAL, "Wow! Please set me free, then we can find my dad. I overheard a guard talking. I think they're taken him to the arena.").also { stage++ }
2 -> playerl(FacialExpression.NEUTRAL, "Ok, we'd better hurry.").also { stage = 3 }
3 -> {
end()
setAttribute(player!!, "spawn-ogre", true)
RescueCutscene(player!!).start()
}
}
}
(questStage == 100) -> {
when (stage) {
0 -> playerl(FacialExpression.NEUTRAL, "You need to kill the creatures in the arena").also { npc!!.faceLocation(player!!.location) }.also { player!!.faceLocation(npc!!.location) }.also { stage = END_DIALOGUE }
}
}
}
}
}
@@ -1,61 +0,0 @@
package content.region.kandarin.ardougne.quest.arena
import core.api.lockInteractions
import core.api.questStage
import core.api.sendPlayerDialogue
import core.api.setQuestStage
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.tools.END_DIALOGUE
import org.rs09.consts.NPCs
class JeremyServilRescuedDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
val questName = "Fight Arena"
val questStage = questStage(player!!, questName)
npc = NPC(NPCs.JEREMY_SERVIL_266)
when (questStage) {
75 -> {
when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Come on Jeremy, we have to get out of here.").also { stage = 1 }
1 -> npcl("Thank you for saving my father.").also { stage = END_DIALOGUE }
}
}
85 -> {
when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Don't worry, I'll get us out of here.").also { stage = 1 }
1 -> npcl("Thanks traveller. I'm sorry that you too are now a subject of this arena.").also { stage = END_DIALOGUE }
}
}
97 -> {
when (stage) {
0 -> lockInteractions(player!!,1).also{ playerl(FacialExpression.FRIENDLY, "You and you father can return to Lady Servil.")}.also { stage = 1 }
1 -> npcl(FacialExpression.FRIENDLY, "Thank you, we are truly indebted to you.").also { stage = 2 }
2 -> {
end()
setQuestStage(player!!, FightArena.FightArenaQuest, 99)
}
}
}
98 -> {
when (stage) {
0 -> sendPlayerDialogue(player!!, "Khazard is dead, you and you father can return to Lady Servil.").also { stage = 1 }
1 -> npcl(FacialExpression.FRIENDLY, "Thank you, we are truly indebted to you.").also { stage = 2 }
2 -> {
end()
setQuestStage(player!!, FightArena.FightArenaQuest, 99)
}
}
}
}
}
}
@@ -1,33 +0,0 @@
package content.region.kandarin.ardougne.quest.arena
import core.api.questStage
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.tools.END_DIALOGUE
import org.rs09.consts.NPCs
class JustinServilDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
val questName = "Fight Arena"
val questStage = questStage(player!!, questName)
npc = NPC(NPCs.JUSTIN_SERVIL_267)
when {
(questStage == 88) -> {
when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Don't worry, I'll get us out of here.").also { stage = 1 }
1 -> npcl(FacialExpression.NEUTRAL, "You've incurred the anger of Khazard yourself now. He won't let any of us go easily.").also { stage = END_DIALOGUE }
}
}
(questStage == 100) -> {
when (stage) {
0 -> npcl(FacialExpression.NEUTRAL, " You saved my life and my son's, I am eternally in your debt brave taveller.").also { stage = END_DIALOGUE }
}
}
}
}
}
@@ -1,37 +0,0 @@
package content.region.kandarin.ardougne.quest.arena
import core.api.allInEquipment
import core.api.sendNPCDialogue
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 org.rs09.consts.Items
import org.rs09.consts.NPCs
@Initializable
class KelvinDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC
if (allInEquipment(player, Items.KHAZARD_HELMET_74, Items.KHAZARD_ARMOUR_75)) {
sendNPCDialogue(player, NPCs.KELVIN_260, "Get away, get away. One day I'll have my revenge, and I'll have all your heads.", FacialExpression.ANNOYED).also { stage = END_DIALOGUE }
} else {
sendNPCDialogue(player, NPCs.KELVIN_260, "You're not safe here traveller. Leave while you still can", FacialExpression.FRIENDLY).also { stage = END_DIALOGUE }
}
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return KelvinDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.KELVIN_260)
}
}
@@ -1,92 +0,0 @@
package content.region.kandarin.ardougne.quest.arena
import content.region.kandarin.ardougne.quest.arena.FightArena.Companion.FightArenaQuest
import core.api.questStage
import core.api.setQuestStage
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.tools.END_DIALOGUE
import org.rs09.consts.NPCs
class LadyServilDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
val questName = "Fight Arena"
val questStage = questStage(player!!, questName)
npc = NPC(NPCs.LADY_SERVIL_264)
when {
(questStage == 0) -> {
when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Hi there, looks like you're in some trouble.").also { stage++ }
1 -> npcl(FacialExpression.SAD, "Oh I wish this broken cart was my only problem. *sob* I've got to find my family.. **sob**").also { stage++ }
2 -> options("I hope you can. good luck.", "Can I help you?").also { stage++ }
3 -> when (buttonID) {
1 -> playerl(FacialExpression.NEUTRAL, "I hope you can, good luck.").also { stage = END_DIALOGUE }
2 -> playerl(FacialExpression.FRIENDLY, "Can I help you?").also { stage++ }
}
4 -> npcl(FacialExpression.SAD, "Would you? Please?").also { stage++ }
5 -> npcl(FacialExpression.SAD, "I'm Lady Servil, and my husband is Sir Servil. We were travelling north together with our son Jeremy when we were ambushed by General Khazard's men.").also { stage++ }
6 -> playerl(FacialExpression.HALF_ASKING, "General Khazard?").also { stage++ }
7 -> npcl(FacialExpression.SAD, "He's been after me even since I declined his hand in marriage.").also { stage++ }
8 -> npcl(FacialExpression.SAD, "Now he's kidnapped my husband and son to fight in his battle arena to the south of here. I hate to think what he'll do to them. He's a sick and twisted man.").also { stage++ }
9 -> playerl(FacialExpression.FRIENDLY, "I'll try my best to return your family.").also { stage++ }
10 -> npcl(FacialExpression.SAD, "Please do. My family is wealthy and can reward you handsomely. I'll be waiting here for you.").also { stage = END_DIALOGUE }.also { setQuestStage(player!!, FightArenaQuest, 10) }
}
}
(questStage == 10) -> {
when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Hello Lady Servil.").also { stage++ }
1 -> npcl(FacialExpression.SAD, "Brave traveller, please... bring back my family.").also { stage = END_DIALOGUE }
}
}
(questStage == 20) -> {
when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Hello Lady Servil.").also { stage++ }
1 -> npcl(FacialExpression.WORRIED, "Have you had any luck with freeing my family?").also { stage++ }
2 -> playerl(FacialExpression.HAPPY, "I've managed to get a guard's uniform, hopefully I can infiltrate the arena.").also { stage++ }
3 -> npcl(FacialExpression.SAD, "Please hurry.").also { stage = END_DIALOGUE }
}
}
(questStage == 30) -> {
when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Lady Servil, I have managed to infiltrate General Khazard's arena.").also { stage++ }
1 -> npcl(FacialExpression.ASKING, "And my family?").also { stage++ }
2 -> playerl(FacialExpression.NEUTRAL, "I'm working on it.").also { stage++ }
3 -> npcl(FacialExpression.SAD, "Please hurry.").also { stage = END_DIALOGUE }
}
}
(questStage == 70) -> {
when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Lady Servil. I freed your son, however he has returned to the arena to help your husband.").also { stage++ }
1 -> npcl(FacialExpression.WORRIED, "Oh no, they won't stand a chance. Please go back and help.").also { stage = END_DIALOGUE }
}
}
(questStage == 99) -> {
when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Lady Servil.").also { stage++ }
1 -> npcl(FacialExpression.AMAZED, "You're alive, I thought Khazard's men had taken you.").also { stage++ }
2 -> npcl(FacialExpression.HAPPY, "My son and husband are safe and recovering at home. Without you they would certainly be dead. I am truly grateful for your service.").also { stage++ }
3 -> npcl(FacialExpression.FRIENDLY, "All I can offer in return is material wealth. Please take these coins as a sign of my gratitude.").also {
player!!.questRepository.getQuest("Fight Arena").finish(player).also { setQuestStage(player!!, FightArenaQuest, 100) }
}
}
}
(questStage == 100) -> {
when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Hello Servil.").also { stage++ }
1 -> npcl(FacialExpression.FRIENDLY, "Oh hello my dear. My husband and son are resting while I wait for the cart fixer.").also { stage++ }
2 -> playerl(FacialExpression.FRIENDLY, "I hope he's not too long.").also { stage++ }
3 -> npcl(FacialExpression.FRIENDLY, "Thanks again for everything.").also { stage = END_DIALOGUE }
}
}
}
}
}
@@ -1,82 +0,0 @@
package content.region.kandarin.ardougne.quest.arena
import content.region.kandarin.ardougne.quest.arena.FightArena.Companion.FightArenaQuest
import core.api.*
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.game.node.item.Item
import core.tools.END_DIALOGUE
import org.rs09.consts.Items.KHALI_BREW_77
import org.rs09.consts.Items.KHAZARD_CELL_KEYS_76
import org.rs09.consts.NPCs
class KhazardGuardDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
val questName = "Fight Arena"
val questStage = questStage(player!!, questName)
npc = NPC(NPCs.A_LAZY_KHAZARD_GUARD_8498)
when {
(questStage == 40) -> {
when (stage) {
0 -> player!!.faceLocation(location(2617, 3144, 0)).also { playerl(FacialExpression.NEUTRAL, "Long live General Khazard!") }.also { stage++ }
1 -> npcl(FacialExpression.FRIENDLY, "Erm.. yes.. quite right.").also { stage++ }
2 -> npcl(FacialExpression.FRIENDLY, "Have you come to laugh at the fight slaves? I used to really enjoy it, but after a while they become quite boring. ").also { stage++ }
3 -> npcl(FacialExpression.FRIENDLY, "Now I just want a decent drink. Mind you, too much Khali brew and I'll fall asleep.").also { stage = END_DIALOGUE }.also { setQuestStage(player!!, FightArenaQuest, 50) }
}
}
(questStage == 50) -> {
when (stage) {
0 -> player!!.faceLocation(location(2617, 3144, 0)).also { playerl(FacialExpression.NEUTRAL, "Hello, how's the job?") }.also { stage++ }
1 -> npcl(FacialExpression.DRUNK, "Please, leave me alone. I'm sure the walls never used to sway that much.").also { stage = END_DIALOGUE }
}
}
(questStage == 60) -> {
when (stage) {
0 -> player!!.faceLocation(location(2617, 3144, 0)).also { playerl(FacialExpression.FRIENDLY, "Hello again.") }.also { stage++ }
1 -> npcl(FacialExpression.NEUTRAL, "Bored, bored, bored. You'd think the slaves would be more entertaining? Selfish the lot of them.").also { stage++ }
2 -> playerl(FacialExpression.FRIENDLY, "Do you still fancy a drink?").also { stage++ }
3 -> npcl(FacialExpression.HAPPY, "I really shouldn't... oh... ok then just the one.").also { stage++ }
4 -> if (player!!.inventory.containItems(KHALI_BREW_77)) {
sendItemDialogue(player!!, KHALI_BREW_77, "You hand a bottle of Khali brew to the guard. He takes a mouthful of the drink.").also { stage = 5 }
} else {
npcl(FacialExpression.NEUTRAL, "Now I just want a decent drink. Mind you, too much Khali brew and I'll fall asleep.").also { stage = END_DIALOGUE }
}
5 -> npcl(FacialExpression.DRUNK, "Blimey this stuff is pretty good. It's not too strong is it?").also { stage++ }
6 -> playerl(FacialExpression.HALF_GUILTY, "No, not at all. You'll be fine.").also { stage++ }
7 -> sendDialogue(player!!, "The guard quickly finishes the rest of the bottle and begins to sway slightly.").also { stage++ }
8 -> npcl(FacialExpression.HAPPY, "That is some gooood stuff... yeah... wooh yeah!").also { stage++ }
9 -> playerl(FacialExpression.HALF_WORRIED, "Are you alright?").also { stage++ }
10 -> npcl(FacialExpression.DRUNK, "Yeesshh, hiccup! Oooh, maybe I sshould relax for a while.").also { stage++ }
11 -> playerl(FacialExpression.NEUTRAL, "Good idea. I'll look after the prisoners.").also { stage++ }
12 -> npcl(FacialExpression.DRUNK, "Yeesh, yes that shounds reasonable. Here, hiccup', take the keysch. Any trouble, you give... you givem a good beating.").also { stage++ }
13 -> playerl(FacialExpression.NEUTRAL, "No problem. I'll keep them in line.").also { stage = 14 }
14 -> {
end()
player!!.inventory.remove(Item(KHALI_BREW_77))
player!!.inventory.add(Item(KHAZARD_CELL_KEYS_76))
sendMessage(player!!, "You pick up the keys from the table.")
player!!.questRepository.getQuest("Fight Arena").setStage(player, 68).also { stage = END_DIALOGUE }
}
}
}
(questStage in 68..100) -> {
when (stage) {
0 -> if (player!!.inventory.containItems(KHAZARD_CELL_KEYS_76)) {
player!!.faceLocation(location(2617, 3144, 0)).also { sendPlayerDialogue(player!!, "Hello, how's the job?", FacialExpression.NEUTRAL) }.also { stage = 1 }
} else {
player!!.faceLocation(location(2617, 3144, 0)).also { sendPlayerDialogue(player!!, "Hi, er.. I lost the keys.", FacialExpression.NEUTRAL) }.also { stage = 2 }
}
1 -> npcl(FacialExpression.DRUNK, "Please, leave me alone. I'm sure the walls never used to sway that much.").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.DRUNK, "What?! You're foolish...").also { stage = 3 }
3 -> npcl(FacialExpression.DRUNK, "...and I'm drunk. Here, take my spare set.").also { player!!.inventory.add(Item(KHAZARD_CELL_KEYS_76)) }.also { stage = END_DIALOGUE }
}
}
}
}
}
@@ -1,7 +1,7 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.cutscenes
import content.region.kandarin.ardougne.quest.arena.FightArenaListeners.Companion.Jeremy import content.region.kandarin.ardougne.quest.arena.FightArenaListeners.Companion.Jeremy
import content.region.kandarin.ardougne.quest.arena.KhazardOgreNPC.Companion.spawnOgre import content.region.kandarin.ardougne.quest.arena.npc.OgreNPC.Companion.spawnOgre
import core.api.* import core.api.*
import core.game.activity.Cutscene import core.game.activity.Cutscene
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
@@ -9,11 +9,8 @@ import core.game.global.action.DoorActionHandler
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.world.map.Direction import core.game.world.map.Direction
import core.game.world.map.Location import core.game.world.map.Location
import core.net.packet.PacketRepository
import core.net.packet.context.MinimapStateContext
import core.net.packet.out.MinimapState
class RescueCutscene(player: Player) : Cutscene(player) { class EscapeCutscene(player: Player) : Cutscene(player) {
override fun setup() { override fun setup() {
setExit(location(2603, 3155, 0)) setExit(location(2603, 3155, 0))
if (player.settings.isRunToggled) { if (player.settings.isRunToggled) {
@@ -25,15 +22,14 @@ class RescueCutscene(player: Player) : Cutscene(player) {
when (stage) { when (stage) {
0 -> { 0 -> {
PacketRepository.send(MinimapState::class.java, MinimapStateContext(player, 1))
move(Jeremy, 56, 31) move(Jeremy, 56, 31)
timedUpdate(2) timedUpdate(3)
} }
1 -> { 1 -> {
player.faceLocation(location(2616, 3167, 0)) player.faceLocation(location(2616, 3167, 0))
animate(player, 2098) animate(player, 2098)
timedUpdate(1) timedUpdate(4)
} }
2 -> { 2 -> {
@@ -44,7 +40,7 @@ class RescueCutscene(player: Player) : Cutscene(player) {
3 -> { 3 -> {
DoorActionHandler.handleAutowalkDoor(Jeremy, getScenery(2617, 3167, 0)) DoorActionHandler.handleAutowalkDoor(Jeremy, getScenery(2617, 3167, 0))
player.faceLocation(location(2617, 3164, 0)) player.faceLocation(location(2617, 3164, 0))
timedUpdate(2) timedUpdate(3)
} }
4 -> { 4 -> {
@@ -76,7 +72,7 @@ class RescueCutscene(player: Player) : Cutscene(player) {
} }
8 -> { 8 -> {
DoorActionHandler.handleAutowalkDoor(player, getScenery(174, 16, 0)) DoorActionHandler.handleAutowalkDoor(player, getObject(46, 16))
moveCamera(41, 26, 300, 4) moveCamera(41, 26, 300, 4)
rotateCamera(45, 15, 300, 4) rotateCamera(45, 15, 300, 4)
timedUpdate(-1) timedUpdate(-1)
@@ -89,7 +85,7 @@ class RescueCutscene(player: Player) : Cutscene(player) {
10 -> { 10 -> {
move(player, 43, 18) move(player, 43, 18)
timedUpdate(2) timedUpdate(1)
} }
11 -> { 11 -> {
@@ -99,16 +95,16 @@ class RescueCutscene(player: Player) : Cutscene(player) {
12 -> { 12 -> {
player.faceLocation(getNPC(JEREMYRESCUE)!!.location) player.faceLocation(getNPC(JEREMYRESCUE)!!.location)
sendPlayerDialogue(player, "Jeremy, where's your father?", FacialExpression.NEUTRAL) sendPlayerDialogue(player, "Jeremy, where's your father?",FacialExpression.HALF_ASKING)
timedUpdate(1) timedUpdate(2)
} }
13 -> { 13 -> {
getNPC(JEREMYRESCUE)!!.faceLocation(player.location) getNPC(JEREMYRESCUE)!!.faceLocation(player.location)
move(getNPC(JUSTIN)!!, 42, 32)
sendNPCDialogue(player, JEREMYRESCUE, "Quick help him! That beast will kill him. He's too old to fight.") sendNPCDialogue(player, JEREMYRESCUE, "Quick help him! That beast will kill him. He's too old to fight.")
teleport(getNPC(OGRE)!!, 45, 30) teleport(getNPC(OGRE)!!, 45, 30)
move(getNPC(JUSTIN)!!, 42, 32) timedUpdate(2)
timedUpdate(1)
} }
14 -> { 14 -> {
@@ -1,33 +1,25 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.cutscenes
import core.api.animate import content.region.kandarin.ardougne.quest.arena.dialogue.HengradDialogue
import core.api.getScenery import core.api.*
import core.api.location
import core.api.openDialogue
import core.game.activity.Cutscene import core.game.activity.Cutscene
import core.game.component.Component
import core.game.dialogue.FacialExpression
import core.game.global.action.DoorActionHandler import core.game.global.action.DoorActionHandler
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.world.map.Direction import core.game.world.map.Direction
import core.net.packet.PacketRepository
import core.net.packet.context.MinimapStateContext
import core.net.packet.out.MinimapState
import org.rs09.consts.Components
class HengradCutscene(player: Player) : Cutscene(player) { class JailCutscene(player: Player) : Cutscene(player) {
override fun setup() { override fun setup() {
setExit(location(2600, 3142, 0)) setExit(location(2600, 3142, 0))
if (player.settings.isRunToggled) { if (player.settings.isRunToggled) {
player.settings.toggleRun() player.settings.toggleRun()
} }
loadRegion(10289)
} }
override fun runStage(stage: Int) { override fun runStage(stage: Int) {
when (stage) { when (stage) {
0 -> { 0 -> {
PacketRepository.send(MinimapState::class.java, MinimapStateContext(player, 1))
addNPC(KHAZARD_GUARD, 48, 5, Direction.WEST) addNPC(KHAZARD_GUARD, 48, 5, Direction.WEST)
teleport(player, 46, 5) teleport(player, 46, 5)
timedUpdate(1) timedUpdate(1)
@@ -41,44 +33,35 @@ class HengradCutscene(player: Player) : Cutscene(player) {
2 -> { 2 -> {
move(player, 45, 5) move(player, 45, 5)
timedUpdate(3) timedUpdate(1)
} }
3 -> { 3 -> {
move(player, 40, 5) move(player, 40, 5)
move(getNPC(KHAZARD_GUARD)!!, 41, 5) move(getNPC(KHAZARD_GUARD)!!, 41, 5)
timedUpdate(8) timedUpdate(6)
} }
4 -> { 4 -> {
animate(getNPC(KHAZARD_GUARD)!!, 1060, true) animate(getNPC(KHAZARD_GUARD)!!, 2098)
timedUpdate(2) DoorActionHandler.handleAutowalkDoor(player, getObject(40, 5))
timedUpdate(5)
} }
5 -> { 5 -> {
DoorActionHandler.handleAutowalkDoor(player, getScenery(2600, 3141, 0)) move(player, 40, 6)
face(player, getNPC(KHAZARD_GUARD)!!)
move(getNPC(KHAZARD_GUARD)!!, 40, 5)
timedUpdate(2) timedUpdate(2)
} }
6 -> { 6 -> {
move(player, 40, 6) face(getNPC(KHAZARD_GUARD)!!, player)
move(getNPC(KHAZARD_GUARD)!!, 40, 5) sendNPCDialogue(player, KHAZARD_GUARD, "The General seems to have taken a liking to you. He'd normally kill imposters like you without a second thought.")
timedUpdate(3) timedUpdate(3)
} }
7 -> { 7 -> {
dialogueUpdate(257, FacialExpression.FRIENDLY, "The General seems to have taken a liking to you. He'd normally kill imposters like you without a second thought.").also { getNPC(KHAZARD_GUARD)!!.faceLocation(player.location) }
player.faceLocation(getNPC(KHAZARD_GUARD)!!.location)
timedUpdate(3)
}
8 -> {
loadRegion(10289)
teleport(player, 40, 6)
timedUpdate(6)
}
9 -> {
end { end {
openDialogue(player, HengradDialogue()) openDialogue(player, HengradDialogue())
} }
@@ -1,44 +1,41 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.cutscenes
import content.region.kandarin.ardougne.quest.arena.KhazardScorpionNPC.Companion.spawnScorpion import content.region.kandarin.ardougne.quest.arena.npc.ScorpionNPC.Companion.spawnScorpion
import core.api.* import core.api.animate
import core.api.location
import core.api.sendChat
import core.game.activity.Cutscene import core.game.activity.Cutscene
import core.game.global.action.DoorActionHandler import core.game.global.action.DoorActionHandler
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.scenery.Scenery
import core.game.world.map.Direction import core.game.world.map.Direction
import core.net.packet.PacketRepository
import core.net.packet.context.MinimapStateContext
import core.net.packet.out.MinimapState
import org.rs09.consts.Scenery.PRISON_DOOR_79
import org.rs09.consts.Scenery.PRISON_DOOR_80
class ScorpionCutscene(player: Player) : Cutscene(player) { class SecondFightCutscene(player: Player) : Cutscene(player) {
override fun setup() { override fun setup() {
setExit(location(2603, 3155, 0)) setExit(location(2603, 3155, 0))
if (player.settings.isRunToggled) { if (player.settings.isRunToggled) {
player.settings.toggleRun() player.settings.toggleRun()
} }
addNPC(GUARD, 36, 5, Direction.EAST)
addNPC(SCORPION, 47, 23, Direction.WEST)
} }
override fun runStage(stage: Int) { override fun runStage(stage: Int) {
when (stage) { when (stage) {
0 -> { 0 -> {
PacketRepository.send(MinimapState::class.java, MinimapStateContext(player, 1)) move(getNPC(GUARD)!!, 39, 5)
addNPC(GUARD, 36, 5, Direction.EAST) sendChat(getNPC(GUARD)!!, "Right you, move it.")
timedUpdate(3) timedUpdate(4)
} }
1 -> { 1 -> {
move(getNPC(GUARD)!!, 39, 5)
sendChat(getNPC(GUARD)!!, "Right you, move it.")
move(player, 40, 6) move(player, 40, 6)
timedUpdate(5) timedUpdate(1)
} }
2 -> { 2 -> {
animate(getNPC(GUARD)!!, 805, true) animate(getNPC(GUARD)!!, 805)
timedUpdate(2) timedUpdate(2)
} }
@@ -80,7 +77,7 @@ class ScorpionCutscene(player: Player) : Cutscene(player) {
10 -> { 10 -> {
sendChat(getNPC(GUARD)!!, "Get out! there.") sendChat(getNPC(GUARD)!!, "Get out! there.")
DoorActionHandler.handleAutowalkDoor(player, getScenery(2606, 3152, 0)) DoorActionHandler.handleAutowalkDoor(player, getObject(46, 16))
move(getNPC(GUARD)!!, 47, 15) move(getNPC(GUARD)!!, 47, 15)
timedUpdate(1) timedUpdate(1)
} }
@@ -96,8 +93,8 @@ class ScorpionCutscene(player: Player) : Cutscene(player) {
} }
13 -> { 13 -> {
sendDialogue(player, "From above you hear a voice..... 'Ladies and gentlemen! Let today's first fight between the outsider and everyone's favourite scorpion commence.'") dialogueUpdate("From above you hear a voice..... 'Ladies and gentlemen! Let today's first fight between the outsider and everyone's favourite scorpion commence.'")
timedUpdate(3) timedUpdate(4)
} }
14 -> { 14 -> {
@@ -110,25 +107,33 @@ class ScorpionCutscene(player: Player) : Cutscene(player) {
15 -> { 15 -> {
moveCamera(42, 23) moveCamera(42, 23)
rotateCamera(46, 23) rotateCamera(46, 23)
replaceScenery(Scenery(77, location(174, 23, 0)), PRISON_DOOR_79, 4)
replaceScenery(Scenery(78, location(174, 24, 0)), PRISON_DOOR_80, 4)
timedUpdate(1) timedUpdate(1)
} }
16 -> { 16 -> {
DoorActionHandler.handleAutowalkDoor(getNPC(SCORPION)!!, getScenery(174, 24, 0)) DoorActionHandler.handleAutowalkDoor(getNPC(SCORPION)!!, getObject(46, 24))
DoorActionHandler.handleAutowalkDoor(getNPC(SCORPION)!!, getScenery(174, 23, 0)) DoorActionHandler.handleAutowalkDoor(getNPC(SCORPION)!!, getObject(46, 23))
timedUpdate(1) timedUpdate(1)
} }
17 -> { 17 -> {
move(getNPC(SCORPION)!!, 45, 20) move(getNPC(SCORPION)!!, 45, 20)
moveCamera(40, 23, 300, 1) moveCamera(37, 23, 300, 5)
rotateCamera(43, 23, 300, 1) rotateCamera(43, 23, 300, 5)
timedUpdate(1) timedUpdate(2)
} }
18 -> { 18 -> {
move(getNPC(SCORPION)!!, 44, 20)
timedUpdate(1)
}
19 -> {
move(getNPC(SCORPION)!!, 42, 20)
timedUpdate(3)
}
20 -> {
end { end {
spawnScorpion(player) spawnScorpion(player)
} }
@@ -1,21 +1,12 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.cutscenes
import content.region.kandarin.ardougne.quest.arena.BouncerNPC.Companion.spawnBouncer import content.region.kandarin.ardougne.quest.arena.npc.BouncerNPC.Companion.spawnBouncer
import core.api.getScenery
import core.api.location
import core.api.replaceScenery
import core.game.activity.Cutscene import core.game.activity.Cutscene
import core.game.global.action.DoorActionHandler import core.game.global.action.DoorActionHandler
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.scenery.Scenery
import core.game.world.map.Direction import core.game.world.map.Direction
import core.net.packet.PacketRepository
import core.net.packet.context.MinimapStateContext
import core.net.packet.out.MinimapState
import org.rs09.consts.Scenery.PRISON_DOOR_79
import org.rs09.consts.Scenery.PRISON_DOOR_80
class BouncerCutscene(player: Player) : Cutscene(player) { class ThirdFightCutscene(player: Player) : Cutscene(player) {
override fun setup() { override fun setup() {
setExit(player.location.transform(0, 0, 0)) setExit(player.location.transform(0, 0, 0))
@@ -35,9 +26,9 @@ class BouncerCutscene(player: Player) : Cutscene(player) {
} }
1 -> { 1 -> {
moveCamera(43, 27) moveCamera(43, 27, 300, 100)
moveCamera(42, 27) moveCamera(42, 27, 300, 100)
rotateCamera(46, 27) rotateCamera(46, 27, 300, 100)
timedUpdate(2) timedUpdate(2)
} }
@@ -48,9 +39,9 @@ class BouncerCutscene(player: Player) : Cutscene(player) {
3 -> { 3 -> {
move(getNPC(BOUNCER)!!, 45, 26) move(getNPC(BOUNCER)!!, 45, 26)
moveCamera(39, 27, 300, 1) moveCamera(37, 27, 300, 5)
rotateCamera(44, 27, 300, 1) rotateCamera(44, 27, 300, 5)
timedUpdate(1) timedUpdate(2)
} }
4 -> { 4 -> {
@@ -60,7 +51,7 @@ class BouncerCutscene(player: Player) : Cutscene(player) {
5 -> { 5 -> {
move(getNPC(BOUNCER)!!, 42, 26) move(getNPC(BOUNCER)!!, 42, 26)
timedUpdate(-1) timedUpdate(3)
} }
6 -> { 6 -> {
@@ -0,0 +1,114 @@
package content.region.kandarin.ardougne.quest.arena.dialogue
import content.region.kandarin.ardougne.quest.arena.FightArena
import core.api.*
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.game.node.item.Item
import core.tools.END_DIALOGUE
import org.rs09.consts.Items
import org.rs09.consts.Items.KHALI_BREW_77
import org.rs09.consts.Items.KHAZARD_CELL_KEYS_76
import org.rs09.consts.NPCs
class ALazyGuardDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
npc = NPC(NPCs.A_LAZY_KHAZARD_GUARD_8498)
when (questStage(player!!, FightArena.FightArenaQuest)) {
in 40..49 -> when (stage) {
0 -> {
player!!.faceLocation(location(2617, 3144, 0))
playerl(FacialExpression.NEUTRAL, "Long live General Khazard!").also { stage++ }
}
1 -> npcl(FacialExpression.FRIENDLY, "Erm.. yes.. quite right.").also { stage++ }
2 -> npcl(FacialExpression.FRIENDLY, "Have you come to laugh at the fight slaves? I used to really enjoy it, but after a while they become quite boring. ").also { stage++ }
3 -> npcl(FacialExpression.FRIENDLY, "Now I just want a decent drink. Mind you, too much Khali brew and I'll fall asleep.").also { stage++ }
4 -> {
end()
setQuestStage(player!!, FightArena.FightArenaQuest, 50)
}
}
in 50..59 -> when (stage) {
0 -> if (!allInEquipment(player!!, Items.KHAZARD_HELMET_74, Items.KHAZARD_ARMOUR_75)) {
player!!.faceLocation(location(2617, 3144, 0))
npcl(FacialExpression.DRUNK, "Go away. Thish areash resh... restricted! We don't like strangersh, 'specially ones who sway. Oooh!").also { stage = END_DIALOGUE }
} else {
player!!.faceLocation(location(2617, 3144, 0))
playerl(FacialExpression.NEUTRAL, "Hello, how's the job?").also { stage++ }
}
1 -> npcl(FacialExpression.DRUNK, "Please, leave me alone. I'm sure the walls never used to sway that much.").also { stage = END_DIALOGUE }
}
in 60..67 -> when (stage) {
0 -> {
setVarbit(player!!, 5627, 0)
player!!.faceLocation(location(2617, 3144, 0))
playerl(FacialExpression.FRIENDLY, "Hello again.").also { stage++ }
}
1 -> npcl(FacialExpression.NEUTRAL, "Bored, bored, bored. You'd think the slaves would be more entertaining? Selfish the lot of them.").also { stage++ }
2 -> playerl(FacialExpression.FRIENDLY, "Do you still fancy a drink?").also { stage++ }
3 -> npcl(FacialExpression.HAPPY, "I really shouldn't... oh... ok then just the one.").also { stage++ }
4 -> if (player!!.inventory.remove(Item(KHALI_BREW_77))) {
sendItemDialogue(player!!, KHALI_BREW_77, "You hand a bottle of Khali brew to the guard. He takes a mouthful of the drink.").also { stage = 5 }
setVarbit(player!!, 5627, 1, true) // swap beer to Khali brew
} else {
npcl(FacialExpression.NEUTRAL, "Now I just want a decent drink. Mind you, too much Khali brew and I'll fall asleep.").also { stage = END_DIALOGUE }
}
5 -> npcl(FacialExpression.DRUNK, "Blimey this stuff is pretty good. It's not too strong is it?").also { stage++ }
6 -> playerl(FacialExpression.HALF_GUILTY, "No, not at all. You'll be fine.").also { stage++ }
7 -> sendDialogue(player!!, "The guard quickly finishes the rest of the bottle and begins to sway slightly.").also { stage++ }
8 -> npcl(FacialExpression.HAPPY, "That is some gooood stuff... yeah... wooh yeah!").also { stage++ }
9 -> playerl(FacialExpression.HALF_WORRIED, "Are you alright?").also { stage++ }
10 -> npcl(FacialExpression.DRUNK, "Yeesshh, hiccup! Oooh, maybe I sshould relax for a while.").also { stage++ }
11 -> playerl(FacialExpression.NEUTRAL, "Good idea. I'll look after the prisoners.").also { stage++ }
12 -> npcl(FacialExpression.DRUNK, "Yeesh, yes that shounds reasonable. Here, hiccup', take the keysch. Any trouble, you give... you givem a good beating.").also { stage++ }
13 -> playerl(FacialExpression.NEUTRAL, "No problem. I'll keep them in line.").also { stage++ }
14 -> {
end()
setVarbit(player!!, 5627, 2)
setQuestStage(player!!, FightArena.FightArenaQuest, 68)
}
}
in 68..99 -> when (stage) {
0 -> if (player!!.inventory.containItems(KHAZARD_CELL_KEYS_76)) {
setVarbit(player!!, 5627, 0)
player!!.faceLocation(location(2617, 3144, 0))
playerl(FacialExpression.HALF_ASKING, "Hello, how's the job?").also { stage = 1 }
} else {
setVarbit(player!!, 5627, 0)
player!!.faceLocation(location(2617, 3144, 0))
playerl(FacialExpression.HALF_GUILTY, "Hi, er.. I lost the keys.").also { stage = 2 }
}
1 -> npcl(FacialExpression.DRUNK, "Please, leave me alone. I'm sure the walls never used to sway that much.").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.DRUNK, "What?! You're foolish...").also { stage++ }
3 -> npcl(FacialExpression.DRUNK, "...and I'm drunk. Here, take my spare set.").also { stage++ }
4 -> {
end()
setVarbit(player!!, 5627, 3)
player!!.inventory.add(Item(KHAZARD_CELL_KEYS_76))
sendMessage(player!!, "You pick up the keys from the table.")
}
}
100 -> when(stage){
0 ->{
setVarbit(player!!, 5627, 0)
player!!.faceLocation(location(2617, 3144, 0))
playerl(FacialExpression.HALF_ASKING, "Hello, how's the job?").also { stage++ }
}
1 -> npcl(FacialExpression.DRUNK, "Please, leave me alone. I'm sure the walls never used to sway that much.").also { stage++ }
2 -> {
end()
setVarbit(player!!, 5627, 3)
}
}
}
}
}
@@ -1,4 +1,4 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.dialogue
import core.api.allInEquipment import core.api.allInEquipment
import core.game.dialogue.DialoguePlugin import core.game.dialogue.DialoguePlugin
@@ -25,9 +25,6 @@ class FightslaveDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (stage) { when (stage) {
0 -> npcl(FacialExpression.FRIENDLY, "Please leave me alone.").also { stage = END_DIALOGUE } 0 -> npcl(FacialExpression.FRIENDLY, "Please leave me alone.").also { stage = END_DIALOGUE }
}
when (stage) {
1 -> npcl(FacialExpression.AFRAID, "I've not met anybody in here by that name.").also { stage = END_DIALOGUE } 1 -> npcl(FacialExpression.AFRAID, "I've not met anybody in here by that name.").also { stage = END_DIALOGUE }
} }
return true return true
@@ -0,0 +1,131 @@
package content.region.kandarin.ardougne.quest.arena.dialogue
import content.region.kandarin.ardougne.quest.arena.FightArena
import content.region.kandarin.ardougne.quest.arena.FightArenaListeners.Companion.General
import content.region.kandarin.ardougne.quest.arena.cutscenes.JailCutscene
import content.region.kandarin.ardougne.quest.arena.cutscenes.ThirdFightCutscene
import core.api.*
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.game.world.map.RegionManager
import core.tools.END_DIALOGUE
import org.rs09.consts.Items
import org.rs09.consts.NPCs
class GeneralKhazardDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
npc = NPC(NPCs.GENERAL_KHAZARD_258)
when (questStage(player!!, FightArena.FightArenaQuest)) {
in 68..70 -> when(stage){
0 -> npcl(FacialExpression.FRIENDLY, "Out of the way, guard! I don't tolerate disruption when I'm watching slaves being slaughtered.").also { stage = END_DIALOGUE }
}
71 -> when (stage) {
0 -> if (!anyInEquipment(player!!, Items.KHAZARD_HELMET_74, Items.KHAZARD_ARMOUR_75)) {
face(player!!, findNPC(NPCs.GENERAL_KHAZARD_258)!!, 1)
sendPlayerDialogue(player!!, "General Khazard?").also { stage = 2 }
} else {
face(player!!, findNPC(NPCs.GENERAL_KHAZARD_258)!!, 1)
face(findNPC(NPCs.GENERAL_KHAZARD_258)!!, player!!,1)
sendNPCDialogue(player!!, NPCs.GENERAL_KHAZARD_258, "Who dares enter my home? You? A feeble traveller?", FacialExpression.OLD_DEFAULT).also { stage = 6 }
}
2 -> npcl(FacialExpression.OLD_DEFAULT, "What do you want guard? I'm a busy man.").also { stage++ }
3 -> playerl(FacialExpression.FRIENDLY, "Of course sir.").also { stage++ }
4 -> npcl(FacialExpression.OLD_DEFAULT, "In the last two hundred years, I have survived all horrors imaginable. Now it is my turn to cover this land in darkness. One day you shall see, all will quake on hearing my name.").also { stage++ }
5 -> npcl(FacialExpression.OLD_DEFAULT, "Now leave me.").also { stage = END_DIALOGUE }
6 -> playerl(FacialExpression.ASKING, "Feeble?!").also { stage++ }
7 -> npcl(FacialExpression.OLD_DEFAULT, "Get out! Whoever let you in shall be severely punished for this.").also { stage = END_DIALOGUE }
}
72 -> when (stage) {
0 -> {
lockInteractions(player!!, 2)
face(player!!, findNPC(NPCs.JUSTIN_SERVIL_267)!!, 1)
face(findNPC(NPCs.JUSTIN_SERVIL_267)!!, player!!, 1)
sendNPCDialogue(player!!, NPCs.JUSTIN_SERVIL_267, "You saved my life and my son's, I am eternally in your debt brave traveller.").also { stage++ }
}
1 -> {
face(findNPC(NPCs.GENERAL_KHAZARD_258)!!, player!!, 1)
npcl(FacialExpression.OLD_DEFAULT, "Haha, well done, well done that was rather entertaining. I am the great General Khazard, and the two men you just 'saved' are my property.").also { stage++ }
}
2 -> {
face(player!!, findNPC(NPCs.GENERAL_KHAZARD_258)!!, 1)
playerl(FacialExpression.ANGRY, "They belong to nobody.").also { stage++ }
}
3 -> npcl(FacialExpression.OLD_DEFAULT, "Well, I suppose we could find some arrangement for their freedom... hmmm?").also { stage++ }
4 -> playerl(FacialExpression.ASKING, "What do you mean?").also { stage++ }
5 -> npcl(FacialExpression.OLD_DEFAULT, "I'll let them go, but you must stay and fight for me. You'll make me double the gold if you manage to last a few fights.").also { stage++ }
6 -> npcl(FacialExpression.OLD_ANGRY1, "Guards! Take " + (if (player!!.isMale) "him" else "her") + " to the cells.").also { stage++ }
7 -> {
end()
JailCutscene(player!!).start()
setAttribute(player!!, "spawn-scorpion", true)
sendMessage(player!!, "A guard grabs the keys to the cell doors.")
}
}
87 -> when (stage) {
0 -> {
face(findNPC(NPCs.GENERAL_KHAZARD_258)!!, player!!)
face(player!!, findNPC(NPCs.GENERAL_KHAZARD_258)!!, 1)
npcl(FacialExpression.OLD_ANGRY1, "How dare you speak to me, you are a slave of this arena now.").also { stage = END_DIALOGUE }
}
}
88 -> when (stage) {
0 -> {
end()
JailCutscene(player!!).start()
setAttribute(player!!, "spawn-scorpion", true)
}
}
89 -> when (stage) {
0 -> {
lockInteractions(player!!, 2)
face(findNPC(NPCs.GENERAL_KHAZARD_258)!!, player!!, 1)
face(player!!, findNPC(NPCs.GENERAL_KHAZARD_258)!!, 1)
npcl(FacialExpression.OLD_ANGRY1, "Not bad, not bad at all. I think you need a tougher challenge. Time for my puppy. Guards! Guards! Bring on Bouncer!").also { stage++ }
}
1 -> sendDialogue(player!!, "From above you hear a voice..... 'Ladies and gentlemen! Today's second round of battle is between the outsider and Bouncer.'").also { stage++ }
2 -> {
end()
setAttribute(player!!, "spawn-bouncer", true)
ThirdFightCutscene(player!!).start()
}
}
91 -> when (stage) {
0 -> {
lockInteractions(player!!, 4)
npcl(FacialExpression.OLD_NEARLY_CRYING, "Nooooo! Bouncer! How dare you? You've taken the life of my old friend. Now you'll suffer traveller, prepare to meet your maker.").also { stage++ }
face(player!!, findNPC(NPCs.GENERAL_KHAZARD_258)!!, 1)
}
1 -> playerl(FacialExpression.ANNOYED, "You agreed to let the Servils go if I stayed to fight.").also { stage++ }
2 -> npcl(FacialExpression.OLD_DEFAULT, "Indeed. I obviously underestimated you, although you still pale in comparsion to the might of General Khazard.").also { stage++ }
3 -> npcl(FacialExpression.OLD_NEARLY_CRYING, "You shall see that I am not cowardlly enough to make false promises. They may go.").also { stage++ }
4 -> npcl(FacialExpression.OLD_EVIL_LAUGH, "You however have coused me much trouble today. You must remain here so that I may at least have the pleasure of killing you myself.").also { stage++ }
5 -> {
end()
setQuestStage(player!!, FightArena.FightArenaQuest, 97)
RegionManager.getNpc(player!!.location, NPCs.GENERAL_KHAZARD_258, 15)
General.attack(player!!)
}
}
100 -> when (stage) {
0 -> {
face(player!!, findNPC(NPCs.GENERAL_KHAZARD_258)!!, 1)
playerl(FacialExpression.ANNOYED, "Didn't I kill you?").also { stage++ }
}
1 -> {
face(findNPC(NPCs.GENERAL_KHAZARD_258)!!, player!!, 1)
npcl(FacialExpression.FRIENDLY,"You might not believe, it, young one, but you can't kill me.").also { stage = END_DIALOGUE }
}
}
}
}
}
@@ -1,4 +1,4 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.dialogue
import core.api.allInEquipment import core.api.allInEquipment
import core.game.dialogue.DialoguePlugin import core.game.dialogue.DialoguePlugin
@@ -16,7 +16,9 @@ class GuardsDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun open(vararg args: Any?): Boolean { override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC npc = args[0] as NPC
if (allInEquipment(player, Items.KHAZARD_HELMET_74, Items.KHAZARD_ARMOUR_75)) { if (player.questRepository.getStage("Fight Arena") == 100) {
npcl(FacialExpression.FRIENDLY, "It's you! I don't believe it. You beat the General! You are a traitor to the uniform!").also { stage = END_DIALOGUE }
} else if (allInEquipment(player, Items.KHAZARD_HELMET_74, Items.KHAZARD_ARMOUR_75)) {
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 0 } playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 0 }
} else { } else {
playerl(FacialExpression.FRIENDLY, "Hi.").also { stage = 2 } playerl(FacialExpression.FRIENDLY, "Hi.").also { stage = 2 }
@@ -26,7 +28,7 @@ class GuardsDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (stage) { when (stage) {
0 -> npcl(FacialExpression.ASKING, "Can I help you stranger?").also { stage = 1 } 0 -> npcl(FacialExpression.ASKING, "Can I help you stranger?").also { stage++ }
1 -> npcl(FacialExpression.FRIENDLY, "Oh, you're a guard as well. That's ok then. We don't like strangers around here").also { stage = END_DIALOGUE } 1 -> npcl(FacialExpression.FRIENDLY, "Oh, you're a guard as well. That's ok then. We don't like strangers around here").also { stage = END_DIALOGUE }
} }
when (stage) { when (stage) {
@@ -49,7 +51,9 @@ class GuardsDialogue(player: Player? = null) : DialoguePlugin(player) {
class KhazardGuard254Dialogue(player: Player? = null) : DialoguePlugin(player) { class KhazardGuard254Dialogue(player: Player? = null) : DialoguePlugin(player) {
override fun open(vararg args: Any?): Boolean { override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC npc = args[0] as NPC
if (allInEquipment(player, Items.KHAZARD_HELMET_74, Items.KHAZARD_ARMOUR_75)) { if (player.questRepository.getStage("Fight Arena") == 100) {
npcl(FacialExpression.FRIENDLY, "It's you! I don't believe it. You beat the General! You are a traitor to the uniform!").also { stage = END_DIALOGUE }
} else if (allInEquipment(player, Items.KHAZARD_HELMET_74, Items.KHAZARD_ARMOUR_75)) {
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 0 } playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 0 }
} else { } else {
playerl(FacialExpression.FRIENDLY, "Hi.").also { stage = 7 } playerl(FacialExpression.FRIENDLY, "Hi.").also { stage = 7 }
@@ -59,20 +63,21 @@ class KhazardGuard254Dialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (stage) { when (stage) {
0 -> npcl(FacialExpression.FRIENDLY, "I've never seen you around here before!").also { stage = 1 } 0 -> npcl(FacialExpression.FRIENDLY, "I've never seen you around here before!").also { stage++ }
1 -> playerl(FacialExpression.FRIENDLY, "Long live General Khazard!").also { stage = 2 } 1 -> playerl(FacialExpression.FRIENDLY, "Long live General Khazard!").also { stage++ }
2 -> npcl(FacialExpression.FRIENDLY, "Erm.. yes.. soldier, I take it you're new around here?").also { stage = 3 } 2 -> npcl(FacialExpression.FRIENDLY, "Erm.. yes.. soldier, I take it you're new around here?").also { stage++ }
3 -> playerl(FacialExpression.FRIENDLY, "You could say that.").also { stage++ }
3 -> playerl(FacialExpression.FRIENDLY, "You could say that.").also { stage = 4 } 4 -> npcl(FacialExpression.FRIENDLY, "Khazard died two hundred years ago. However his dark spirit remains in the form of the undead maniac General Khazard. Remember he is your master, always watching.").also { stage++ }
4 -> npcl(FacialExpression.FRIENDLY, "Khazard died two hundred years ago. However his dark spirit remains in the form of the undead maniac General Khazard. Remember he is your master, always watching.").also { stage = 5 } 5 -> npcl(FacialExpression.FRIENDLY, "Got that newbie?").also { stage++ }
6 -> playerl(FacialExpression.FRIENDLY, "Undead, maniac, master. Got it, loud and clear.").also { stage = END_DIALOGUE }
5 -> npcl(FacialExpression.FRIENDLY, "Got that newbie?").also { stage = 6 } 7 -> npcl(FacialExpression.ANNOYED, "This area is restricted. Leave now! OUT! And don't come back.").also { stage++ }
6 -> playerl(FacialExpression.FRIENDLY, "Undead, maniac, master. Got it, loud and clear.").also { stage = END_DIALOGUE 8 -> options("I apologise, I stumbled in here by mistake.", "You have no right to tell me where I can and cannot go.").also { stage++ }
9 -> when(buttonId){
1 -> playerl(FacialExpression.HALF_WORRIED, "I apologise, I stumbled in here by mistake.").also { stage = 10 }
2 -> playerl(FacialExpression.HALF_WORRIED, "You have no right to tell me where I can and cannot go.").also { stage = 11 }
} }
} 10 -> npcl(FacialExpression.FRIENDLY, "Well, don't just stand there - get out of here!").also { stage = END_DIALOGUE }
when (stage) { 11 -> npcl(FacialExpression.FRIENDLY, "Fair enough. Let's do this the hard way.").also { stage = END_DIALOGUE }
7 -> npcl(FacialExpression.ANNOYED, "This area is restricted, leave now!").also { stage = 8 }
8 -> npcl(FacialExpression.ANGRY, "OUT! And don't come back!").also { stage = END_DIALOGUE }
} }
return true return true
} }
@@ -90,7 +95,9 @@ class KhazardGuard254Dialogue(player: Player? = null) : DialoguePlugin(player) {
class KhazardGuard255Dialogue(player: Player? = null) : DialoguePlugin(player) { class KhazardGuard255Dialogue(player: Player? = null) : DialoguePlugin(player) {
override fun open(vararg args: Any?): Boolean { override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC npc = args[0] as NPC
if (allInEquipment(player, Items.KHAZARD_HELMET_74, Items.KHAZARD_ARMOUR_75)) { if (player.questRepository.getStage("Fight Arena") == 100) {
npcl(FacialExpression.FRIENDLY, "It's you! I don't believe it. You beat the General! You are a traitor to the uniform!").also { stage = END_DIALOGUE }
} else if (allInEquipment(player, Items.KHAZARD_HELMET_74, Items.KHAZARD_ARMOUR_75)) {
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 0 } playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 0 }
} else { } else {
playerl(FacialExpression.FRIENDLY, "Hi.").also { stage = 2 } playerl(FacialExpression.FRIENDLY, "Hi.").also { stage = 2 }
@@ -100,11 +107,9 @@ class KhazardGuard255Dialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (stage) { when (stage) {
0 -> npcl(FacialExpression.ASKING, "Can I help you stranger?").also { stage = 1 } 0 -> npcl(FacialExpression.ASKING, "Can I help you stranger?").also { stage++ }
1 -> npcl(FacialExpression.FRIENDLY, "Oh, you're a guard as well. That's ok then. We don't like strangers around here.").also { stage = END_DIALOGUE } 1 -> npcl(FacialExpression.FRIENDLY, "Oh, you're a guard as well. That's ok then. We don't like strangers around here.").also { stage = END_DIALOGUE }
} 2 -> npcl(FacialExpression.ANNOYED, "This area is restricted, leave now!").also { stage++ }
when (stage) {
2 -> npcl(FacialExpression.ANNOYED, "This area is restricted, leave now!").also { stage = 3 }
3 -> npcl(FacialExpression.ANGRY, "OUT! And don't come back!").also { stage = END_DIALOGUE } 3 -> npcl(FacialExpression.ANGRY, "OUT! And don't come back!").also { stage = END_DIALOGUE }
} }
return true return true
@@ -125,6 +130,8 @@ class KhazardGuard256Dialogue(player: Player? = null) : DialoguePlugin(player) {
npc = args[0] as NPC npc = args[0] as NPC
if (allInEquipment(player, Items.KHAZARD_HELMET_74, Items.KHAZARD_ARMOUR_75)) { if (allInEquipment(player, Items.KHAZARD_HELMET_74, Items.KHAZARD_ARMOUR_75)) {
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 0 } playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 0 }
} else if (player.questRepository.getStage("Fight Arena") == 100) {
npcl(FacialExpression.FRIENDLY, "It's you! I don't believe it. You beat the General! You are a traitor to the uniform!").also { stage = END_DIALOGUE }
} else { } else {
playerl(FacialExpression.FRIENDLY, "Hi.").also { stage = 3 } playerl(FacialExpression.FRIENDLY, "Hi.").also { stage = 3 }
} }
@@ -133,12 +140,9 @@ class KhazardGuard256Dialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (stage) { when (stage) {
0 -> npcl(FacialExpression.ANGRY, "Despicable thieving scum, that was good armour. Did you see anyone around here soldier?").also { stage = 1 } 0 -> npcl(FacialExpression.ANGRY, "Despicable thieving scum, that was good armour. Did you see anyone around here soldier?").also { stage++ }
1 -> playerl(FacialExpression.SILENT, "Me? No, no one!").also { stage++ }
1 -> playerl(FacialExpression.SILENT, "Me? No, no one!").also { stage = 2 }
2 -> npcl(FacialExpression.SUSPICIOUS, "Hmmmm").also { stage = END_DIALOGUE } 2 -> npcl(FacialExpression.SUSPICIOUS, "Hmmmm").also { stage = END_DIALOGUE }
}
when (stage) {
3 -> npcl(FacialExpression.ANNOYED, "I don't know who you are. Get out of my house stranger.").also { stage = END_DIALOGUE } 3 -> npcl(FacialExpression.ANNOYED, "I don't know who you are. Get out of my house stranger.").also { stage = END_DIALOGUE }
} }
return true return true
@@ -0,0 +1,49 @@
package content.region.kandarin.ardougne.quest.arena.dialogue
import content.region.kandarin.ardougne.quest.arena.FightArena
import content.region.kandarin.ardougne.quest.arena.cutscenes.SecondFightCutscene
import core.api.*
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import org.rs09.consts.NPCs
class HengradDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
npc = NPC(NPCs.HENGRAD_263)
when (questStage(player!!, FightArena.FightArenaQuest)) {
in 72..87 -> when (stage) {
0 -> {
lockInteractions(player!!, 10)
face(findNPC(NPCs.HENGRAD_263)!!,player!!, 1)
npcl(FacialExpression.AFRAID, "Are you ok stranger?").also { stage++ }
}
1 -> {
face(player!!,findNPC(NPCs.HENGRAD_263)!!, 1)
playerl(FacialExpression.FRIENDLY, "I'm fine thanks.").also { stage++ }
}
2 -> npcl(FacialExpression.ASKING, " So Khazard got his hand on you too?").also { stage++ }
3 -> playerl(FacialExpression.HALF_WORRIED, " I'm afraid so.").also { stage++ }
4 -> npcl(FacialExpression.FRIENDLY, " If you're lucky you may last as long as me.").also { stage++ }
5 -> playerl(FacialExpression.ASKING, " How long have you been here?").also { stage++ }
6 -> npcl(FacialExpression.FRIENDLY, " I've been in Khazard's prisons ever since I can remember. I was a child when his men kidnapped me. My whole life as been spent killing and fighting, all in the hope that, one day, I might escape.").also { stage++ }
7 -> playerl(FacialExpression.FRIENDLY, "Don't give up.").also { stage++ }
8 -> npcl(FacialExpression.FRIENDLY, "Thanks friend.").also { stage++ }
9 -> npcl(FacialExpression.SILENT, "Wait... Shhh, the guard is coming. Looks like you'll be going into the arena. Good luck, friend.").also { stage++ }
10 -> {
end()
SecondFightCutscene(player!!).start()
setQuestStage(player!!, FightArena.FightArenaQuest, 88)
}
}
88 -> when (stage) {
0 -> {
end()
SecondFightCutscene(player!!).start()
}
}
}
}
}
@@ -0,0 +1,61 @@
package content.region.kandarin.ardougne.quest.arena.dialogue
import content.region.kandarin.ardougne.quest.arena.FightArena
import content.region.kandarin.ardougne.quest.arena.cutscenes.EscapeCutscene
import core.api.*
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.tools.END_DIALOGUE
import org.rs09.consts.NPCs
class JeremyServilADialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
npc = NPC(NPCs.JEREMY_SERVIL_265)
when (questStage(player!!, FightArena.FightArenaQuest)) {
20 -> when (stage) {
0 -> {
face(player!!, findNPC(NPCs.JEREMY_SERVIL_265)!!, 1)
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage++ }
}
1 -> {
face(findNPC(NPCs.JEREMY_SERVIL_265)!!, player!!, 1)
npcl(FacialExpression.FRIENDLY, "Please " + (if (player!!.isMale) "Sir" else "Madam") + ", don't hurt me.").also { stage++ }
}
2 -> playerl(FacialExpression.FRIENDLY, "Sshh. This uniform is a disguise. I'm here to help. Where do they keep the keys?").also { stage++ }
3 -> npcl(FacialExpression.FRIENDLY, "The guard always keeps hold of them.").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "Don't lose heart, I'll be back.").also { stage++ }
5 -> {
end()
setQuestStage(player!!, FightArena.FightArenaQuest, 40)
}
}
in 68..89 -> when (stage) {
0 -> {
face(player!!, findNPC(NPCs.JEREMY_SERVIL_265)!!, 2)
playerl(FacialExpression.FRIENDLY, "Jeremy look, I have the keys.").also { stage++ }
}
1 -> {
face(findNPC(NPCs.JEREMY_SERVIL_265)!!, player!!, 2)
npcl(FacialExpression.AMAZED, "Wow! Please set me free, then we can find my dad. I overheard a guard talking. I think they're taken him to the arena.").also { stage++ }
}
2 -> playerl(FacialExpression.NEUTRAL, "Ok, we'd better hurry.").also { stage++ }
3 -> {
end()
setAttribute(player!!, "spawn-ogre", true)
EscapeCutscene(player!!).start()
}
}
in 90..100 -> when (stage) {
0 -> {
face(player!!, findNPC(NPCs.JEREMY_SERVIL_265)!!, 1)
npcl(FacialExpression.FRIENDLY, "You need to kill the creatures in the arena").also { stage = END_DIALOGUE }
}
}
}
}
}
@@ -0,0 +1,74 @@
package content.region.kandarin.ardougne.quest.arena.dialogue
import content.region.kandarin.ardougne.quest.arena.FightArena
import core.api.*
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.tools.END_DIALOGUE
import org.rs09.consts.NPCs
class JeremyServilBDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
npc = NPC(NPCs.JEREMY_SERVIL_266)
when (questStage(player!!, FightArena.FightArenaQuest)) {
in 1..84 -> when (stage) {
0 -> {
face(player!!, findNPC(NPCs.JEREMY_SERVIL_266)!!, 1)
playerl(FacialExpression.FRIENDLY, "Don't worry, I'll get us out of here.").also { stage++ }
}
1 -> npcl(FacialExpression.FRIENDLY, "Thanks, traveller. I'm sorry that you too are a subject of this arena.").also { stage = END_DIALOGUE }
}
in 85..97 -> when (stage) {
0 -> {
lockInteractions(player!!, 1)
face(player!!, findNPC(NPCs.JEREMY_SERVIL_266)!!, 1)
playerl(FacialExpression.FRIENDLY, "You and you father can return to Lady Servil.").also { stage++ }
}
1 -> npcl(FacialExpression.FRIENDLY, "Thank you, we are truly indebted to you.").also { stage++ }
2 -> {
end()
setQuestStage(player!!, FightArena.FightArenaQuest, 99)
}
}
98 -> when (stage) {
0 -> {
face(player!!, findNPC(NPCs.JEREMY_SERVIL_266)!!, 1)
sendPlayerDialogue(player!!, "Khazard is dead, you and you father can return to Lady Servil.").also { stage++ }
}
1 -> {
face(findNPC(NPCs.JEREMY_SERVIL_266)!!,player!!, 1)
npcl(FacialExpression.FRIENDLY, "Thank you, we are truly indebted to you.").also { stage++ }
}
2 -> {
end()
setQuestStage(player!!, FightArena.FightArenaQuest, 99)
}
}
100 -> when (stage) {
0 -> {
face(player!!, findNPC(NPCs.JEREMY_SERVIL_266)!!, 1)
playerl(FacialExpression.FRIENDLY, "Hiya kiddo! You're looking a lot happier now.").also { stage++ }
}
1 -> {
face(findNPC(NPCs.JEREMY_SERVIL_266)!!,player!!, 1)
npcl(FacialExpression.FRIENDLY,"Thank you " + (if (player!!.isMale) "Sir" else "Madam") + " I saw you fighting in the arena. You were brilliant! You were like POW! and then you got hit, but you were like too hard and didn't care and then you like hit him again and KERPLOW! Then the big scary dog came out, but you weren't scared and you like smacked him as well, and then you...").also { stage++ }
}
2 -> playerl(FacialExpression.FRIENDLY, "Jeremy, calm down. Player doesn't need to hear everything " + (if (player!!.isMale) "He" else "She") + " did. " + (if (player!!.isMale) "He" else "She") + " was there when it happened, remember.").also { stage++ }
3 -> sendNPCDialogue(player!!, NPCs.LADY_SERVIL_264, "I was rather enjoying it, actually.").also { stage++ }
4 -> npcl(FacialExpression.FRIENDLY, "Yeah, but mum... ${player!!.username} was so cool. " + (if (player!!.isMale) "He" else "She") + " was like BAM! BASH! SPLAT! When I grow up, I wanna be a hero as well.").also { stage++ }
5 -> playerl(FacialExpression.FRIENDLY, "I'm sure you will be. You showed a lot of bravery in the arena, young lad. If you work hard to complete your squire training, you'll be a worthy knight. Trust me, I can tell these things.").also { stage++ }
6 -> npcl(FacialExpression.FRIENDLY, "Yeah! I'm gonna be the bravest knight in the world! After you, of course.").also { stage++ }
7 -> sendNPCDialogue(player!!, NPCs.JUSTIN_SERVIL_267, "Thank you again, ${player!!.username}. You have saved my family and given young Jeremy here a new hero.").also { stage++ }
8 -> playerl(FacialExpression.FRIENDLY, "I'm glad I could help. Have a good journey home and farewell.").also { stage++ }
9 -> npcl(FacialExpression.HAPPY, "See ya!").also { stage = END_DIALOGUE }
}
}
}
}
@@ -1,4 +1,4 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.dialogue
import core.api.allInEquipment import core.api.allInEquipment
import core.api.sendNPCDialogue import core.api.sendNPCDialogue
@@ -26,13 +26,11 @@ class JoeDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (stage) { when (stage) {
0 -> sendNPCDialogue(player, NPCs.JOE_261, "If we did, why would we tell you guard?", FacialExpression.ANNOYED).also { stage = 1 } 0 -> sendNPCDialogue(player, NPCs.JOE_261, "If we did, why would we tell you guard?", FacialExpression.ANNOYED).also { stage++ }
1 -> sendNPCDialogue(player, NPCs.KELVIN_260, "Until our last breath, our every action will be against Khazard. Never will we help you.", FacialExpression.ANNOYED).also { stage = 2 } 1 -> sendNPCDialogue(player, NPCs.KELVIN_260, "Until our last breath, our every action will be against Khazard. Never will we help you.", FacialExpression.ANNOYED).also { stage++ }
2 -> sendNPCDialogue(player, NPCs.JOE_261, "I spit on Khazard's grave, and all who do his bidding.", FacialExpression.ANNOYED).also { stage = END_DIALOGUE } 2 -> sendNPCDialogue(player, NPCs.JOE_261, "I spit on Khazard's grave, and all who do his bidding.", FacialExpression.ANNOYED).also { stage = END_DIALOGUE }
} 3 -> sendNPCDialogue(player, NPCs.KELVIN_260, "I have heard of those of whom you speak. But I fear it may be too late.", FacialExpression.HALF_GUILTY).also { stage++ }
when (stage) { 4 -> sendNPCDialogue(player, NPCs.JOE_261, "It is said that Khazard has a personal vendetta against those two, their time is therefore short.", FacialExpression.FRIENDLY).also { stage++ }
3 -> sendNPCDialogue(player, NPCs.KELVIN_260, "I have heard of those of whom you speak. But I fear it may be too late.", FacialExpression.HALF_GUILTY).also { stage = 4 }
4 -> sendNPCDialogue(player, NPCs.JOE_261, "It is said that Khazard has a personal vendetta against those two, their time is therefore short.", FacialExpression.FRIENDLY).also { stage = 5 }
5 -> sendNPCDialogue(player, NPCs.KELVIN_260, "You're a brave " + (if (player!!.isMale) "Sir" else "Madam") + ". If the guards get you, you'll be in here next.", FacialExpression.HALF_WORRIED).also { stage = END_DIALOGUE } 5 -> sendNPCDialogue(player, NPCs.KELVIN_260, "You're a brave " + (if (player!!.isMale) "Sir" else "Madam") + ". If the guards get you, you'll be in here next.", FacialExpression.HALF_WORRIED).also { stage = END_DIALOGUE }
} }
return true return true
@@ -43,6 +41,6 @@ class JoeDialogue(player: Player? = null) : DialoguePlugin(player) {
} }
override fun getIds(): IntArray { override fun getIds(): IntArray {
return intArrayOf(NPCs.JOE_261) return intArrayOf(NPCs.KELVIN_260, NPCs.JOE_261)
} }
} }
@@ -0,0 +1,72 @@
package content.region.kandarin.ardougne.quest.arena.dialogue
import content.region.kandarin.ardougne.quest.arena.FightArena
import core.api.face
import core.api.findNPC
import core.api.questStage
import core.api.sendNPCDialogue
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.tools.END_DIALOGUE
import org.rs09.consts.NPCs
class JustinServilDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
npc = NPC(NPCs.JUSTIN_SERVIL_267)
when (questStage(player!!, FightArena.FightArenaQuest)) {
in 1..68 -> when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Hello.").also { stage++ }
1 -> {
face(findNPC(NPCs.JUSTIN_SERVIL_267)!!, player!!, 1)
npcl(FacialExpression.FRIENDLY, "You've incurred the anger of Khazard himself. He won't let any of us go easily.").also { stage = END_DIALOGUE }
}
}
in 69..71 -> when (stage) {
0 -> {
face(findNPC(NPCs.JUSTIN_SERVIL_267)!!, player!!, 1)
playerl(FacialExpression.FRIENDLY, "Lady Servil sent me to rescue you and your son. Come on, we have to get out of here.").also { stage++ }
}
1 -> npcl(FacialExpression.FRIENDLY, "I'm too old to fight. I'm afraid you'll have to kill that ogre by yourself.").also { stage = END_DIALOGUE }
}
72 -> when (stage) {
0 -> {
face(findNPC(NPCs.JUSTIN_SERVIL_267)!!, player!!, 1)
playerl(FacialExpression.FRIENDLY, "Are you alright").also { stage++ }
}
1 -> npcl(FacialExpression.FRIENDLY, "You saved my life and my son's. I am eternally in your debt brave traveller.").also { stage = END_DIALOGUE }
}
in 73..89 -> when (stage) {
0 -> {
face(findNPC(NPCs.JUSTIN_SERVIL_267)!!, player!!, 1)
playerl(FacialExpression.FRIENDLY, "Don't worry, I'll get us out of here.").also { stage++ }
}
1 -> npcl(FacialExpression.NEUTRAL, "You've incurred the anger of Khazard yourself now. He won't let any of us go easily.").also { stage = END_DIALOGUE }
}
in 90..99 -> when (stage) {
0 -> {
face(findNPC(NPCs.JUSTIN_SERVIL_267)!!, player!!, 1)
npcl(FacialExpression.NEUTRAL, " You saved my life and my son's, I am eternally in your debt brave taveller.").also { stage = END_DIALOGUE }
}
}
100 -> when (stage) {
0 -> {
face(findNPC(NPCs.JUSTIN_SERVIL_267)!!, player!!, 1)
npcl(FacialExpression.FRIENDLY, "Thank you again, ${player!!.username}. You have saved me and my boy from an awful fate.").also { stage++ }
}
1 -> sendNPCDialogue(player!!, NPCs.JEREMY_SERVIL_266, "Yeah, you were ace. I wanna be jus' like you.").also { stage++ }
2 -> npcl(FacialExpression.FRIENDLY, "If you do well in your studies and work hard, maybe you will be.").also { stage++ }
3 -> sendNPCDialogue(player!!, NPCs.JEREMY_SERVIL_266, "Daaad, studying's so boooooooring! I wanna hit things.").also { stage++ }
4 -> npcl(FacialExpression.FRIENDLY, "I'm sure ${player!!.username} studied hard when he was younger.").also { stage++ }
5 -> playerl(FacialExpression.FRIENDLY, "That's right, son, you should do as your father says. Anyway, I should go now, have a safe journey home. And you, young lad, work hard and stay out of trouble - at least until you're a little older.").also { stage = END_DIALOGUE }
}
}
}
}
@@ -1,6 +1,10 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.dialogue
import core.api.* import content.region.kandarin.ardougne.quest.arena.FightArena
import core.api.addItem
import core.api.questStage
import core.api.removeItem
import core.api.setQuestStage
import core.game.dialogue.DialogueFile import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC import core.game.node.entity.npc.NPC
@@ -12,28 +16,25 @@ import org.rs09.consts.NPCs
class KhazardBarmanDialogue : DialogueFile() { class KhazardBarmanDialogue : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) { override fun handle(componentID: Int, buttonID: Int) {
val questName = "Fight Arena"
val questStage = questStage(player!!, questName)
npc = NPC(NPCs.KHAZARD_BARMAN_259) npc = NPC(NPCs.KHAZARD_BARMAN_259)
when (questStage(player!!, FightArena.FightArenaQuest)) {
when { in 0..49 -> {
(questStage in 49 downTo 0) -> {
when (stage) { when (stage) {
0 -> playerl(FacialExpression.HAPPY, "Hello. I'll have a beer please.").also { stage = 1 } 0 -> playerl(FacialExpression.HAPPY, "Hello. I'll have a beer please.").also { stage = 1 }
1 -> npcl(FacialExpression.FRIENDLY, "There you go, that's two gold coins.").also { stage = 2 } 1 -> npcl(FacialExpression.FRIENDLY, "There you go, that's two gold coins.").also { stage = 2 }
2 -> if (inInventory(player!!, COINS_995, 2)) { 2 -> if (removeItem(player!!, Item(COINS_995, 2))) {
end() end()
removeItem(player!!, Item(COINS_995, 2)) && addItem(player!!, Items.BEER_1917, 1).also { stage = END_DIALOGUE } addItem(player!!, Items.BEER_1917, 1)
stage = END_DIALOGUE
} else { } else {
end()
playerl(FacialExpression.STRUGGLE, "Oh, I don't have enough money with me.").also { stage = END_DIALOGUE } playerl(FacialExpression.STRUGGLE, "Oh, I don't have enough money with me.").also { stage = END_DIALOGUE }
} }
} }
} }
(questStage in 100 downTo 50) -> { in 50..100 -> {
when (stage) { when (stage) {
0 -> playerl(FacialExpression.HAPPY, "Hello.").also { stage++ } 0 -> playerl(FacialExpression.HAPPY, "Hello.").also { stage++ }
1 -> npcl(FacialExpression.FRIENDLY, "Hi, what can I get you? We have a range of quality brews.").also { stage++ } 1 -> npcl(FacialExpression.FRIENDLY, "Hi, what can I get you? We have a range of quality brews.").also { stage++ }
2 -> options("I'll have a beer please.", "I'd like a Khali brew please.", "Got any news?").also { stage++ } 2 -> options("I'll have a beer please.", "I'd like a Khali brew please.", "Got any news?").also { stage++ }
@@ -43,19 +44,24 @@ class KhazardBarmanDialogue : DialogueFile() {
3 -> playerl(FacialExpression.ASKING, "Got any news?").also { stage = 5 } 3 -> playerl(FacialExpression.ASKING, "Got any news?").also { stage = 5 }
} }
4 -> npcl(FacialExpression.FRIENDLY, "There you go, that's two gold coins.").also { stage = 8 } 4 -> npcl(FacialExpression.FRIENDLY, "There you go, that's two gold coins.").also { stage = 8 }
5 -> npcl(FacialExpression.NEUTRAL, "If you want to see the action around here you should visit the famous Khazard fight arena. I've seen some grand battles in my time. Ogres, goblins, even dragons have fought there.").also { stage = 6 } 5 -> npcl(FacialExpression.NEUTRAL, "If you want to see the action around here you should visit the famous Khazard fight arena. I've seen some grand battles in my time. Ogres, goblins, even dragons have fought there.").also { stage++ }
6 -> npcl(FacialExpression.WORRIED, "Although you have to feel sorry for some of the slaves sent in there.").also { stage = END_DIALOGUE } 6 -> npcl(FacialExpression.WORRIED, "Although you have to feel sorry for some of the slaves sent in there.").also { stage = END_DIALOGUE }
7 -> npcl(FacialExpression.FRIENDLY, "There you go, that's five gold coins. I suggest lying down before you drink it. That way you have less distance to collapse.").also { stage = 9 } 7 -> npcl(FacialExpression.FRIENDLY, "There you go, that's five gold coins. I suggest lying down before you drink it. That way you have less distance to collapse.").also { stage = 9 }
8 -> if (inInventory(player!!, COINS_995, 2)) { 8 -> if (removeItem(player!!, Item(COINS_995, 2))){
end() end()
removeItem(player!!, Item(COINS_995, 2)) && addItem(player!!, Items.BEER_1917, 1).also { stage = END_DIALOGUE } addItem(player!!, Items.BEER_1917, 1)
stage = END_DIALOGUE
} else { } else {
end()
playerl(FacialExpression.STRUGGLE, "Oh, I don't have enough money with me.").also { stage = END_DIALOGUE } playerl(FacialExpression.STRUGGLE, "Oh, I don't have enough money with me.").also { stage = END_DIALOGUE }
} }
9 -> if (inInventory(player!!, COINS_995, 5)) { 9 -> if (removeItem(player!!, Item(COINS_995, 5))){
end() end()
removeItem(player!!, Item(COINS_995, 5)) && addItem(player!!, Items.KHALI_BREW_77, 1).also { setQuestStage(player!!, FightArena.FightArenaQuest, 60) }.also { stage = END_DIALOGUE } addItem(player!!, Items.KHALI_BREW_77, 1)
setQuestStage(player!!, FightArena.FightArenaQuest, 60)
stage = END_DIALOGUE
} else { } else {
end()
playerl(FacialExpression.STRUGGLE, "Oh, I don't have enough money with me.").also { stage = END_DIALOGUE } playerl(FacialExpression.STRUGGLE, "Oh, I don't have enough money with me.").also { stage = END_DIALOGUE }
} }
} }
@@ -0,0 +1,100 @@
package content.region.kandarin.ardougne.quest.arena.dialogue
import content.region.kandarin.ardougne.quest.arena.FightArena.Companion.FightArenaQuest
import core.api.questStage
import core.api.setQuestStage
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 org.rs09.consts.NPCs
@Initializable
class LadyServilDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC
playerl(FacialExpression.FRIENDLY, "Hi there, looks like you're in some trouble.")
if (player.questRepository.getStage("Fight Arena") == 10) {
playerl(FacialExpression.FRIENDLY, "Hello Lady Servil.")
} else if (player.questRepository.getStage("Fight Arena") == 30) {
playerl(FacialExpression.FRIENDLY, "Lady Servil, I have managed to infiltrate General Khazard's arena.")
} else if (player.questRepository.getStage("Fight Arena") == 70) {
playerl(FacialExpression.FRIENDLY, "Lady Servil. I freed your son, however he has returned to the arena to help your husband.").also { stage++ }
} else {
playerl(FacialExpression.FRIENDLY, "Hello Lady Servil.")
}
return true
}
override fun handle(componentID: Int, buttonID: Int): Boolean {
when (questStage(player!!, FightArenaQuest)) {
0 -> when (stage) {
0 -> npcl(FacialExpression.SAD, "Oh I wish this broken cart was my only problem. *sob* I've got to find my family.. **sob**").also { stage++ }
1 -> options("I hope you can. good luck.", "Can I help you?").also { stage++ }
2 -> when (buttonID) {
1 -> playerl(FacialExpression.NEUTRAL, "I hope you can, good luck.").also { stage = END_DIALOGUE }
2 -> playerl(FacialExpression.FRIENDLY, "Can I help you?").also { stage++ }
}
3 -> npcl(FacialExpression.SAD, "Would you? Please?").also { stage++ }
4 -> npcl(FacialExpression.SAD, "I'm Lady Servil, and my husband is Sir Servil. We were travelling north together with our son Jeremy when we were ambushed by General Khazard's men.").also { stage++ }
5 -> playerl(FacialExpression.HALF_ASKING, "General Khazard?").also { stage++ }
6 -> npcl(FacialExpression.SAD, "He's been after me even since I declined his hand in marriage.").also { stage++ }
7 -> npcl(FacialExpression.SAD, "Now he's kidnapped my husband and son to fight in his battle arena to the south of here. I hate to think what he'll do to them. He's a sick and twisted man.").also { stage++ }
8 -> playerl(FacialExpression.FRIENDLY, "I'll try my best to return your family.").also { stage++ }
9 -> {
end()
setQuestStage(player!!, FightArenaQuest, 10)
npcl(FacialExpression.SAD, "Please do. My family is wealthy and can reward you handsomely. I'll be waiting here for you.").also { stage = END_DIALOGUE }
}
}
in 1..10 -> when (stage) {
0 -> npcl(FacialExpression.SAD, "Brave traveller, please... bring back my family.").also { stage = END_DIALOGUE }
}
in 11..20 -> when (stage) {
0 -> npcl(FacialExpression.WORRIED, "Have you had any luck with freeing my family?").also { stage++ }
1 -> playerl(FacialExpression.HAPPY, "I've managed to get a guard's uniform, hopefully I can infiltrate the arena.").also { stage++ }
2 -> npcl(FacialExpression.SAD, "Please hurry.").also { stage = END_DIALOGUE }
}
in 21..30 -> when (stage) {
0 -> npcl(FacialExpression.ASKING, "And my family?").also { stage++ }
1 -> playerl(FacialExpression.NEUTRAL, "I'm working on it.").also { stage++ }
2 -> npcl(FacialExpression.SAD, "Please hurry.").also { stage = END_DIALOGUE }
}
in 31..98 -> when (stage) {
0 -> npcl(FacialExpression.WORRIED, "Oh no, they won't stand a chance. Please go back and help.").also { stage = END_DIALOGUE }
}
99 -> when (stage) {
0 -> npcl(FacialExpression.AMAZED, "You're alive, I thought Khazard's men had taken you.").also { stage++ }
1 -> npcl(FacialExpression.HAPPY, "My son and husband are safe and recovering at home. Without you they would certainly be dead. I am truly grateful for your service.").also { stage++ }
2 -> npcl(FacialExpression.FRIENDLY, "All I can offer in return is material wealth. Please take these coins as a sign of my gratitude.").also { stage++ }
3 -> {
end()
player!!.questRepository.getQuest("Fight Arena").finish(player)
}
}
100 -> when (stage) {
0 -> npcl(FacialExpression.FRIENDLY, "Oh hello my dear. My husband and son are resting while I wait for the cart fixer.").also { stage++ }
1 -> playerl(FacialExpression.FRIENDLY, "I hope he's not too long.").also { stage++ }
2 -> npcl(FacialExpression.FRIENDLY, "Thanks again for everything.").also { stage = END_DIALOGUE }
}
}
return true
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.LADY_SERVIL_264)
}
}
@@ -1,4 +1,4 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.dialogue
import core.game.dialogue.DialoguePlugin import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
@@ -12,27 +12,32 @@ import org.rs09.consts.NPCs
class LocalDialogue(player: Player? = null) : DialoguePlugin(player) { class LocalDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun open(vararg args: Any?): Boolean { override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC npc = args[0] as NPC
if (player.questRepository.getStage("Fight Arena") >= 10) { if (player.questRepository.getStage("Fight Arena") == 100) {
npcl(FacialExpression.FRIENDLY, "Hey, you're the guy from the arena! How'd you get out?").also { stage = END_DIALOGUE }
} else if (player.questRepository.getStage("Fight Arena") in 91..99) {
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 9 }
} else if (player.questRepository.getStage("Fight Arena") >= 10) {
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 0 } playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 0 }
} else { } else {
playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 7 } playerl(FacialExpression.FRIENDLY, "Hello.").also { stage = 7 }
} }
return true return true
} }
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (stage) { when (stage) {
0 -> npcl(FacialExpression.FRIENDLY, "I heard the Servil family are fighting soon. Should be very entertaining.").also { stage = 1 } 0 -> npcl(FacialExpression.FRIENDLY, "I heard the Servil family are fighting soon. Should be very entertaining.").also { stage++ }
1 -> npcl(FacialExpression.ASKING, "Hello stranger, are you new to these parts?").also { stage = 2 } 1 -> npcl(FacialExpression.ASKING, "Hello stranger, are you new to these parts?").also { stage++ }
2 -> playerl(FacialExpression.ASKING, "I suppose I am.").also { stage = 3 } 2 -> playerl(FacialExpression.ASKING, "I suppose I am.").also { stage++ }
3 -> npcl(FacialExpression.ASKING, "What's your business?").also { stage = 4 } 3 -> npcl(FacialExpression.ASKING, "What's your business?").also { stage++ }
4 -> playerl(FacialExpression.ASKING, "Just visiting friends in the cells.").also { stage = 5 } 4 -> playerl(FacialExpression.ASKING, "Just visiting friends in the cells.").also { stage++ }
5 -> npcl(FacialExpression.LAUGH, "Visiting, that's funny.").also { stage = 6 } 5 -> npcl(FacialExpression.LAUGH, "Visiting, that's funny.").also { stage++ }
6 -> npcl(FacialExpression.FRIENDLY, "Only Khazard guards are allowed to see prisoners. Unless you know where to get some Khazard armour, you won't be visiting anyone.").also { stage = END_DIALOGUE } 6 -> npcl(FacialExpression.FRIENDLY, "Only Khazard guards are allowed to see prisoners. Unless you know where to get some Khazard armour, you won't be visiting anyone.").also { stage = END_DIALOGUE }
} 7 -> npcl(FacialExpression.ASKING, "Hello stranger, are you new to these parts? You look lost.").also { stage++ }
when (stage) {
7 -> npcl(FacialExpression.ASKING, "Hello stranger, are you new to these parts? You look lost.").also { stage = 8 }
8 -> npcl(FacialExpression.HALF_THINKING, "I suppose you're here for the fight arena? There are some rich folk fighting tomorrow. Should be entertaining.").also { stage = END_DIALOGUE } 8 -> npcl(FacialExpression.HALF_THINKING, "I suppose you're here for the fight arena? There are some rich folk fighting tomorrow. Should be entertaining.").also { stage = END_DIALOGUE }
9 -> npcl(FacialExpression.FRIENDLY, "You're the guy who beat Bouncer! Amazing! That makes you a champion to many, but you'd better get out of here while you still can. General Khazard liked that brute and will be after you.").also { stage++ }
10 -> playerl(FacialExpression.FRIENDLY, "He tried, but I killed him. You are safe now.").also { stage++ }
11 -> npcl(FacialExpression.FRIENDLY, "Sadly, you can't kill what is already dead. He's probably still out there, somewhere.").also { stage = END_DIALOGUE }
} }
return true return true
} }
@@ -1,5 +1,7 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.npc
import content.region.kandarin.ardougne.quest.arena.FightArena
import content.region.kandarin.ardougne.quest.arena.dialogue.GeneralKhazardDialogue
import core.api.* import core.api.*
import core.game.node.entity.Entity import core.game.node.entity.Entity
import core.game.node.entity.npc.AbstractNPC import core.game.node.entity.npc.AbstractNPC
@@ -23,7 +25,7 @@ class BouncerNPC(id: Int = 0, location: Location? = null) : AbstractNPC(id, loca
override fun handleTickActions() { override fun handleTickActions() {
super.handleTickActions() super.handleTickActions()
if (clearTime++ > 144) poofClear(this) if (clearTime++ > 300) poofClear(this)
} }
companion object { companion object {
@@ -1,7 +1,8 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.npc
import content.region.kandarin.ardougne.quest.arena.FightArena
import content.region.kandarin.ardougne.quest.arena.FightArenaListeners.Companion.General import content.region.kandarin.ardougne.quest.arena.FightArenaListeners.Companion.General
import content.region.kandarin.ardougne.quest.arena.dialogue.JeremyServilBDialogue
import core.api.openDialogue import core.api.openDialogue
import core.api.questStage import core.api.questStage
import core.api.setQuestStage import core.api.setQuestStage
@@ -26,7 +27,6 @@ class GeneralNPC(id: Int = 0, location: Location? = null) : AbstractNPC(id, loca
super.handleTickActions() super.handleTickActions()
General.asNpc().isRespawn = true General.asNpc().isRespawn = true
General.respawnTick = 10 General.respawnTick = 10
} }
override fun finalizeDeath(killer: Entity?) { override fun finalizeDeath(killer: Entity?) {
@@ -35,7 +35,7 @@ class GeneralNPC(id: Int = 0, location: Location? = null) : AbstractNPC(id, loca
if (questStage(killer, quest) == 97) { if (questStage(killer, quest) == 97) {
setQuestStage(killer, FightArena.FightArenaQuest, 98) setQuestStage(killer, FightArena.FightArenaQuest, 98)
} }
openDialogue(killer, JeremyServilRescuedDialogue()) openDialogue(killer, JeremyServilBDialogue())
} }
super.finalizeDeath(killer) super.finalizeDeath(killer)
} }
@@ -1,5 +1,7 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.npc
import content.region.kandarin.ardougne.quest.arena.FightArena
import content.region.kandarin.ardougne.quest.arena.dialogue.GeneralKhazardDialogue
import core.api.* import core.api.*
import core.game.node.entity.Entity import core.game.node.entity.Entity
import core.game.node.entity.npc.AbstractNPC import core.game.node.entity.npc.AbstractNPC
@@ -11,25 +13,24 @@ import core.plugin.Initializable
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
@Initializable @Initializable
class KhazardOgreNPC(id: Int = 0, location: Location? = null) : AbstractNPC(id, location) { class OgreNPC(id: Int = 0, location: Location? = null) : AbstractNPC(id, location) {
var clearTime = 0 var clearTime = 0
override fun construct(id: Int, location: Location, vararg objects: Any): AbstractNPC { override fun construct(id: Int, location: Location, vararg objects: Any): AbstractNPC {
return KhazardOgreNPC(id, location) return OgreNPC(id, location)
} }
override fun getIds(): IntArray { override fun getIds(): IntArray {
return intArrayOf(NPCs.KHAZARD_OGRE_270) return intArrayOf(NPCs.KHAZARD_OGRE_270)
} }
override fun handleTickActions() { override fun handleTickActions() {
super.handleTickActions() super.handleTickActions()
if (clearTime++ > 144) poofClear(this) if (clearTime++ > 300) poofClear(this)
} }
companion object { companion object {
fun spawnOgre(player: Player) { fun spawnOgre(player: Player) {
val ogre = KhazardOgreNPC(NPCs.KHAZARD_OGRE_270) val ogre = OgreNPC(NPCs.KHAZARD_OGRE_270)
ogre.location = location(2603, 3166, 0) ogre.location = location(2603, 3166, 0)
ogre.isWalks = true ogre.isWalks = true
ogre.isAggressive = true ogre.isAggressive = true
@@ -1,6 +1,7 @@
package content.region.kandarin.ardougne.quest.arena package content.region.kandarin.ardougne.quest.arena.npc
import content.region.kandarin.ardougne.quest.arena.FightArena
import content.region.kandarin.ardougne.quest.arena.dialogue.GeneralKhazardDialogue
import core.api.* import core.api.*
import core.game.node.entity.Entity import core.game.node.entity.Entity
import core.game.node.entity.npc.AbstractNPC import core.game.node.entity.npc.AbstractNPC
@@ -12,11 +13,10 @@ import core.plugin.Initializable
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
@Initializable @Initializable
class KhazardScorpionNPC(id: Int = 0, location: Location? = null) : AbstractNPC(id, location) { class ScorpionNPC(id: Int = 0, location: Location? = null) : AbstractNPC(id, location) {
var clearTime = 0 var clearTime = 0
override fun construct(id: Int, location: Location, vararg objects: Any): AbstractNPC { override fun construct(id: Int, location: Location, vararg objects: Any): AbstractNPC {
return KhazardScorpionNPC(id, location) return ScorpionNPC(id, location)
} }
override fun getIds(): IntArray { override fun getIds(): IntArray {
@@ -25,12 +25,12 @@ class KhazardScorpionNPC(id: Int = 0, location: Location? = null) : AbstractNPC(
override fun handleTickActions() { override fun handleTickActions() {
super.handleTickActions() super.handleTickActions()
if (clearTime++ > 144) poofClear(this) if (clearTime++ > 300) poofClear(this)
} }
companion object { companion object {
fun spawnScorpion(player: Player) { fun spawnScorpion(player: Player) {
val scorpion = KhazardScorpionNPC(NPCs.KHAZARD_SCORPION_271) val scorpion = ScorpionNPC(NPCs.KHAZARD_SCORPION_271)
scorpion.location = location(2604, 3159, 0) scorpion.location = location(2604, 3159, 0)
scorpion.isWalks = true scorpion.isWalks = true
scorpion.isAggressive = true scorpion.isAggressive = true