mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-14 18:40:18 -07:00
Falador medium achievement diary task for lighting bullseye lantern can now be obtained
This commit is contained in:
parent
c54f03d8cc
commit
406552fae4
5 changed files with 20 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
package content.global.skill.crafting.lightsources
|
package content.global.skill.crafting.lightsources
|
||||||
|
|
||||||
import core.game.container.Container
|
import core.game.container.Container
|
||||||
|
import core.game.event.LitLightSourceEvent
|
||||||
import core.game.interaction.NodeUsageEvent
|
import core.game.interaction.NodeUsageEvent
|
||||||
import core.game.interaction.UseWithHandler
|
import core.game.interaction.UseWithHandler
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
|
|
@ -85,6 +86,7 @@ class LightSourceLighter : UseWithHandler(590,36,38){
|
||||||
if(playerLevel < requiredLevel) return false
|
if(playerLevel < requiredLevel) return false
|
||||||
|
|
||||||
player.inventory.replace(item,Item(lightSource.litID))
|
player.inventory.replace(item,Item(lightSource.litID))
|
||||||
|
player.dispatch(LitLightSourceEvent(lightSource.litID))
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import org.rs09.consts.NPCs
|
||||||
import org.rs09.consts.Scenery
|
import org.rs09.consts.Scenery
|
||||||
import content.region.asgarnia.falador.dialogue.RisingSunInnBartenderDialogue
|
import content.region.asgarnia.falador.dialogue.RisingSunInnBartenderDialogue
|
||||||
import content.global.handlers.iface.FairyRing
|
import content.global.handlers.iface.FairyRing
|
||||||
|
import content.global.skill.crafting.lightsources.LightSources
|
||||||
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
|
||||||
|
|
@ -27,6 +28,7 @@ class FaladorAchievementDiary : DiaryEventHookBase(DiaryType.FALADOR) {
|
||||||
private val WAYNES_CHAINS_AREA = ZoneBorders(2969, 3310, 2975, 3314)
|
private val WAYNES_CHAINS_AREA = ZoneBorders(2969, 3310, 2975, 3314)
|
||||||
private val SARAHS_FARMING_SHOP_AREA = ZoneBorders(3021, 3285, 3040, 3296)
|
private val SARAHS_FARMING_SHOP_AREA = ZoneBorders(3021, 3285, 3040, 3296)
|
||||||
private val FALADOR_GENERAL_AREA = ZoneBorders(2934, 3399, 3399, 3307)
|
private val FALADOR_GENERAL_AREA = ZoneBorders(2934, 3399, 3399, 3307)
|
||||||
|
private val CHEMIST_AREA = ZoneBorders(2929, 3213, 2936, 3207)
|
||||||
|
|
||||||
|
|
||||||
private val PROSELYTE_FULL_ARMOR_MALE = intArrayOf(
|
private val PROSELYTE_FULL_ARMOR_MALE = intArrayOf(
|
||||||
|
|
@ -248,4 +250,16 @@ class FaladorAchievementDiary : DiaryEventHookBase(DiaryType.FALADOR) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onLightSourceLit(player: Player, event: LitLightSourceEvent) {
|
||||||
|
when {
|
||||||
|
inBorders(player, CHEMIST_AREA) && (event.litLightSourceId == LightSources.BULLSEYE_LANTERN.litID) -> {
|
||||||
|
finishTask(
|
||||||
|
player,
|
||||||
|
DiaryLevel.MEDIUM,
|
||||||
|
MediumTasks.CHEMISTS_LIGHT_BULLSEYE_LANTERN
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7,6 +7,7 @@ object Event {
|
||||||
@JvmStatic val NPCKilled = NPCKillEvent::class.java
|
@JvmStatic val NPCKilled = NPCKillEvent::class.java
|
||||||
@JvmStatic val Teleported = TeleportEvent::class.java
|
@JvmStatic val Teleported = TeleportEvent::class.java
|
||||||
@JvmStatic val FireLit = LitFireEvent::class.java
|
@JvmStatic val FireLit = LitFireEvent::class.java
|
||||||
|
@JvmStatic val LightSourceLit = LitLightSourceEvent::class.java
|
||||||
@JvmStatic val Interacted = InteractionEvent::class.java
|
@JvmStatic val Interacted = InteractionEvent::class.java
|
||||||
@JvmStatic val ButtonClicked = ButtonClickEvent::class.java
|
@JvmStatic val ButtonClicked = ButtonClickEvent::class.java
|
||||||
@JvmStatic val DialogueOpened = DialogueOpenEvent::class.java
|
@JvmStatic val DialogueOpened = DialogueOpenEvent::class.java
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ abstract class DiaryEventHookBase(private val diaryType: DiaryType) : MapArea, L
|
||||||
player.hook(Event.NPCKilled, EventHandler(this, ::onNpcKilled))
|
player.hook(Event.NPCKilled, EventHandler(this, ::onNpcKilled))
|
||||||
player.hook(Event.Teleported, EventHandler(this, ::onTeleported))
|
player.hook(Event.Teleported, EventHandler(this, ::onTeleported))
|
||||||
player.hook(Event.FireLit, EventHandler(this, ::onFireLit))
|
player.hook(Event.FireLit, EventHandler(this, ::onFireLit))
|
||||||
|
player.hook(Event.LightSourceLit, EventHandler(this, ::onLightSourceLit))
|
||||||
player.hook(Event.Interacted, EventHandler(this, ::onInteracted))
|
player.hook(Event.Interacted, EventHandler(this, ::onInteracted))
|
||||||
player.hook(Event.ButtonClicked, EventHandler(this, ::onButtonClicked))
|
player.hook(Event.ButtonClicked, EventHandler(this, ::onButtonClicked))
|
||||||
player.hook(Event.DialogueOpened, EventHandler(this, ::onDialogueOpened))
|
player.hook(Event.DialogueOpened, EventHandler(this, ::onDialogueOpened))
|
||||||
|
|
@ -207,6 +208,7 @@ abstract class DiaryEventHookBase(private val diaryType: DiaryType) : MapArea, L
|
||||||
protected open fun onNpcKilled(player: Player, event: NPCKillEvent) {}
|
protected open fun onNpcKilled(player: Player, event: NPCKillEvent) {}
|
||||||
protected open fun onTeleported(player: Player, event: TeleportEvent) {}
|
protected open fun onTeleported(player: Player, event: TeleportEvent) {}
|
||||||
protected open fun onFireLit(player: Player, event: LitFireEvent) {}
|
protected open fun onFireLit(player: Player, event: LitFireEvent) {}
|
||||||
|
protected open fun onLightSourceLit(player: Player, event: LitLightSourceEvent) {}
|
||||||
protected open fun onInteracted(player: Player, event: InteractionEvent) {}
|
protected open fun onInteracted(player: Player, event: InteractionEvent) {}
|
||||||
protected open fun onButtonClicked(player: Player, event: ButtonClickEvent) {}
|
protected open fun onButtonClicked(player: Player, event: ButtonClickEvent) {}
|
||||||
protected open fun onDialogueOpened(player: Player, event: DialogueOpenEvent) {}
|
protected open fun onDialogueOpened(player: Player, event: DialogueOpenEvent) {}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ data class ResourceProducedEvent(val itemId: Int, val amount: Int, val source: N
|
||||||
data class NPCKillEvent(val npc: NPC) : Event
|
data class NPCKillEvent(val npc: NPC) : Event
|
||||||
data class TeleportEvent(val type: TeleportType, val method: TeleportMethod, val source: Any, val location: Location) : Event
|
data class TeleportEvent(val type: TeleportType, val method: TeleportMethod, val source: Any, val location: Location) : Event
|
||||||
data class LitFireEvent(val logId: Int) : Event
|
data class LitFireEvent(val logId: Int) : Event
|
||||||
|
data class LitLightSourceEvent(val litLightSourceId: Int) : Event
|
||||||
data class InteractionEvent(val target: Node, val option: String) : Event
|
data class InteractionEvent(val target: Node, val option: String) : Event
|
||||||
data class ButtonClickEvent(val iface: Int, val buttonId: Int) : Event
|
data class ButtonClickEvent(val iface: Int, val buttonId: Int) : Event
|
||||||
data class DialogueOpenEvent(val dialogue: DialoguePlugin) : Event
|
data class DialogueOpenEvent(val dialogue: DialoguePlugin) : Event
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue