Immersive sound update

Fixed all skills to play their correct level up jingles
All skills except agility have 2 level up jingles
Most skills play a different jingle for new unlocks
Some skills have specific jingles based on level/range (Strength, Hitpoints, Hunter, Construction, Summoning)
Implemented furnace sound when crafting silver and gold jewelry at a furnace using moulds
Implemented emptying sound for fishbowls
Fixed cow milking sound so it plays for more than one bucket
Implemented sound when pushing a canoe into the water from a canoe station
Fixed quest complete jingles to play a random 1 of 3 quest jingles
Implemented jingle that plays when changing clothes at Thessalia in Varrock
Implemented jingle that plays when spying on a penguin
Implemented jingle that plays on login with completed grand exchange offers
Implemented sound when spinning items at a spinning wheel
This commit is contained in:
Zerken
2023-07-29 05:14:11 +00:00
committed by Ryan
parent 421c419f69
commit 686a2c9141
13 changed files with 98 additions and 12 deletions
@@ -1,5 +1,6 @@
package content.global.activity.penguinhns
import core.api.*
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.game.system.task.Pulse
@@ -17,6 +18,7 @@ class PenguinSpyingHandler : InteractionListener {
player.sendMessage("You've already tagged this penguin.")
} else {
GameWorld.submit(SpyPulse(player, npc))
playJingle(player, 345)
}
return@on true
}
@@ -1,5 +1,6 @@
package content.global.handlers.iface
import core.api.playJingle
import core.game.component.Component
import core.game.component.ComponentDefinition
import core.game.component.ComponentPlugin
@@ -154,6 +155,7 @@ class ThessaliaInterface : ComponentPlugin(){
component.setCloseEvent{pl,_ ->
pl?.toggleWardrobe(false)
pl.attributes.remove("thes-type")
playJingle(pl, 266)
if(!pl.getAttribute("thes-paid",false)){
pl.appearance.torso.changeLook(pl.getAttribute("orig-torso",0))
pl.appearance.torso.changeColor(pl.getAttribute("orig-torso-color",0))
@@ -20,6 +20,9 @@ import core.tools.RandomFunction;
import core.game.dialogue.DialogueInterpreter;
import core.game.dialogue.DialoguePlugin;
import core.game.node.entity.skill.Skills;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.*;
// Sources:
// https://www.youtube.com/watch?v=xu7Err9YUgw
@@ -71,6 +74,7 @@ public class FishbowlPlugin extends OptionHandler {
if (player.getInventory().remove(item)) {
player.lock(2);
player.getInventory().add(new Item(FISHBOWL_EMPTY));
playAudio(player, Sounds.LIQUID_2401, 1);
player.getPacketDispatch().sendMessage("You empty the contents of the fishbowl onto the ground.");
}
break;
@@ -15,6 +15,8 @@ import core.plugin.Initializable;
import core.plugin.ClassScanner;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.*;
/**
* Represents the plugin used to milk a cow.
* @author 'Vexia
@@ -56,7 +58,7 @@ public final class CowMilkingPlugin extends OptionHandler {
}
player.animate(ANIMATION);
player.getAudioManager().send(Sounds.MILK_COW_372);
playAudio(player, Sounds.MILK_COW_372);
player.getPulseManager().run(new Pulse(8, player) {
@Override
public boolean pulse() {
@@ -66,6 +68,7 @@ public final class CowMilkingPlugin extends OptionHandler {
}
if (player.getInventory().contains(1925, 1) || player.getInventory().contains(3727, 1)) {
player.animate(ANIMATION);
playAudio(player, Sounds.MILK_COW_372);
return false;
}
return true;
@@ -5,6 +5,9 @@ import core.game.node.entity.skill.Skills;
import core.game.node.entity.player.Player;
import core.game.node.item.Item;
import core.game.world.update.flag.context.Animation;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.*;
/**
* Represents the pulse used to craft jewllery.
@@ -55,6 +58,7 @@ public final class JewelleryPulse extends SkillPulse<Item> {
public void animate() {
if (ticks % 5 == 0) {
player.animate(ANIMATION);
playAudio(player, Sounds.FURNACE_2725, 1);
}
}
@@ -8,6 +8,7 @@ import core.game.node.scenery.Scenery
import core.game.system.task.Pulse
import org.rs09.consts.Animations
import org.rs09.consts.Items
import org.rs09.consts.Sounds
/**
* Handles tick-based silver crafting logic.
@@ -28,6 +29,7 @@ class SilverCraftingPulse(
}
animate(player, Animations.HUMAN_FURNACE_SMELTING_3243)
playAudio(player, Sounds.FURNACE_2725, 1)
if (removeItem(player, Items.SILVER_BAR_2355, Container.INVENTORY)) {
addItem(player, product.producedItemId, product.amountProduced)
@@ -9,6 +9,9 @@ import core.game.node.entity.skill.Skills;
import core.game.node.entity.player.Player;
import core.game.node.item.Item;
import core.game.world.update.flag.context.Animation;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Represents the pulse used to spin an item.
@@ -67,6 +70,7 @@ public final class SpinningPulse extends SkillPulse<Item> {
public void animate() {
if (ticks % 5 == 0) {
player.animate(ANIMATION);
playAudio(player, Sounds.SPINNING_2590, 1);
}
}
@@ -10,6 +10,7 @@ import core.game.interaction.InteractionListener
import core.game.interaction.IntType
import core.api.*
import org.rs09.consts.Sounds
class CanoeStationListener : InteractionListener {
@@ -80,6 +81,7 @@ class CanoeStationListener : InteractionListener {
val canoe = CanoeUtils.getCanoeFromVarbit(player, varbit)
player.animator.animate(PUSH)
lock(player, 2)
playAudio(player, Sounds.CANOE_ROLL_2731)
player.faceLocation(CanoeUtils.getFaceLocation(player.location))
player.pulseManager.run(object : Pulse(){
override fun pulse(): Boolean {