mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Canoe Animations & Travel Interface
This commit is contained in:
parent
31b3dbbbe6
commit
1e1f37ed85
3 changed files with 31 additions and 6 deletions
|
|
@ -53,7 +53,7 @@ public class TarquinDialogue extends DialoguePlugin {
|
|||
stage = 11;
|
||||
break;
|
||||
case 11:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I'd be suprised if you haven't already heard of me?");
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I'd be surprised if you haven't already heard of me?");
|
||||
stage = 12;
|
||||
break;
|
||||
case 12:
|
||||
|
|
@ -109,7 +109,7 @@ public class TarquinDialogue extends DialoguePlugin {
|
|||
stage = 26;
|
||||
break;
|
||||
case 26:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "You look like you know your way around a tree, you can", "you can make many canoes.");
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "You look like you know your way around a tree,", "you can make many canoes.");
|
||||
stage = 27;
|
||||
break;
|
||||
case 27:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package rs09.game.interaction.`object`.canoestation
|
||||
|
||||
import api.ContentAPI
|
||||
import core.cache.def.impl.VarbitDefinition
|
||||
import core.game.component.Component
|
||||
import core.game.content.global.travel.canoe.Canoe
|
||||
|
|
@ -44,7 +45,7 @@ class CanoeInterfaceListeners : InterfaceListener() {
|
|||
}
|
||||
|
||||
player.lock()
|
||||
player.animate(axe.animation)
|
||||
ContentAPI.animate(player,CanoeUtils.getShapeAnimation(axe))
|
||||
player.pulseManager.run(object : Pulse(3) {
|
||||
override fun pulse(): Boolean {
|
||||
if (RandomFunction.random(if (canoe == Canoe.WAKA) 8 else 6) == 1) {
|
||||
|
|
@ -56,7 +57,7 @@ class CanoeInterfaceListeners : InterfaceListener() {
|
|||
player.unlock()
|
||||
return true
|
||||
}
|
||||
player.animate(axe.animation)
|
||||
ContentAPI.animate(player,CanoeUtils.getShapeAnimation(axe))
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
|
@ -98,13 +99,20 @@ class CanoeInterfaceListeners : InterfaceListener() {
|
|||
var counter = 0
|
||||
override fun pulse(): Boolean {
|
||||
when(counter++){
|
||||
0 -> player.interfaceManager.openOverlay(Component(Components.FADE_TO_BLACK_120))
|
||||
0 -> {
|
||||
player.interfaceManager.openOverlay(Component(Components.FADE_TO_BLACK_120))
|
||||
player.interfaceManager.open(Component(Components.CANOE_TRAVEL_758))
|
||||
}
|
||||
2 -> {
|
||||
PacketRepository.send(MinimapState::class.java, MinimapStateContext(player, 2))
|
||||
player.interfaceManager.hideTabs(0, 1, 2, 3, 4, 5, 6, 11, 12)
|
||||
}
|
||||
15 -> player.properties.teleportLocation = dest
|
||||
16 -> {player.interfaceManager.closeOverlay(); player.interfaceManager.openOverlay(Component(Components.FADE_FROM_BLACK_170))}
|
||||
16 -> {
|
||||
player.interfaceManager.close(Component(Components.CANOE_TRAVEL_758))
|
||||
player.interfaceManager.closeOverlay()
|
||||
player.interfaceManager.openOverlay(Component(Components.FADE_FROM_BLACK_170))
|
||||
}
|
||||
18 -> {
|
||||
player.unlock()
|
||||
player.interfaceManager.restoreTabs()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@ import core.cache.def.impl.VarbitDefinition
|
|||
import core.game.content.global.travel.canoe.Canoe
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.node.entity.skill.gather.SkillingTool
|
||||
import core.game.world.map.Location
|
||||
import core.game.world.update.flag.context.Animation
|
||||
import core.net.packet.out.SkillLevel
|
||||
import org.rs09.consts.Components
|
||||
|
||||
object CanoeUtils {
|
||||
|
|
@ -37,6 +40,20 @@ object CanoeUtils {
|
|||
}
|
||||
}
|
||||
|
||||
fun getShapeAnimation(axe: SkillingTool): Animation{
|
||||
when(axe){
|
||||
SkillingTool.BRONZE_AXE -> return Animation(6744);
|
||||
SkillingTool.IRON_AXE -> return Animation(6743);
|
||||
SkillingTool.STEEL_AXE -> return Animation(6742);
|
||||
SkillingTool.BLACK_AXE -> return Animation(6741);
|
||||
SkillingTool.MITHRIL_AXE -> return Animation(6740);
|
||||
SkillingTool.ADAMANT_AXE -> return Animation(6739);
|
||||
SkillingTool.RUNE_AXE -> return Animation(6738);
|
||||
SkillingTool.DRAGON_AXE -> return Animation(6745);
|
||||
}
|
||||
return axe.animation;
|
||||
}
|
||||
|
||||
fun getDestinationFromButtonID(buttonID: Int): Location {
|
||||
return when(buttonID){
|
||||
47 -> Location.create(3240, 3242, 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue