Audio refactor continued

Implemented admin audio command ::audio audioId loops[optional]
Implemented admin globalaudio command ::globalaudio audioId radius playername (plays from that players location) or can be used by coords ::globalaudio audioId radius x y z
Refactored the following sounds:
Tribal totem quest Cromperty teleport (fixed looping)
Vinesweeper tool leprechaun teleport sound (Corrected this sound so it does not loop 10 times)
Antifire and poision immunity 30 seconds remaining tick tock sounds and sound of the potions expiring (Fixed it so it plays the correct number of tick tocks)
Sound when summoning a familiar (All familiars were using the summon unicorn sound. It is now defaulted to the normal summoning sound instead of the unicorn summon sound. All familiars on first summon have a their own sounds that will need to be implemented later)
Door and gate sounds
Bank interface sounds
Unicorn stallion special move sound
Agility pyramid rolling block sounds
Prayer book sounds
Lunar stat spy
Hunter falconry
Picking items in a field like potatoes
Ectophial teleport and refill
Summoning pouch creation and renewing points
Runecrafting at altar sound
Making finished and unfinished potions
Cutting gems
Entering giant mole area
Praying at an altar
Warriors guild animator sounds
Chiseling limestone
Spirit wolf special move sound
Telegrab spell sound
Glassblowing sound
Strong of security opening reward chest creaking sound
Butterfly net sound
Desert rug travel rise and descend sound
Enchanting bolts
Woodcutting tree falling and chopping sound
Hunter setting up dismantling traps and pitfall sounds
Explorers ring run energy restore sound
Farming: Raking, adding compost to patch, picking from fruit trees, seed dibb, using plant cure on patch, opening/closing/adding to/from compost bin
Mage training arena alchemy spell sounds
Breaking bones to peaches/bananas tab sound
Casting silver sickle bloom
Entrana magic door teleport
Cabbage teleport
Teleother cast sound
Fairy ring teleport sound
Lunar vengeance spells
Running out of prayer sound
Lunar (non teleport) spells
Super heat and bones to bananas normal spell book sounds
Equip/unequip item sound
Revenant combat sounds
Herb cleaning sound
Emptying buckets/bowls/jugs of water
Making cannonballs at a furnace
Digging with a spade
Peer the seer fremmenik trials challenge: heating items on the range
Blessing a spirit shield at a POH altar
ContentAPI function stun sound
Picking up items off the ground
Eating food sound
Cooking and intentionally burning food
Drinking a potion
Warriors guild catapult
Pulling wilderness teleport levers
Offering bones on a POH altar
Slashing spider webs in Varrock sewers
Entering POH portal teleport sound
GE exchanging item set sound
Jumping wilderness ditch
Dragon axe special
Digging up a farming patch
Lunar heal spells
Chaos elemental projectile impact sounds
Mounted glory teleport
Lunar share and boost potion spell
Dwarf multi cannon setup, rotate, and firing sounds
NPC attacking sound
Enchanted bolt effect combat sound
This commit is contained in:
Zerken
2023-08-24 13:58:19 +00:00
committed by Ryan
parent 00af62e449
commit c52e02936d
109 changed files with 463 additions and 619 deletions
@@ -1,5 +1,6 @@
package content.global.skill.magic
import core.api.playAudio
import core.api.setAttribute
import core.cache.def.impl.ItemDefinition
import core.game.node.Node
@@ -76,7 +77,7 @@ abstract class SpellListener(val bookName: String) : Listener {
if(player.getAttribute("tablet-spell",false)) return
player.visualize(anim,gfx)
if(soundID != -1){
player.audioManager.send(soundID)
playAudio(player, soundID)
}
}
@@ -1,12 +1,14 @@
package content.global.skill.magic
import content.global.skill.magic.spellconsts.Modern
import core.api.playAudio
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.Items
import core.game.interaction.InteractionListener
import core.game.interaction.IntType
import org.rs09.consts.Sounds
class SpellTablets : InteractionListener {
val B2P_TABLET = Items.BONES_TO_PEACHES_8015
@@ -30,7 +32,7 @@ class SpellTablets : InteractionListener {
}
fun breakTablet(player: Player){
player.audioManager.send(979)
playAudio(player, Sounds.POH_TABLET_BREAK_979)
player.animator.forceAnimation(Animation(4069))
player.lock(5)
player.setAttribute("tablet-spell",true)
@@ -97,7 +97,7 @@ public final class BloodSpells extends CombatSpell {
projectile.transform(entity, (Entity) target, false, 58, 10).send();
}
entity.animate(animation);
playGlobalAudio(entity.getLocation(), audio.getId(), 20);
playGlobalAudio(entity.getLocation(), audio.id, 20);
}
@Override
@@ -102,7 +102,7 @@ public final class IceSpells extends CombatSpell {
projectile.transform(entity, (Entity) target, false, 58, 10).send();
}
entity.animate(animation);
playGlobalAudio(entity.getLocation(), audio.getId(), 20);
playGlobalAudio(entity.getLocation(), audio.id, 20);
}
@@ -101,7 +101,7 @@ public final class MiasmicSpells extends CombatSpell {
projectile.transform(entity, (Entity) target, false, 58, 10).send();
}
entity.animate(animation);
playGlobalAudio(entity.getLocation(), audio.getId(), 20);
playGlobalAudio(entity.getLocation(), audio.id, 20);
}
@Override
@@ -99,7 +99,7 @@ public final class ShadowSpells extends CombatSpell {
projectile.transform(entity, (Entity) target, false, 58, 10).send();
}
entity.animate(animation);
playGlobalAudio(entity.getLocation(), audio.getId(), 20);
playGlobalAudio(entity.getLocation(), audio.id, 20);
}
@Override
@@ -108,7 +108,7 @@ public final class SmokeSpells extends CombatSpell {
projectile.transform(entity, (Entity) target, false, 58, 10).send();
}
entity.animate(animation);
playGlobalAudio(entity.getLocation(), audio.getId(), 20);
playGlobalAudio(entity.getLocation(), audio.id, 20);
}
@Override
@@ -9,17 +9,19 @@ import core.game.node.entity.Entity;
import core.game.node.entity.combat.ImpactHandler.HitsplatType;
import core.game.node.entity.combat.spell.SpellType;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.audio.Audio;
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
import core.game.node.item.Item;
import core.game.world.map.RegionManager;
import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
import java.util.Iterator;
import java.util.List;
import static core.api.ContentAPIKt.playGlobalAudio;
/**
* Represents the healing spell.
* @author 'Vexia
@@ -105,8 +107,8 @@ public final class HealSpell extends MagicSpell {
player.getImpactHandler().manualHit(player, transfer, null);
o.getSkills().heal(transfer);
player.animate(ANIMATION);
player.getAudioManager().send(new Audio(2895), true);
o.getAudioManager().send(new Audio(2892), true);
playGlobalAudio(player.getLocation(), Sounds.LUNAR_HEAL_OTHER_2895);
playGlobalAudio(o.getLocation(), Sounds.LUNAR_HEAL_OTHER_INDIVIDUAL_2892);
o.graphics(GRAPHICS);
} else {
List<Player> players = RegionManager.getLocalPlayers(player, 1);
@@ -130,9 +132,9 @@ public final class HealSpell extends MagicSpell {
}
player.getImpactHandler().manualHit(player, percentage, HitsplatType.NORMAL);
player.animate(ANIMATION_G);
player.getAudioManager().send(new Audio(2894), true);
playGlobalAudio(player.getLocation(), Sounds.LUNAR_HEAL_GROUP_2894);
for (Player p : players) {
p.getAudioManager().send(new Audio(2892), true);
playGlobalAudio(p.getLocation(), Sounds.LUNAR_HEAL_OTHER_INDIVIDUAL_2892);
p.graphics(GRAPHICS_G);
p.getSkills().heal(percentage);
}
@@ -13,6 +13,9 @@ import core.game.world.GameWorld;
import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* The magic imbue spell.
@@ -61,7 +64,7 @@ public class MagicImbueSpell extends MagicSpell {
player.lock(ANIMATION.getDuration() + 1);
player.graphics(GRAPHIC);
player.animate(ANIMATION);
player.getAudioManager().send(2888, 1, 1);
playAudio(player, Sounds.LUNAR_EMBUE_RUNES_2888);
player.getPacketDispatch().sendMessage("You are charged to combine runes!");
return true;
}
@@ -8,7 +8,6 @@ import core.game.node.Node;
import core.game.node.entity.Entity;
import core.game.node.entity.combat.spell.SpellType;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.audio.Audio;
import core.game.bots.AIPlayer;
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
import core.game.node.item.Item;
@@ -17,9 +16,12 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
import java.util.List;
import static core.api.ContentAPIKt.playGlobalAudio;
@Initializable
public final class StatBoostSpell extends MagicSpell {
@@ -70,7 +72,7 @@ public final class StatBoostSpell extends MagicSpell {
continue;
}
o.graphics(GRAPHICS);
o.getAudioManager().send(new Audio (2902), true);
playGlobalAudio(o.getLocation(), Sounds.LUNAR_STRENGTH_SHARE2_2902);
potion.getEffect().activate(o);
size++;
}
@@ -80,7 +82,7 @@ public final class StatBoostSpell extends MagicSpell {
}
super.meetsRequirements(player, true, true);
potion.getEffect().activate(player);
player.getAudioManager().send(new Audio (2901), true);
playGlobalAudio(player.getLocation(), Sounds.LUNAR_STRENGTH_SHARE_2901);
player.animate(ANIMATION);
player.graphics(GRAPHICS);
player.getInventory().remove(item);
@@ -9,7 +9,6 @@ import core.game.node.Node;
import core.game.node.entity.Entity;
import core.game.node.entity.combat.spell.SpellType;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.audio.Audio;
import core.game.bots.AIPlayer;
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
import core.game.node.item.Item;
@@ -17,9 +16,12 @@ import core.game.world.map.RegionManager;
import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
import java.util.List;
import static core.api.ContentAPIKt.playGlobalAudio;
@Initializable
public class StatRestoreSpell extends MagicSpell {
@@ -87,7 +89,7 @@ public class StatRestoreSpell extends MagicSpell {
}
super.meetsRequirements(player, true, true);
potion.getEffect().activate(player);
player.getAudioManager().send(new Audio (2899), true);
playGlobalAudio(player.getLocation(), Sounds.LUNAR_STAT_SHARE_2899);
player.animate(ANIMATION);
player.graphics(GRAPHICS);
player.getInventory().remove(item);
@@ -15,6 +15,9 @@ import core.game.node.item.Item;
import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* The stat spy spell.
@@ -72,7 +75,7 @@ public final class StatSpySpell extends MagicSpell {
final Player o = ((Player) target);
player.animate(ANIMATION);
player.face(o);
player.getAudioManager().send(3620);
playAudio(player, Sounds.LUNAR_STAT_SPY_3620);
COMPONENT.setCloseEvent(new CloseEvent() {
@Override
public boolean close(Player player, Component c) {
@@ -82,7 +85,7 @@ public final class StatSpySpell extends MagicSpell {
});
player.graphics(EYE);
o.graphics(GRAPHIC);
player.getAudioManager().send(3621);
playAudio(player, Sounds.LUNAR_STAT_SPY_IMPACT_3621);
for (int[] element : SKILLS) {
player.getPacketDispatch().sendString("" + o.getSkills().getLevel(element[0]) + "", 523, element[1]);
player.getPacketDispatch().sendString("" + o.getSkills().getStaticLevel(element[0]) + "", 523, element[2]);
@@ -13,6 +13,10 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
import static core.api.ContentAPIKt.playGlobalAudio;
/**
* Handles the vengeance (other) spell.
@@ -81,7 +85,7 @@ public final class VengeanceSpell extends MagicSpell {
visualize(entity, p);
entity.setAttribute("vengeance_delay", ticks + 50);
p.setAttribute("vengeance", true);
p.getAudioManager().send(vengOther ? 2908 : 2907);
playGlobalAudio(p.getLocation(), vengOther ? Sounds.LUNAR_VENGENCE_OTHER_2908 : Sounds.LUNAR_VENGENCE_2907);
return true;
}
@@ -187,7 +187,7 @@ class ModernListeners : SpellListener("modern"){
}
}
visualizeSpell(player,BONE_CONVERT_ANIM, BONE_CONVERT_GFX)
player.audioManager.send(Audio(114))
playAudio(player, Sounds.BONES_TO_BANANAS_ALL_114)
removeRunes(player)
addXP(player,if(bananas) 25.0 else 65.0)
setDelay(player,false)
@@ -223,7 +223,7 @@ class ModernListeners : SpellListener("modern"){
player.lock(3)
removeRunes(player)
addXP(player,53.0)
player.audioManager.send(Sounds.SUPERHEAT_ALL_190)
playAudio(player, Sounds.SUPERHEAT_ALL_190)
showMagicTab(player)
player.pulseManager.run(SmeltingPulse(player, item, bar, 1, true))
setDelay(player,false)
@@ -78,7 +78,7 @@ public final class TeleblockSpell extends CombatSpell {
projectile.transform(entity, (Entity) target, false, 58, 10).send();
}
entity.animate(animation);
playGlobalAudio(entity.getLocation(), audio.getId(), 20);
playGlobalAudio(entity.getLocation(), audio.id, 20);
}
@Override