Refactored movement pulse

Fixed bug with Vinesweeper gnomes not checking flags
Fixed hunter tracking
This commit is contained in:
Ceikry
2023-06-29 01:46:00 +00:00
committed by Ryan
parent da33c89a70
commit 06e8279f2a
13 changed files with 192 additions and 121 deletions
@@ -7,12 +7,15 @@ import org.rs09.consts.NPCs
import core.game.dialogue.DialogueFile
import core.game.interaction.InteractionListener
import core.game.interaction.IntType
import core.game.world.update.flag.context.Animation
import core.tools.END_DIALOGUE
import core.api.*
class MistagEasterEgg : InteractionListener {
val DIAMOND = Items.DIAMOND_1601
val MISTAG = NPCs.MISTAG_2084
val ZANIK_RING = 14649
val DRUNK_RENDER = 982
override fun defineListeners() {
onUseWith(IntType.NPC,DIAMOND,MISTAG){ player, _, with ->
@@ -30,6 +33,18 @@ class MistagEasterEgg : InteractionListener {
player.appearance.transformNPC(-1)
return@onUnequip true
}
onEquip(Items.BEER_1917){player, _ ->
setAttribute(player, "render-anim-override", DRUNK_RENDER)
return@onEquip true
}
onUnequip(Items.BEER_1917){player, _ ->
removeAttribute(player, "render-anim-override")
player.appearance.setDefaultAnimations()
player.appearance.sync()
return@onUnequip true
}
}
}
@@ -55,4 +70,4 @@ class MistagEasterEggDialogue(val hasRing: Boolean): DialogueFile(){
override fun npc(vararg messages: String?): Component? {
return super.npc(core.game.dialogue.FacialExpression.OLD_HAPPY,*messages)
}
}
}
@@ -217,7 +217,7 @@ abstract class HunterTracking : OptionHandler(){
trail.get(currentIndex)
}
} else {
return false
TrailDefinition(0,TrailType.LINKING,false,Location(0,0,0),Location(0,0,0),Location(0,0,0))
}
when(option){