Implemented Varrock diary task for GE shortcut
Implemented Varrock diary task for pickpocketing a guard Implemented Varrock diary task for browsing Oziach's store
This commit is contained in:
@@ -13,16 +13,21 @@ import org.rs09.consts.Scenery
|
|||||||
import content.region.misthalin.varrock.dialogue.ElsieDialogue
|
import content.region.misthalin.varrock.dialogue.ElsieDialogue
|
||||||
import content.global.handlers.iface.FairyRing
|
import content.global.handlers.iface.FairyRing
|
||||||
import content.global.skill.magic.TeleportMethod
|
import content.global.skill.magic.TeleportMethod
|
||||||
import content.global.skill.magic.spellconsts.Modern
|
import core.api.inBorders
|
||||||
import core.game.diary.AreaDiaryTask
|
import core.game.diary.AreaDiaryTask
|
||||||
import core.game.diary.DiaryEventHookBase
|
import core.game.diary.DiaryEventHookBase
|
||||||
import core.game.diary.DiaryLevel
|
import core.game.diary.DiaryLevel
|
||||||
import core.game.event.*
|
import core.game.event.*
|
||||||
|
import core.game.node.entity.player.link.SpellBookManager
|
||||||
|
import core.game.node.entity.skill.Skills
|
||||||
|
|
||||||
class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
|
class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
|
||||||
companion object {
|
companion object {
|
||||||
private val VARROCK_ROOF_AREA = ZoneBorders(3201, 3467, 3225, 3497, 3)
|
private val VARROCK_ROOF_AREA = ZoneBorders(3201, 3467, 3225, 3497, 3)
|
||||||
private val SOS_LEVEL_2_AREA = ZoneBorders(2040, 5241, 2046, 5246)
|
private val SOS_LEVEL_2_AREA = ZoneBorders(2040, 5241, 2046, 5246)
|
||||||
|
private val VARROCK_PALACE = ZoneBorders(3201, 3456, 3227, 3468)
|
||||||
|
private val CHAMPIONS_GUILD = ZoneBorders(3188, 3361, 3194, 3362)
|
||||||
|
private val OZIACH_SHOP = ZoneBorders(3066, 3514,3070, 3518)
|
||||||
|
|
||||||
private val STRAY_DOGS = arrayOf(
|
private val STRAY_DOGS = arrayOf(
|
||||||
NPCs.STRAY_DOG_4766, NPCs.STRAY_DOG_4767,
|
NPCs.STRAY_DOG_4766, NPCs.STRAY_DOG_4767,
|
||||||
@@ -103,6 +108,12 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
|
|||||||
SOS_LEVEL_2_AREA,
|
SOS_LEVEL_2_AREA,
|
||||||
DiaryLevel.EASY,
|
DiaryLevel.EASY,
|
||||||
EasyTasks.VISIT_SOS_LEVEL2
|
EasyTasks.VISIT_SOS_LEVEL2
|
||||||
|
),
|
||||||
|
|
||||||
|
AreaDiaryTask(
|
||||||
|
CHAMPIONS_GUILD,
|
||||||
|
DiaryLevel.MEDIUM,
|
||||||
|
MediumTasks.CHAMPIONS_GUILD_VISIT
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -167,6 +178,31 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
|
|||||||
EasyTasks.EDGEVILLE_ENTER_DUNGEON_SOUTH
|
EasyTasks.EDGEVILLE_ENTER_DUNGEON_SOUTH
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
12598 -> if (event.target.id == 9312 && player.skills.getLevel(Skills.AGILITY, true) >= 21) {
|
||||||
|
finishTask(
|
||||||
|
player,
|
||||||
|
DiaryLevel.MEDIUM,
|
||||||
|
MediumTasks.USE_GE_UNDER_WALL_SHORTCUT
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.option == "pickpocket" && (event.target.id == NPCs.GUARD_5920 && inBorders(player, VARROCK_PALACE))) {
|
||||||
|
finishTask(
|
||||||
|
player,
|
||||||
|
DiaryLevel.MEDIUM,
|
||||||
|
MediumTasks.PALACE_PICKPOCKET_GUARD
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player.questRepository.isComplete("Dragon Slayer")) {
|
||||||
|
if (event.target.id == NPCs.OZIACH_747 && event.option == "trade" && inBorders(player, OZIACH_SHOP)) {
|
||||||
|
finishTask(
|
||||||
|
player,
|
||||||
|
DiaryLevel.MEDIUM,
|
||||||
|
MediumTasks.OZIACH_BROWSE_STORE
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,8 +262,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onSpellCast(player: Player, event: SpellCastEvent) {
|
override fun onSpellCast(player: Player, event: SpellCastEvent) {
|
||||||
when (event.spellId) {
|
if (event.spellBook == SpellBookManager.SpellBook.MODERN && event.spellId == 15) {
|
||||||
Modern.VARROCK_TELEPORT -> {
|
|
||||||
finishTask(
|
finishTask(
|
||||||
player,
|
player,
|
||||||
DiaryLevel.MEDIUM,
|
DiaryLevel.MEDIUM,
|
||||||
@@ -235,7 +270,6 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
override fun onFairyRingDialed(player: Player, event: FairyRingDialEvent) {
|
override fun onFairyRingDialed(player: Player, event: FairyRingDialEvent) {
|
||||||
if (event.fairyRing == FairyRing.DKR) {
|
if (event.fairyRing == FairyRing.DKR) {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package content.region.misthalin.varrock.handlers
|
package content.region.misthalin.varrock.handlers
|
||||||
|
|
||||||
import core.game.node.entity.player.link.diary.DiaryType
|
|
||||||
import core.plugin.Initializable
|
import core.plugin.Initializable
|
||||||
import org.rs09.consts.Scenery
|
import org.rs09.consts.Scenery
|
||||||
import core.game.interaction.IntType
|
import core.game.interaction.IntType
|
||||||
@@ -22,14 +21,8 @@ class ChampionsGuildDoor : InteractionListener {
|
|||||||
player.packetDispatch.sendMessage("The door won't open - you need at least 32 Quest Points.")
|
player.packetDispatch.sendMessage("The door won't open - you need at least 32 Quest Points.")
|
||||||
} else {
|
} else {
|
||||||
if (player.location.x == 3191 && player.location.y == 3363) {
|
if (player.location.x == 3191 && player.location.y == 3363) {
|
||||||
player.dialogueInterpreter.sendDialogues(
|
player.dialogueInterpreter.sendDialogues(198, null, "Greetings bold adventurer. Welcome to the guild of", "Champions.")
|
||||||
198,
|
|
||||||
null,
|
|
||||||
"Greetings bold adventurer. Welcome to the guild of",
|
|
||||||
"Champions."
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
player.achievementDiaryManager.finishTask(player, DiaryType.VARROCK, 1, 1)
|
|
||||||
core.game.global.action.DoorActionHandler.handleAutowalkDoor(player, node as core.game.node.scenery.Scenery)
|
core.game.global.action.DoorActionHandler.handleAutowalkDoor(player, node as core.game.node.scenery.Scenery)
|
||||||
}
|
}
|
||||||
return@on true
|
return@on true
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import core.api.*
|
|||||||
import core.game.node.entity.impl.ForceMovement
|
import core.game.node.entity.impl.ForceMovement
|
||||||
import core.game.node.entity.impl.ForceMovement.direction
|
import core.game.node.entity.impl.ForceMovement.direction
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.entity.player.link.diary.DiaryType
|
|
||||||
import core.game.node.entity.skill.Skills
|
import core.game.node.entity.skill.Skills
|
||||||
import core.game.node.scenery.Scenery
|
import core.game.node.scenery.Scenery
|
||||||
import core.game.system.task.Pulse
|
import core.game.system.task.Pulse
|
||||||
@@ -93,8 +92,6 @@ class GrandExchangeShortcut : InteractionListener {
|
|||||||
path[2],
|
path[2],
|
||||||
CLIMB_UP
|
CLIMB_UP
|
||||||
)
|
)
|
||||||
// Use the shortcut under the wall, north-west of the Grand<br><br>Exchange
|
|
||||||
player.achievementDiaryManager.finishTask(player, DiaryType.VARROCK, 1, 8)
|
|
||||||
unlock(player)
|
unlock(player)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user