Audio Refactor
1st of many audio refactors, the end goal is removing AudioManager.java and using contentAPI functions for all sound Refactored playAudio Refactored playGlobalAudio Fixed lunar teleport sounds to not play if teleblocked Refactored the following sounds: All the special attack and DFS sounds defaulting to new API radius of 8 instead of 5 Dropping coins, item, and destroying object sounds fixed Ectophial refill sound Agility pyramid sounds Emptying a fishbowl Enchanted jewellery teleport sound Enchanted jewellery enchant tab sound All the sounds for Elemental Workshop 1 listeners The sound when getting experience from a lamp Blessing and repairing a grave Hunter pitfall sounds Hunter sound when catching a kebbit with a noose Lunar cure me and cure group spell sound High and low alchemy spells Silver crafting at a furnace Spinning at a spinning wheel Drinking from a waterskin in the desert Sound when being blessed by drezel in nature's spirit quest Sound when poison immunity has 30 seconds left and when your immunity expires Shearing regular sheep and the penguin sheep at lumbridge Sound when regular spell book charge spell expires GE sounds: making 0 coin offer when buying, not having enough money, placing a buy offer, not enough room in inventory Sound when filling vessels from a water source Regular and ancient combat spells
This commit is contained in:
@@ -196,7 +196,7 @@ public final class AgilityPyramidCourse extends AgilityCourse {
|
||||
player.getPacketDispatch().sendMessage("You must be level 30 agility or higher to climb down the rocks.");
|
||||
return;
|
||||
}
|
||||
playAudio(player, Sounds.CLIMBING_LOOP_2454, 6);
|
||||
playAudio(player, Sounds.CLIMBING_LOOP_2454, 0, 6);
|
||||
if (!scale) {
|
||||
ForceMovement.run(player, player.getLocation(), end, Animation.create(740), Animation.create(740), Direction.WEST, 13).setEndAnimation(Animation.RESET);
|
||||
} else {
|
||||
@@ -223,7 +223,7 @@ public final class AgilityPyramidCourse extends AgilityCourse {
|
||||
}
|
||||
player.lock(4);
|
||||
player.getPacketDispatch().sendMessage("You climb the low wall...");
|
||||
playAudio(player, Sounds.CLIMB_WALL_2453,10, 40);
|
||||
playAudio(player, Sounds.CLIMB_WALL_2453, 40);
|
||||
if (fail) {
|
||||
Location end = player.getLocation().transform(d, 1);
|
||||
player.lock(3);
|
||||
@@ -247,10 +247,10 @@ public final class AgilityPyramidCourse extends AgilityCourse {
|
||||
final boolean fail = player.getSkills().getLevel(Skills.AGILITY) < 75 && hasFailed(player);
|
||||
final Location end = player.getLocation().transform(dir.getStepX() * (fail ? 3 : 5), dir.getStepY() * (fail ? 3 : 5), 0);
|
||||
player.getPacketDispatch().sendMessage("You put your foot on the ledge and try to edge across...");
|
||||
playAudio(player, Sounds.BALANCING_LEDGE_2451, 5);
|
||||
playAudio(player, Sounds.BALANCING_LEDGE_2451, 0, 5);
|
||||
if (fail) {
|
||||
player.lock(4);
|
||||
playAudio(player, Sounds.FALL_LAND_2455, 10, 125);
|
||||
playAudio(player, Sounds.FALL_LAND_2455, 125);
|
||||
AgilityHandler.walk(player, -1, player.getLocation(), end, Animation.create(157 - diff), 0.0, "You slip and fall to the level below.");
|
||||
GameWorld.getPulser().submit(new Pulse(3, player) {
|
||||
@Override
|
||||
@@ -297,13 +297,13 @@ public final class AgilityPyramidCourse extends AgilityCourse {
|
||||
final boolean fail = player.getSkills().getLevel(Skills.AGILITY) >= 75 ? false : hasFailed(player) ;
|
||||
final Location end = object.getLocation().transform(object.getId() != 10868 ? dir : dir.getOpposite(), fail ? 2 : 5);
|
||||
AgilityHandler.walk(player, fail ? -1 : 1, player.getLocation(), end, Animation.create(155), fail ? 0.0 : 56.4, fail ? null : "You walk carefully across the slippery plank...");
|
||||
playAudio(player, Sounds.PLANKWALK_2480, 3);
|
||||
playAudio(player, Sounds.PLANKWALK_2480, 0, 3);
|
||||
if (fail) {
|
||||
GameWorld.getPulser().submit(new Pulse(2, player) {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
final Location dest = transformLevel(end.transform(!custom ? 2 : 0, custom ? -2 : 0, 0));
|
||||
playAudio(player, Sounds.FALL_LAND_2455, 10, 50);
|
||||
playAudio(player, Sounds.FALL_LAND_2455, 50);
|
||||
AgilityHandler.failWalk(player, 2, end, dest, dest, Animation.create(764), 10, 10, null);
|
||||
return true;
|
||||
}
|
||||
@@ -331,13 +331,13 @@ public final class AgilityPyramidCourse extends AgilityCourse {
|
||||
}
|
||||
dest = transformLevel(dest);
|
||||
player.lock(8);
|
||||
playAudio(player, Sounds.JUMP_NO_LAND_2467, 10, 30);
|
||||
playAudio(player, Sounds.FALL_LAND_2455, 10, 200);
|
||||
playAudio(player, Sounds.JUMP_NO_LAND_2467, 30);
|
||||
playAudio(player, Sounds.FALL_LAND_2455, 200);
|
||||
AgilityHandler.forceWalk(player, -1, player.getLocation(), end, Animation.create(3068), 10, 0.0, "... and miss your footing.");
|
||||
AgilityHandler.fail(player, 8, dest, Animation.create(3068), 8, null);
|
||||
return;
|
||||
}
|
||||
playAudio(player, Sounds.JUMP2_2462, 10 , 30);
|
||||
playAudio(player, Sounds.JUMP2_2462, 30);
|
||||
player.lock(4);
|
||||
AgilityHandler.forceWalk(player, 2, player.getLocation(), player.getLocation().transform(dir, 3), Animation.create(3067), 20, 22, null);
|
||||
}
|
||||
@@ -355,7 +355,7 @@ public final class AgilityPyramidCourse extends AgilityCourse {
|
||||
int mod = player.getLocation().equals(new Location(3359, 2849, 2)) ? 0 : player.getLocation().equals(new Location(3357, 2841, 2)) ? 1 : player.getLocation().equals(new Location(3367, 2832, 1)) ? 1 : player.getLocation().equals(new Location(3372, 2832, 1)) ? 0 : object.getLocation().equals(new Location(3370, 2831, 1)) ? 0 : rot == 1 && dir == Direction.EAST ? 0 : rot == 3 && (dir == Direction.WEST || dir == Direction.EAST) ? 1 : rot == 0 && dir == Direction.SOUTH ? 1 : dir == Direction.WEST && rot != 3 || dir == Direction.EAST ? 1 : 0;
|
||||
final Animation animation = Animation.create(387 - mod);
|
||||
playAudio(player, Sounds.HANDHOLDS_GRAB_TO_SECOND_2450);
|
||||
playAudio(player, Sounds.FALL_LAND_2455, 10, 170);
|
||||
playAudio(player, Sounds.FALL_LAND_2455, 170);
|
||||
if (fail) {
|
||||
Location dest = object.getLocation().transform(dir, 1);
|
||||
dest = rot == 1 && dir == Direction.EAST ? dest.transform(1, 2, 0) : rot == 1 && dir == Direction.WEST && player.getLocation().getY() < 2841 ? dest.transform(0, -2, 0) : rot == 1 && dir == Direction.WEST ? dest.transform(0, 2, 0): dest.transform(dir == Direction.NORTH || dir == Direction.SOUTH ? -1 : dir == Direction.WEST ? 1 : 0, dir == Direction.SOUTH ? 1 : dir == Direction.WEST || dir == Direction.EAST ? -1 : 0, 0);
|
||||
|
||||
@@ -63,7 +63,7 @@ public final class MovingBlockNPC extends AbstractNPC {
|
||||
getWalkingQueue().addPath(loc.getX(), loc.getY());
|
||||
for (Player p : RegionManager.getLocalPlayers(getTileLocations()[0], 4)) {
|
||||
checkBlock(p);
|
||||
playAudio(p, Sounds.PYRAMID_BLOCK_1395, 10, 30);
|
||||
playAudio(p, Sounds.PYRAMID_BLOCK_1395, 30);
|
||||
}
|
||||
moving = true;
|
||||
GameWorld.getPulser().submit(new Pulse(1, this) {
|
||||
@@ -137,7 +137,7 @@ public final class MovingBlockNPC extends AbstractNPC {
|
||||
}
|
||||
}
|
||||
player.lock(4);
|
||||
playAudio(player, Sounds.LAND_FLAT_2469, 10 , 50);
|
||||
playAudio(player, Sounds.LAND_FLAT_2469, 50);
|
||||
player.setAttribute("block-move", GameWorld.getTicks() + 4);
|
||||
if(dest != null) {
|
||||
AgilityHandler.failWalk(player, close ? 1 : 3, player.getLocation(), dest, AgilityPyramidCourse.transformLevel(dest), Animation.create(3066), 10, 8, null, getId() == 3124 ? Direction.WEST : Direction.SOUTH);
|
||||
|
||||
@@ -58,7 +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);
|
||||
playAudio(player, Sounds.FURNACE_2725);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class SilverCraftingPulse(
|
||||
}
|
||||
|
||||
animate(player, Animations.HUMAN_FURNACE_SMELTING_3243)
|
||||
playAudio(player, Sounds.FURNACE_2725, 1)
|
||||
playAudio(player, Sounds.FURNACE_2725)
|
||||
|
||||
if (removeItem(player, Items.SILVER_BAR_2355, Container.INVENTORY)) {
|
||||
addItem(player, product.producedItemId, product.amountProduced)
|
||||
|
||||
@@ -70,7 +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);
|
||||
playAudio(player, Sounds.SPINNING_2590);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ class PitfallListeners : InteractionListener {
|
||||
|
||||
player.setAttribute("pitfall:timestamp:${pit.location.x}:${pit.location.y}", System.currentTimeMillis())
|
||||
setPitState(player, pit.location, 1)
|
||||
playAudio(player, getAudio(Sounds.HUNTING_PLACEBRANCHES_2639))
|
||||
playAudio(player, Sounds.HUNTING_PLACEBRANCHES_2639)
|
||||
val collapsePulse = object : Pulse(201, player) {
|
||||
override fun pulse(): Boolean {
|
||||
val oldTime = player.getAttribute("pitfall:timestamp:${pit.location.x}:${pit.location.y}", System.currentTimeMillis())
|
||||
@@ -210,7 +210,7 @@ class PitfallListeners : InteractionListener {
|
||||
if(dir != null) {
|
||||
val dst = src.transform(dir, 3)
|
||||
ForceMovement.run(player, src, dst, ForceMovement.WALK_ANIMATION, Animation(1603), dir, 16)
|
||||
playAudio(player, getAudio(Sounds.HUNTING_JUMP_2635))
|
||||
playAudio(player, Sounds.HUNTING_JUMP_2635)
|
||||
val pitfall_npc: Entity? = player.getAttribute("pitfall_npc", null)
|
||||
if(pitfall_npc != null && pitfall_npc.getLocation().getDistance(src) < 3.0) {
|
||||
val last_pit_loc: Location? = pitfall_npc.getAttribute("last_pit_loc", null)
|
||||
@@ -248,7 +248,7 @@ class PitfallListeners : InteractionListener {
|
||||
}
|
||||
on(SPIKED_PIT, IntType.SCENERY, "dismantle") { player, node ->
|
||||
val pit = node as Scenery
|
||||
playAudio(player, getAudio(Sounds.HUNTING_TAKEBRANCHES_2649))
|
||||
playAudio(player, Sounds.HUNTING_TAKEBRANCHES_2649)
|
||||
player.removeAttribute("pitfall:timestamp:${pit.location.x}:${pit.location.y}")
|
||||
player.incrementAttribute("pitfall:count", -1)
|
||||
setPitState(player, pit.location, 0)
|
||||
@@ -281,7 +281,7 @@ class PitfallListeners : InteractionListener {
|
||||
return@on true
|
||||
}
|
||||
entity.attack(player)
|
||||
playAudio(player, getAudio(Sounds.HUNTING_TEASE_FELINE_2651))
|
||||
playAudio(player, Sounds.HUNTING_TEASE_FELINE_2651)
|
||||
player.setAttribute("pitfall_npc", entity)
|
||||
return@on true
|
||||
}
|
||||
@@ -295,7 +295,7 @@ class PitfallListeners : InteractionListener {
|
||||
setPitState(player, pit.location, 0)
|
||||
player.getSkills().addExperience(Skills.HUNTER, xp, true)
|
||||
player.inventory.add(Item(Items.BIG_BONES_532))
|
||||
playAudio(player, getAudio(Sounds.HUNTING_TAKEBRANCHES_2649))
|
||||
playAudio(player, Sounds.HUNTING_TAKEBRANCHES_2649)
|
||||
// TODO: what's the actual probability of tatty vs perfect fur?
|
||||
val chance = RandomFunction.getSkillSuccessChance(50.0, 100.0, player.skills.getLevel(Skills.HUNTER))
|
||||
if(RandomFunction.random(0.0, 100.0) < chance) {
|
||||
|
||||
@@ -13,7 +13,6 @@ import core.game.world.map.Location
|
||||
import core.game.world.update.flag.context.Animation
|
||||
import core.tools.RandomFunction
|
||||
import org.rs09.consts.Items
|
||||
import core.tools.SystemLogger
|
||||
import core.game.world.GameWorld
|
||||
import core.tools.Log
|
||||
import org.rs09.consts.Sounds
|
||||
@@ -165,7 +164,7 @@ abstract class HunterTracking : OptionHandler(){
|
||||
fun reward(player: Player, success: Boolean) {
|
||||
player.lock()
|
||||
player.animator.animate(if(success) KEBBIT_ANIM else MISS_ANIM)
|
||||
playAudio(player, getAudio(Sounds.HUNTING_NOOSE_2637))
|
||||
playAudio(player, Sounds.HUNTING_NOOSE_2637)
|
||||
GameWorld.Pulser.submit(object : Pulse(KEBBIT_ANIM.duration){
|
||||
override fun pulse(): Boolean {
|
||||
if(hasTrail(player) && success){
|
||||
|
||||
@@ -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(), 1, 20);
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -102,14 +102,14 @@ public final class IceSpells extends CombatSpell {
|
||||
projectile.transform(entity, (Entity) target, false, 58, 10).send();
|
||||
}
|
||||
entity.animate(animation);
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 1, 20);
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 20);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visualizeImpact(Entity entity, Entity target, BattleState state) {
|
||||
if (state.isFrozen()) {
|
||||
playGlobalAudio(target.getLocation(), impactAudio, 1, 20);
|
||||
playGlobalAudio(target.getLocation(), impactAudio, 20);
|
||||
target.graphics(BARRAGE_ORB);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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(), 1, 20);
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,7 +20,6 @@ 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;
|
||||
|
||||
/**
|
||||
@@ -100,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(), 1, 20);
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 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(), 1, 20);
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -77,7 +77,7 @@ public final class HumidifySpell extends MagicSpell {
|
||||
p.lock(ANIMATION.getDuration() + 1);
|
||||
p.animate(ANIMATION);
|
||||
p.graphics(GRAPHIC);
|
||||
playGlobalAudio(p.getLocation(), Sounds.LUNAR_HUMIDIFY_3614, 1, 20);
|
||||
playGlobalAudio(p.getLocation(), Sounds.LUNAR_HUMIDIFY_3614, 20);
|
||||
for (int k = 0; k < 28; k++) {
|
||||
for (int i = 0; i < 21; i++) {
|
||||
if (p.getInventory().contains(EMPTY[i], 1)) {
|
||||
|
||||
@@ -13,7 +13,6 @@ import core.game.node.entity.combat.ImpactHandler
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.link.TeleportManager
|
||||
import core.game.node.entity.player.link.audio.Audio
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.node.item.Item
|
||||
import core.game.node.scenery.Scenery
|
||||
@@ -40,91 +39,91 @@ class LunarListeners : SpellListener("lunar"), Commands {
|
||||
|
||||
onCast(Lunar.MOONCLAN_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,69, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,1), Item(Items.EARTH_RUNE_557,2)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,66.0, Location.create(2111, 3916, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.MOONCLAN_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,70, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,1), Item(Items.EARTH_RUNE_557,4)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,67.0,"Moonclan Island",Location.create(2111, 3916, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.OURANIA_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,71, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,1), Item(Items.EARTH_RUNE_557,6)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,69.0, Location.create(2469, 3247, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.WATERBIRTH_TELEPORT, NONE){ player, _ ->
|
||||
requires(player,72, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563), Item(Items.WATER_RUNE_555)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,71.0, Location.create(2527, 3739, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.WATERBIRTH_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,73, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563), Item(Items.WATER_RUNE_555,5)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,72.0,"Waterbirth Island", Location.create(2527, 3739, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.BARBARIAN_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,75, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.FIRE_RUNE_554,3)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,76.0, Location.create(2544, 3572, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.BARBARIAN_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,77, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.FIRE_RUNE_554,6)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,77.0,"Barbarian Outpost", Location.create(2544, 3572, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.KHAZARD_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,78, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.WATER_RUNE_555,4)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,80.0, Location.create(2656, 3157, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.KHAZARD_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,79, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.WATER_RUNE_555,8)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,81.0, "Port Khazard", Location.create(2656, 3157, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.FISHING_GUILD_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,85, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,10)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,89.0, Location.create(2611, 3393, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.FISHING_GUILD_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,86, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,14)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,90.0,"Fishing Guild", Location.create(2611, 3393, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.CATHERBY_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,87, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,10)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,92.0, Location.create(2804, 3433, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.CATHERBY_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,88, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,15)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,93.0,"Catherby", Location.create(2804, 3433, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.ICE_PLATEAU_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,89, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,8)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,96.0, Location.create(2972, 3873, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.ICE_PLATEAU_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,90, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,16)))
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
if (!player.isTeleBlocked) playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,99.0, "Ice Plateau", Location.create(2972, 3873, 0))
|
||||
}
|
||||
|
||||
@@ -487,7 +486,7 @@ class LunarListeners : SpellListener("lunar"), Commands {
|
||||
visualizeSpell(player, CURE_ME_ANIM, CURE_ME_GFX, 2880)
|
||||
curePoison(player)
|
||||
addXP(player, 69.0)
|
||||
playAudio(player, Audio(2900))
|
||||
playAudio(player, Sounds.LUNAR_CURE_OTHER_INDIVIDUAL_2900)
|
||||
sendMessage(player, "You have been cured of poison.")
|
||||
}
|
||||
|
||||
@@ -505,7 +504,7 @@ class LunarListeners : SpellListener("lunar"), Commands {
|
||||
}
|
||||
curePoison(acct)
|
||||
sendMessage(acct, "You have been cured of poison.")
|
||||
playAudio(acct, Audio(2889), true)
|
||||
playGlobalAudio(acct.location, Sounds.LUNAR_CURE_OTHER_INDIVIDUAL_2889)
|
||||
visualize(acct, -1, CURE_GROUP_GFX)
|
||||
}
|
||||
addXP(player, 74.0)
|
||||
@@ -533,7 +532,7 @@ class LunarListeners : SpellListener("lunar"), Commands {
|
||||
player.face(p)
|
||||
visualizeSpell(player, CURE_OTHER_ANIM, CURE_OTHER_GFX, 2886)
|
||||
visualize(p, -1, CURE_OTHER_GFX)
|
||||
playAudio(p, Audio(2889), true)
|
||||
playGlobalAudio(p.location, Sounds.LUNAR_CURE_OTHER_INDIVIDUAL_2889)
|
||||
removeRunes(player, true)
|
||||
curePoison(p)
|
||||
sendMessage(p, "You have been cured of poison.")
|
||||
|
||||
@@ -193,19 +193,19 @@ public final class GodSpells extends CombatSpell {
|
||||
if (state.getEstimatedHit() == -1) {
|
||||
target.graphics(SPLASH_GRAPHIC);
|
||||
if (projectile == SARA_PROJECTILE) {
|
||||
playGlobalAudio(target.getLocation(), Sounds.SARADOMIN_STRIKE_FAIL_1656, 1, 20);
|
||||
playGlobalAudio(target.getLocation(), Sounds.SARADOMIN_STRIKE_FAIL_1656, 20);
|
||||
}
|
||||
if (projectile == GUTHIX_PROJECTILE) {
|
||||
playGlobalAudio(target.getLocation(), Sounds.CLAWS_OF_GUTHIX_FAIL_1652, 1, 20);
|
||||
playGlobalAudio(target.getLocation(), Sounds.CLAWS_OF_GUTHIX_FAIL_1652, 20);
|
||||
}
|
||||
if (projectile == ZAM_PROJECTILE) {
|
||||
playGlobalAudio(target.getLocation(), Sounds.FLAMES_OF_ZAMORAK_FAIL_1654, 1, 20);
|
||||
playGlobalAudio(target.getLocation(), Sounds.FLAMES_OF_ZAMORAK_FAIL_1654, 20);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
target.graphics(endGraphic);
|
||||
playGlobalAudio(target.getLocation(), impactAudio, 1);
|
||||
playGlobalAudio(target.getLocation(), impactAudio);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -256,7 +256,7 @@ class ModernListeners : SpellListener("modern"){
|
||||
player.animate(Animation(if (high) 713 else 712))
|
||||
player.graphics(Graphics(if (high) 113 else 112))
|
||||
}
|
||||
playAudio(player, Audio(if (high) 97 else 98))
|
||||
playAudio(player, if (high) Sounds.HIGH_ALCHEMY_97 else Sounds.LOW_ALCHEMY_98)
|
||||
|
||||
if (coins.amount > 0)
|
||||
player.inventory.add(coins)
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package content.global.skill.magic.modern
|
||||
|
||||
import core.api.getAudio
|
||||
import core.api.playAudio
|
||||
import core.api.sendMessage
|
||||
import core.api.*
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.player.Player
|
||||
import org.rs09.consts.Sounds
|
||||
import core.game.system.timer.PersistTimer
|
||||
|
||||
class SpellCharge : PersistTimer (700, "magic:spellcharge") {
|
||||
override fun run (entity: Entity) : Boolean {
|
||||
if (entity !is Player) return false
|
||||
sendMessage(entity, "Your magical charge fades away.")
|
||||
playAudio(entity, getAudio(1650))
|
||||
playAudio(entity, Sounds.CHARGE_GONE_1650)
|
||||
return 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(), 1, 20);
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user