Added missing sounds to agility pyramid

This commit is contained in:
Zerken
2023-03-01 02:45:09 +00:00
committed by Ryan
parent 716fcb7209
commit 81321e44e1
3 changed files with 16 additions and 0 deletions
@@ -193,6 +193,7 @@ public final class AgilityPyramidCourse extends AgilityCourse {
player.getPacketDispatch().sendMessage("You must be level 30 agility or higher to climb down the rocks."); player.getPacketDispatch().sendMessage("You must be level 30 agility or higher to climb down the rocks.");
return; return;
} }
player.getAudioManager().send(2454, 6);
if (!scale) { if (!scale) {
ForceMovement.run(player, player.getLocation(), end, Animation.create(740), Animation.create(740), Direction.WEST, 13).setEndAnimation(Animation.RESET); ForceMovement.run(player, player.getLocation(), end, Animation.create(740), Animation.create(740), Direction.WEST, 13).setEndAnimation(Animation.RESET);
} else { } else {
@@ -222,10 +223,12 @@ public final class AgilityPyramidCourse extends AgilityCourse {
if (fail) { if (fail) {
Location end = player.getLocation().transform(d, 1); Location end = player.getLocation().transform(d, 1);
player.lock(3); player.lock(3);
player.getAudioManager().send(1397, 10, 25);
AgilityHandler.failWalk(player, 2, player.getLocation(), end, end, Animation.create(1106), 15, getHitAmount(player), "You lost your balance!"); AgilityHandler.failWalk(player, 2, player.getLocation(), end, end, Animation.create(1106), 15, getHitAmount(player), "You lost your balance!");
AgilityHandler.forceWalk(player, -1, end, player.getLocation(), ForceMovement.WALK_ANIMATION, 10, 0.0, null, 4); AgilityHandler.forceWalk(player, -1, end, player.getLocation(), ForceMovement.WALK_ANIMATION, 10, 0.0, null, 4);
return; return;
} }
player.getAudioManager().send(2453,10, 40);
AgilityHandler.forceWalk(player, 0, player.getLocation(), player.getLocation().transform(d, 2), Animation.create(1252), 6, 8, "... and make it over."); AgilityHandler.forceWalk(player, 0, player.getLocation(), player.getLocation().transform(d, 2), Animation.create(1252), 6, 8, "... and make it over.");
player.animate(Animation.RESET, 4); player.animate(Animation.RESET, 4);
} }
@@ -242,8 +245,10 @@ public final class AgilityPyramidCourse extends AgilityCourse {
final boolean fail = player.getSkills().getLevel(Skills.AGILITY) < 75 && hasFailed(player); 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); 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..."); player.getPacketDispatch().sendMessage("You put your foot on the ledge and try to edge across...");
player.getAudioManager().send(2451, 5);
if (fail) { if (fail) {
player.lock(4); player.lock(4);
player.getAudioManager().send(2455, 10, 125);
AgilityHandler.walk(player, -1, player.getLocation(), end, Animation.create(157 - diff), 0.0, "You slip and fall to the level below."); 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) { GameWorld.getPulser().submit(new Pulse(3, player) {
@Override @Override
@@ -290,11 +295,13 @@ public final class AgilityPyramidCourse extends AgilityCourse {
final boolean fail = player.getSkills().getLevel(Skills.AGILITY) >= 75 ? false : hasFailed(player) ; 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); 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..."); 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...");
player.getAudioManager().send(2480, 3);
if (fail) { if (fail) {
GameWorld.getPulser().submit(new Pulse(2, player) { GameWorld.getPulser().submit(new Pulse(2, player) {
@Override @Override
public boolean pulse() { public boolean pulse() {
final Location dest = transformLevel(end.transform(!custom ? 2 : 0, custom ? -2 : 0, 0)); final Location dest = transformLevel(end.transform(!custom ? 2 : 0, custom ? -2 : 0, 0));
player.getAudioManager().send(2455, 10, 50);
AgilityHandler.failWalk(player, 2, end, dest, dest, Animation.create(764), 10, 10, null); AgilityHandler.failWalk(player, 2, end, dest, dest, Animation.create(764), 10, 10, null);
return true; return true;
} }
@@ -322,10 +329,12 @@ public final class AgilityPyramidCourse extends AgilityCourse {
} }
dest = transformLevel(dest); dest = transformLevel(dest);
player.lock(8); player.lock(8);
player.getAudioManager().send(2463, 10, 30);
AgilityHandler.forceWalk(player, -1, player.getLocation(), end, Animation.create(3068), 10, 0.0, "... and miss your footing."); AgilityHandler.forceWalk(player, -1, player.getLocation(), end, Animation.create(3068), 10, 0.0, "... and miss your footing.");
AgilityHandler.fail(player, 8, dest, null, 8, null); AgilityHandler.fail(player, 8, dest, null, 8, null);
return; return;
} }
player.getAudioManager().send(2462, 10 , 30);
player.lock(4); player.lock(4);
AgilityHandler.forceWalk(player, 2, player.getLocation(), player.getLocation().transform(dir, 3), Animation.create(3067), 20, 22, null); AgilityHandler.forceWalk(player, 2, player.getLocation(), player.getLocation().transform(dir, 3), Animation.create(3067), 20, 22, null);
} }
@@ -342,6 +351,8 @@ public final class AgilityPyramidCourse extends AgilityCourse {
final int rot = object.getRotation(); final int rot = object.getRotation();
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; 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); final Animation animation = Animation.create(387 - mod);
player.getAudioManager().send(2450);
player.getAudioManager().send(2455, 10, 170);
if (fail) { if (fail) {
Location dest = object.getLocation().transform(dir, 1); Location dest = object.getLocation().transform(dir, 1);
dest = rot == 1 && dir == Direction.EAST ? dest.transform(1, 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); dest = rot == 1 && dir == Direction.EAST ? dest.transform(1, 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);
@@ -133,6 +133,8 @@ public final class MovingBlockNPC extends AbstractNPC {
} }
} }
player.lock(4); player.lock(4);
player.getAudioManager().send(1395);
player.getAudioManager().send(2469, 10 , 40);
player.setAttribute("block-move", GameWorld.getTicks() + 4); player.setAttribute("block-move", GameWorld.getTicks() + 4);
if(dest != null) { 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); AgilityHandler.failWalk(player, close ? 1 : 3, player.getLocation(), dest, AgilityPyramidCourse.transformLevel(dest), Animation.create(3066), 10, 8, null, getId() == 3124 ? Direction.WEST : Direction.SOUTH);
@@ -29,6 +29,9 @@ public final class RollingBlock implements MovementHook {
final boolean fail = backwards || AgilityHandler.hasFailed(player, 2, 0.3); final boolean fail = backwards || AgilityHandler.hasFailed(player, 2, 0.3);
player.lock(5); player.lock(5);
AgilityPyramidCourse.addConfig(player, stone, 1, false); AgilityPyramidCourse.addConfig(player, stone, 1, false);
player.getAudioManager().send(1396);
player.getAudioManager().send(2469, 10 , 40);
if(e.isPlayer()) if(e.isPlayer())
{ {
((Player) e).logoutListeners.put("rolling-block", p -> { ((Player) e).logoutListeners.put("rolling-block", p -> {